Suricata Really Annoying, Blocking Everything
-
So what you're saying is that you don't want a job as a security analyst?
LMFAO!
We've had sourcefire (enterprise snort) in alert mode for 6 months before switching it to block. Now, please follow me everyone, on the WAN. We turned it on the WAN. So what this means is we're not intercepting our own SSH, inside our network. And the rules we turned on were "medium" security (this is an enterprise subscription), and the threats were considered "high." So that's somewhere between 5k and 7k of signatures. How many are you running? I'm sorry for laughing.
-
Hi,
if you use the Inline IPS mode there won't be any blocking by default only alerts. This way you have time to configure blocking on specific categories or rules in the SID mgmt menu using dropsid.conf file.
So far I use these in my dropsid.conf and I'm satisfied with the results. Feel free to modify for your needs:snort_ emerging-drop emerging-botcc.portgrouped emerging-botcc emerging-ciarmy emerging-compromised emerging-dshield emerging-tor emerging-worm emerging-trojan emerging-mobile_malware emerging-malware 1:2016149 # ET INFO Session Traversal Utilities for NAT (STUN Binding Request) 1:2016150 # ET INFO Session Traversal Utilities for NAT (STUN Binding Response) 1:2012247 # ET P2P BTWebClient UA uTorrent in use 1:2221002 # SURICATA HTTP request field missing colon 1:2221013 # SURICATA HTTP request header invalid 1:2016777 # ET INFO HTTP Request to a *.pw domain #1:2013031 # ET POLICY Python-urllib/ Suspicious User Agent 1:2014701 # ET DNS Non-DNS or Non-Compliant DNS traffic on DNS port Opcode 6 or 7 set 1:2014703 # ET DNS Non-DNS or Non-Compliant DNS traffic on DNS port Reserved Bit Set
I just copied your setup into my suricata setup. Have you found for this to be sufficient at start up or have you added more since then. Where u at now as far as rules go. I just setup suricata and disabled hardware notification rule which was pretty much flooding the log. I googled it before i did that.
-
Hi,
the following code is my recent configuration.
I haven't touched it for 5 months. Running without issues but be aware that this is a small home network:GPLv2_community snort_ emerging-drop emerging-botcc.portgrouped emerging-botcc emerging-ciarmy emerging-compromised emerging-dshield emerging-tor emerging-worm emerging-trojan emerging-mobile_malware emerging-malware 1:2016149 # ET INFO Session Traversal Utilities for NAT (STUN Binding Request) 1:2016150 # ET INFO Session Traversal Utilities for NAT (STUN Binding Response) 1:2012247 # ET P2P BTWebClient UA uTorrent in use 1:2221002 # SURICATA HTTP request field missing colon 1:2221013 # SURICATA HTTP request header invalid 1:2016777 # ET INFO HTTP Request to a *.pw domain # Blocks Kodi user agent 1:2013031 # ET POLICY Python-urllib/ Suspicious User Agent 1:2014701 # ET DNS Non-DNS or Non-Compliant DNS traffic on DNS port Opcode 6 or 7 set 1:2014703 # ET DNS Non-DNS or Non-Compliant DNS traffic on DNS port Reserved Bit Set 1:2221030 # SURICATA HTTP METHOD terminated by non-compliant character 1:2221029 # SURICATA HTTP URI terminated by non-compliant character 1:2221031 # SURICATA HTTP Request line with leading whitespace 1:2013936 # ET POLICY SSH banner detected on TCP 443 likely proxy evasion 1:2017399 # ET WEB_SERVER WebShell Generic eval of base64_decode 1:2012118 # ET CURRENT_EVENTS http string in hex Likely Obfuscated Exploit Redirect 1:2011540 # ET POLICY OpenSSL Demo CA - Internet Widgits Pty (O) 1:2012811 # ET DNS Query to a .tk domain - Likely Hostile 1:2023472 # ET POLICY OpenDNS IP Lookup 1:2012087 # ET SHELLCODE Possible Call with No Offset UDP Shellcode 1:2018302 # ET INFO Possible Phish - Mirrored Website Comment Observed 1:2015561 # ET INFO PDF Using CCITTFax Filter # Blocks trackers 1:2011706 # ET P2P Bittorrent P2P Client User-Agent (uTorrent) 1:2221015 # SURICATA HTTP Host header ambiguous 1:2221027 # SURICATA HTTP Host part of URI is invalid 1:2025105 # ET INFO DNS Query for Suspicious .ga Domain
-
I had similar issues when I first started using the IPS. As other stated, don't enable all categories. mind12's list seems like a good starting point for a dropsid.config file. I could be wrong, but I thought the categories in the dropsid file had to be separated with commas. I found a similar list which I copied from these forums. Also, under the WAN Categories I have the Snort IPS Policy Selection set to Balanced with the IPS Policy Mode set to Policy. Based on my understanding, doing this will set certain snort rules to drop automatically so the snort rules don't have to be specified in a dropsid file if you go that route.
-
@Raffi.:
I had similar issues when I first started using the IPS. As other stated, don't enable all categories. mind12's list seems like a good starting point for a dropsid.config file. I could be wrong, but I thought the categories in the dropsid file had to be separated with commas. I found a similar list which I copied from these forums. Also, under the WAN Categories I have the Snort IPS Policy Selection set to Balanced with the IPS Policy Mode set to Policy. Based on my understanding, doing this will set certain snort rules to drop automatically so the snort rules don't have to be specified in a dropsid file if you go that route.
All of the above statements by @Raffi are correct. The best starting point for a complete newbie to an IDS/IPS is to use the Snort rules and set the CATEGORIES tab to "IPS Policy Connectivity" and the Policy Mode to "Policy". This will set up a good starter rule set with expert-recommended rules set to DROP and some others set to just ALERT. Later, if you want to, you can up the Policy to "Balanced" to get a bit more security, but with the possibility of a few false positives now and then.
Bill
-
Thanks Bill. Most of my knowledge on this stuff is thanks to you. You laid out the information for the rest of us. Below is the dropsid.conf I'm using to add ET categories. The code uses the syntax with commas. I forget who's list this was based on so I can't give credit. For all I know, this could be based on yours Bill.
# This is the full list of ET open rules in case I want to add more of them ==> emerging-activex.rules,emerging-attack_response.rules,emerging-botcc.portgrouped.rules,emerging-botcc.rules,emerging-chat.rules,emerging-ciarmy.rules,emerging-compromised.rules,emerging-current_events.rules,emerging-deleted.rules,emerging-dns.rules,emerging-dos.rules,emerging-drop.rules,emerging-dshield.rules,emerging-exploit.rules,emerging-ftp.rules,emerging-games.rules,emerging-icmp.rules,emerging-icmp_info.rules,emerging-imap.rules,emerging-inappropriate.rules,emerging-info.rules,emerging-malware.rules,emerging-misc.rules,emerging-mobile_malware.rules,emerging-netbios.rules,emerging-p2p.rules,emerging-policy.rules,emerging-pop3.rules,emerging-rbn-malvertisers.rules,emerging-rbn.rules,emerging-rpc.rules,emerging-scada.rules,emerging-scan.rules,emerging-shellcode.rules,emerging-smtp.rules,emerging-snmp.rules,emerging-sql.rules,emerging-telnet.rules,emerging-tftp.rules,emerging-tor.rules,emerging-trojan.rules,emerging-user_agents.rules,emerging-voip.rules,emerging-web_client.rules,emerging-web_server.rules,emerging-web_specific_apps.rules,emerging-worm.rules # Emerging Threat categories shown below will have all rules changed from "alert" to "drop" emerging-worm,emerging-voip,emerging-snmp,emerging-scada,emerging-rpc,emerging-pop3,emerging-misc,emerging-imap,emerging-games,emerging-dos,emerging-deleted,emerging-current_events,emerging-activex,emerging-botcc,emerging-malware,emerging-mobile_malware,emerging-trojan
-
@Raffi.:
Thanks Bill. Most of my knowledge on this stuff is thanks to you. You laid out the information for the rest of us. Below is the dropsid.conf I'm using to add ET categories. The code uses the syntax with commas. I forget who's list this was based on so I can't give credit. For all I know, this could be based on yours Bill.
# This is the full list of ET open rules in case I want to add more of them ==> emerging-activex.rules,emerging-attack_response.rules,emerging-botcc.portgrouped.rules,emerging-botcc.rules,emerging-chat.rules,emerging-ciarmy.rules,emerging-compromised.rules,emerging-current_events.rules,emerging-deleted.rules,emerging-dns.rules,emerging-dos.rules,emerging-drop.rules,emerging-dshield.rules,emerging-exploit.rules,emerging-ftp.rules,emerging-games.rules,emerging-icmp.rules,emerging-icmp_info.rules,emerging-imap.rules,emerging-inappropriate.rules,emerging-info.rules,emerging-malware.rules,emerging-misc.rules,emerging-mobile_malware.rules,emerging-netbios.rules,emerging-p2p.rules,emerging-policy.rules,emerging-pop3.rules,emerging-rbn-malvertisers.rules,emerging-rbn.rules,emerging-rpc.rules,emerging-scada.rules,emerging-scan.rules,emerging-shellcode.rules,emerging-smtp.rules,emerging-snmp.rules,emerging-sql.rules,emerging-telnet.rules,emerging-tftp.rules,emerging-tor.rules,emerging-trojan.rules,emerging-user_agents.rules,emerging-voip.rules,emerging-web_client.rules,emerging-web_server.rules,emerging-web_specific_apps.rules,emerging-worm.rules # Emerging Threat categories shown below will have all rules changed from "alert" to "drop" emerging-worm,emerging-voip,emerging-snmp,emerging-scada,emerging-rpc,emerging-pop3,emerging-misc,emerging-imap,emerging-games,emerging-dos,emerging-deleted,emerging-current_events,emerging-activex,emerging-botcc,emerging-malware,emerging-mobile_malware,emerging-trojan
No, that's not a list I created but it is a good one. There have been several contributions submitted to the forum here by Suricata users.
Bill
-
Hi,
if you use the Inline IPS mode there won't be any blocking by default only alerts. This way you have time to configure blocking on specific categories or rules in the SID mgmt menu using dropsid.conf file.
So far I use these in my dropsid.conf and I'm satisfied with the results. Feel free to modify for your needs:snort_ emerging-drop emerging-botcc.portgrouped emerging-botcc emerging-ciarmy emerging-compromised emerging-dshield emerging-tor emerging-worm emerging-trojan emerging-mobile_malware emerging-malware 1:2016149 # ET INFO Session Traversal Utilities for NAT (STUN Binding Request) 1:2016150 # ET INFO Session Traversal Utilities for NAT (STUN Binding Response) 1:2012247 # ET P2P BTWebClient UA uTorrent in use 1:2221002 # SURICATA HTTP request field missing colon 1:2221013 # SURICATA HTTP request header invalid 1:2016777 # ET INFO HTTP Request to a *.pw domain #1:2013031 # ET POLICY Python-urllib/ Suspicious User Agent 1:2014701 # ET DNS Non-DNS or Non-Compliant DNS traffic on DNS port Opcode 6 or 7 set 1:2014703 # ET DNS Non-DNS or Non-Compliant DNS traffic on DNS port Reserved Bit Set
I just copied your setup into my suricata setup. Have you found for this to be sufficient at start up or have you added more since then. Where u at now as far as rules go. I just setup suricata and disabled hardware notification rule which was pretty much flooding the log. I googled it before i did that.
been trying to find more info regardin dropsid.conf or how to copy a setup like this. But i havnt found anything. Could anyone please point me in the right direction how you use above setup to copy it into your own suricata setup
-
Hi,
if you use the Inline IPS mode there won't be any blocking by default only alerts. This way you have time to configure blocking on specific categories or rules in the SID mgmt menu using dropsid.conf file.
So far I use these in my dropsid.conf and I'm satisfied with the results. Feel free to modify for your needs:snort_ emerging-drop emerging-botcc.portgrouped emerging-botcc emerging-ciarmy emerging-compromised emerging-dshield emerging-tor emerging-worm emerging-trojan emerging-mobile_malware emerging-malware 1:2016149 # ET INFO Session Traversal Utilities for NAT (STUN Binding Request) 1:2016150 # ET INFO Session Traversal Utilities for NAT (STUN Binding Response) 1:2012247 # ET P2P BTWebClient UA uTorrent in use 1:2221002 # SURICATA HTTP request field missing colon 1:2221013 # SURICATA HTTP request header invalid 1:2016777 # ET INFO HTTP Request to a *.pw domain #1:2013031 # ET POLICY Python-urllib/ Suspicious User Agent 1:2014701 # ET DNS Non-DNS or Non-Compliant DNS traffic on DNS port Opcode 6 or 7 set 1:2014703 # ET DNS Non-DNS or Non-Compliant DNS traffic on DNS port Reserved Bit Set
I just copied your setup into my suricata setup. Have you found for this to be sufficient at start up or have you added more since then. Where u at now as far as rules go. I just setup suricata and disabled hardware notification rule which was pretty much flooding the log. I googled it before i did that.
been trying to find more info regardin dropsid.conf or how to copy a setup like this. But i havnt found anything. Could anyone please point me in the right direction how you use above setup to copy it into your own suricata setup
Very easy. In @mind12's post click the small red "Select" link to select everything in the code box and then copy that to the clipboard using CTRL+c or whatever other shortcut your computer uses. Now go over to Suricata and open the SID MGMT tab. Click the ADD button to create a new dropsid.conf file. In the modal dialog that opens, type the list name on the top line (I suggest something like "dropsid-LAN.conf" or "dropsid-WAN.conf" depending on the interface you intend to use it with). Then paste the clipboard contents into the textarea control in the middle of the dialog using the appropriate keyboard shortcut for your computer (CTRL+v) for Windows. Click SAVE to create the new list. It will now show up along side the other sample lists on the page.
Go down to the interfaces list at the bottom of the SID MGMT page and in the row for the interface you want to assign the new dropsid.conf file to, go across to the dropsid drop-down selector and choose the just-created list. If you want to immediately apply the list to the running Suricata interface, then tick the checkbox over on the far left end of the row and then click SAVE. That's it.
You can view the result of the automatic SID MGMT operation by going to the LOGS VIEW tab, choosing the interface where you assigned the new list, and then selecting the "sid_changes.log" in the drop-down for selecting which log to view. The contents of the log will appear in the window.
Bill
-
Hi,
if you use the Inline IPS mode there won't be any blocking by default only alerts. This way you have time to configure blocking on specific categories or rules in the SID mgmt menu using dropsid.conf file.
So far I use these in my dropsid.conf and I'm satisfied with the results. Feel free to modify for your needs:snort_ emerging-drop emerging-botcc.portgrouped emerging-botcc emerging-ciarmy emerging-compromised emerging-dshield emerging-tor emerging-worm emerging-trojan emerging-mobile_malware emerging-malware 1:2016149 # ET INFO Session Traversal Utilities for NAT (STUN Binding Request) 1:2016150 # ET INFO Session Traversal Utilities for NAT (STUN Binding Response) 1:2012247 # ET P2P BTWebClient UA uTorrent in use 1:2221002 # SURICATA HTTP request field missing colon 1:2221013 # SURICATA HTTP request header invalid 1:2016777 # ET INFO HTTP Request to a *.pw domain #1:2013031 # ET POLICY Python-urllib/ Suspicious User Agent 1:2014701 # ET DNS Non-DNS or Non-Compliant DNS traffic on DNS port Opcode 6 or 7 set 1:2014703 # ET DNS Non-DNS or Non-Compliant DNS traffic on DNS port Reserved Bit Set
I just copied your setup into my suricata setup. Have you found for this to be sufficient at start up or have you added more since then. Where u at now as far as rules go. I just setup suricata and disabled hardware notification rule which was pretty much flooding the log. I googled it before i did that.
been trying to find more info regardin dropsid.conf or how to copy a setup like this. But i havnt found anything. Could anyone please point me in the right direction how you use above setup to copy it into your own suricata setup
goa, that list will not work as a dropsid.conf file because it doesn't separate the categories with commas. You can find a really good write up by bmeeks in the forum here https://forum.pfsense.org/index.php?topic=108365.msg603749#msg603749
-
Very easy. In @mind12's post click the small red "Select" link to select everything in the code box and then copy that to the clipboard using CTRL+c or whatever other shortcut your computer uses. Now go over to Suricata and open the SID MGMT tab. Click the ADD button to create a new dropsid.conf file. In the modal dialog that opens, type the list name on the top line (I suggest something like "dropsid-LAN.conf" or "dropsid-WAN.conf" depending on the interface you intend to use it with). Then paste the clipboard contents into the textarea control in the middle of the dialog using the appropriate keyboard shortcut for your computer (CTRL+v) for Windows. Click SAVE to create the new list. It will now show up along side the other sample lists on the page.
Go down to the interfaces list at the bottom of the SID MGMT page and in the row for the interface you want to assign the new dropsid.conf file to, go across to the dropsid drop-down selector and choose the just-created list. If you want to immediately apply the list to the running Suricata interface, then tick the checkbox over on the far left end of the row and then click SAVE. That's it.
You can view the result of the automatic SID MGMT operation by going to the LOGS VIEW tab, choosing the interface where you assigned the new list, and then selecting the "sid_changes.log" in the drop-down for selecting which log to view. The contents of the log will appear in the window.
Bill
Superthanks!!
Does this override my current suricata setup for wan?
Are there any documents where i can read more about this?
Or where i can find more info about this. As i prefer to read up on this myself instead of having to constantly ask questions in the forum. -
@Raffi.:
goa, that list will not work as a dropsid.conf file because it doesn't separate the categories with commas. You can find a really good write up by bmeeks in the forum here https://forum.pfsense.org/index.php?topic=108365.msg603749#msg603749
Cant i just add , to each row?
-
There might be books on this, but the official pfSense book doesn't have much at all on Suricata. This is a community driven project and these forums have been extremely helpful for me. I have learn about it, thanks to people on the forums and some trial and error. Unfortunately, it does require digging around for answers. I didn't find all the answers in one place. I even found some contradictory information such as lists without commas and lists with them. Read up on that link I sent. If you still have questions, don't be afraid to dig some more and ask more questions.
One thing the pfSense book taught me was how to use google with more relevant results. For example, try typing in google "suricata inline site:pfsense.org" This will limit the search to information about suricata inline mode on pfsense.org, including the forums.
-
@Raffi.:
There might be books on this, but the official pfSense book doesn't have much at all on Suricata. This is a community driven project and these forums have been extremely helpful for me. I have learn about it, thanks to people on the forums and some trial and error. Unfortunately, it does require digging around for answers. I didn't find all the answers in one place. I even found some contradictory information such as lists without commas and lists with them. Read up on that link I sent. If you still have questions, don't be afraid to dig some more and ask more questions.
One thing the pfSense book taught me was how to use google with more relevant results. For example, try typing in google "suricata inline site:pfsense.org" This will limit the search to information about suricata inline mode on pfsense.org, including the forums.
Dont think my current card supports inline mode. So no real point in reading up about it.
-
In that case, you don't really need a dropsid.conf file. The dropsid is mainly needed for inline mode, at least that's the only reason I'm using it. Legacy mode is a matter of enabling categories from the WAN categories list. In legacy mode, an alert will automatically block/drop that traffic anyway so there is no need to specify which traffic should be dropped in a dropsid file.
-
@Raffi.:
In that case, you don't really need a dropsid.conf file. The dropsid is mainly needed for inline mode, at least that's the only reason I'm using it. Legacy mode is a matter of enabling categories from the WAN categories list. In legacy mode, an alert will automatically block/drop that traffic anyway so there is no need to specify which traffic should be dropped in a dropsid file.
Well in that case it should save me a lot of time =)
-
@Raffi.:
In that case, you don't really need a dropsid.conf file. The dropsid is mainly needed for inline mode, at least that's the only reason I'm using it. Legacy mode is a matter of enabling categories from the WAN categories list. In legacy mode, an alert will automatically block/drop that traffic anyway so there is no need to specify which traffic should be dropped in a dropsid file.
Well… the new 4.x Suricata versions do have a feature for Legacy Mode users that mimics IPS Inline Mode in terms of DROPS versus ALERTS. There is an option on the INTERFACE SETTINGS tab, when you enable Legacy Mode blocking, to only block traffic for DROP rules. So if you enable that, then you do need to set rules to DROP using a dropsid.conf file. This option is off by default, but can be enabled if desired. With the option enabled, then Legacy Mode behaves more like IPS Mode where you can have alerts that don't block, but drops that do block.
Bill
-
@Raffi.:
I had similar issues when I first started using the IPS. As other stated, don't enable all categories. mind12's list seems like a good starting point for a dropsid.config file. I could be wrong, but I thought the categories in the dropsid file had to be separated with commas. I found a similar list which I copied from these forums. Also, under the WAN Categories I have the Snort IPS Policy Selection set to Balanced with the IPS Policy Mode set to Policy. Based on my understanding, doing this will set certain snort rules to drop automatically so the snort rules don't have to be specified in a dropsid file if you go that route.
All of the above statements by @Raffi are correct. The best starting point for a complete newbie to an IDS/IPS is to use the Snort rules and set the CATEGORIES tab to "IPS Policy Connectivity" and the Policy Mode to "Policy". This will set up a good starter rule set with expert-recommended rules set to DROP and some others set to just ALERT. Later, if you want to, you can up the Policy to "Balanced" to get a bit more security, but with the possibility of a few false positives now and then.
Bill
Bill, guys under wan interface wan categories and/or wan rules i don't see any option to set Categories to ips policy connectivity. Am i looking in the wrong tab?
-
btw guys i'm now on vpn with aes 128 gcm encyrpted traffic. Are these rules neccessary stil even when using VPN encryption and vpn interface therefore?
So far i set @raffi rules only with block enabled on WAN interface only, no lan no vpn interface at all. Any advise.
I tried lan and vpn interace and suricata dropped my vpn connection lol. Granted i'm just getting familiar with IDS so for now i disabled blocking and listening only on lan and opt1 interaces.
I recently had my paypal, amazon and ebay accounts hacked hance me setting up pfsenes firewall and vpn encryption. Then coinmama account got hacked as well.
This was really annoying and was done with malice. It showed russian names on paypal charge but I'm pretty sure NSA did this. I'm also not sure wtf they want from me. I'm just some unimportant dude.
-
Rango good luck with the accounts.
I only use blocking on the WAN interface. All the information and recommendation I've seen show only blocking on WAN.
I recently had issues with inline mode not showing dropped traffic. I had a legitimate site being blocked and even after clearing all the logs and restarting Suricata, I could not see the site coming up in the alert log highlighted in red. Since I could not see what was being blocked, this made it pretty much impossible to manage in instances when legit sites were being blocked. Maybe I'm doing something wrong. In any case, I switched back to legacy mode and that site is now working fine even with the same categories selected.
Another odd thing I found is that line mode caused an issue with my WAN traffic graph to show no out traffic. When I switched back to legacy, that's working fine again.
I attached what the WAN categories should look like. If you don't have the snort IPS policy selection showing up, then you may have to configure the snort rules in the global settings first.
![Wan Cat.JPG](/public/imported_attachments/1/Wan Cat.JPG)
![Wan Cat.JPG_thumb](/public/imported_attachments/1/Wan Cat.JPG_thumb)