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
  • Here a few additional information on how to setup a chroot envirioment.

    ldd snort

    dispays all the dynamic linked binaries, make sure you have them in the chroot.

    strings snort | grep '/'

    displays all strings in the binary, this 
    are normaly used programms, dev and other files.

    chroot /var/chroot-snort/ strace -f -o chroot.log  /usr/bin/strace -f -ostrace.log snort

    This starts snort in the change root with strace. In the strace.log you can see all errors and problem.

    I hope that helps, 

    Greeting form germany

    Gert
  • 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
Reply
  • 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
Children