╰─# /var/ossec/bin/wazuh-logtest 130 ↵
Starting wazuh-logtest v4.3.5
Type one log per line
178.30.160.203 - - [24/Jun/2022:18:16:35 +0530] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko”
**Phase 1: Completed pre-decoding.
full event: '178.30.160.203 - - [24/Jun/2022:18:16:35 +0530] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko”'
**Phase 2: Completed decoding.
name: 'web-accesslog'
id: '304'
protocol: 'GET'
srcip: '178.30.160.203'
url: '/'
**Phase 3: Completed filtering (rules).
id: '100100'
level: '12'
description: 'IP address found in AlienVault reputation database.'
groups: '['syslog', 'attacks']'
firedtimes: '1'
mail: 'True'
**Alert to be generated.
Jun 24 18:09:27 test sshd[2066210]: Accepted password for helpdeskmum from 178.30.160.203 port 20987 ssh2
**Phase 1: Completed pre-decoding.
full event: 'Jun 24 18:09:27 test sshd[2066210]: Accepted password for helpdeskmum from 178.30.160.203 port 20987 ssh2'
timestamp: 'Jun 24 18:09:27'
hostname: 'test'
program_name: 'sshd'
**Phase 2: Completed decoding.
name: 'sshd'
parent: 'sshd'
dstuser: 'helpdeskmum'
srcip: '178.30.160.203'
srcport: '20987'
**Phase 3: Completed filtering (rules).
id: '900805'
level: '12'
description: 'Authentication success from Blacklisted IP'
groups: '['syslog', 'attacks']'
firedtimes: '1'
frequency: '2'
gdpr: '['IV_35.7.d', 'IV_32.2']'
gpg13: '['4.13']'
hipaa: '['164.312.b', '164.312.a.2.I', '164.312.a.2.II']'
mail: 'True'
mitre.id: '['T1531']'
mitre.tactic: '['Impact']'
mitre.technique: '['Account Access Removal']'
nist_800_53: '['AU.14', 'AC.7', 'AC.2', 'IA.4']'
pci_dss: '['10.2.7', '10.2.5', '8.1.2']'
tsc: '['CC6.8', 'CC7.2', 'CC7.3']'
**Alert to be generated.
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/CAKK7VjogCwu%3DDawRQ7KaJ%2BRbqzNRgpd4APux6ZuJgE6zO7Gkjg%40mail.gmail.com.
Hi Julian,I am using wazuh version 4.3.1.
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/08356b30-01d1-41a7-8eb3-97a02fa646acn%40googlegroups.com.
[root@wazuh-server ~]cat /var/ossec/etc/rules/local_rules.xml
<!-- Local rules -->
<!-- Modify it at your will. -->
<!-- Copyright (C) 2015, Wazuh Inc. -->
<!-- Example -->
<group name="local,syslog,sshd,">
<!--
Dec 10 01:02:02 host sshd[1234]: Failed none for root from 1.1.1.1 port 1066 ssh2
-->
<rule id="100001" level="5">
<if_sid>5716</if_sid>
<srcip>1.1.1.1</srcip>
<description>sshd: authentication failed from IP 1.1.1.1.</description>
<group>authentication_failed,pci_dss_10.2.4,pci_dss_10.2.5,</group>
</rule>
</group>
<group name="syslog,attacks,">
<rule id="100100" level="12">
<if_group>web|attack|attacks</if_group>
<list field="srcip" lookup="address_match_key">etc/lists/blacklist_alienvault_windows_test</list>
<description>IP address found in AlienVault reputation database.</description>
</rule>
</group>
<group name="syslog,attacks,">
<rule id="900805" level="12" timeframe= "500" frequency="2">
<if_matched_sid>100100</if_matched_sid>
<if_sid>5715</if_sid>
<same_srcip />
<description>Authentication success from Blacklisted IP</description>
<mitre> <id>T1531</id> </mitre>
<group>pci_dss_10.2.7,pci_dss_10.2.5,pci_dss_8.1.2,gpg13_4.13,gdpr_IV_35.7.d,gdpr_IV_32.2,hipaa_164.312.b,hipaa_164.312.a.2.I,hipaa_164.312.a.2.II,nist_800_53_AU.14,nist_800_53_AC.7,nist_800_53_AC.2,nist_800_53_IA.4,tsc_CC6.8,tsc_CC7.2,tsc_CC7.3,</group>
</rule>
</group>
[root@wazuh-server ~]# cat /var/ossec/etc/lists/blacklist_alienvault_windows_test
178.30.160.203:
<ruleset>
<!-- Default ruleset -->
<decoder_dir>ruleset/decoders</decoder_dir>
<rule_dir>ruleset/rules</rule_dir>
<rule_exclude>0215-policy_rules.xml</rule_exclude>
<list>etc/lists/audit-keys</list>
<list>etc/lists/amazon/aws-eventnames</list>
<list>etc/lists/security-eventchannel</list>
<list>etc/lists/blacklist_alienvault_windows_test</list>
<!-- User-defined ruleset -->
<decoder_dir>etc/decoders</decoder_dir>
<rule_dir>etc/rules</rule_dir>
</ruleset>
[root@wazuh-server ~]# /var/ossec/bin/wazuh-logtest
Starting wazuh-logtest v4.3
Type one log per line
178.30.160.203 - - [24/Jun/2022:18:16:35 +0530] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko”
**Phase 1: Completed pre-decoding.
full event: '178.30.160.203 - - [24/Jun/2022:18:16:35 +0530] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko”'
**Phase 2: Completed decoding.
name: 'web-accesslog'
id: '304'
protocol: 'GET'
srcip: '178.30.160.203'
url: '/'
**Phase 3: Completed filtering (rules).
id: '100100'
level: '12'
description: 'IP address found in AlienVault reputation database.'
groups: '['syslog', 'attacks']'
firedtimes: '1'
mail: 'True'
**Alert to be generated.
Jun 24 18:09:27 test sshd[2066210]: Accepted password for helpdeskmum from 178.30.160.203 port 20987 ssh2
**Phase 1: Completed pre-decoding.
Hi Julian,
I found that rule working perfectly in wazuh-logtest . But after pushing it in the live environment it started showing inconsistent behaviour.
I found this same inconsistent behaviour for all my rules where I used if_sid and If_matched_sid with same_XXX.
Please guide me .
Hi Julián,Please find attached file
Hi Julián,I have recorded a video for your better understanding .Please let me know if you have any questions.On Mon, 18 Jul 2022 at 10:19, Julián Morales <julian....@wazuh.com> wrote:JulianHI TUKARAM,Regards,
Could you help me to understand the inconsistencies? I see that the behavior is as expected in the alerts.
The 57XX rules and the 100100 rule seem to be generated correctly. As for rule 900810, I don't know because the alerts of 31168 are not present.On Fri, Jul 15, 2022 at 4:50 AM TUKARAM GAONKAR <tukaramga...@gmail.com> wrote:HI Julian ,Here you see lots of inconsistency in behaviour for this rule.