27.06.2013 Views

Hack Security Pro.pdf - Index of

Hack Security Pro.pdf - Index of

Hack Security Pro.pdf - Index of

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Configure snort so that it can store its results in the sql database. In the configuration file, add the rule:<br />

output database:log,mysql,user=user_snort password=snort_pwd dbname=snort host=localhost<br />

Then we can create the snort database.<br />

mysql<br />

>create database SNORT;<br />

>use mysql;<br />

>snort insert into user values('localhost', 'user_snort', password('snort_pwd'), 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',<br />

'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', '', '', '', '', 'Y', 'Y', 'Y');<br />

>ALL PRIVILEGES ON SNORT.* TO user_snort@localhost IDENTIFIED BY 'snort_pwd' WITH<br />

GRANT OPTION;<br />

>flush privileges;<br />

>use snort;<br />

>Source create_mysql<br />

All that needs to be done now is to configure ACID so that it displays the snort results. You can<br />

download it at http://www.andrew.cmu.edu/user/rdanyliw/snort/snortacid.html. You will also need<br />

adodb http://php.weblogs.com/adodb, and PHPlot http://www.phplot.com.<br />

Then execute the following commands (make sure that /var/www is well and truly Apache's<br />

DocumentRoot):<br />

cd /var/www/<br />

tar -xvzf acid*<br />

tar -xvzf adodb*<br />

tar -xvzf phplot*<br />

Finally, in the /var/www/acid/acid_conf.php configuration file, fill in the following values:<br />

$DBlib_path="../adodb";<br />

$Chartlin_path="../phplot";<br />

alert_dbname="snort"<br />

alert_host="localhost"<br />

alert_user="user_snort"<br />

alert_password="snort_pwd"<br />

You will then be able to see the results <strong>of</strong> the logs on http://serv/acid/.<br />

The <strong>Hack</strong>ademy DMP -183/209- SYSDREAM

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!