The scenario is fictional. The awk detector was tested on a synthetic log (
epoch uid comm args). The article's timeline row for this burst is an illustrative assumption, not from the book's exercise log.
Before escalating, attackers look around. Four commands in a few minutes from a service account are rare in normal operations.
What you'll learn
- The enumeration commands:
sudo -l,find / -perm -4000,getcap -r /,uname -r - Counting distinct kinds per uid per minute
- Handling false positives
Detector logic
Key on uid + minute, count distinct kinds, alert on n >= 3 and uid != 0. Test output:
ENUM-BURST uid=33 kinds=4: sudo-l find-suid getcap uname-r
Normal admin activity (one or two kinds) stayed silent. Allow-list known inventory jobs by uid and source.
Next: the Windows version, IIS to SYSTEM in 17 minutes.
Adapted from chapter 25 of my Japanese book on server defense.
Top comments (0)