/var/ossec/etc/rules/
/var/ossec/etc/decoders/
Respuesta mail list:
Hello,
In order to ensure the events are reaching the manager, follow these steps:
Edit the manager's /var/ossec/etc/ossec.conf file and set the <logall_json> option to yes.
Restart the manager.
Execute the following command --> tailf /var/ossec/logs/archives/archives.json | grep "User login: successful"
Generate the events in the agent. In this case, login successfully against the apache server.
You should be able to see events showing up in the terminal where you executed the tailf command. Please set the <logall_json> option to no again to avoid storing every event coming from the agents.
In case the events are reaching the manager the rules and decoders aren't working as expected, is necessary to check out the events received and compare them against the decoders and rules.
In case the events aren't reaching the manager the agent is not properly configured. Please check you’ve set the <localfile> correctly and there are new events in the monitored file.
I hope it helps you.
<decoder name="apache-access-logs">
<parent>apache-access-logs</parent>
<regex>Username: "(\.*)"|[\d+](\w+) - </regex>
<order>Username</order>
</decoder>
<decoder name="apache-access-logs">
<parent>apache-access-logs</parent>
<regex>Username: "(\.*)"|[\d+](\.+) - </regex>
<order>Username</order>
</decoder>
<rule id="100008" level="6" frequency="3" timeframe="10">
<if_matched_sid>100003</if_matched_sid>
<description>Brute force attack detected.</description>
</rule>
<rule id="100009" level="6" frequency="2" timeframe="60">
<if_matched_sid>100004</if_matched_sid>
<same_field>Username</same_field>
<not_same_field>server_ip</not_same_field>
<description>different ip.</description>
</rule>