Skip to content

Commit

Permalink
fix process match for /sbin for redhat linux sys
Browse files Browse the repository at this point in the history
In redhat and fedora systems, /sbin/ is a symlink to
/usr/sbin, preventing the process match from catching
the execs.
  • Loading branch information
carlosrodfern committed Aug 7, 2024
1 parent a3a3a94 commit 1c4f71f
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions cis/system/ksp-audit-cis-mysql-1-5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ spec:
matchPaths:
- path: /bin/false
- path: /sbin/nologin
- path: /usr/sbin/nologin
action: Audit
1 change: 1 addition & 0 deletions cis/system/ksp-block-cis-centos-8-1-1-4-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ spec:
- path: /usr/bin/auditd
- path: /bin/auditd
- path: /sbin/auditd
- path: /usr/sbin/auditd
action: Block
1 change: 1 addition & 0 deletions elastic/system/ksp-audit-elasticsearch-bash-spawn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ spec:
- path: /bin/bash
- path: /bin/sh
- path: /sbin/sh
- path: /usr/sbin/sh
- path: /bin/csh
action: Audit
3 changes: 3 additions & 0 deletions golang/system/ksp-block-golang-generic-policy-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ spec:
- path: /sbin/ldconfig
fromSource:
- path: /usr/bin/python2.7
- path: /usr/sbin/ldconfig
fromSource:
- path: /usr/bin/python2.7
- path: /usr/bin/whoami
fromSource:
- path: /bin/dash
Expand Down
1 change: 1 addition & 0 deletions malware/system/ksp-block-sysrv-hello-malware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ spec:
process:
matchPaths:
- path: /sbin/iptables
- path: /usr/sbin/iptables
- path: /etc/iptables
- path: /usr/share/iptables
- path: /usr/sbin/ufw
Expand Down
2 changes: 2 additions & 0 deletions metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ policyRules:
matchDirectories:
- dir: /sbin/
recursive: true
- dir: /usr/sbin/
recursive: true
message: restricted maintenance tool access attempted
selector:
matchLabels:
Expand Down
1 change: 1 addition & 0 deletions nist/system/ksp-system-information-blockwithaudit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ spec:
- path: /bin/lsblk
- path: /usr/bin/lspci
- path: /sbin/fdisk
- path: /usr/sbin/fdisk
action: Block
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ spec:
process:
matchPaths:
- path: /sbin/unix_update
- path: /usr/sbin/unix_update
action:
Audit

0 comments on commit 1c4f71f

Please sign in to comment.