<rule id="31168" level="15">
<if_sid>31108</if_sid>
<regex>"\(\)\s*{\s*\w*:;\s*}\s*;|"\(\)\s*{\s*\w*;\s*}\s*;</regex>
<description>Shellshock attack detected</description>
<mitre>
<id>T1068</id>
<id>T1190</id>
</mitre>
<info type="cve">CVE-2014-6271</info>
<info type="link">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-6271</info>
<group>attack,pci_dss_11.4,gdpr_IV_35.7.d,nist_800_53_SI.4,tsc_CC6.1,tsc_CC6.8,tsc_CC7.2,tsc_CC7.3,</group>
</rule>
AND
<rule id="31169" level="15">
<if_sid>31108</if_sid>
<regex>"\(\)\s*{\s*_;\.*}\s*>_[\$\(\$\(\)\)]\s*{</regex>
<description>Shellshock attack detected</description>
<mitre>
<id>T1068</id>
<id>T1190</id>
</mitre>
<info type="cve">CVE-2014-6278</info>
<info type="link">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-6278</info>
<group>attack,pci_dss_11.4,gdpr_IV_35.7.d,nist_800_53_SI.4,tsc_CC6.1,tsc_CC6.8,tsc_CC7.2,tsc_CC7.3,</group>
</rule>
I didn't touch those two rules, they're native wazuh rules.
Why is it sending the same 2 alert more than 100 times every day? And how can I make it send just one time. And is there a fix? I mean yeah, nessus is trying shellshock attacks. But I am doing it on purpose. But Why just one host gets triggered. And I don't want to ignore it to get alerts about a real shellshock attack attempt.
I found another similar post here which recommends just setting the rule level to 0. That is not a solution in my eyes.
https://groups.google.com/g/wazuh/c/t-epCxHOtnk/m/uPRhBly4AgAJ
Cheers
chic
I believe we can create a custom rule to exclude alerts from that Nessus log source. Could you please share sample logs related to both rules? This will help us check if it's possible to exclude these events based on the log source.
There is an option to use the ignore attribute in the rule tag. However, in your case, you shouldn't use it to overwrite rules and avoid alert floods during specific times, because doing so would also exclude real attacks. The best option is to review the sample logs that trigger those alerts and create a custom rule with level 0 to silence them instead.
Example:
If the Nessus IP address appears in the log, you can write a regex to match it. If the log decodes the IP address, you can use the <field> tag in the rule instead. However, we need to review the sample logs to provide you with the proper solution.
Ref:
Wazuh Regex
Custom rules
Rule syntax
Earlier, I shared an example, and you can achieve this using the same approach.
The reason it was not working is because of the regex. Your log sample starts directly with the IP address, so you don't need to add \.+ before the IP in the regex pattern.
For example, you can write it like this:
Could you share a bit more detail about the issue? It's a bit strange that the first rule worked but the second one isn't, especially since the log you shared seems to match the last rule I provided.
To get to the bottom of this, we need to check the actual log sample that Wazuh is processing through its analysis engine. It would help if you could pull the relevant logs from the archives.json file so we can take a closer look at what's coming through.
By default, archive logs are disabled due to high storage consumption. Edit the /var/ossec/etc/ossec.conf file and add this:
Save the file, then restart the manager again: systemctl restart wazuh-manager
This will log all events to /var/ossec/logs/archives/archives.json, so you can see everything your manager is picking up.
Check the Archive Logs: Now, let’s look for related logs in the archive: cat /var/ossec/logs/archives/archives.json | grep keyword
Replace keyword with sample log unique content.
Warning Keeping <logall_json>yes</logall_json> on can fill up your disk fast! Once you’re done troubleshooting, set it back to no in /var/ossec/etc/ossec.conf and restart the manager: systemctl restart wazuh-manager.
The only difference in the events was the host that triggered.
Ref: https://documentation.wazuh.com/current/user-manual/ruleset/ruleset-xml-syntax/rules.html#rules-hostname
If you are mentioned in this way, then you can use hostname tag to use the rule for specic agent, if not please share more details regarding this.
Let me know if you need further assistance on this.

That's okay, let me know if you need any further help with this, and we can look into it more. Thanks!