evilbotnet/gtfo-bins-mcp
If you are the rightful owner of gtfo-bins-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The GTFOBins MCP Server integrates the GTFOBins database with Claude Desktop, allowing users to query exploitation techniques and explore privilege escalation methods directly from their conversations.
search_gtfobins
Search the database by binary name or technique keywords.
get_binary_details
Get complete exploitation information for a specific binary.
list_binaries_by_function
List all binaries that support a specific function type.
GTFOBins MCP Server
A Model Context Protocol (MCP) server that provides seamless access to the GTFOBins database through Claude Desktop. Query exploitation techniques, search for specific binaries, and explore privilege escalation methods directly from your Claude conversations.
What is GTFOBins? GTFOBins is a curated list of Unix binaries that can be used to bypass local security restrictions in misconfigured systems. This MCP server brings that knowledge directly into Claude Desktop.
⨠Features
- š Smart Search: Find binaries by name, function type, or technique
- š Function Filtering: List binaries by specific capabilities (shell, file-upload, SUID, etc.)
- š Detailed Information: Get complete exploitation techniques with code examples
- š³ Dockerized: Clean, isolated deployment with minimal dependencies
- š Apple Silicon Optimized: Native ARM64 support for M1/M2/M3 Macs
- š On-Demand: No persistent containers - runs fresh for each session
šÆ Use Cases
- Security Research: Quickly lookup exploitation techniques during assessments
- Red Team Operations: Find creative ways to abuse legitimate system utilities
- Blue Team Defense: Understand what attackers can do with common binaries
- Educational: Learn about Unix security and privilege escalation vectors
- CTF Competitions: Fast reference for challenge solving
š Quick Start
Prerequisites
- Docker installed and running
- Claude Desktop application
- Apple Silicon Mac (M1/M2/M3) or compatible system
1. Setup Project
# Create project directory
mkdir gtfobins-mcp-server
cd gtfobins-mcp-server
# Copy the following files to this directory:
# - Dockerfile
# - requirements.txt
# - server.py
2. Build Docker Image
# Build the image for Apple Silicon
docker build --platform linux/arm64 -t gtfobins-mcp-server .
# Test the build
docker run --rm --platform linux/arm64 gtfobins-mcp-server python -c "
import sys; sys.path.append('/app')
from server import GTFOBinsServer
server = GTFOBinsServer()
print(f'ā
Successfully loaded {len(server.binaries_data)} GTFOBins entries')
"
3. Configure Claude Desktop
Edit your Claude Desktop configuration file:
Location: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"gtfobins": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--platform",
"linux/arm64",
"gtfobins-mcp-server",
"python",
"/app/server.py"
],
"env": {}
}
}
}
4. Restart Claude Desktop
Completely quit and restart Claude Desktop to load the new MCP server.
š¬ Usage Examples
Once configured, you can interact with GTFOBins directly through Claude Desktop:
Search for Binaries
"What GTFOBins techniques are available for python?"
"Search for binaries that can create reverse shells"
"Show me wget exploitation methods"
Filter by Function Type
"List all binaries that support file upload"
"What binaries can be used for SUID privilege escalation?"
"Show me all shell escape techniques"
Get Detailed Information
"Get complete exploitation details for curl"
"Show me the sudo techniques for vim"
"What are all the capabilities-based attacks for systemctl?"
š Available Tools
The MCP server provides three main tools:
1. search_gtfobins
Search the database by binary name or technique keywords.
Parameters:
query
(required): Search termfunction_type
(optional): Filter by function type
Example: Search for "python" binaries with "shell" function
2. get_binary_details
Get complete exploitation information for a specific binary.
Parameters:
binary
(required): Name of the binary
Example: Get all techniques available for "wget"
3. list_binaries_by_function
List all binaries that support a specific function type.
Parameters:
function
(required): One of: shell, file-upload, file-download, file-write, file-read, library-load, suid, sudo, capabilities
Example: List all binaries with SUID exploitation techniques
š Project Structure
gtfobins-mcp-server/
āāā Dockerfile # Container definition with GTFOBins data
āāā requirements.txt # Python dependencies (MCP SDK, PyYAML, etc.)
āāā server.py # Main MCP server implementation
āāā docker-compose.yml # Optional: Alternative deployment method
āāā build.sh # Automated setup script
āāā README.md # This documentation
š§ Architecture
The MCP server works by:
- Data Loading: Clones the GTFOBins repository during Docker build
- Parsing: Processes all markdown files with YAML frontmatter
- Indexing: Creates searchable data structures in memory
- MCP Interface: Exposes search/query capabilities through MCP tools
- On-Demand Execution: Runs fresh containers for each Claude Desktop session
š Troubleshooting
Common Issues
"No such container" error:
- The new configuration uses
docker run
instead ofdocker exec
- No persistent container needed - each session runs fresh
"Container not running" error:
- Ensure you're using the updated Claude Desktop configuration
- Check that Docker is running:
docker ps
Build failures:
- Ensure you're on Apple Silicon and using the
--platform linux/arm64
flag - Check Docker has sufficient disk space for the image
MCP connection issues:
- Verify the claude_desktop_config.json syntax is valid JSON
- Completely restart Claude Desktop after configuration changes
- Check Claude Desktop logs for specific error messages
Debug Commands
# Test Docker image
docker run --rm --platform linux/arm64 gtfobins-mcp-server python --version
# Test GTFOBins data loading
docker run --rm --platform linux/arm64 gtfobins-mcp-server python -c "
import sys; sys.path.append('/app')
from server import GTFOBinsServer
server = GTFOBinsServer()
print(f'Loaded: {len(server.binaries_data)} binaries')
print('Sample binaries:', list(server.binaries_data.keys())[:5])
"
# Check configuration file
cat ~/Library/Application\ Support/Claude/claude_desktop_config.json | python -m json.tool
Getting Help
If you encounter issues:
- Check the Claude Desktop logs for specific error messages
- Verify all files are correctly placed in the project directory
- Ensure Docker is running and has sufficient resources
- Test the Docker image independently before connecting to Claude
š Security Considerations
Important Security Notes:
- This server provides read-only access to GTFOBins data
- GTFOBins contains legitimate system administration techniques that could be misused
- Use responsibly and in accordance with your organization's security policies
- Intended for authorized security testing and educational purposes only
- The Docker container runs with minimal privileges and no network access by default
Best Practices:
- Only use in authorized testing environments
- Understand your organization's security policies before deployment
- Keep the Docker image updated with latest GTFOBins data
- Monitor usage for compliance with security guidelines
š License & Attribution
This project is for educational and legitimate security research purposes.
- GTFOBins Data: Subject to its own license terms at GTFOBins.github.io
- MCP Server Code: Educational use - please respect responsible disclosure practices
- Docker Configuration: Freely usable for legitimate security research
š¤ Contributing
Improvements welcome! Areas for contribution:
- Additional search capabilities
- Better error handling and logging
- Performance optimizations
- Extended filtering options
- Integration with other security tools
š Learn More
- GTFOBins: https://gtfobins.github.io
- Model Context Protocol: https://modelcontextprotocol.io
- Claude Desktop: https://claude.ai/desktop
- Docker: https://docs.docker.com
ā” Ready to explore? Ask Claude: "What GTFOBins techniques are available for your favorite Unix utility?"