:arrow_up: :skull_and_crossbones: :fire: Automatic Linux privesc via exploitation of low-hanging fruit e.g. gtfobins, pwnkit, dirty pipe, +w docker.sock
:arrow_up: :skull_and_crossbones: :fire: Automatic Linux privesc via exploitation of low-hanging fruit e.g. gtfobins, pwnkit, dirty pipe, +w docker.sock
Automatically exploit low-hanging fruit to pop a root shell. Linux privilege escalation made easy!
Traitor packages up a bunch of methods to exploit local misconfigurations and vulnerabilities in order to pop a root shell:
It'll exploit most sudo privileges listed in GTFOBins to pop a root shell, as well as exploiting issues like a writable docker.sock, or the recent dirty pipe (CVE-2022-0847). More routes to root will be added over time too.
Run with no arguments to find potential vulnerabilities/misconfigurations which could allow privilege escalation. Add the -p flag if the current user password is known. The password will be requested if it's needed to analyse sudo permissions etc.
traitor -pRun with the -a/--any flag to find potential vulnerabilities, attempting to exploit each, stopping if a root shell is gained. Again, add the -p flag if the current user password is known.
traitor -a -pRun with the -e/--exploit flag to attempt to exploit a specific vulnerability and gain a root shell.
traitor -p -e docker:writable-socketTraitor will run on all Unix-like systems, though certain exploits will only function on certain systems.
Grab a binary from the releases page, or use go:
CGO_ENABLED=0 go get -u github.com/liamg/traitor/cmd/traitorFor go1.18:
CGO_ENABLED=0 go install github.com/liamg/traitor/cmd/traitor@latestIf the machine you're attempting privesc on cannot reach GitHub to download the binary, and you have no way to upload the binary to the machine over SCP/FTP etc., then you can try base64 encoding the binary on your machine, and echoing the base64 encoded string to | base64 -d > /tmp/traitor on the target machine, remembering to chmod +x it once it arrives.
Exploit failed: exec: "sh": executable file not found in $PATH
Dose it woke need root?!
Add support for CVE-2024-1086
The "powertop" tool can fully display the hidden process name and PID...
please don't let this project die
Exploit CVE-2022-0847 terminates with error
Add support for the new CVE-2022-2588
Add support for CVE-2016-5195 (Dirty COW)
Add support for CVE-2022-29799 & CVE-2022-29800 (Nimbuspwn)
Add support for CVE-2022-29582 and you will not believe what will happen next!