Skip to main content

A Python tool for automating SUID/SGID binary enumeration against GTFOBins

Project description

banner

gtfobinSUID V1.2

Developed by strikoder

gtfobinSUID is a lightweight Python tool for automating SUID/SGID binary enumeration. It compares discovered binaries against the GTFOBins database and supports both online and offline modes. In offline mode, it uses a local database file (db.txt), which can be automatically updated by scraping the latest entries from GTFOBins.

🎥 Demo

gtfobinSUID demo


🔹 Features

  • Works on Linux, macOS, and Windows
  • Handles versioned binary names (python3, perl5.42, etc.)
  • Prints the command to enumerate SUID/GUID on Linux systems on demand
  • Minimal, no dependencies beyond requests (likely preinstalled on Kali Linux)
  • Shows hints for binaries that might have vulnearbilites when they have SUID enabled like pkexec and sudo
  • Checks if a binary exists on GTFOBins under SUID or Limited SUID and prints [FOUND], [FOUND - Limited SUID], or [NOT FOUND] as it processes

Flags

  • --online (Default): fetches live data directly from GTFOBins
  • --update-db: automatically pulls all GTFOBins SUID and Limited SUID entries
  • --offline (Auto-Switch with no network): uses a local db.txt for environments without internet

Installation

Use one of these installation methods:

pip install gtfobinsuid
git clone https://github.com/strikoder/gtfobinSUID.git
cd gtfobinsuid
pip install requests

Or if you hate cloning like me, you can either copy-paste the python code to your machine or download it using wget/curl:

wget -q -O gtfobinsuid.py "https://raw.githubusercontent.com/strikoder/gtfobinSUID/main/gtfobinsuid.py" && chmod +x gtfobinsuid.py

Usage

1. Basic usage

Paste your SUID/SGID enum output directly:

python3 gtfobinsuid.py

Then paste something like:

/usr/bin/find
/usr/bin/passwd
/usr/bin/sudo
/bin/mount

Press Ctrl+d (Linux/macOS) or Ctrl+z + Enter (Windows) to finish.
You’ll see immediate output:

[FOUND] find -> https://gtfobins.github.io/gtfobins/find/
[NOT FOUND] sudo
    [!] HINT: 'sudo' with SUID might indicate CVE exploits or misconfigurations (check Baron Samedit & version vulnerabilities)
[NOT FOUND] mount

2. Force online or offline

  • Force online only:
    python3 gtfobinsuid.py --online
    
  • Force offline mode (requires db.txt):
    python3 gtfobinsuid.py --offline
    

3. Update the local database

You can refresh db.txt automatically from GTFOBins:

python3 gtfobinsuid.py --update-db

This will:

  • Fetch all SUID and Limited SUID binaries directly from the GTFOBins website
  • Save them to db.txt
  • Print how many entries were found

Example output:

[*] Fetching GTFOBins lists...
[+] Database updated successfully: db.txt
    195 SUID entries
    64 Limited SUID entries

How it works

  1. Extracts basenames from your pasted enumeration results.
    Example: /usr/bin/sudosudo
  2. Checks each binary:
    • If online: queries the GTFOBins page for that binary.
    • If offline: looks up the name in db.txt.
  3. Prints result immediately for each binary.

🧑‍💻 Author

Strikoder
Penetration Tester & ex AI Engineer

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gtfobinsuid-1.2.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gtfobinsuid-1.2.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file gtfobinsuid-1.2.0.tar.gz.

File metadata

  • Download URL: gtfobinsuid-1.2.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for gtfobinsuid-1.2.0.tar.gz
Algorithm Hash digest
SHA256 1ec0b498c063aeee5e756dc8f5133a70b28e78f59b912a38478a8ca1a6a27ea8
MD5 f75a7d83102572db225f37e463922cfe
BLAKE2b-256 fb1cbaf1fe1bd8fb08237c3db84b36c555d92c8ecd787be0f15e0d8a26bdb1d0

See more details on using hashes here.

File details

Details for the file gtfobinsuid-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: gtfobinsuid-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for gtfobinsuid-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 564cf9fe0664fadd1cdfb90d7d2b556418d783245167fa5f6cbcb11481168947
MD5 9b079ac45364b59fda2312b0e8756354
BLAKE2b-256 bd8c5be45cd152d7ba181098a7dbca189aa9d3c8d1433174601071f2dc1fe830

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page