GTFOcli 是一个命令行界面工具,用于轻松搜索那些可用于绕过配置错误系统中本地安全限制的二进制命令。

使用 go:
go install github.com/cmd-tools/gtfocli@latest
使用 homebrew:
brew tap cmd-tools/homebrew-tap
brew install gtfocli
使用 docker:
docker pull cmdtoolsowner/gtfocli
搜索 tar 二进制文件:
gtfocli search tar
从标准输入搜索 tar 二进制文件:
echo "tar" | gtfocli search
搜索位于文件中的二进制文件:
cat myBinaryList.txt
/bin/bash
/bin/sh
tar
arp
/bin/tail
gtfocli search -f myBinaryList.txt
搜索 Winget.exe 二进制文件:
gtfocli search Winget --os windows
从标准输入搜索 Winget 二进制文件:
echo "Winget" | gtfocli search --os windows
搜索位于文件中的二进制文件:
cat windowsExecutableList.txt
Winget
c:\\Users\\Desktop\\Ssh
Stordiag
Bash
c:\\Users\\Runonce.exe
Cmdkey
c:\dir\subDir\Users\Certreq.exe
gtfocli search -f windowsExecutableList.txt --os windows
搜索 Winget 二进制文件并以 yaml 格式输出(查看 -h 获取可用格式):
gtfocli search Winget -o yaml --os windows
示例:
搜索 Winget 二进制文件并以 yaml 格式输出:
docker run -i cmdtoolsowner/gtfocli search Winget -o yaml --os windows
搜索 tar 二进制文件并以 json 格式输出:
echo 'tar' | docker run -i cmdtoolsowner/gtfocli search -o json
搜索位于容器内挂载卷文件中的二进制文件:
cat myBinaryList.txt
/bin/bash
/bin/sh
tar
arp
/bin/tail
docker run -i -v $(pwd):/tmp cmdtoolsowner/gtfocli search -f /tmp/myBinaryList.txt
gtfocli 与 find 结合使用的常见用例示例:
find / -type f \( -perm 04000 -o -perm -u=s \) -exec gtfocli search {} \; 2>/dev/null
或
find / -type f \( -perm 04000 -o -perm -u=s \) 2>/dev/null | gtfocli search
感谢 GTFOBins 和 LOLBAS,没有这些项目,gtfocli 将永远不会问世。
你想为此项目做贡献?哇,谢谢!那么请 Fork 它并发送一个 Pull Request。