Skip to content

Commit e0e2b3a

Browse files
committed
Extend syscall rules for security policies
Added audit rules for new mount and Landlock-related syscalls—mount_setattr, landlock_create_ruleset, landlock_add_rule, landlock_restrict_self, and lsm_set_self_attr—in the OSPP policy set with a special-config-changes key to track sensitive configuration activity. Mirrored these syscall audits in the PCI-DSS policy rules using the 10.2.7-system-object key to align with PCI-DSS requirements for system-level object changes. Updated the STIG rule set to log mount_setattr alongside mount, ensuring mount attribute changes are captured for STIG compliance.
1 parent 5cbd004 commit e0e2b3a

File tree

3 files changed

+32
-5
lines changed

3 files changed

+32
-5
lines changed

rules/30-ospp-v42.rules

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,18 @@
7474
-a always,exit -F arch=b32 -F path=/usr/sbin/grub2-set-bootflag -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes
7575
-a always,exit -F arch=b64 -F path=/usr/sbin/grub2-set-bootflag -F perm=x -F auid>=1000 -F auid!=unset -F key=special-config-changes
7676

77+
## Capture mount and LSM attribute changes
78+
-a always,exit -F arch=b32 -S mount_setattr -F auid>=1000 -F auid!=unset -F key=special-config-changes
79+
-a always,exit -F arch=b64 -S mount_setattr -F auid>=1000 -F auid!=unset -F key=special-config-changes
80+
-a always,exit -F arch=b32 -S landlock_create_ruleset -F auid>=1000 -F auid!=unset -F key=special-config-changes
81+
-a always,exit -F arch=b64 -S landlock_create_ruleset -F auid>=1000 -F auid!=unset -F key=special-config-changes
82+
-a always,exit -F arch=b32 -S landlock_add_rule -F auid>=1000 -F auid!=unset -F key=special-config-changes
83+
-a always,exit -F arch=b64 -S landlock_add_rule -F auid>=1000 -F auid!=unset -F key=special-config-changes
84+
-a always,exit -F arch=b32 -S landlock_restrict_self -F auid>=1000 -F auid!=unset -F key=special-config-changes
85+
-a always,exit -F arch=b64 -S landlock_restrict_self -F auid>=1000 -F auid!=unset -F key=special-config-changes
86+
-a always,exit -F arch=b32 -S lsm_set_self_attr -F auid>=1000 -F auid!=unset -F key=special-config-changes
87+
-a always,exit -F arch=b64 -S lsm_set_self_attr -F auid>=1000 -F auid!=unset -F key=special-config-changes
88+
7789
## Privilege escalation via su or sudo. This is entirely handled by pam.
7890
## Special case for systemd-run. It is not audit aware, specifically watch it
7991
-a always,exit -F arch=b32 -F path=/usr/bin/systemd-run -F perm=x -F auid!=unset -F key=maybe-escalation

rules/30-pci-dss-v31.rules

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## The purpose of these rules is to meet the pci-dss v3.1 auditing requirements
2-
## These rules depends on having 10-base-config.rules & 99-finalize.rules
3-
## installed.
2+
## These rules depends on having 10-base-config.rules, 43-module-load.rules,
3+
## and 99-finalize.rules installed.
44

55
## NOTE:
66
## 1) if this is being used on a 32 bit machine, comment out the b64 lines
@@ -87,7 +87,22 @@
8787
## These are handled implicitly by auditd
8888

8989
## 10.2.7 Creation and deletion of system-level objects
90-
## This requirement seems to be database table related and not audit
90+
## This requirement would include the database table holding user information.
91+
## but we will also define this to mean Kernel modules, security controls,
92+
## and system software. Changes to system software is implicitly met by
93+
## librpm so that using either rpm or dnf to install something results in an
94+
## audit event. We will place rules to meet the other items.
95+
## For kernel modules, include 43-module-load.rules
96+
-a always,exit -F arch=b32 -S mount_setattr -F auid>=1000 -F auid!=unset -F key=10.2.7-system-objects
97+
-a always,exit -F arch=b64 -S mount_setattr -F auid>=1000 -F auid!=unset -F key=10.2.7-system-objects
98+
-a always,exit -F arch=b32 -S landlock_create_ruleset -F auid>=1000 -F auid!=unset -F key=10.2.7-system-objects
99+
-a always,exit -F arch=b64 -S landlock_create_ruleset -F auid>=1000 -F auid!=unset -F key=10.2.7-system-objects
100+
-a always,exit -F arch=b32 -S landlock_add_rule -F auid>=1000 -F auid!=unset -F key=10.2.7-system-objects
101+
-a always,exit -F arch=b64 -S landlock_add_rule -F auid>=1000 -F auid!=unset -F key=10.2.7-system-objects
102+
-a always,exit -F arch=b32 -S landlock_restrict_self -F auid>=1000 -F auid!=unset -F key=10.2.7-system-objects
103+
-a always,exit -F arch=b64 -S landlock_restrict_self -F auid>=1000 -F auid!=unset -F key=10.2.7-system-objects
104+
-a always,exit -F arch=b32 -S lsm_set_self_attr -F auid>=1000 -F auid!=unset -F key=10.2.7-system-objects
105+
-a always,exit -F arch=b64 -S lsm_set_self_attr -F auid>=1000 -F auid!=unset -F key=10.2.7-system-objects
91106

92107
## 10.3 Record at least the following audit trail entries
93108
## 10.3.1 through 10.3.6 are implicitly met by the audit system.

rules/30-stig.rules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@
129129
## You have to mount media before using it. You must disable all automounting
130130
## so that its done manually in order to get the correct user requesting the
131131
## export
132-
-a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=unset -F key=export
133-
-a always,exit -F arch=b64 -S mount -F auid>=1000 -F auid!=unset -F key=export
132+
-a always,exit -F arch=b32 -S mount,mount_setattr -F auid>=1000 -F auid!=unset -F key=export
133+
-a always,exit -F arch=b64 -S mount,mount_setattr -F auid>=1000 -F auid!=unset -F key=export
134134

135135
##- System startup and shutdown (unsuccessful and successful)
136136

0 commit comments

Comments
 (0)