How ly4k/pwnkit works
PwnKit is a self-contained local privilege-escalation exploit for vulnerable pkexec systems. The principal workflow is to run the exploit, stage the gconv files, invoke pkexec, and use the resulting privileged initialization to launch either a command or an interactive shell. The C source also monitors pkexec output and removes staged files when it detects a likely patched target. The README documents both direct execution and a shell-based download-and-run entry point; binary internals were not sampled.
Main entry points: PwnKit.c Exploit entry · PwnKit PwnKit executable · PwnKit.sh Shell launcher
Components 14
Launch
- Shell launcher
PwnKit.sh - PwnKit executable
PwnKit - 32-bit executable
PwnKit32
Exploit runtime
- Exploit entry
PwnKit.c - Gconv staging
PwnKit.c - Failure watcher
PwnKit.c - Gconv initializer
PwnKit.c - Staged files
PwnKit.c - Output pipe
PwnKit.c - Artifact cleanup
PwnKit.c
Privileged result
- Command shell
- Interactive shell
Other components
- Operator
- pkexec
Connections 16
- Operator → Shell launcher: runs one-liner
README.md - Shell launcher → PwnKit executable: downloads and runs
README.md - Operator → PwnKit executable: runs directly
README.md - PwnKit executable → Exploit entry: enters
- Exploit entry → Gconv staging: creates
PwnKit.c - Gconv staging → Staged files: writes
PwnKit.c - Exploit entry → Failure watcher: forks
PwnKit.c - Exploit entry → Output pipe: creates
PwnKit.c - Failure watcher → Output pipe: reads
PwnKit.c - Exploit entry → Output pipe: redirects stderr
PwnKit.c - Exploit entry → pkexec: executes
PwnKit.c - pkexec → Gconv initializer: loads gconv payload
- Gconv initializer → Artifact cleanup: removes artifacts
PwnKit.c - Failure watcher → Artifact cleanup: cleans on failure
PwnKit.c - Gconv initializer → Command shell: executes command
PwnKit.c - Gconv initializer → Interactive shell: starts shell
PwnKit.c