Lion Cipher Lab

Reassemble Linux audit EXECVE records and hunt the decoded commands

Why it matters

On a Linux server, the audit subsystem is often the only record of exactly which commands ran, with which arguments, as which user. It is what an incident responder reaches for when a web server has been turned into a remote shell. But the raw log is not written for humans or for grep. One command becomes five lines; any argument containing a space is silently rewritten as a hexadecimal string; a long argument is cut into pieces across several lines; and the convenient 'process title' field stops after 128 bytes. An analyst who greps audit.log for 'curl' or 'base64' gets a confident, wrong…

What you'll learn

Steps in this lab

  1. What you are looking at, and why a SOC hunts it
  2. One event, five records, one serial number
  3. The encoding rule: why some arguments turn into hex
  4. Build the synthetic audit.log
  5. Read the raw records before you write any code
  6. Write the reassembler
  7. Why you decode EXECVE and do not trust PROCTITLE
  8. auid versus uid: who is really behind a command
  9. Four hunts over the same log, scored per event
  10. The judgment: which hunt to run, and when
  11. The way the pros read it: ausearch -i, keys and enriched logs
  12. Honest limits, and where to go next

Open the full interactive lab →