Hi Dharmil
Yes you are right!
There is an open issue with the field srcuser case
link.
You can modify the default decoder to capture that field in a
src_user.Example
The decoder is in the file
/var/ossec/ruleset/decoders/0320-sudo_decoders.xmlOriginal<decoder name="sudo-fields">
<parent>sudo</parent>
<prematch>\s</prematch>
<regex>^\s*(\S+)\s*:</regex>
<order>
srcuser</order>
<fts>name,
srcuser,location</fts>
<ftscomment>First time user executed the sudo command</ftscomment>
</decoder>
New <decoder name="sudo-fields">
<parent>sudo</parent>
<prematch>\s</prematch>
<regex>^\s*(\S+)\s*:</regex>
<order>
src_user</order>
<fts>name,
src_user,location</fts>
<ftscomment>First time user executed the sudo command</ftscomment>
</decoder>
Then update your rule
<group name="syslog, sudo">
<rule id="100001" level="3">
<if_sid>5402</if_sid>
<field name="src_user">dharmil</field>
<description>Ignore: successful sudo to ROOT executed.</description>
<rule>
</group>
Be careful, the default decoder files are updated with each manager update.
Let me know if that works.
Regards.