1

Snort in IDS mode:

If there is some traffic that does NOT find any matched rule against all existing Snort rules, how would you write a bottom rule to alert this traffic?

2 Answers 2

2

I'm sorry, but Snort is not really designed for that. It sounds like you're wanting something more like a firewall.

Snort is an Intrusion Detection System, whose job is to highlight on suspicious or malicious traffic that it observes in order to inform those who monitor the network to, "Look over here!" Alerting on every single piece of traffic that passes by is pretty much the opposite of what Snort is supposed to do.

There are other solutions that would be better suited for what you're asking.

  • If you're looking for metadata only, a firewall with the ability to log would be perfect. You can simply put an "allow any -> any log" rule at the bottom and then you'll have a log file with all of the metadata for each connection.

  • If you're wanting to capture the actual traffic that is observed regardless of whether it fires a rule or not, you'd probably want to set up a packet capture utility with the ability to rotate log files. Many homegrown security devices are built this way so that security researchers can examine traffic that their IDS may have missed. For high bandwidth connections, people use something like netsniff-ng. If you're looking for something that not only captures the traffic but also gives you an interface to use to examine and download pcap, check out http://molo.ch/ which is free.

-1

I don't know if this will work but you can use a generic regular expression on the pcre:"/^.*$/" parameter that will match anything if the regex is wrote correctly :).

2
  • I imagine that would be horribly inefficient for what is merely a "default" rule.
    – forest
    Commented Apr 12, 2018 at 9:32
  • 1
    @forest is correct; that would crush the Snort engine. A simple rule with no rule options would work the same, but not kill the engine, such as alert ip any any -> any any (msg:"Traffic"; sid:1; rev:1; )
    – Damian T.
    Commented Apr 12, 2018 at 12:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .