Replies: 7 comments 14 replies
-
Were you following the 2.4 documentation? |
Beta Was this translation helpful? Give feedback.
-
It looks like you're using a mix of ANDs and ORs, which is a little confusing and may not be applying in the way you intend. Try something like this to ignore traffic from those hosts: not host 172.16.12.10 && |
Beta Was this translation helpful? Give feedback.
-
Thanks for your response, I changed the configs and applied the rules as you've suggested but i got the same results |
Beta Was this translation helpful? Give feedback.
-
I've had issues with the BPF stuff. Not offering any insight or suggestions, but I've struggled with it in the past, not attempting it again until something changes. LATE UPDATE: I take it back - working for me now. |
Beta Was this translation helpful? Give feedback.
-
Here's how we format and validate our BPFs; YMMV. We format the yaml like this with different global and site-specific exclusions noted as comments:
We also have installed the 'yq' package on the system, which is a yaml parsing and analysis tool similar to what jq is for json. With that tool, we are able to run this command to verify that the yaml syntax is correct and to generate the resulting concatenated BPF expression:
You can run the resulting expression into tcpdump in debug mode to verify it is valid BPF:
You can use the so-bpf-compile script to check validity of the bpf syntax, which just calls tcpdump behind the scene and outputs the compiled BPF in bytecode:
Note the use of 'ip' preceeding each net or host block in the example. Without that, the block is checked twice: as bare IP and with a VLAN header. If you know you will not receive any VLAN headers, adding IP as part of the expression simplifies the resulting filter by avoiding that second check. To see for yourself, check the resulting debug output from tcpdump with or without it. Also note extensive use of '&&' for AND and '!' for NOT. There is a limit to the length of the BPF string before zeek barfs on it, and those tokens are shorter than their equivalent strings, plus they allow you to eliminate surrounding spaces when placed next to other strings. Eg. you can use '!(ip&&port 53)' instead of '!(ip AND port 53)' which is a 12% reduction in string length for that example. There is also a maximum length for the compiled BPF string that stenographer will accept. I have not seen these string length limits documented and have not fully characterized them myself, so just beware of really long BPFs. |
Beta Was this translation helpful? Give feedback.
-
You might actually want to "see" those alerts if using the log4 vulnerabilities - just not from certain hosts. Try putting just one argument in the 1st dialog and select the desired onion below, Like Doug suggested. |
Beta Was this translation helpful? Give feedback.
-
I experienced the same issue with BPF not seeming to work at all, and I was only trying to ignore 1 IP. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Version
2.4.20
Installation Method
Security Onion ISO image
Description
other (please provide detail below)
Installation Type
Standalone
Location
on-prem with Internet access
Hardware Specs
Exceeds minimum requirements
CPU
64
RAM
252
Storage for /
2 TB
Storage for /nsm
2 TB
Network Traffic Collection
span port
Network Traffic Speeds
1Gbps to 10Gbps
Status
Yes, all services on all nodes are running OK
Salt Status
No, there are no failures
Logs
No, there are no additional clues
Detail
Hello everyone,
I'd like some help on my security onion server, in fact I'm trying to filter certain traffic in my network that I found to be noisy.
I've followed the instructions on the Security Onion documentation and created the following rules which are applied to the config section of BPF suricata, zeek and PCAP:
not (host 172.16.12.10 and host 172.30.224.94) &&
not (host 170.32.24.243 or host 170.41.0.67 or host 170.32.3.213 or host 170.34.3.42) &&
not (host 173.41.0.100 or host 173.34.0.110 or host 173.32.2.39 or host 173.32.1.110 or host 173.32.224.110) &&
not tcp dst port 7081 &&
not (src port 0 or dst port 0)
None of the above rules worked as intended, I'm still seeing Suricata alerts from these hosts.
Does anyone know how to make it work to block traffic from all hosts in the BPF rules above?
And could be the problem why it's not working ?
Regards.
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions