We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug The documentation says that "syslog_facility" is a valid condition.
The sagan-rules repo says that "facility" is a valid condition (e.g. facility: kern)
facility: kern
However, neither of these have any effect.
To Reproduce
alert any $EXTERNAL_NET any -> $HOME_NET any (msg: "GOTCHA"; content: "abcde"; classtype: unsuccessful-user; facility: mail; syslog_facility: mail; sid: 911; rev: 1; )
You can trigger this with:
echo "192.0.2.1|auth|info|info|sshd|2001-01-01|00:00:00|sshd|abcde" >/var/sagan/fifo/sagan.fifo
Note that the facility in the message is auth not mail:
auth
mail
[D] [processor.c, line 168] **[Parsed Syslog]********************************* [D] [processor.c, line 169] Host: 192.0.2.1 | Program: sshd | Facility: auth | Priority: info | Level: info | Tag: sshd | Date: 2001-01-01 | Time: 00:00:00 [D] [processor.c, line 170] Parsed message: abcde [D] [processors/engine.c, line 1548] **[Trigger]********************************* [D] [processors/engine.c, line 1549] Program: sshd | Facility: auth | Priority: info | Level: info | Tag: sshd [D] [processors/engine.c, line 1550] Threshold flag: 0 | After flag: 0 | Flexbit Flag: 0 | Flexbit status: 0 [D] [processors/engine.c, line 1551] Triggering Message: abcde
Expected behavior Alert to trigger only on matching syslog facility
Screenshots N/A
Desktop (please complete the following information): N/A
Smartphone (please complete the following information): N/A
Additional context Adding debugging to src/processors/engine.c shows that the value has not been parsed.
src/processors/engine.c
if ( rulestruct[b].s_facility[0] != '\0' ) { strlcpy(tmpbuf, rulestruct[b].s_facility, sizeof(tmpbuf)); Sagan_Log(DEBUG, "facility: %s", tmpbuf); <<< NOT INVOKED
Because of #140, the no warning is generated saying that the facility / syslog_facility condition is not recognised.
The text was updated successfully, but these errors were encountered:
Do not forget rule conditions like syslog_facility, syslog_level etc
a2ee7fc
Fixes beave#141
Successfully merging a pull request may close this issue.
Describe the bug
The documentation says that "syslog_facility" is a valid condition.
The sagan-rules repo says that "facility" is a valid condition (e.g.
facility: kern
)However, neither of these have any effect.
To Reproduce
You can trigger this with:
Note that the facility in the message is
auth
notmail
:Expected behavior
Alert to trigger only on matching syslog facility
Screenshots
N/A
Desktop (please complete the following information):
N/A
Smartphone (please complete the following information):
N/A
Additional context
Adding debugging to
src/processors/engine.c
shows that the value has not been parsed.Because of #140, the no warning is generated saying that the facility / syslog_facility condition is not recognised.
The text was updated successfully, but these errors were encountered: