You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.
Trying to figure out why there was such a delay (varying from a few milliseconds to a few seconds) between a snort alert and the corresponding IP address being blocked by snortsam, I noticed that barnyard2 calls the output plugins in sequence and the alert_fwsam one last in my case (after "Database" and "Sguil" which are potentially slow ones).
Moving the "output" line in barnyard2.conf for alert_fwsam to the top didn't help.
Then, I looked at the code, and noticed that the "alert" type plugins were called first, and then the "log" ones.
If I modify the source code
--- output-plugins/spo_alert_fwsam.c~ 2012-05-01 09:51:52.592711406 +0100
+++ output-plugins/spo_alert_fwsam.c 2012-05-01 09:52:05.348792507 +0100
@@ -593,7 +593,7 @@
#endif
/* Set the preprocessor function into the function list */
- AddFuncToOutputList(AlertFWsam, OUTPUT_TYPE__LOG, fwsamlist);
+ AddFuncToOutputList(AlertFWsam, OUTPUT_TYPE__ALERT, fwsamlist);
AddFuncToCleanExitList(AlertFWsamCleanExitFunc, fwsamlist);
AddFuncToRestartList(AlertFWsamRestartFunc, fwsamlist);
}
Then, it still works, and I'm able to have alert_fwsam be called first, which reduces the delay.
The other source of delay seems to be the "tail -f" way that barnyard2 reads the snort unified2 file. I'll raise a feature request issue for that.
The text was updated successfully, but these errors were encountered:
Hello,
Trying to figure out why there was such a delay (varying from a few milliseconds to a few seconds) between a snort alert and the corresponding IP address being blocked by snortsam, I noticed that barnyard2 calls the output plugins in sequence and the alert_fwsam one last in my case (after "Database" and "Sguil" which are potentially slow ones).
Moving the "output" line in barnyard2.conf for alert_fwsam to the top didn't help.
Then, I looked at the code, and noticed that the "alert" type plugins were called first, and then the "log" ones.
If I modify the source code
Then, it still works, and I'm able to have alert_fwsam be called first, which reduces the delay.
The other source of delay seems to be the "tail -f" way that barnyard2 reads the snort unified2 file. I'll raise a feature request issue for that.
The text was updated successfully, but these errors were encountered: