Lion Cipher Lab
Catch shell script execution (T1059.004), and see what a rule on the shell can and cannot see (Purple Execution 1 of 3)
- SOC Analyst / Blue Team
- Intermediate
- ~60 min
- Free · no account required
Why it matters
Running commands through a shell is the most basic way anything gets done on Linux, for people and for intruders. That is exactly why it is hard to detect: the shell is always running. The interesting signals are around the shell: scripts in odd places, shells started by unexpected parents, commands pasted as one long line. This lab shows how little a plain 'shell ran' rule tells you, and how a rule on location tells you more.
What you'll learn
- running four documented Unix-shell atomics on a VM you own, with the input changed to stay on the machine
- writing a rule on the shell programs and measuring how noisy it is
- writing a rule on files executed from a temporary folder, and seeing which test it does and does not catch
- explaining why a script run through an interpreter and a script run directly look different to audit rules
- reading an event for the script path and the original login user
Steps in this lab
- Rules of this lab, and the technique
- Read the four atomics you will run
- Load two rules, each with its own key
- Measure the baseline, then run the four tests
- Find what each rule saw, test by test
- Run one variation: execute the script directly
- Clean up, and what to hand to the defenders
Open the full interactive lab →