Skip to content

AfterGlow Cloud is a security visualization tool which lets users upload data and visualize the data as graphs on-the-fly (part of Google Summer of Code 2012).

Notifications You must be signed in to change notification settings

ayrus/afterglow-cloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AfterGlow-Cloud

About

AfterGlow Cloud is a visualization tool which lets users upload data and visualize the data as graphs on-the-fly. This project was part of Google's Summer of Code 2012 under the The Honeynet Project.

The core of this tool is based on the command-line tool AfterGlow. AfterGlow Cloud runs primarily on Django. A live demo can be found here.

Installation

Following provides installation requirements and procedure for AfterGlow Cloud. At a production level, since AfterGlow runs on Django; it can be deployed in a number of ways. This document however will only deal with deploying the application on Apache with mod_wsgi. If you choose to deploy it with another choice, please refer the to guidelines in the official Django documentation.

AfterGlow also requires a database system on its backend to handle its operations. Instructions below refer to using MySQL. You can again, however use any of the compatible systems that Django supports.

Instructions below are also specific to a machine running Ubuntu. If your targetted environment doesn't run Ubuntu you will have to satisfy the requirements below (specific to the distribution you are using) and then attempt to run the application.

###Requirements:

  • Apache 2 (or an alternate, see above)
  • mod_wsgi
  • MySQL (or an alternate, see above)
  • Python MySQL bindings (or an alternate, see above)
  • Python Imaging Library (PIL)
  • Django 1.4.0
  • GraphViz Library
  • Perl Text::CSV package
  • Django libraries:
  • ReCaptcha client
  • Easy thumbnails
  • OAuth2

You will also have to sign up for specific API keys and mention settings at settings.py (Step #6 below)

###Instructions:

  1. Most of the above packages can be installed on a Ubuntu machine with the following; even if you have a fresh install of Ubuntu. Missing packages (or all) are installed. It's also assumed that you'd want to install the application in your home folder, merely as an example (throughout the document):

$ sudo apt-get install git apache2 libapache2-mod-wsgi mysql-server libmysqlclient-dev
$ sudo apt-get install python-pip python-mysqldb libtext-csv-perl graphviz python-imaging

  1. Install Django 1.4.0 and the libraries AfterGlow requires:

~$ sudo pip install Django==1.4.0 recaptcha-client easy_thumbnails oauth2

  1. Clone this repository to obtain the application files:

~$ git clone https://github.com/ayrus/afterglow-cloud.git

  1. Change permissions of certain folders to rwxrwxrwx (these folders are written to by Apache while performing various operations):

$ cd afterglow-cloud/afterglow_cloud/
/afterglow-cloud/afterglow_cloud$ chmod 777 user_config/ user_data/ user_logs/ user_logs_parsed/
afterglow_cloud/app/static/gallery/ afterglow_cloud/app/static/gallery_thumbs/ afterglow_cloud/app/static/rendered/

  1. Create a database for AfterGlow to use (this example will use the database name as "af").

$ mysql -u user -p

Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.

Once logged in to the MySQL prompt, create the database:

mysql> create database af;

Query OK, 1 row affected (0.00 sec)

  1. Edit settings.py at afterglow_cloud/settings.py (if you're currently in ~/afterglow-cloud/afterglow_cloud). This file contains important configuration for the application to run. You'll have to edit Lines #10-88 with the instructions inside. The file has been commented in detail to help you out.

  2. Create tables in the database with Django's syncdb command.

~/afterglow-cloud/afterglow_cloud$ python ../manage.py syncdb

If everything went well, you should see something like this:

Creating tables ...
Creating table auth_permission
.
.
.
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

  1. At this point, the application should be ready to run in a development environment (with django's runserver). To deploy it on Apache with mod_wsgi:

Open /etc/apache2/httpd.conf in an editor and add the following:
(your username is assumed to be foo, and as indicated earlier it's assumed that you've cloned the application files to your home folder).

WSGIPythonPath /home/foo/afterglow-cloud/afterglow_cloud

Alias /static/ /home/foo/afterglow-cloud/afterglow_cloud/afterglow_cloud/app/static/

<Directory /home/foo/afterglow-cloud/afterglow_cloud/afterglow_cloud/app/static>
Order deny,allow
Allow from all
</Directory>

WSGIScriptAlias / /home/foo/afterglow-cloud/afterglow_cloud/afterglow_cloud/wsgi.py

<Directory /home/foo/afterglow-cloud/afterglow_cloud/afterglow_cloud>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>

Note: Several assumptions have been made above.

  • You do not have any sites enabled on Apache. If you do, ideally the WSGIPythonPath declaration goes in /etc/apache2/httpd.conf and the rest of the above should go in your VirtualHost declaration for the site you want to enable/serve the application with.

  • It is also assumed that you'd want to use Apache to serve the static files as well. You can however serve it with another dedicated server as mentioned in the documentation.

  1. Reload and restart apache:

$ sudo service apache2 reload
$ sudo service apache2 restart

You should now have the application running in complete from your Apache server.
(if you followed these instructions as-is, this would ideally be at http://localhost ).

Links

Blog post detailing the features available in the first version can be viewed here.

Contacts / Bugs

Questions / Comments? Email us at afterglow@secviz.org.

About

AfterGlow Cloud is a security visualization tool which lets users upload data and visualize the data as graphs on-the-fly (part of Google Summer of Code 2012).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •