• Great Site for Helping Write Custom Suricata Rules

    Pinned
    1
    3 Votes
    1 Posts
    427 Views
    No one has replied
  • This topic is deleted!

    Pinned
    1
    6 Votes
    1 Posts
    2k Views
    No one has replied
  • 8 Votes
    74 Posts
    40k Views
    bmeeksB

    @Snailkhan:
    It is not possible in pfSense to tie IDS/IPS rules or policies to the pf firewall engine. Thus it is impossible to tie IDS/IPS rules to IP source or destination pairs as evaluated by the firewall engine. That's just not how pfSense is designed. If you need this level of granularity, then pfSense is not the product for you. The best you could do is write your own custom IDS/IPS rules where you customize the Source/Destination fields of each IDS/IPS rule. I seriously doubt you want to get into that level of maintainence.

    Snort is an add-on volunteer-maintained package for pfSense. It is not baked into the operating system nor into the design of the firewall. Therefore its capabilities will be nowhere near as flexible as say a customized Cisco hardware/software solution might be.

    Later Edit: but compare the price you pay for pfSense and its Snort package to what the Cisco solution costs you 😁. Many times compromises are necessary when taking advantage of the "free" option.

  • 7 Votes
    4 Posts
    15k Views
    bmeeksB

    @gwaitsi said in Configuring pfSense/netmap for Suricata Inline IPS mode on em/igb interfaces:

    is it necessary to have on all interfaces, or just the ones assigned to suricata?

    Just the ones assigned to Suricata. But the general consensus these days with the super fast multicore CPUs most users have is that you should just disable all hardware offloading on all interfaces. It was helpful back in the days of Pentiums struggling to achieve line rate packet processing, but today's multicore CPUs generally don't break a sweat until you get to the 10 Gig area. There are several things (including some third-party packages) that can be negatively impacted by hardware offloading.

  • Quick Snort Setup Instructions for New Users

    Pinned
    147
    5 Votes
    147 Posts
    254k Views
    bmeeksB

    @qinn, it depends totally on which precise rules are enabled and what the traffic on your network actually consists of. The goal in IDS/IPS is to get no or very few alerts and blocks. That means your network is relatively secure and clients are following the rules ... ☺ .

    I don't mean that to say you should never get alerts, though. Just that you don't want to be receiving hundreds per hour. Once blocking is enabled that might drive you crazy as an admin. Within the IPS Polices, the Snort team has selected rules that provide security without a ton of false positive alerts.

  • 8 Votes
    4 Posts
    15k Views
    bmeeksB

    @cyberzeus said in How Automatic SID Management and User Rule Overrides Work in Snort and Suricata:

    bmeeks - I found the following link that describes what is included in each of the 3 IPS policies.  Note there is a 4th policy - MaxDetect.  Do you know if there are any plans to implement this in the Snort package for pfSense?

    https://www.snort.org/documents/215

    Replying to an old thread, but the answer is "yes". The new MaxDetect policy is now present and selectable in the Snort and Suricata packages. Just remember that the Snort folks recommend enabling that only for testing purposes! It is most definitely not recommended for a production network. It will generate a lot of false positives!

  • Important Info About Passlists with Suricata Inline IPS Mode

    Pinned
    2
    1 Votes
    2 Posts
    6k Views
    S

    For those looking to create their own rules, the "sid:1000006;" part of the example is NOT a reference to an existing SID. It needs to be a unique number otherwise Suricata won't load the rule.

    To whitelist for a rule for an IP, search for the SID in /usr/local/etc/suricata/suricata_(interface)/rules/suricata.rules. Duplicate the conditions like "flow:from_server,established; content:"403"; http_stat_code;" into the custom rule so it matches, like

    pass ip 192.168.1.22/32 80 <- any any (msg: "Pass List Entry - allow all traffic to/from 192.168.1.22/32"; flow:from_server,established; content:"403"; http_stat_code;sid:1000006;)

    Otherwise with only the IP address, port, and unique SID it will allow all traffic for that IP.

    Also note the directional (<-) only allows for two directions..."both" or "left."

  • About the New Block-on-Drops Only Option in Suricata 4.0.0

    Pinned
    12
    3 Votes
    12 Posts
    9k Views
    bmeeksB

    @JasonAU:

    You put a lot of effort into this forum & Pfsense thank you! Seriously a lot of people would be lost without somebody doing the answering on the forum

    I’m having a lot of fun toying with this after work in my lab the only thing that I don’t currently understand is can I make some rules drop rather than block when I’m configured with:

    *Legacy mode not inline

    *Block on DROP only enabled

    *IPS Policy Security with ‘policy’ mode

    Snort Subscriber + ET

    Let’s say I like one of the rules FILE tracking GIF (1x1 pixel) from the files.rules category sounds like a good thing to help with privacy but the blocking action causes problems as often the IP that gets blocked is hosting other legitimate images in the page, Can I use SID Management to modify this rule to drop even when I have block on drop enabled?

    Your question leads me to believe you are misunderstanding a key piece of the puzzle.  There is no difference between DROP and BLOCK in Legacy Mode.  They are the same thing.  Both lead to the exact same result:  traffic from the offending IP address (the one that triggered the rule) is blocked by placing the SRC, DST or BOTH IP addresses from the offending packet into the snort2c pf firewall table.  After that, all further traffic from those IP addresses is blocked until the IP addresses are removed from the snort2c table.  Legacy Mode can't do what you want.

    The whole reason I created the new "Block-on-drops-only" option was so you can tailor rules actions to get the results you desire.  See, all rules by default from the rule set vendors come with the action set to ALERT.  With Legacy Mode Blocking, and before the new "Block-on-drops-only" option was added, any alert also generated a corresponding block.  It was an all or nothing arrangement.  When you enabled blocking, any rule that generated an alert would also cause a block.  With the new "Block-on-drops-only" option, I added some extra intelligence within the custom blocking module so that it could look at the rule action (ALERT or DROP) of the triggered rule and take the action specified.  So if the rule says ALERT, then only an alert is generated but no block is created.  If the rule says DROP, then both an alert and a block are generated.

    SID MGMT has options that allow you to alter rule actions from the default value of ALERT.  So now you can pick and choose which rules you want to just alert and which you want to drop (or block traffic).  This new "Block-on-drops-only" option was born out of the way the Inline IPS mode operates.  With Inline IPS Mode, you must specifically change rule actions to DROP in order to drop or block traffic.  You could also leave some rules with the default ALERT action and those rules would generate alerts but would not block or drop traffic.  That's the way most commercial proprietary Intrusion Prevention Systems operate.  So I thought it would be useful to port that same functionality (the choice of ALERT or DROP) over to Legacy Mode operation.  Hence the new "Block-on-drops-only" option.

    I still don't want folks to confuse Legacy Mode's use of DROP with the way IPS Mode works, though.  In Legacy Mode, even though I'm using the term "drop", the actual blocking of traffic is done the old way using libpcap to get copies of every packet traversing the interface, and when a rule fires to create a block, the IP addresses from the offending packet are copied to the snort2c table in pf to implement a firewall block.  So when I say "drop" in the context of Legacy Mode and the new "Block-on-drops-only" option, I really mean that only rules with DROP as the action will add the offender's IP address to the snort2c table.  The "drop" is really still the old fashioned block.  With Inline IPS Mode, the snort2c table is not used at all.  There is another Sticky Post here on the forum that describes the difference between Legacy Mode and Inline IPS Mode.

    Read both of the Sticky Posts in this forum about Passlists and Suricata.  Each of them also contains some key points about blocks, drops and Legacy vs Inline IPS modes.

    Bill

  • Using Snort VRT Rules With Suricata and Keeping Them Updated

    Pinned
    11
    3 Votes
    11 Posts
    26k Views
    M

    @bmeeks said in Using Snort VRT Rules With Suricata and Keeping Them Updated:

    @MxcZXAKM said in Using Snort VRT Rules With Suricata and Keeping Them Updated:

    @bmeeks So is this the best release to reference for now?

    snortrules-snapshot-29160.tar.gz

    Yes. You want to use the most current version of the Snort 2.9.x rules with Suricata. Since Snort 2.9.16 is the current release, then the snortrules-snapshot-29160.tar.gz rules archive contains the latest ones.

    Very helpful, Thank you!

  • Suricata logs: Move to a new location

    3
    0 Votes
    3 Posts
    114 Views
    C

    @bmeeks That would explain it. Thank you.

  • Suricata IDP/IDS on PFsense blocking all traffic

    4
    0 Votes
    4 Posts
    151 Views
    bmeeksB

    @Dr-Monarch said in Suricata IDP/IDS on PFsense blocking all traffic:

    What ideally i am aiming for is all traffic is dropped until particular rule is analyzed and cleared so it can be allowed.

    That's not how Suricata works -- unless I am still not understanding what you want to do. You whitelist hosts (by IP address) not SIDs (rules). There is no construct I am aware of that mimics a "whitelist" SID (Signature ID). You can certainly enable or disable particular rules (SIDs), but that will apply to all hosts.

    With Legacy Mode Blocking, all rules do block when triggered. The only exception is IP addresses in the Pass List which are not blocked. These are by default local LAN hosts, gateways, DNS servers, and the WAN interface's single public IP address. Inline IPS Mode requires that you manually change rule actions to DROP for all rules which you wish to block traffic when triggered. You can do this via SID MGMT or manually using the provided icons on the ALERTS or RULES tabs.

    There is no concept of a Pass List with Inline IPS Mode because that mode does not block an IP address. It instead drops the particular offending packet (the one that triggered the rule). If you want to exclude a particular IP address from enforcement action, you can use a Suppress List or change the rule's action to PASS and edit the target IP addresses in the SID as necessary.

    What you can do is selectively change the action of a given SID manually. You can set the action of a given SID to ALERT, DROP, REJECT, or PASS.

  • Netgate 1100

    4
    0 Votes
    4 Posts
    141 Views
    bmeeksB

    @jwnazz said in Netgate 1100:

    @bmeeks
    Snort started without issue with just the "Connectivity" IPS Policy selected. Thanks for the suggestion.

    Thank you for the feedback 😀

  • Suricata not downloading Maxmind Database

    10
    0 Votes
    10 Posts
    310 Views
    N

    @bmeeks

    Makes sense.

    Auto-updates are def working as expected now. To your point I adjusted my frequency to weekly, every Saturday at 4am. I think Maxmind pushes updates every Tuesday & Friday.

    cffaed5b-4c49-4cff-aca1-34032b216f29-image.png

  • Can someone explain why this rule gets triggered by Snort 3:19187?

    41
    0 Votes
    41 Posts
    2k Views
    R

    @rasputinthegreatest I realized I had packet captures enabled. I found this in Wireshark:

    192.168.179.1 192.168.1.73 DNS 158 Standard query response 0x6ffc HTTPS chrome.cloudflare-dns.com HTTPS

    Doesn't tell me much though. Still makes no sense to me how this connection could happen and be captured.

    I saw this IP in the packet capture with an insane AV detection rate and IDS warnings on this website:
    https://otx.alienvault.com/indicator/ip/172.64.41.3

  • Suricata webGUI suppress list textbox

    1
    0 Votes
    1 Posts
    63 Views
    No one has replied
  • Snort alerts

    6
    0 Votes
    6 Posts
    181 Views
    D

    @tinfoilmatt Snort is running on the LAN interface.

  • Suricata Extra Rules from the OISF Suricata Ruleset Index

    2
    0 Votes
    2 Posts
    163 Views
    bmeeksB

    I am very reluctant to add rules to the package containing a URL with "githubusercontent.com" as the repository because those can disappear as suddenly as they appeared. They are maintained by users generally, and those users could lose interest in future support.

  • 0 Votes
    9 Posts
    262 Views
    N

    @johnpoz

    I hear ya, and I do have that working already. I was just very curious if there were any creative ways to catch someone casually sniffing with Wireshark in promiscuous mode. To your point, as soon as they start arp poisoning or scanning internal hosts I am going to catch them in seconds with my current setup and ruleset.

  • 12 Votes
    22 Posts
    4k Views
    JonathanLeeJ

    @michmoor In Snort's OpenAppID context, "appMapping.data is a file that maps application names to their corresponding AppID identifiers, which are used for creating rules to identify and control application traffic."

  • Open Appid Signatures - Updating?

    7
    0 Votes
    7 Posts
    314 Views
    M

    @bmeeks said in Open Appid Signatures - Updating?:

    The real story is that perimeter IDS/IPS is on the way out unless you devote time, effort, and energy into MITM proxying.

    Well i would argue its all about placement.
    I have firewalls (IPS/IDS built in) that police traffic DC <-> DC [East-West flows].
    Yes if the majority of your traffic flows are to the Internet then an IPS is less effective as that is likely to be TLS encrypted but between datacenters you can detect unusual traffic. Its all about security in depth. I would rather have an IDS than not have one.

Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.