First question on a new box is always the same: of the dozen binaries in this
challenge, which one is the soft target? The answer is checksec — run once per
file, read all at once. So I stopped running it by hand.
the one-liner#
Find every ELF under the current tree and line their mitigations up:
|
Pointed at a challenge directory it turns "twelve unknown files" into a glance:
The one with no canary and partial RELRO is where I start. Here it is as the panel I'd paste into the writeup:
- arch
- amd64-64-little
- RELROpartial
- canaryoff
- NXon
- PIEoff
wiring it to a key#
A script I have to remember to run is a script I won't run. So it goes behind one tmux binding, scoped to the current pane's directory:
|
prefix C-k and the table pops over whatever I'm doing, no context switch. The
muscle memory is the whole point — five seconds saved a hundred times is the
difference between checking and assuming.
the version that earns its keep#
The shell one-liner is fine until a corpus has 300 files and you want it sorted by
"easiest first." At that point it graduates to pwntools, where ELF already
parses the mitigations and I can rank them:
|
The diff from "prints a table" to "ranks the table" is small and worth it:
don't trust a green wall
checksec reads the binary, not the deployment. Full RELRO with a stack leak
is still game over, and a "secure" wall just means the bug is somewhere subtler
than the linker flags. The table tells you where to look first, not where to
stop.
- enumerate every ELF in the tree
- one keybind, scoped to the pane
- rank by exploitability, not filename
- cache results per-file hash so re-runs are instant1
-
The obvious next increment: key a tiny on-disk cache by the file's
sha1, so a 300-binary corpus only pays the parse cost once. Left undone because the popup already feels instant under ~50 files, which is every CTF I actually play. ↩