Blog-N-Play.com
Anytime a feature of a framework gives me something for free that I don't need to manually implement I'm a happy camper. One such feature of ASP.NET MVC 2 is jQuery client-side validation. The
Read Digital Edition


ADS BY GOOGLE
Most Read This Week
Top Three Links You Must Click On


How to detect intruders with ACID
Installing the favorite intrusion detector takes free software & a little patience

(LinuxWorld) -- I wanted to try ACID ever since someone rooted my server last year. Mind you, not the hallucinogen LSD, though at the time I might have been tempted. The ACID I'm talking about is the Analysis Console for Intrusion Databases. It allows you to display and examine alerts from Snort in almost real-time. Snort, of course, is the wonderful open source Intrusion Detection System (IDS) by Marty Roesch. You can read all about my introduction to Snort by following the link given in Resources below. Another link in Resources points to a primer on installing Snort. It's a favorite of security people around the globe. I understand that some IT staffs prefer it to commercial offerings, and not just because of its price.

It all begins with Snort...

My ACID trip began with the Snort install. Please note that almost all the packages required to get ACID up and running make use of what you've done in installing other packages. Do your Apache install incorrectly, and PHP won't work. If you want to use Snort with MySQL and various bits associated with MySQL aren't found, Snort's configure script will throw up its hands in defeat.

My first download was Snort itself. I found version 1.8.4 on a mirror listed on the Snort.org Web site. The download includes Martin Roesch's fine Snort manual in PDF dated March 13, 2002. There are also a number of handy README.* files. If you plan to install ACID, the database README is vital. Snort supports MySQL, PostgreSQL, Oracle, and any Unix ODBC.

...then MySQL...

I chose MySQL because to my mind this is exactly the kind of application it does best. Others will go with PostgreSQL, Oracle, or whatever and have their own reasons for doing so. I began by installing MySQL 3.23.49a-1 from the Red Hat 7.2 RPM.

Turning back to Snort, I ran the configure script with the indicated database enabled (with-mysql). It complained about not finding mysql.h and failed. Well, no wonder it couldn't find it. It wasn't on my system. I installed the MySQL development RPM from the Red Hat CD and tried again, adding a complete path to the header file. Configure didn't like that either. I peeked at the source for the configure script and found that it was appending an include/mysql/mysql.h to the directory I was specifying. I chopped the path to simply with-mysql=/usr and it worked just fine.

After running the supplied scripts to create the Snort database and then assigning a user and password with rights to the database, I started to hack the snort.conf file. I uncommented the output database: log (etc) line with the appropriate database name, user, and password. Then I entered an identical line for output database: alert (etc)". To start snort running (and logging/alerting to the MySQL database) I simply entered snort -D -c /etc/snort/snort.conf.

...then Apache, PHP, ADOdb...

Of course, I was after more than just running Snort. The goal of my exercise was to provide alert data in a flash, and in an attractive GUI format at that. I needed ACID, and ACID needs Apache and ADOdb. Apache needs to speak both PHP and MySQL, and PHP needs to speak MySQL as well. It also needs the GD graphing library. It can all get confusing.

Next came Apache. I grabbed the 1.3.24 tar ball from a mirror of the Apache.org site because my pre-installed Apache binary wasn't adequate for the task. My successful Apache build came after a number of flawed attempts. It was based on the following configure statement:

./configure --enable-module=most --enable-shared=max

Then came PHP. It took me considerably longer to get PHP built correctly. Some the wasted time came about because of mistakes I made with initial builds of Apache. Until I got Apache right, it didn't really matter whether I got the PHP configure correct. Here is the configure statement that finally moved me along:

./configure --with-mysql=/usr --with-apxs=/usr/local/apache/bin/apxs --with-gd

Now I was nearly there. First, I needed to add ADODB in order to standardize PHP's database interfaces. That was as easy as downloading and uncompressing the ADODB PHP pages, then moving them into /usr/local/apache/htdocs. Next came the GD graphics library and phplot. After downloading GD from the Web site, I followed the instructions in readme.txt and ran make install. This put libgd.so in /usr/local/lib. I made sure that directory was included in /etc/ld.so.conf, then ran /sbin/ldconfig.

phplot was pre-tweaked to use PNG images, so I had nothing to change in it. I simply moved the PHP files into the same spot I was putting everything else: /usr/local/apache/htdocs.

...then finally, ACID

Finally, it was time for ACID. I downloaded it and copied the contents of the directory created when I uncompressed the tar ball into the same Apache htdocs directory. I edited the acid_conf.php file to give it the particulars on the Snort database, including the user name and password to use, and to tell it where ADOdb and phplot were located.

The first time I used ACID (pointing my Galeon browser at http://localhost:8080), it needed to add a couple of columns to the Snort database. I simply followed the cues on the Update page and it did all the work. All I needed to do was let Snort gather data.

To help that process along, I asked LUG members to scan my IP address. That request yielded more than 10,000 alerts in 2 hours. It also revealed a huge security hole on my system. ACID itself was available to anyone sending HTML requests to port 8080 at my IP address, and one of the volunteer scanners told me he had used ACID to search for his own IP in the alert database.

The point is to remember to secure access to Apache if you are following along on your own system. I have since changed my httpd.conf from "Allow from any" to "Allow from 127.0.0.1". Be sure to read the PHP documentation carefully for security tips as well, because it has its own security issues.

The ACID home page (shown below) provides running totals of the various types of alerts (TCP, UDP, and ICMP) and port scanning activity. By default, these totals are refreshed every 3 minutes. You can hack acid_conf.php to turn the refreshing on or off, or to change the interval between refreshments. ACID also allows you to choose from several tools with which to analyze the database.

Options include about half a dozen "canned" reports showing the most recent alerts, the most common alerts, alerts for the past day, and so on. For real security analysts, ACID's real value probably comes not from any one of the packaged "snapshots" but from its search capabilities.

The Search page allows you to specify almost any type of search criteria for a database query: from IP address to packet payload to category of alert to time of day. If you can name it, most likely you can find a place to specify it.

The image below shows a graph of alerts by hour in a day. The graphing functionality is still noted as being experimental, but it allows you to define all the parameters for about a dozen types of graphing.

ACID Custom Graph

ACID, written by Roman Danyliw, is part of a larger project called AirCERT. AirCERT seeks to create a global Internet repository of security alerts or anomalies from selected local sites. Among other things, this will allow for quicker identification of the signatures of new attacks and threats.

About Joe Barr
Joe Barr is a freelance journalist covering Linux, open source and network security. His 'Version Control' column has been a regular feature of Linux.SYS-CON.com since its inception. As far as we know, he is the only living journalist whose works have appeared both in phrack, the legendary underground zine, and IBM Personal Systems Magazine.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

Armor2net Personal Firewall, a program for the Windows operating system that helps protect computers from the threats on the Internet and World Wide Web. With Armor2net Personal Firewall in place, end-users can breathe a sigh of relief.
For more information, please visit: http://www.armor2net.com

Armor2net Personal Firewall software provides a complete spectrum of Internet security and Internet privacy for computers. The program protects the computer from hackers, data thieves, and other Internet-based dangers.
For more information, please visit: http://www.armor2net.com


  Subscribe to our RSS feeds now and receive the next article instantly!
In It? Reprint It! Contact advertising(at)sys-con.com to order your reprints!
Subscribe to the World's Most Powerful Newsletters
Linux Links You Must Click On !

Lo Ultimo
La embajadora mundial de AvonReese Witherspoon ha sido anfitriona de una fiesta del té exclusiva par...

GameStop Corp. (NYSE:GME), la empresa minorista de software de videojuegos y entret...

Un estudio online publicado esta semana en Science ha demostrado que SPC3649, una revolucionaria ter...
Microsoft Corp. ha anunciado hoy una oleada de informes voluntarios - más de 150.000 en los dos últi...
Tras dos décadas de éxito demostrado a nivel científico y médico en su campo, los expertos de Lightl...
ADS BY GOOGLE
Some people say “oh, you’re dual licensing like MySQL. So does that mean that I get to use it and no...
Michael Bell, founder of Methodologies Corporation, the leading service-oriented modeling company, a...
Dune Networks' Highly Scalable Switch Fabric Technology Expands Broadcom's Product Portfolio for Dat...
M86 Security, a leading global provider of Web and messaging security products, released Predictions...
JetBrains, creators of intelligent, productivity-enhancing development tools, announced the public a...
Researchers from Intel Labs demonstrated an experimental, 48-core Intel processor, or “single-chip c...
The irony is that Oracle has advanced MySQL, lost money in the process, and helped its competitors -...
The founders of Crystal Reports and veterans of Microsoft, Symmetrics and Business Objects have laun...
I first met Mark Fishburn at the Convergence Technology Council (CTC) in Calabasas, California. Mark...
Concerns about the security of cloud computing environments top the list of reasons for firms not be...
WSO2, the open source SOA company, today announced the launch of the WSO2 Cloud Platform. Available ...
Red Hat Enterprise Linux running on Intel® processor-based servers helps your customers reduce TCO, ...
Now is the time to examine the TCO migrating from Unix to the more cost-effective open systems platf...
Making the right choices around technology is critical to the success of your business. Finding out ...
Dell is transferring ownership of its new factory in Poland over to contract manufacturer Foxconn Te...
Michael Donnelly, Group Director Worldwide Interactive Marketing, Coca-Cola and Michael Buck Global ...
To address this need, increasing numbers of healthcare organizations are evaluating enterprise imagi...
Some great news came out of Sun Microsystems yesterday with the release of VirtualBox 3.1.o. This is...
IGEL's Linux firmware now supports popular touchscreen monitors, including the LG L1730SF Monitor an...
Thales announces SafeSign Mobile Authentication which enables strong authentication using a mobile d...