Lion Cipher Lab
Map systemd service dependencies and find single points of failure
- Cyber / Security Engineer
- Intermediate
- ~45 min
- Free · no account required
Why it matters
On a modern Linux server, systemd starts and supervises nearly every service, and it does so according to a web of declared dependencies. A unit can Require another (a hard dependency: if the required unit fails or is stopped, the dependent is stopped too), Want another (a soft, best-effort dependency), and be ordered After another (it will not start until the other has). Get this web right and the system comes up cleanly and fails gracefully; get it wrong and one shared service failing drags half the host down with it, or services race each other at boot and fail intermittently in ways that…
What you'll learn
- reading systemd Requires= / Wants= / After= semantics
- building a dependency graph from captured unit data
- ranking single points of failure by transitive blast radius
- finding startup races (a requirement with no ordering)
- detecting dependency cycles
- the difference between a declared dependency and runtime reality
Steps in this lab
- Three directives decide what a failure takes down
- The captured dependency list
- Write the analyzer
- Run it: blast radius, a race, and a cycle
- Fix each class, and the limits