pfSense Support Subscription

Author Topic: Quick Snort Setup Instructions for New Users  (Read 166293 times)

0 Members and 2 Guests are viewing this topic.

Offline bmeeks

  • Hero Member
  • *****
  • Posts: 3173
  • Karma: +821/-0
    • View Profile
Re: Quick Snort Setup Instructions for New Users
« Reply #60 on: March 28, 2014, 11:00:56 pm »
I read somewhere that AC-BNFA-NQ should provide better performance than AC-BNFA and it also appears to be the default in Snort now, as mentioned here: http://manual.snort.org/node16.html

Currently I have Snort running on a single interface as AC-BNFA-NQ with:

- Snort VRT free Registered User
- Snort Community Ruleset
- ETOpen

with 90% of all rules enabled, on a box with 2GB of RAM and the RAM usage never goes above 35% (it is also running pfBlocker, OpenVPN client + server, Squid + LightSquid, HAVP)...

Are you saying AC-BNFA would be better even?

No, it is no better in terms of memory consumption.  The NQ means "not queued" if I am recalling correctly, and has some relation to overall performance.  The NQ settings are popular now.

Bill

Offline l3lu3

  • Newbie
  • *
  • Posts: 15
  • Karma: +2/-0
    • View Profile
Re: Quick Snort Setup Instructions for New Users
« Reply #61 on: April 05, 2014, 12:32:32 pm »
Is there any way to log the packets that trigger a snort alert? Mainly I want to see HTTP header and request associated with the alert.

The new 2.9.6.0 version of Snort offers increased packet/file capture abilities according to the post on the Snort.org web site.  I am working now on readying that version for the next Snort package update.  I will investigate what is offered in the new binary and see what I can reasonably incorporate into the GUI.

I had a similar request from some folks in the new Suricata BETA package thread where the wish was a clickable link from the alert on the ALERTS tab to a view of the packets that triggered the alert.  I am mulling over in my head the best way to accomplish that without bogging down the firewall CPU searching through hundreds of megabytes of packet capture files.  In general its better to offload such tasks to an external system.

Bill

I really hope you'll be able to incorporate full packet capture offloaded to an external system. That would be ideal. I see your reservations and challenges about doing it all on the fw box. Although I believe any of us wanting to do full packet capture are already using barnyard2 sending to an external system. Thanks for all your hard work - I really appreciate it, as I'm sure others do as well :)

Offline SpitefulMonkey

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Quick Snort Setup Instructions for New Users
« Reply #62 on: April 08, 2014, 10:23:34 am »
I am having an issue trying to install snort on my new box. The PBI seems to be missing. Here is what I am seeing...

Beginning package installation for snort .
Downloading package configuration file... done.
Saving updated package information... done.
Downloading snort and its dependencies...
Checking for package installation...
 Downloading https://files.pfsense.org/packages/amd64/8/All/snort-2.9.6.0-amd64.pbi ...  could not download from there or http://files.pfsense.org/packages/amd64/8/All//snort-2.9.6.0-amd64.pbi.
of snort-2.9.6.0-amd64 failed!

I peeked in https://files.pfsense.org/packages/amd64/8/All/ and didn't see the package, just older installs. Was there a reason 2.9.6.0 was pulled?


Offline doktornotor

  • Hero Member
  • *****
  • Posts: 8553
  • Karma: +956/-278
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: Quick Snort Setup Instructions for New Users
« Reply #63 on: April 08, 2014, 10:24:25 am »
I am having an issue trying to install snort on my new box.

And you are having issues with the search box on the forum as well?
Do NOT PM for help!

Offline SpitefulMonkey

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Quick Snort Setup Instructions for New Users
« Reply #64 on: April 08, 2014, 01:19:41 pm »
I am having an issue trying to install snort on my new box.

And you are having issues with the search box on the forum as well?

Search was used many times and all I came across was that it is available on the servers via IPv6 and not IPv4. If you knew a quick fix, you could have posted it thus having a thread to show in search when others like myself run in to this. It's my understanding that is how the search feature works...

Offline doktornotor

  • Hero Member
  • *****
  • Posts: 8553
  • Karma: +956/-278
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: Quick Snort Setup Instructions for New Users
« Reply #65 on: April 08, 2014, 02:02:13 pm »
Sigh, how about you stop flooding this thread with completely off-topic junk.
Do NOT PM for help!

Offline SpitefulMonkey

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Quick Snort Setup Instructions for New Users
« Reply #66 on: April 08, 2014, 04:50:37 pm »
Someone found a workaround for it in this thread at the end. https://forum.pfsense.org/index.php?topic=74486.15





Offline Amuzed2pieces

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Quick Snort Setup Instructions for New Users
« Reply #67 on: April 15, 2014, 01:10:06 pm »
Noob issue with creating Alias/Whitelist.... 

I am having an issue creating a Passlist (whitelist).  I click on the "Pass List Tab" and lists "passlist_36480", then Edit (e)  with a set of check boxes, and an Alias box at the bottom.

To add my own to the White/Passlist, I am guessing I add a file name to the Alias Box:  But I get an error message when adding a file name, whether it as created in the "Ip List" or not:  The following input errors were detected:        A valid alias must be provided


I follow the Alias button, and there is no (+) Add button.  I tried different syntax in the file name, adding a "IP List" but have not been able to create or add.  I saw the pictures listed before in this thread about Editing a Alias, but not about creating one.

What simple idiot step am I missing?  Thanks.

Offline Mr. Jingles

  • Hero Member
  • *****
  • Posts: 1136
  • Karma: +92/-724
    • View Profile
    • The FreeBSD Foundation
Re: Quick Snort Setup Instructions for New Users
« Reply #68 on: April 15, 2014, 01:14:33 pm »
Noob issue with creating Alias/Whitelist.... 

I am having an issue creating a Passlist (whitelist).  I click on the "Pass List Tab" and lists "passlist_36480", then Edit (e)  with a set of check boxes, and an Alias box at the bottom.

To add my own to the White/Passlist, I am guessing I add a file name to the Alias Box:  But I get an error message when adding a file name, whether it as created in the "Ip List" or not:  The following input errors were detected:        A valid alias must be provided


I follow the Alias button, and there is no (+) Add button.  I tried different syntax in the file name, adding a "IP List" but have not been able to create or add.  I saw the pictures listed before in this thread about Editing a Alias, but not about creating one.

What simple idiot step am I missing?  Thanks.

Firewall/aliasses. Create one first.

It is good to see more noobs on this board; for over a year I've been feeling so lonely  ;D

Offline Amuzed2pieces

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Select the rulesets Snort will load at startup
« Reply #69 on: April 15, 2014, 01:15:27 pm »
RE Selecting Rule Sets:

Under "WAN Categories", I have the IPS Ruleset:Connectivity and Flowbits boxes checked. 

Do I just ignore the "Rulesets Snort will load at Startup"  below this?  So is this an ALTERNATIVE or ADDITION, or do I have to check the Rulesets to use UNDER the IPS Ruleset: Connectivity?

Thanks for the noob clarification.




Offline Amuzed2pieces

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Quick Snort Setup Instructions for New Users
« Reply #70 on: April 15, 2014, 01:55:20 pm »

Firewall/aliasses. Create one first.

It is good to see more noobs on this board; for over a year I've been feeling so lonely  ;D

I will probably make your week. 


Offline bmeeks

  • Hero Member
  • *****
  • Posts: 3173
  • Karma: +821/-0
    • View Profile
Re: Select the rulesets Snort will load at startup
« Reply #71 on: April 15, 2014, 05:10:35 pm »
RE Selecting Rule Sets:

Under "WAN Categories", I have the IPS Ruleset:Connectivity and Flowbits boxes checked. 

Do I just ignore the "Rulesets Snort will load at Startup"  below this?  So is this an ALTERNATIVE or ADDITION, or do I have to check the Rulesets to use UNDER the IPS Ruleset: Connectivity?

Thanks for the noob clarification.

When you select an IPS Policy, that will load a preset collection of Snort VRT rules.  The VRT rule authors decide which particular rules are associated with a given IPS Policy.  But this only applies to Snort VRT rules.  Emerging Threats is a completely separate and unrelated set of rules.  So when you use an IPS Policy, individual selections for Snort VRT rule categories are disabled, but you are free to select ET rules categories (if you have Emerging Threats rules enabled for download under GLOBAL SETTINGS) that will be added to your automatic Snort VRT collection coming from the chosen policy.  So when using a policy, the checkboxes further down below are optional and will add more rules to those that are part of the policy.

Bill
« Last Edit: April 15, 2014, 05:12:07 pm by bmeeks »

Offline bmeeks

  • Hero Member
  • *****
  • Posts: 3173
  • Karma: +821/-0
    • View Profile
Re: Quick Snort Setup Instructions for New Users
« Reply #72 on: April 15, 2014, 05:17:36 pm »
Noob issue with creating Alias/Whitelist.... 

I am having an issue creating a Passlist (whitelist).  I click on the "Pass List Tab" and lists "passlist_36480", then Edit (e)  with a set of check boxes, and an Alias box at the bottom.

To add my own to the White/Passlist, I am guessing I add a file name to the Alias Box:  But I get an error message when adding a file name, whether it as created in the "Ip List" or not:  The following input errors were detected:        A valid alias must be provided


I follow the Alias button, and there is no (+) Add button.  I tried different syntax in the file name, adding a "IP List" but have not been able to create or add.  I saw the pictures listed before in this thread about Editing a Alias, but not about creating one.

What simple idiot step am I missing?  Thanks.

Aliases are used throughout pfSense and are really cool.  They allow you to use a "name" for one or more IP addresses (hosts, networks, etc.).  Anywhere you use the "name", then at runtime pfSense will go grab the underlying associated IP addresses and use them in the firewall rules.  This way, if later on you need to edit an IP address or add or delete one, you just edit the Alias.  Then the change is instantly applied to all the firewall rules (or in the case of PASS LISTS in Snort), the Snort pass list.  That keeps you from having to manually search out all the places where that IP was used and then hand editing it in every instance.

You create Aliases under Firewall...Aliases as another user posted.  Once created, you can then access the list of Aliases from several places in Snort where Aliases are allowed by clicking the VIEW button beside the fields.  Anytime you see a textbox entry field with a red background, that means it will only accept an already-created Alias name as a valid parameter.

Offline G.D. Wusser Esq.

  • Full Member
  • ***
  • Posts: 108
  • Karma: +1/-0
    • View Profile
Re: Quick Snort Setup Instructions for New Users
« Reply #73 on: May 22, 2014, 02:03:05 pm »
I have three questions about Snort.

1.   Auto-Flowbit Rules. There is a warning on the Auto-Flowbit Rules page “WARNING: You should not disable flowbit rules! Add Suppress List entries for them instead by clicking here.”

Do I understand correctly that this warning exists because disabling any of these rules may make other, enabled, rules not function?

A small comment: since a rule can be disabled right from the Alerts page, a user may never see the warning and disable an Auto-Flowbit Rule.
Is there some kind of rule of thumb, which rules are safe to disable and which must remain enabled and may only be suppressed?

2.   Pass Lists. The Pass Lists page contains the following information, “The default Pass List includes the WAN IP and gateway, defined DNS servers, VPNs and locally-attached networks. Be careful, it is very easy to get locked out of your system by altering the default settings.”

By default there is no Pass List, so the default pass list must be hidden or something. Now, when I create a custom pass list, I realize that I need to add WAN IP and gateway, defined DNS servers, VPNs and locally-attached networks, to it by leaving the corresponding checkboxes on in the “Add auto-generated IP Addresses” section checked.

Now, what happens when something in this auto-generated section changes? For example, if I changed a DNS server address, will the pass-list automatically reference the new DNS address, or do I need to go to the pass list and re-save it?

3.   Memory usage. If I have plenty of memory on the system, will Snort be automatically allocated as much as it needs, or is there a setting somewhere to give Snort more memory for better performance? I already selected the “AC” search method, I am just wondering if I also need to dedicate the memory to Snort somehow, or it will grab the free memory automatically.

Thank you!

Offline bmeeks

  • Hero Member
  • *****
  • Posts: 3173
  • Karma: +821/-0
    • View Profile
Re: Quick Snort Setup Instructions for New Users
« Reply #74 on: May 22, 2014, 07:54:45 pm »
I have three questions about Snort.

1.   Auto-Flowbit Rules. There is a warning on the Auto-Flowbit Rules page “WARNING: You should not disable flowbit rules! Add Suppress List entries for them instead by clicking here.”

Do I understand correctly that this warning exists because disabling any of these rules may make other, enabled, rules not function?

A small comment: since a rule can be disabled right from the Alerts page, a user may never see the warning and disable an Auto-Flowbit Rule.
Is there some kind of rule of thumb, which rules are safe to disable and which must remain enabled and may only be suppressed?


First, auto-flowbit rules are those that set flowbits required by other rules that check those flowbits.  So if you have enabled a rule that only triggers when some particular flowbit is set, but you neglected to enable the rule that sets that flowbit, then your enabled rule would never fire.  The auto-flowbit logic takes care of this for you behind the scenes by looking at all your rules and finding each one that examines a flowbit.  It then looks to make sure that at least one enabled rule exists that sets that flowbit.  If not, it will enable all rules that set that flowbit for you.

So this is why you should suppress, rather than disable, flowbit rules that generate false positives.  The Snort VRT folks are really good about including the "noalert" option with nearly all of their flowbit "set" rules so they don't generate alerts but do set the flowbit.

Finally, yeah it is possible to inadvertently disable a flowbit rule on the ALERTS tab if you don't pay attention.


2.   Pass Lists. The Pass Lists page contains the following information, “The default Pass List includes the WAN IP and gateway, defined DNS servers, VPNs and locally-attached networks. Be careful, it is very easy to get locked out of your system by altering the default settings.”

By default there is no Pass List, so the default pass list must be hidden or something. Now, when I create a custom pass list, I realize that I need to add WAN IP and gateway, defined DNS servers, VPNs and locally-attached networks, to it by leaving the corresponding checkboxes on in the “Add auto-generated IP Addresses” section checked.

Now, what happens when something in this auto-generated section changes? For example, if I changed a DNS server address, will the pass-list automatically reference the new DNS address, or do I need to go to the pass list and re-save it?


The default Pass List does indeed contain those items that are default "checked" on the PASS LISTS tab.  If any of those change, Snort will pick it up with the following important caveat -- Snort reads these values only on a restart.  So if something changes and Snort is not restarted, it will not see the changed item.  pfSense is pretty good about restarting packages when important things happen (like DHCP giving a new WAN IP address, for example).


3.   Memory usage. If I have plenty of memory on the system, will Snort be automatically allocated as much as it needs, or is there a setting somewhere to give Snort more memory for better performance? I already selected the “AC” search method, I am just wondering if I also need to dedicate the memory to Snort somehow, or it will grab the free memory automatically.

Thank you!

The answer here is "yes", Snort will take what it needs up to the max defined for parameters that have max memcap settings (these are on the PREPROCESSORS tab mostly).  This is also why Snort can bring a box without a lot of RAM to its knees quickly in a high traffic situation.

Bill
« Last Edit: May 22, 2014, 07:58:18 pm by bmeeks »