Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rules/decoders for ownCloud #64

Merged
merged 1 commit into from Oct 31, 2017
Merged

Rules/decoders for ownCloud #64

merged 1 commit into from Oct 31, 2017

Conversation

ghost
Copy link

@ghost ghost commented Sep 1, 2017

My first dive into this topic, feedback is very welcome.

Cross-Ref: ossec/ossec-hids#1246

@jesuslinares
Copy link
Contributor

Hi @kdslkdsaldsal,

it is a great job!.

Keep on mind that Wazuh 3.0 is able to decode JSON events automatically, so you don't need to create the decoders. Example: https://github.com/wazuh/wazuh-ruleset/blob/master/rules/0475-suricata_rules.xml

Also, this decoder is capturing several events, not only ownCloud:

<decoder name="owncloud">
  <prematch>^{"\S+":"\S+","\S+":"\S+</prematch>
</decoder>

Please, change the parent decoder to something more specific or adapt them to Wazuh 3.0.

Thanks a lot.

@ghost
Copy link
Author

ghost commented Sep 2, 2017

@jesuslinares
Hey, thanks for your review. I thought this might be too unspecific but wasn't sure. Unfortunately the logformat of ownCloud is quite messy and unstable as you can see from the examples 😞

What about matching for:

^{"reqId":"\S+","\S+":"\S+|^{"app":"\S+","\S+":"\S+

at the beginning? Or is this still to unspecific?

But i will have another look tomorrow, maybe i can use a <regex> instead of the <prematch> which gives me a little more freedom in the initial decoder match.

@ghost
Copy link
Author

ghost commented Sep 3, 2017

@jesuslinares Updated the prematch (got a "No 'prematch' found in decoder: 'owncloud'." when trying to use only a regex). Hope this makes the decoder more specific.

@ghost
Copy link
Author

ghost commented Sep 24, 2017

Seems they have changed the log order / syntax once more in ownCloud 10: owncloud/core#27562

Just updated this PR to catch those logs as well.

Cross-Ref: ossec/ossec-hids#1260

@jesuslinares jesuslinares merged commit 5d7d045 into wazuh:master Oct 31, 2017
@jesuslinares
Copy link
Contributor

Good job!. Thanks for your contribution.

@ghost ghost deleted the owncloud branch November 1, 2017 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant