Snort and Interface Enable/Disable
-
No unfortunately not.
-
Well, thanks for the info and the assistance. Amazing speed on that speedtest.net report.
-
It rocks to have a nice internet throughput :)
When I come to think of it, I think its Ermal who integrates Snort in Pfsense !
-
I noticed that in the other thread! Looks like he's been quite active recently. This sort of thing really makes me want to get more involved in the developer side of things though.
-
I was I had the competence in FreeBSD to help out….but I havent :(
-
Supermule- not sure if this helps, but if you really want things running, some people have done some interesting stuff:
http://www.bellera.cat/josep/snort2pfsense/
-
Thx :)
-
Supermule,
From looking at your screenshots snort IS running on the selected interface and barnyard2 is NOT running. You can tell by the X and the Checkmark that appear on these services. It shows the state of the service if you click the indicator not its running state.
As for rules enabling themselves or snort shutting down, I have found this to occur if you are changing setting in an interface Snort is listening on. However, we run Snort in production without any issue whatsoever. Its helped us find malware and protected us from many different attacks. Just be sure you suppress some of the warning if you use HTTP inspect and watch the alerts before turning on block. But as far as the package being broken, I have not found this to be true.
-
TJ-
I'd love to know how you got it running or your versions for everything, because I'm running with barnyard 2 active and my rulesets for the interfaces are constantly resetting. In addition, I mentioned in this thread about the icons. Even though Snort IS running, and is generating alerts, the icon for the interface is showing as a red 'X'. This isn't making any sense.
The big issue is the Emerging Threat Policy rules that keeps resetting, which would block Pandora, iTunes, and other non-risky programs. I'm currently using Snort on my WAN and is is blocking IPs and traffic generated from rules-matching for non-whitelist traffic, but I've now had the Emerging Threat rules reset on me twice.
-Josh
-
I am not the Snort package maintainer, but I have been working the last month on some fixes/updates for the Snort package and plan to post them soon for others to test in non-production setups. Here are some of the things I currently have working –
-
Auto-flowbit rule resolution like PulledPork implements. This automatically scans your enabled rules and turns on any non-active rules that are required to satisfy flowbit dependencies in your selected rules. If you don't want alerts from any of the auto-flowbit rules, you just add their SID to the Suppression List.
-
I fixed a bug in the http_inspect code that sets up the snort.conf file. This code was not properly reading and setting some values. Also in http_inspect, I've added some new settings that are part of the current Snort binary but were not available back when the original Snort package was created on pfSense. In my updates, you can individually select inspect depths for "server" and "client". Finally, I added a configurable "no_alerts" parameter that lets you utilize the http_inspect normalization without getting any alerts.
-
Fixed a gap in how the Snort package handles the critical classification.config and reference.config files during rule updates. When running both Emerging Threats and Snort VRT rules, these two files were not properly generated to contain information from both rule sets. As a result, barnyard2 logging lacked details for some alerts, and at least on my system, I saw some Snort failures and stops when it alerted on a rule but could not find the corresponding classification parameter in the classification.config file. The correct procedure when using both ET and VRT rules is to produce a combined classification.config file and reference.config file that has the entries from both rule sets.
-
The stream5 preprocessor also had a bug I fixed where it did not properly recognize the max_segs and max_queued bytes parameters. I also added a new configuration parameter for memcap in stream5. These have stopped all the log errors on big file downloads saying "…session pruned that exceeded max queued bytes...", etc.
-
I added configuration parameters for the Modbus and DNP3 SCADA preprocessors. These are used in industrial control systems.
-
I am working on implementing the Snort pre-defined IDS-Policies now available in the rules. Here is a link to the VRT blog with details on the policies and flowbit auto-resolution: http://blog.snort.org/2012/01/importance-of-pulledpork.html
I believe I also see the errors in the current package that are causing disabled rules to get enabled again. Basically the "disablesid" functionality is not getting called during rule updates. I will look at fixing that while I'm working on my other updates.
I want to touch base with the pfSense forum admins before I do, but my plan is to post my changes as files (with installation instructions) that some others can test in non-production environments. I do not know how to build the actual Snort package for installation, so all I can provide for now are the individual PHP files needed to implement my updates.
-
-
- The stream5 preprocessor also had a bug I fixed where it did not properly recognize the max_segs and max_queued bytes parameters. I also added a new configuration parameter for memcap in stream5. These have stopped all the log errors on big file downloads saying "…session pruned that exceeded max queued bytes...", etc.
Oh how I have been sooo waiting for this, :)
-
I believe I also see the errors in the current package that are causing disabled rules to get enabled again. Basically the "disablesid" functionality is not getting called during rule updates. I will look at fixing that while I'm working on my other updates.
This is the one thing pissing me off big time! :D
-
bmeeks-
Truly amazing. If you need any help testing anything or implementing any changes, let me know. We have 2 systems here, and getting this up and running really would simplify so many matters on our end. Hopefully the moderators pick this up!
-
Would be good if one could tag Ermal in this topic…. :)
-
Truly amazing. If you need any help testing anything or implementing any changes, let me know. We have 2 systems here, and getting this up and running really would simplify so many matters on our end. Hopefully the moderators pick this up!
Thanks. I use pfSense in a home network environment. I'm testing using a VMware virtual machine. So far I've tested only on 32-bit code. I suspect my changes will work fine on 64-bit, but I want to create a 64-bit VM to test with as well.
I have two pieces still in progress: (1) implementing the pre-defined IDS policies, and (2) a more robust enablesid and disablesid functionality that survives rule updates. I work on my changes during the evenings when I'm home. Hopefully I can have test files ready to post by this weekend.
-
DAMN NICE!!
-
bmeeks, thanks for your very promising work.
Would be good if one could tag Ermal in this topic….
It seems to me that Snort is a complex piece of software that requires one to have a certain amount hands-on-experience with IDS, in order to create a fully functional pfsense package.
Apparently a new binary will be nice, because 2.9.2.3 is going EoL soon.
Snort Version Released EOL
Snort 2.9.2.3 2012-05-16 2013-02-28
Snort 2.9.3.1 2012-08-12 TBD**
Snort 2.9.4.0 2012-11-30 TBD** -
Snort is indeed a bit complex and somewhat sensitive to the settings in the snort.conf file (no big surprise there ;) )
I am quite close to being finished with my modifications and updates. Here is a screenshot of some of the new features that are working. I have corresponded with the Forum admins, and the recommended course of action for posting my code is via Github and then executing a Pull Request for Ermal or others on the pfSense team to evaluate. So I will not post modified PHP files directly to the forum, but will instead have them available on my fork of the Github pfsense-packages repository. I will post a link back here when things are posted.
Are there any particular settings for the HTTP_Inspect or Stream5 preprocessors that anyone would like to have GUI configuration parameters available for? Below you can see what will be available (if my submissions are accepted by the pfSense team).
New Preprocessors tab showing additional settings
![New Preprocessors tab.jpg_thumb](/public/imported_attachments/1/New Preprocessors tab.jpg_thumb)
![New Preprocessors tab.jpg](/public/imported_attachments/1/New Preprocessors tab.jpg) -
Here is another screenshot of the new Categories tab showing the features I've added for IPS Policy selection and automatic flowbit resolution for selected rules.
New Categories tab (partial)
![New Categories tab.jpg](/public/imported_attachments/1/New Categories tab.jpg)
![New Categories tab.jpg_thumb](/public/imported_attachments/1/New Categories tab.jpg_thumb) -
Last post for this evening…
For those of you that use the enablesid and disablesid feature in the Snort package, I've found some potential big bugs with its implementation in the current code base. In particular, it can't cope with multi-line rules. These are rules with a backslash ("") at the end of the line followed by a newline to signal continuation onto the next line. There are a handful of these multi-line rules in the rule sets from Emerging Threats and the Snort VRT. The current code just assumes any newline indicates the end of a rule when reading a rules file. Obviously with multi-line rules this is a mistake.
This bug, combined with the way the old code physically wrote back to disk a modified version of the rules file when enablesid or disablesid was used, risks writing a corrupt rules file when the original contains any multi-line rules.
My new procedure for handling enablesid and disablesid will fix this potential bug. I'm including the capability to "reset to defaults" any rules you may have previously disabled or enabled. The "reset to defaults" feature will return all the rules in a particular category to their default state, effectively wiping the slate clean of any modifications you previously made.
Of course I'm also adding the necessary hooks to ensure that any disablesid or enablesid customizations are preserved across rule updates... ;D