--
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/16a0134c-e73a-19e1-47c6-50f6c1a10ba3%40kalrong.net.
For more options, visit https://groups.google.com/d/optout.
Yeah, Im using sources like VT and MISP where I get a list of filenames, hashes, etc.
I think the CDB list could be a good approach while we keep this list updated from different sources, but not really sure how the alert must be created, Im checking the documentation but doesn't speak about hashes just ip's and users.
Thanks a lot for your quick response Santiago!
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 https://groups.google.com/d/msgid/wazuh/CAEb-Ba-na7ztdQnRJ8Zx60wsLAwgNkA0R9A5FZNWHPaVZmbDJA%40mail.gmail.com.
I managed to create the CDB with a test hash and created the following rule upon new file creation:
<group name="syscheck">
<rule id="69001" level="15">
<if_sid>554</if_sid>
<list field="syscheck.md5_after" lookup="match_key_value"
check_value="^malware">etc/lists/md5-keys</list>
<description>MD5 matches malware.</description>
</rule>
</group>
Just asked in the #ossec IRC channel and looks like this rule
works as expected on the ossec master branch, looks like there is
something not merged in the wazuh fork, any ideas?
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/44148f34-2e95-7efb-2de7-524ba7e180d2%40kalrong.net.
mmm looks like its not working at all.
I have tried to mimic rule 598 but using cdb and still doesn't work:
<rule id="598"
level="5">
|
<category>ossec</category>
|
<if_sid>554</if_sid>
|
<hostname>syscheck-registry</hostname>
|
<group>syscheck,pci_dss_11.5,</group>
|
<description>Registry Entry Added to the
System</description>
|
</rule>
cdb file contains syscheck-registry:test and was compiled with
ossec-makelist and I created the following rule.
<rule id="69001"
level="15">
<if_sid>554</if_sid>
<list field="hostname"
lookup="match_key">etc/lists/md5-keys</list>
<description>MD5 matches
malware.</description>
</rule>
If I change the list line with a simple match with the file name
created it works. It seems like when list is used the field is not
properly recognized or populated before checking for a match. I
also tried changing from match_key to not_match_key but the result
is the same, the rule doesn't trigger.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/8b1d3285-2e15-69d7-e08a-68c3c9a3791d%40kalrong.net.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/CAEb-Ba-na7ztdQnRJ8Zx60wsLAwgNkA0R9A5FZNWHPaVZmbDJA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
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/44148f34-2e95-7efb-2de7-524ba7e180d2%40kalrong.net.
For more options, visit https://groups.google.com/d/optout.
--
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.
Hi Jesus,
This is the content of the file, as you can see I add a couple of
tests but the first one is the one intended to work:
8b6742f65664caabe5e3f2bef207fb31:malware
malware:8b6742f65664caabe5e3f2bef207fb31
syscheck-registry:test
The file has been add to the config and ossec-makelist run.
Any ideas about this? We are stuck here and not sure what else to try.
Currently we have this CDB:
8b6742f65664caabe5e3f2bef207fb31:malware
malware:8b6742f65664caabe5e3f2bef207fb31
That we are trying to match with this rule (set under local_rules.xml):
<group name="syscheck">
<rule id="69001" level="15">
<if_sid>554</if_sid>
<list field="syscheck.md5_after" lookup="match_key_value"
check_value="^malware">etc/lists/md5-keys</list>
<description>MD5 matches malware.</description>
</rule>
</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 https://groups.google.com/d/msgid/wazuh/9d953cd4-224b-06cf-f7be-e07a76aaa875%40kalrong.net.
No more ideas here then?
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 https://groups.google.com/d/msgid/wazuh/9d953cd4-224b-06cf-f7be-e07a76aaa875%40kalrong.net.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/0095c93a-f410-fa06-76ac-07b32ed9201e%40kalrong.net.
I've made this example using a CDB list to check if the MD5 belongs to a list of hashes.
First of all I've made a CDB list with the list of MD5 hashes and I've compiled it using ossec-makelist.
etc/lists/md5-keys
a992c07980ab70422c1f3e82a0517fff:
I've used the following rules:
<group name="attack,">
<rule id="69001" level="15">
<category>ossec</category>
<decoded_as>syscheck_new_entry</decoded_as>
<list field="md5" lookup="match_key">etc/lists/md5-keys</list>
<description>New file matches malware IOC.</description>
<group>malware,</group>
</rule>
<rule id="69002" level="15">
<category>ossec</category>
<decoded_as>syscheck_integrity_changed</decoded_as>
<list field="md5" lookup="match_key">etc/lists/md5-keys</list>
<description>New file matches malware IOC.</description>
<group>malware,</group>
</rule>
</group>
The field used is 'md5', corresponding to the field 'md5_before'.
Then I've added a new file with the specified MD5 and I've obtained the expected alert:
** Alert 1506355643.224444: mail - attack,malware,
2017 Sep 25 18:07:23 ubuntu->syscheck
Rule: 69001 (level 15) -> 'New file matches malware IOC.'
New file '/etc/malware' added to the file system.
File: /etc/malware
New size: 22
New permissions: 100644
New user: root (0)
New group: root (0)
New MD5: a992c07980ab70422c1f3e82a0517fff
New SHA1: d37c3dcfad7da300115c78c5af6a5fa72e49fe94
New date: Mon Sep 25 18:07:22 2017
New inode: 804370
I hope it helps.
Regards.
Thanks a lot for you reply! I will test it tomorrow morning and
let you know the results.
--
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 https://groups.google.com/d/msgid/wazuh/bd727aa7-7254-4a07-a161-c250213dee21%40googlegroups.com.
Hi Alberto,
Just tested and is working like a charm now, looks like the problem was the field name that should be md5 but it wasn't expecified anywhere.
I have done tests on different lookups and using if_sid and everything is working fine :)
Thanks a lot!
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/e957bd41-26b4-48da-8031-7e53463d539a%40kalrong.net.
A little detail, what would be the field in this case that I
should pass to an active respons escript so it deletes the file
that matches that 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+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 https://groups.google.com/d/msgid/wazuh/1476ff6f-1477-40ac-aeaf-9327106c612b%40googlegroups.com.
So, there is no way to use an active response rule that takes the
filename from the alert? Or maybe the syscheck.file_path is stored
in dstuser o srcip?
--
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 https://groups.google.com/d/msgid/wazuh/1dd33aa6-f782-476e-8680-e8e8a86fc4a9%40googlegroups.com.