- File permissions and a service's log do not say who wrote to a file — auditd records that by a rule.
- A rule is set with
auditctl -w <path> -p wa -k <key>, events are read withausearch -k <key> -i. - In an event
comm/exeare the program,uidis the effective user,auidis who logged in (unsetfor a boot-time service), andppidleads to the service. - A persistent rule is a line in
/etc/audit/rules.d/*.rules, loaded byaugenrules --load; it survives an auditd restart. - The line in
/etc/hostsfrom the start of the lesson was appended by a service: the audit event named thesedprogram and its path, andppidled to the unit that ran it.
Step 6 of 6 · summary · 3 min
Summary
Found an inaccuracy? Report an error in the lesson