Traitor : Automatic Linux Privesc Via Exploitation Of Low-Hanging Fruit E.G. GTFOBin

Traitor packages up a bunch of methods to exploit local misconfigurations and vulnerabilities (including most of GTFOBins) in order to pop a root shell. Automatically exploit low-hanging fruit to pop a root shell. Linux privilege escalation made easy!

It’ll exploit most sudo privileges listed in GTFOBins to pop a root shell, as well as exploiting issues like a writable docker.sock. More routes to root will be added over time too.

Usage

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 -p

Run 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 -p

Run with the -e/--exploit flag to attempt to exploit a specific vulnerability and gain a root shell.

traitor -p -e docker:writable-socket

Supported Platforms

Traitor will run on all Unix-like systems, though certain exploits will only function on certain systems.

Getting Traitor

Grab a binary from the releases page, or use go:

CGO_ENABLED=0 go get -u github.com/liamg/traitor/cmd/traitor

If 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.

R K

Recent Posts

type Command in Linux: Show How the Shell Resolves a Name

The type command in Linux shows how the current shell would interpret a name typed on the…

10 hours ago

How to Check Memory Usage in Linux: free, top, and /proc/meminfo

When a Linux system is slow or behaving unexpectedly, memory is one of the first…

10 hours ago

ip Command in Linux: Configure Interfaces, Routes, and ARP

The ip command is the standard network configuration tool on modern Linux systems. It is part of…

10 hours ago

chown Command in Linux: Change File and Directory Ownership

Every file and directory in Linux has an owner (a user) and a group. Together…

10 hours ago

How to Remove Files and Directories in Linux: rm, shred, rmdir

The command line does not have a Trash folder. When you delete a file from…

1 day ago

How to Create a systemd Service File in Linux: Step-by-Step Guide

Systemd is the init system on most modern Linux distributions. A service file (also called…

1 day ago