🧠💥 LLM + Metasploit automation — control the Metasploit Framework using natural language commands powered by local Large Language Models.
llmsploit.py is a Python tool that connects a local LLM (via Ollama or any CLI-accessible model) to the Metasploit RPC API.
It lets you type natural language like:
scan target 192.168.1.10 for open ports
…and the LLM will translate it into valid Metasploit commands, execute them through msfrpcd, and return results — all without leaving your terminal.
- 🔗 Natural language → Metasploit (LLM translates your instructions)
- ⚡ Full RPC support (
use,set,exploit,run,sessions, etc.) - 📝 Command history & logging
- 🤖 Autonomous mode (
--auto) to let the LLM plan and execute multi-step workflows - 🔒 Local-only by design (no cloud models needed)
- Metasploit Framework
Install Required Libraries
sudo apt install metasploit-framework
pip3 install pymetasploit3
- Start msfrpcd
msfrpcd -U msf -P yourpassword -a 127.0.0.1
- Ollama with a model (e.g.
mistral,phi3,llama3)ollama pull mistral
git clone https://github.com/Te-REDSA/llmsploit.git
cd llmsploit
python3 llmsploit.pypython3 llmsploit.pyExample:
You: search smb exploit
LLM Suggests: search type:exploit smb
Metasploit Output: [list of exploits...]
Let the LLM plan a chain of actions:
python3 llmsploit.py --autoThis project is for educational and authorized penetration testing only.
Running exploits against systems without permission is illegal and unethical.
The author(s) take no responsibility for misuse.
- Web UI dashboard
- Multi-LLM support (switch models easily)
- Integration with session management (
postmodules, Meterpreter) - Config file for persistent settings
Pull requests, issues, and feature requests are welcome!
If you build something cool with llmsploit.py, share it with the community.