# Privilege Escalation and Living Off the Land Detection

> Detect privilege changes and living off the land activity from logs: token privileges, PowerShell, signed binaries, encoded commands and Linux sudo and SUID changes.

Canonical: https://codelivly.com/rooms/privilege-escalation-and-living-off-the-land-detection
Last updated: 2026-11-23

| | |
|---|---|
| Level | Intermediate |
| Category | Cybersecurity |
| Lessons | 6 |
| Estimated time | 4 h 35 min |
| XP | 1150 |

Attackers who gain a foothold rarely bring new tools. They raise their privileges and use the programs already installed. This room follows Thursday 2027-05-13 at Kestrel Logistics, when Mina Castellan asks you to review privilege and living off the land detections against the last 20 hours of exported telemetry. You read Windows privilege events and Sysmon integrity levels, judge PowerShell by parent, command line and script block, recognise certutil, mshta, rundll32, regsvr32 and bitsadmin in process and network logs, read encoded commands with a decoded copy beside them, and trace sudo and SUID changes on a Linux server. A guided lab ends the room with ten command lines to classify as benign, suspicious or malicious, with evidence and an action for each. Everything here is defensive: every exercise reads pre-loaded exports, and attacker activity appears only as logged telemetry.

## Lessons

1. Token and Privilege Changes (45 min)
2. Suspicious Use of PowerShell (45 min)
3. Living Off the Land Binaries (45 min)
4. Encoded and Obfuscated Commands (45 min)
5. Linux sudo and SUID Abuse Indicators (45 min)
6. Guided Lab: Classify 10 Command Lines (50 min)

## Related

- [Learning path: Detecting Attacks on Windows, Linux and AD](https://codelivly.com/learning-paths/detecting-attacks-on-windows-linux-and-ad)
- [All rooms](https://codelivly.com/rooms)
