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

Adding lighttpd decoder/rules #1787

Merged
merged 5 commits into from
Oct 3, 2020
Merged

Adding lighttpd decoder/rules #1787

merged 5 commits into from
Oct 3, 2020

Conversation

Nono-m0le
Copy link
Contributor

This is my first attempt, sorry if it's not the way it is supposed to be done.

  • I didn't had any licences/information on the rules as I personnaly use it on the local_rules.xml
    Obviously, this can freely reuse in any condition (WTFPL Licences)
    Feel free to correct if needed or merge with another set of rules ?
  • Rule id / level can be freely edited as needed (id="110000" / level="10")

Happy to get any feedback on this.

Is use this specific (not so nice) format to make it easier to differentiate with the almost similar racoon vpn rule.
The rules need to be put BEFORE the racoon one, due to the extra "(" after the date on lighttpd case, but not racoon VPN.
Probably a nicer way would be to create a specific "windows date format" rules, with sub-rules for racoon / lighttpd / other ?
@ddpbsd
Copy link
Member

ddpbsd commented Nov 2, 2019

Thanks for the submission. Here are a few comments.
Let's start the rule IDs with 56201.

I get this error when loading the rule file:

arrakis# cat /tmp/sample_logs | /var/ossec/bin/ossec-logtest 
2019/11/02 18:28:38 ossec-testrule: INFO: Reading local decoder file.
2019/11/02 18:28:38 rules_op: Invalid root element "rule".Only "group" is allowed
2019/11/02 18:28:38 ossec-testrule(1220): ERROR: Error loading the rules: 'lighttpd_rules.xml'.

So we need something like this before and after the rule:

<group name="local,lighttpd">
   RULE
</group>

<regex> probably isn't necessary, <match> will work just fine.

@atomicturtle
Copy link
Member

Looks good, thanks again for the contribution!

@atomicturtle atomicturtle merged commit 9764be3 into ossec:master Oct 3, 2020
@Nono-m0le Nono-m0le deleted the patch-1 branch October 3, 2020 21:54
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.

3 participants