AfterGlow Cloud is a security visualization tool which lets users upload data and visualize the data as graphs on-the-fly. This project is a part of Google's Summer of Code 2012 under The Honeynet Project.
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.
- Apache 2 (or an alternate, see above)
- 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
You will also have to sign up for specific API keys and mention settings at settings.py (Step #6 below)
- 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
- Install Django 1.4.0 and the libraries AfterGlow requires:
~$ sudo pip install Django==1.4.0 recaptcha-client easy_thumbnails oauth2
- Clone this repository to obtain the application files:
~$ git clone https://github.com/ayrus/afterglow-cloud.git
- 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/
- Create a database for AfterGlow to use (this example will use the database name as "af").
$ mysql -u user -p
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)
settings.pyat 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.
Create tables in the database with Django's
~/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)
- At this point, the application should be ready to run in a development
environment (with django's
runserver). To deploy it on Apache with
/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
WSGIPythonPathdeclaration goes in
/etc/apache2/httpd.confand the rest of the above should go in your
VirtualHostdeclaration 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.
- 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 ).
A first version of this application (development version) can be found in a
Blog post detailing the features available in the first version can be viewed here.
Contacts / Bugs
You can reach or report a bug using the contact form available on the demo.