snort IDS on internal nic?

G'Day

It is certainly feasable. Bear in mind that you should run SNORT in a CHROOT environment in this situation. 

There are various CHROOT environments in /VAR... Copy one and place a SNORT distribution in it. If you have never dealt with CHROOT before you might have some fun, but it is feasable.

As far as I can tell, ASTARO is LINUX with configuration software that makes it into a firewall appliance. There is still bare LINUX underneith.

Darryl
Parents
  • Great. I've never played with CHROOT before, but I have a friend who is a Linux Admin. I'll bribe him with some beer and pizza and see if I can get it to work. Do you know of any good HOW-TOs that explain CHROOT?
  • Hi There...

    The basics of CHROOT are
       cd directory
       chroot .
    Where LINUX now thinks that the directory and it's sub directories IS the entire system. There are scripts showing how ASL sets up CHROOT in /etc/rc.d and also maybe in the chroot environment. 

    The idea is that if anyone does break in using snort all they can affect is the snort environment. There is no way back to the rest of the system. The rest of the system can go the orther way though.

    I tend to develop in a CHROOT in one window, and a non-chroot in another. There are generally no or few utilities in a chroot environment. Oh, and devices might not be available in CHROOT unless you create them :-). 

    Basically you are setting up a miniture LINUX distribution in directories...

    Hope this helps

    Darryl
  • Thanks for the great replies. I'm pretty lost so far, so this will be a fun learning experience.

    As a side note, are there any plans for ASL to include a IDS system in the firewall? Traditionally, IDS type systems have sat on a network segment and passively logged packets. The trend I am seeing now is for IDS systems to become actively involved in the network and drop/block packets for certain exploits. It would be great if (example) the firewall could spot a IIS Unicode attack and drop it without letting it pass into the network while telling the firewall to drop packets from the source address along the way. Is this a possibility, or would the computational time add severe latency onto the incoming and outgoing packets?
  • G'Day

    I have just set SNORT up in a CHROOT environement... SNORT is sort of cool beucase it has it's own CHROOT from the command line. This makes things easier.

    When I compiled SNORT on my other LINUX box, it had libpg and libm linked. libpg is postgres SQL and is easy to remove, and is only linked if the lib is on the compiling system. As for libm, I needed to remove that from the MAKEFILE after configure. It is not actually needed.

    After compiling I created a folder called /var/chroot-snort and under it I put all the snort -lib files and snort itself in a directory called snort. I also created a directory called log to store the portscan log, although I actually log to syslogd.

    I created a file /etc/rc.d/snort, and it appears below.



    Astaro logs all the SNORT warnings to /var/log/auth through syslogd. I also copies snort2html.pl from the contrib directory in snort to the snort directory. I told it to look at the auth log file, and to place the generated HTML in /usr/local/html/htdocs . This should be run periodically through cron.

    I can then type https://1.2.3.4/snort2html.html and I can get the HTML listing of snort rule violations.

    I can tar all my work up and put it somewhere if people would like

    Darryl
  • quote:
    I can tar all my work up and put it somewhere if people would like

    Darryl 
      


    Please do, I for one would be greatful. So far, this software seems to be stable enough to possibly install for clients, the SNORT integration would really help   [;)]
  • Hi...

    My snort files are on  http://www.ozemail.com.au/~vk2tds/snort-asl.tgz

    Untar them to /var/chroot-snort, which should happen if you untar from the root directory.

    Let me know how it goes

    Darryl
  • An update...

    a) I have now got SNORT2HTML running every 15 minutes. The addition to the /etc/crontab file appears below...



    b) NOTE: /var/log/auth is archived each night. Therefore snort2html is will only read the activity since midnight. The script can be hacked to change this...

    c) The copy of snort2html is an old-ish one... A new copy can be found at http://www.geocities.com/swan_daniel/snort2html.txt

    Darryl
  • How exactly did you get the files over there? I've tried using a floppy but can't get the drive to mount (no kernel support?) and ftp doesn't work either. I can't think of any other way to get them there ...
  • Nevermind, I was mounting to the wrong place. It is:

    mount -t ext2 /dev/fd0 /floppy

    NOT

    mount -t ext2 /dev/fd0 /mnt/floppy

    friz
  • The easy way to get files around is to use SCP. It is basically SSH... Do a search on this site for SCP and WinSCP

    Darryl
  • Hi hackers,

    please add your private crontab entries under /etc/ with the filename syntax crontab.YOUR_PROJECT_NAME and our MiddleWare will include your entrie automatically after restarts or config changes via WebAdmin.
  • I played with this a little over the weekend, but I'm having tons of problems out of the HD in the machine, so I gotta replace it before doing anything else...

    I was planning on using MySQL rather than postgres SQL, I belive there is a build (or source) for MySQL on the snort site. Also, I was going to use ACID just cause I am more familiar with it (although nothing is locked in stone). From a performance stand point, should I go with the method above or try the ACID/SQL route? Will these scripts work for that as well? 

    Darryl, great work on the scripts btw.
Reply
  • I played with this a little over the weekend, but I'm having tons of problems out of the HD in the machine, so I gotta replace it before doing anything else...

    I was planning on using MySQL rather than postgres SQL, I belive there is a build (or source) for MySQL on the snort site. Also, I was going to use ACID just cause I am more familiar with it (although nothing is locked in stone). From a performance stand point, should I go with the method above or try the ACID/SQL route? Will these scripts work for that as well? 

    Darryl, great work on the scripts btw.
Children