Linux Audit Defense: Detect and Close LOLBin, Cron, and Credential Attack Gaps
Expert · 60 minutes · 100 points
In this expert-level lab you take the defender's seat in a SOC investigation. An attacker who gained root on web01, an Ubuntu 22.04 web server, ran three realistic techniques — a LOLBin payload download with curl, a cron-based persistence backdoor, and reading sensitive credential files — while the server's auditd ran only a baseline ruleset. You will write that baseline ruleset, analyse the server's recorded audit log with ausearch and aureport to find which techniques left no trace, write precise auditd rules for every gap, and confirm in a second recorded log — captured after your rules were deployed and the attack was replayed — that every action is now recorded. The lab works on recorded logs because a container cannot run auditd: the Linux audit system belongs to the host kernel, and loading or locking audit rules from a container would change the audit rules of the computer it runs on. The lab ships the two sample logs in auditd's own format, and you check your rule files offline the way a reviewer does before they are deployed. This builds the triage and hardening workflow SOC teams use on real Linux fleets.
What you’ll learn
- Write a baseline auditd ruleset and check the rule files offline before deployment
- Analyse a recorded audit log with ausearch and aureport to find which LOLBin (curl), cron persistence and credential-access actions were not recorded
- Write targeted auditd rules for each gap and confirm in a second recorded log that all three techniques are now captured
How this lab works
- Start the lab: One click starts a container on your computer with a real terminal: nothing to install by hand, nothing to clean up.
- Work through 3 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work runs each task’s checks in your container and says what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Runs: A container on your computer, with a real terminal
- Image: ubuntu:22.04
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- Docker Desktop installed and running
Topics: auditd, linux-security, lolbins, curl, cron-persistence, credential-access, threat-detection, syscall-auditing, blue-team, SOC
Create a free account to start this lab.