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

Fix ignoring paths on rootcheck #3058

Merged
merged 12 commits into from Apr 23, 2019
Merged

Fix ignoring paths on rootcheck #3058

merged 12 commits into from Apr 23, 2019

Conversation

Zenidd
Copy link
Contributor

@Zenidd Zenidd commented Apr 9, 2019

The fix in this PR partially solves the issue #3030

  • Now the check_dev module now ignores the paths specified in ossec.conf.
  • The rest of the rootcheck modules( check_trojans, check_files, check_sys) that perform a search in the file system still do not implement the ignore functionality well.

@Zenidd Zenidd marked this pull request as ready for review April 11, 2019 09:38
@Zenidd Zenidd requested a review from albertomn86 April 11, 2019 09:38
@Zenidd
Copy link
Contributor Author

Zenidd commented Apr 11, 2019

The fix in this PR solves the issue #3030

  • Now the check_dev module now ignores paths and files specified in ossec.conf.

  • The rest of the rootcheck modules( check_trojans, check_files, check_sys..) that perform a search in the file system are now able to ignore path and files.

Tests have been performed ignoring paths and files in different locations of the file system.

@albertomn86 albertomn86 changed the base branch from 3.10 to 3.9 April 12, 2019 10:57
@Zenidd Zenidd self-assigned this Apr 12, 2019
@Zenidd Zenidd force-pushed the 3.10-rootcheck-ignore branch 4 times, most recently from 6f27323 to 9226119 Compare April 16, 2019 15:30
@albertomn86
Copy link
Contributor

Example of use:

  • Using sregex:
    <ignore type="sregex">/dev/ignore/</ignore>
2019/04/23 11:20:15 ossec-syscheckd[46437] rootcheck.c:267 at check_ignore(): DEBUG: '/dev/ignore/.badalert' matches the '/dev/ignore/' pattern, so it will be ignored.
  • Using full path:
    <ignore>/dev/ignore/.badalert</ignore>
2019/04/23 11:14:46 ossec-syscheckd[43323] rootcheck.c:275 at check_ignore(): DEBUG: '/dev/ignore/.badalert' has been marked as ignored.

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.

None yet

3 participants