Slashdot Mirror


Using Snort Stealthily

jukal writes "Linux Journal has an article on using Snort as stealth sniffer, a stealth NDIS probe and stealth loger -- on a network interface with no IP address. 'Snort is a versatile and powerful tool for sniffing, intrusion detection and packet logging. Configuring it to run stealthily in sniffing mode or NIDS mode is easy; incorporating it into a stealth-logging solution is only slightly less so'"

16 of 148 comments (clear)

  1. Re:Snort UI by HappyPhunBall · · Score: 3, Informative

    The "133t hax0r" type you mentioned is much more likely to be trying to avoid snort than deploying it.

    You can find some snort enhancements at this site. Have fun.

  2. Re:Warning by flonker · · Score: 5, Interesting

    It's easy to remain undetected with a custom patch cord, (no transmit). IIRC, 10BaseT, you simply didn't set up the TX wires, and 100BaseT, you untwisted one of the twisted pairs.

    It's even possible to remain undetected with software only, but you *really* need to know what you're doing. Stuff can be detected on the ethernet layer that most people aren't aware of.

  3. Re:Even more simple ... by vofka · · Score: 5, Insightful

    Unfortunately, firewalls are not the be-all and end-all of network security... A firewall can effectively protect your network from malicious access from the outside world, however it can not prevent hack-attacks on your systems which originate from within your network.

    There are two primary reasons for hack-attacks originating inside a firewalled-zone:
    1. A trojaned system, usually due to poor Antivirus policy and/or poor user education.
    2. A Disgruntled employee who is out to get you!

    Obviously, the best solutions to these problems are to implement a good Antivirus product and virus protection policy, and to keep your employees happy!

    Unfortunately, no matter how hard you try, there are always likely to be problems you have not forseen - which is where Sniffers and NIDS tools come in. Whilst these tools are also not the sole answer to anyone's prayers, they can often help as part of an overall security system implementation.

    Snort is (IMHO) one of the best NIDS tools out there - I have used Snort for a couple of years as part of an integrated security solution, and the logfiles it generates, once properly parsed, have helped me track down a number of threats to network security, and plug any holes present before the problems became serious.

    Firewalls are not a panacea, nor are NIDS tools, used together though, they are much more than the sum of their parts....

    --
    Disclaimer: I meant what I thought, not what I wrote! What? You can't read my Mind? Oh dear!
  4. Re:Snort is okay by ericman31 · · Score: 3, Insightful

    Funny, I can have my SNORT installation log to Oracle, MSSQL Server, MySQL, PostGreSQL, etc. And I can perform vulnerability assessments, etc. By adding on ACID (from CERT) and logsnorter, I can integrate my firewall logs and view everything through a very nice web UI. Best of all, except for the hardware I run it on, and the work, my IDS and vulnerability assessment platform hasn't cost me a dime.

    And your "superior SQL Server 2000" has more holes than swiss cheese, which is why I'm using MySQL in a secured, private network, for my logs.

    --
    In my universe I'm perfectly normal, it's not my fault you don't live in my universe.
  5. Interesting challenge by DragonWyatt · · Score: 4, Interesting
    Unfortunately, the NIC can still introduce errors and whatnot onto the segment... Also, don't forget that not all traffic on an ethernet segment is IP!

    The biggest problems are:
    1. A switch can mangle the packets a little before they're port-mirrored
    2. How exactly DOES one monitor >100mbit full-duplex traffic using only a single 100mbit port :) ? (dropped packets are a significant reality on a busy network)
    'Course, what you REALLY need is a good, *electrically* transparent impedance matching tap, like one of these.
    --
    Don't sweat the petty things. But do pet the sweaty things.
    1. Re:Interesting challenge by ericman31 · · Score: 3, Interesting

      2. How exactly DOES one monitor >100mbit full-duplex traffic using only a single 100mbit port :) ? (dropped packets are a significant reality on a busy network)

      Simple, you connect your firewall to a hub on each interface. You then connect your hub to the switches (or routers) that carry network traffic for each interface. On that same hub you connect your IDS, running in stealth mode. The IDS will pick up all packets, since a hub simply repeats all traffic out every port. Those packets that are dropped outbound from the firewall will be caught by the firewall syslogs. Inbound packets that are dropped are going to be of little concern if they are dropped prior to the firewall interface.

      --
      In my universe I'm perfectly normal, it's not my fault you don't live in my universe.
    2. Re:Interesting challenge by jcostom · · Score: 3, Insightful
      How exactly DOES one monitor >100mbit full-duplex traffic using only a single 100mbit port :) ?

      Um, you don't. That's what Gigabit Ethernet is for. Check out the Intel Copper Gig cards - there's Linux support for them and they're reliable cards.

      On another note, I don't quite see how using 2 nics, one on a management LAN and the second with no IP bound to it doing the sniffing is a revelation! Shouldn't this just be common sense? After all, it's been a standard NIDS sensor practice for quite a long time now. To really do this job right, all of the sensors should be using a management LAN for reporting back to a MySQL/PostgreSQL database, which in turn is queried by ACID, or something similar..

      BTW, ACID's SQL is so terribly un-optimized, it's downright pitiful. I know of a large company that's getting ready to release a huge patch to ACID to actually optimize its SQL usage, bringing performance for large-scale snort deployments up to a reasonable level.

      --

      The unsig!
    3. Re:Interesting challenge by stinky+wizzleteats · · Score: 4, Informative

      Simple, you connect your firewall to a hub on each interface.

      Which would be a great idea, except that hubs are half-duplex.

  6. Re:Snort is okay by marmoset · · Score: 4, Interesting

    Whew, the ISS marketing guys really did a number on your mind, didn't they?


    I worked on intrusion detection at a site where we had two IDS systems set up in parallel, one based on RealSecure and the other being a custom tailored solution that utilized a "sensor" machine sitting in our DMZ with a quiet NIC, similar to what's described in the linked article. It used tcpdump for data collection, and saved most of our incoming and outgoing network traffic to a fast disk array for analysis (based on tcpdump filters.) Hourly scripts would process the saved packages with Snort (and a variety of other tools, some of them free and some of them custom written for us and the other sites on our WAN.)


    While RealSecure is fine for detecting bumbling script kiddies and obvious misconfigurations (like unpatched boxes becoming Nimda zombies), the tcpdump solution was far better at detecting the serious intrusion attempts, like the slow and low network probes with custom crafted packets, and telling us exactly who on our network was doing boneheaded things like using telnet across network boundaries. RealSecure's coming in a pretty box and costing a lot of money doesn't make it the end-all be-all of intrusion detection systems.


  7. Re:Even more simple ... by ericman31 · · Score: 4, Insightful

    The best analogy for defending your networks is a castle. Castles have moats, walls and an inner keep, all to protect the treasures of the kingdom (jewels, the princess, etc.). But, none of that does you any good without sentries watching the moat and walls who can report to the Captain of the Watch anything out of the norm. Your network defense should consist of a hardened router(the moat), firewall and DMZ (walls), and your private networks (the keep). You should have intrusion detection systems, syslogs from routers and firewalls and regular system monitoring (sentries). All of this should be parsed by a system that provides alerts for key events (report to the Captain of the Watch) and is also checked regularly by humans.

    --
    In my universe I'm perfectly normal, it's not my fault you don't live in my universe.
  8. A better article, and other links .... by ericman31 · · Score: 5, Informative
    --
    In my universe I'm perfectly normal, it's not my fault you don't live in my universe.
  9. Re:Snort is okay by RagManX · · Score: 4, Interesting
    But you are much better off using something like ISS' RealSecure

    The wonderful tool which is less configurable than Snort, doesn't log data as well, and provides less viewable data about packets which set off alerts.
    which feeds into either workgroup manager or their new flagship product, Site Protector.

    And this is better than Snort how? Snort can log to local or remote databases, text files, syslog, and probably other formats (but I haven't tried). It supports multiple output formats, so you can choose how you want to look at the data. It also supports loading a database from tcpdump files (Our training with ISS never covered how to do this with RealSecure, and I'm doubtful that it can be done).
    With that, you can dump all your events into a superior MS SQL 2000 server for event correlation, queries, and forensics.

    Superior in what way? It costs more than Postgres or MySQL, has more holes than any other database out there, and costs an insane amount of money compared to what most people running Snort would use (we use MySQL here, I know many people using Postgres, or you can dump to text files).
    You can also tie together your intrusion detection with your vulnerability assessment so, if you see a bunch of a certain kind of attack, you can automatically launch a vulnerability assessment with just that attack to ensure you have everything protected (and to make sure that there isn't a new development or test box sitting there insecure since you had no inkling of its existence).

    In the world of real security grunts, we like to call such a tool Nessus (http://www.nessus.org/). It scans for more vulnerabilities than ISS (the marketing claims by ISS notwithstanding), is updated more frequently, offers more flexibility in scanning options, has a better support community, and is free.

    Unfortunately for me, ISS has brainwashed many, many people in the Department of Energy. I'm forced to use their product on a day-to-day basis. On the upside, I can run Snort and Nessus to do all my real checks and detects, and the go to the ISS products I have to use, try to make them show me the data I need, and report with that. But every single site I have to deal with which uses ISS has done the same thing I've done - shoved it in a corner, set up a system with Snort and a system with Nessus, and gone about getting real work done with free, easy to use, well supported tools.

    RagManX
  10. Re:Even more simple ... by RagManX · · Score: 5, Insightful
    Build a firewall!!!

    You probably should work in the security world before making statements about things you clearly don't understand. tcpdump is a tool for watching all or select traffic. It dumps raw packets, and you have to figure out what to make of them. Snort is a tool for analyzing those packets and alerting on suspicious data. It provides the information you need to help you find potentially dangerous traffic.

    Where I work, we have a T-3 'net connection. We typically run about 40% available bandwidth. You'll have just a *TINY* bit of trouble keeping up with that traffic if you manually analyze tcpdump logs. If you run Snort, it will do the bulk of the work, and alert you on things it thinks bear further investigation. It makes mistakes. But having it help focus your traffic checks makes the day a lot easier.

    As for using a firewall, too many people have the mistaken impression that once they install a firewall, all their worries will go away. If you have an insider attacking one of your corporate servers, a firewall doesn't help with that at all. An intrusion detection system like Snort will. If you users bring in discs from home that contain trojan programs with call home features, your firewall probably won't catch that, but an intrusion detection system probably will. If your users are surfing to pr0n sites, your firewall might catch that, but an intrusion detection system has a much greater chance.

    A firewall is a good thing to have, but everyone working in the security field is going to tell you that it is not enough. We have a concept which we frequently preach to newbs - defense in depth. Put as many systems in place for securing your network as you can realistically manage and track. If you have only a single security device, once an exploit comes out for that device, your network is wide open. And every single security system out there has bugs, so depending on one greatly increases your chances of getting 0wnzerized. Put in multiple systems, and you are likely to catch attacks on at least one of them, in the event that a way to avoid one part of your defense is found.

    RagManX
  11. Re:Even more simple ... by jcostom · · Score: 3, Insightful
    Build a firewall!!!

    Score: -17, bad security.

    Installing a firewall is not a magic solution. Suppose you run a website. You WILL be permitting 80/tcp through your firewall, probably also 443/tcp. Along comes the next worm that uses only http to gain entry to a system (Think CodeRed, Nimda && friends). How exactly is your firewall going to stop that sort of traffic? The answer you're searching for is, "it won't."

    In addition to firewalling, running a NIDS sensor will help abate these threats. Most NIDS products support the notion of killing a connection (rskill, for RealSecure, flexresp for Snort, etc.) - this is how you can stop the threat of CR, CR-II, Nimda, et al.

    Another way to abate these kinds of threats is to use something like Hogwash (which strangely enough is based on Snort), or a reverse-proxy that can inspect HTTP requests. Of course, those only help for HTTP traffic - there's a lot more out there besides HTTP. Remember sendmail, uw-imap, old qpopper, bind, and friends? They've all had remote-rootables that blew right through firewalls, since they only used the designated "proper" port(s) for the vulnerable daemon.

    Use your head. There is no security magic bullet. It's a process, not a single product.

    --

    The unsig!
  12. Re:Even more simple ... by palme999 · · Score: 3, Insightful

    Suppose you run a website. You WILL be permitting 80/tcp through your firewall, probably also 443/tcp. Along comes the next worm that uses only http to gain entry to a system (Think CodeRed, Nimda && friends). How exactly is your firewall going to stop that sort of traffic? The answer you're searching for is, "it won't."

    Ahh but if you are allowing 443/tcp, how exactly is your IDS going to detect that sort of traffic? Seeing how the session is encrypted. The answer you're searching for is, "it won't."

  13. Re:Warning by GeorgeH · · Score: 4, Informative

    A 10baseT patch cable with the TX wires clipped will get you a whole lotta nothing because the TX wires are used for heartbeat signals. You need to corrupt the outgoing frames instead, which is a PITA.

    The easier method is to use a 10 Mbit AUI adapter with the TX pins cut. You can probably even find a 10baseT -> AUI adapter at a computer junk shop for a buck or three.

    For more about creating a receive-only ethernet adapter check out http://www.robertgraham.com/pubs/sniffing-faq.html #receive-only or read up on Antisniff (weird, I can't find anything about it on @stake's site).

    --
    Why can't I moderate something "Wrong" or at least "Grossly Misinformed"?