<localfile>
<log_format>full_command</log_format>
<alias>process list</alias>
<command>ps -e -o pid,uname,command</command>
<frequency>30</frequency>
</localfile>
And here are the rules I used for the video (/var/ossec/etc/rules/local_rules.xml):
<group name="ossec,">
<rule id="100050" level="0">
<if_sid>530</if_sid>
<match>^ossec: output: 'process list'</match>
<description>List of running processes.</description>
<group>process_monitor,</group>
</rule>
<rule id="100051" level="7" ignore="900">
<if_sid>100050</if_sid>
<match>nc -l</match>
<description>Netcat listening for incoming connections.</description>
<group>process_monitor,</group>
</rule>
</group>
Rule 530 is included by default, you don't need to add it to your local_rules.xml file. It matches everything that uses 'command' or 'full_command' in <log_format> configuration section. It does it by looking to the string 'ossec: output: ' at the beginning of the event coming from the agent. Here is the rule (it belongs to file /var/ossec/ruleset/rules/0015-ossec_rules.xml):
<rule id="530" level="0">
<if_sid>500</if_sid>
<match>^ossec: output: </match>
<description>OSSEC process monitoring rules.</description>
<group>process_monitor,</group>
</rule>
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/707c355c-990b-499d-b5e7-0f92a804cb3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<localfile>
<log_format>full_command</log_format>
<alias>process list</alias>
<command>ps -e -o pid,uname,command</command>
<frequency>30</frequency>
</localfile>
and I configured this rules in the manager:
<group name="ossec,">
<rule id="100050" level="0">
<if_sid>530</if_sid>
<match>^ossec: output: 'process list'</match>
<description>List of running processes.</description>
<group>process_monitor,</group>
</rule>
<rule id="100051" level="7" ignore="900">
<if_sid>100050</if_sid>
<match>nc -l</match>
<description>Netcat listening for incoming connections.</description>
<group>process_monitor,</group>
</rule>
</group>
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/99c92910-a4e2-4c54-b39f-b6908f5402c3%40googlegroups.com.
Hi SantiagoThanks very much for your response.I am running the wazuh agent in a Ubuntu server 16.04 andthe wazuh manager is in Centos7When I runps -e -o -pid, uname command i was not able to see the total ( all ) log, and I was notable to see the nc -l.The goal is detects if a netcat process is running, but because the list of process get truncated, I can not detected it.Some another idea?Thanks and RegardsYolanda Prieto
On 2018-02-14 03:15, Santiago Bassett wrote:
Hi Yolanda,
I am not sure what the cause of the problem may be, but most likely we
do not parse the double quotes in the command correctly (I've never
tried that myself).
What OS are you running? When you run PS -E -O PID,UNAME,COMMAND do
Visit this group at https://groups.google.com/group/wazuh [2].
To view this discussion on the web visit
https://groups.google.com/d/msgid/wazuh/99c92910-a4e2-4c54-b39f-b6908f5402c3%40googlegroups.com
[3].
For more options, visit https://groups.google.com/d/optout [4].
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.
Links:
------
[1] https://www.youtube.com/watch?v=Cx2rIpGA3V8
[2] https://groups.google.com/group/wazuh
[3]
https://groups.google.com/d/msgid/wazuh/99c92910-a4e2-4c54-b39f-b6908f5402c3%40googlegroups.com?utm_medium=email&utm_source=footer
[4] https://groups.google.com/d/optout
[5]
https://groups.google.com/d/msgid/wazuh/CAEb-Ba__vDJmysBp2drcfpow8pAKgXir%3D3oxF0MGfrFTtXEpSw%40mail.gmail.com?utm_medium=email&utm_source=footer
Hi Yolanda,
I am not sure what the cause of the problem may be, but most likely we
do not parse the double quotes in the command correctly (I've never
tried that myself).
What OS are you running? When you run PS -E -O PID,UNAME,COMMAND do
an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh [2].
To view this discussion on the web visit
https://groups.google.com/d/msgid/wazuh/99c92910-a4e2-4c54-b39f-b6908f5402c3%40googlegroups.com
[3].
For more options, visit https://groups.google.com/d/optout [4].
--
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 post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.