
GTFO コマンドラインインターフェースは、設定ミスがあるシステムでローカルセキュリティ制限を回避するために使用できる簡単なバイナリ検索コマンドを提供します。
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は日の目を見ることはなかったでしょう。
このプロジェクトに貢献したいですか?すごい、ありがとう!それでは、フォークしてプルリクエストを送ってください。