
Interface en ligne de commande GTFO pour des commandes de recherche faciles de binaires qui peuvent être utilisées pour contourner les restrictions de sécurité locales dans des systèmes mal configurés.
GTFOcli est une interface en ligne de commande pour rechercher facilement des binaires dont les commandes peuvent être utilisées pour contourner les restrictions de sécurité locales dans des systèmes mal configurés.

Avec go :
go install github.com/cmd-tools/gtfocli@latest
Avec homebrew :
brew tap cmd-tools/homebrew-tap
brew install gtfocli
Avec docker :
docker pull cmdtoolsowner/gtfocli
Recherche du binaire tar :
gtfocli search tar
Recherche du binaire tar depuis stdin :
echo "tar" | gtfocli search
Recherche de binaires listés dans un fichier :
cat myBinaryList.txt
/bin/bash
/bin/sh
tar
arp
/bin/tail
gtfocli search -f myBinaryList.txt
Recherche du binaire Winget.exe :
gtfocli search Winget --os windows
Recherche du binaire Winget depuis stdin :
echo "Winget" | gtfocli search --os windows
Recherche de binaires listés dans un fichier :
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
Recherche du binaire Winget et affichage au format yaml (voir -h pour les formats disponibles) :
gtfocli search Winget -o yaml --os windows
Exemples :
Recherche du binaire Winget et affichage au format yaml :
docker run -i cmdtoolsowner/gtfocli search Winget -o yaml --os windows
Recherche du binaire tar et affichage au format json :
echo 'tar' | docker run -i cmdtoolsowner/gtfocli search -o json
Recherche de binaires listés dans un fichier monté en volume dans le conteneur :
cat myBinaryList.txt
/bin/bash
/bin/sh
tar
arp
/bin/tail
docker run -i -v $(pwd):/tmp cmdtoolsowner/gtfocli search -f /tmp/myBinaryList.txt
Un exemple d'utilisation courante de gtfocli avec find :
find / -type f \( -perm 04000 -o -perm -u=s \) -exec gtfocli search {} \; 2>/dev/null
ou
find / -type f \( -perm 04000 -o -perm -u=s \) 2>/dev/null | gtfocli search
Merci à GTFOBins et LOLBAS, sans ces projets gtfocli n'aurait jamais vu le jour.
Vous voulez contribuer à ce projet ? Super, merci ! Alors faites un fork et envoyez une pull request.