Hi Meeks.
Im guessing this is normal behavior since suricata is merely intercepting a tcp stream and examining it but ive noticed that with the file hash comparison and blocking turned on the ips will always allow the first instance of a blacklisted file theough. After that the ips engine will block the DST address and subsequent attempts to download the same file will be blocked along with the entire host.
You know of any way to force it not to allow the first instance through?
Also. Do you know if theres a way to have the executable name included in the alerts section without having to go to the eve.json log?
Thanks
What you are seeing is an artifact of the Legacy Mode blocking. Suricata, in that mode, is using libpcap to get copies of each packet traversing the interface. It examines the copy (and in many cases may need to see a number of copies of additional packets) to make a block/no-block decision. Once it decides to block, it makes a system call to insert the offender's IP address into a built-in pfSense firewall table called
snort2c. That will result in subsequent traffic from that IP address getting blocked until the IP is removed from that
pf table. Suricata will also optionally kill all open states associated with the IP (the default is to kill open states). However, remember I said "copies of packets", so that initial download can get started as the original packets continued on to the firewall and then the host behind it (assuming the traffic was solicited by the host in the first place). This is what we call "packet leakage" and is inherent in Legacy Mode.
To prevent this you would need to run with Inline IPS Mode, but that mode uses native Netmap functionality in FreeBSD and also requires the NIC hardware driver to fully support Netmap operation. Some do, but many to do not. Also, you must remember that Suricata needs to download the entire file in order to compute the checksum to check against the list. So a lot of memory might be required for buffering.
Bill