Hello,
With the current rule engine of Wazuh and the architecture, there is no easy way to enrich an already created alert using the rule engine. You cannot make changes to the alerts from the manager once they are created.
You can do something like not trigger a new alert if the alert is from the same source ip and destination address for a specific time. But in that case, you will not have the new Session information from the same ip in your alerts.
Ref: same_srcip, same_dstip
You can make use of the Wazuh indexer Update Document API to update or enrich a document's fields with new values
https://docs.opensearch.org/latest/api-reference/document-apis/update-document/
And delete the second alert with the same source ip and destination address with the Delete Document API
Let me know if you need any further information.
Hello
same_srcip is used in conjunction with frequency and timeframe.
Ref: same_srcip,
I can see that you have not used frequency and timeframe
There is already a child rule for rule ID 11201. So rule 11201 will check that child rule first.
<rule id="11252" level="10" frequency="12" timeframe="60">
<if_matched_sid>11201</if_matched_sid>
<same_source_ip />
<description>ProFTPD: Multiple connection attempts from same source.</description>
<mitre>
<id>T1110</id>
</mitre>
<group>gdpr_IV_35.7.d,nist_800_53_SI.4,pci_dss_11.4,recon,tsc_CC6.1,tsc_CC6.8,tsc_CC7.2,tsc_CC7.3,</group>
</rule>
You can modify that child rule like this to trigger this custom modified rule.
<group name="syslog,proftpd,">
<rule id="11252" level="0" frequency="2" timeframe="60" ignore="300" overwrite="yes">
<if_matched_sid>11201</if_matched_sid>
<same_source_ip />
<description>ProFTPD: Multiple connection attempts from same source.</description>
<mitre>
<id>T1110</id>
</mitre>
<group>gdpr_IV_35.7.d,nist_800_53_SI.4,pci_dss_11.4,recon,tsc_CC6.1,tsc_CC6.8,tsc_CC7.2,tsc_CC7.3,</group>
</rule>
</group>
Check this document to learn more about overwriting custom rules:
Changing existing rules