Traitor

通过利用唾手可得的软件工具,如 gtfobins、pwnkit、dirty pipe、+w docker.sock,自动实现Linux privesc。「Automatic Linux privesc via exploitation of low-hanging fruit e.g. gtfobins, pwnkit, dirty pipe, +w docker.sock」

Github星跟踪图

Traitor

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:

  • Nearly all of GTFOBins
  • Writeable docker.sock
  • CVE-2022-0847 (Dirty pipe)
  • CVE-2021-4034 (pwnkit)
  • CVE-2021-3560

Demo

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.

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.

In The News

主要指标

概览
名称与所有者liamg/traitor
主编程语言Go
编程语言Go (语言数: 2)
平台Linux, Unix-like
许可证MIT License
所有者活动
创建于2021-01-24 10:50:15
推送于2024-03-12 21:01:14
最后一次提交
发布数14
最新版本名称v0.0.14 (发布于 )
第一版名称v0.0.1 (发布于 )
用户参与
星数7k
关注者数120
派生数646
提交数82
已启用问题?
问题数42
打开的问题数19
拉请求数40
打开的拉请求数4
关闭的拉请求数46
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?