Creating a custom rule for vulnerable agents

120 views
Skip to first unread message

wazuh

unread,
May 28, 2024, 7:23:06 AM5/28/24
to Wazuh | Mailing List
wazuh has rule id - 31168 which is for Shellshock attack detected. Would it be possible to make a rule that would trigger if this rule triggers and the agent vulnerability scanner has detected CVE-2014-6271 (the Shellshock vulnerability),

For example at the moment the Shellshock rule triggered on this full log - 111.111.111.111 - - [21/May/2024:18:36:35 +0000] "GET /cgi-bin/jarrewrite.sh HTTP/1.1" 302 3319 "-" "\"() { :; }; echo ; /bin/bash -c 'cat /etc/passwd'\""

If the server does not have the vulnerability i would like to lower the level of the rule, however if the server has the vulnerability i would like the alert to be level 15.

Juan Nicolás Asselle (Nico Asselle)

unread,
May 28, 2024, 8:19:14 AM5/28/24
to Wazuh | Mailing List

Hi!

Currently, Wazuh rules do not allow (as it) the correlation of an event with the agent’s vulnerability information.

But there’s still a way to achieve this! here’s the idea

Basically is a loop in the Wazuh Manager that checks 31168 rule, validates it against CVE database, and in case it meets the criteria it will create a new event that will trigger a custom rule with a higher level.
This kind of mechanism is already used in OTTB scripts like Virustotal integration

Hope this helps!
Nico

Reply all
Reply to author
Forward
0 new messages