Created
November 22, 2016 17:50
-
-
Save mstemm/abd3d875fe94314496f220a38e02983f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- macro: bin_dir | |
condition: fd.directory in (/bin, /sbin, /usr/bin, /usr/sbin) | |
- macro: open_write | |
condition: (evt.type=open or evt.type=openat) and evt.is_open_write=true and fd.typechar='f' | |
- macro: package_mgmt_binaries | |
items: [dpkg, dpkg-preconfigu, rpm, rpmkey, yum, frontend] | |
- rule: Write below binary dir | |
desc: an attempt to write to any file below a set of binary directories | |
condition: bin_dir and evt.dir = < and open_write and not proc.name in (package_mgmt_binaries) | |
output: "File below a known binary directory opened for writing (user=%user.name command=%proc.cmdline file=%fd.name)" | |
priority: WARNING | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment