Skip to content
 
 

Latest commit

 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mulot

Go MCP Drives License

Agentic AI web pentester that drives a browser.

An open-weights LLM (GLM-5.2, Gemma or Qwen) drives a real headless Chromium through a Burp-style toolkit and works a target the way a human pentester would.

No frontier model, no agent running inside a Kali VM.

mulot solving OverTheWire natas16

recon → writes its own JavaScript payload → command injection → flag.

Running only this harness, open-weights GLM-5.2 agents solved 87% of OverTheWire Natas and 73% of Root-Me Web-Server (full tables below).

  • Real browser, not just HTTP real login flows, JS-heavy apps, and DOM-based XSS.
  • Burp-shaped primitives traffic history, repeater, intruder, passive scan.
  • No frontier API, no agent-in-a-VM Qwen 3.6 27B is workable; GLM-5.2 is the sweet spot.

The idea

An agent isn't just a model, the tooling often matters more than the parameter count.

Models have read the security literature, intercepting proxies, request history, site maps, fuzzing an insertion point. Burp, ZAP, mitmproxy, Fiddler their vocabulary and their gestures exists in the corpus the model was trained on.

So mulot shapes the harness to expose exactly those primitives.

Two halves

mulot splits in two: a proxy that captures and replays every exchange, and a thinking layer that runs the agent's own code inside the target page.

The proxy half

  • Traffic journal (History): every HTTP exchange lands in an always-on SQLite database, queryable and replayable. Capture goes through the browser's CDP protocol, so HTTPS is read already decrypted no interception certificate, no real MITM.

  • Request editor (Interceptor/Repeater): rebuild a request from a URL or reseed one from a captured flow, tamper with it, and reissue it, outside the browser's CORS rules.

  • Http fuzz (Intruder): one marked insertion point, a payload set swapped in turn, and match conditions on status, length, or regex.

  • Scans (Passive scan): passive and active passes over that same journal and the live DOM.

The thinking half

  • In-page JavaScript: a JS toolbox run inside the page, not on the host. The agent automates from within, the machine that runs it stays out of reach. It injects helper JS libraries into the DOM context and creates its own JavaScript tools for padding-oracle attacks, time-based SQLi, deserialization...

  • Embedded skills & wordlists: playbooks and wordlists baked into the binary, served on demand by tag. Skills are picked after fingerprinting the target, wordlists, large by nature, never cross the context window they're consumed server-side or iterated in-page.

Skills: embedded playbooks, dynamic selection

Playbooks live in the binary (go:embed over assets/skills/) and are served by two tools:

  • list_skills enumerates the available stacks (php, python, java, nodejs, ...).
  • load_skill returns the shared workflow with no arguments, or a stack's tailored playbook when you name it (load_skill(["python"])).

The flow: the model gets the shared workflow up front (so it knows its capabilities before it knows the target), fingerprints the target, then loads the matching stack. Polyglot targets are fine; call it again as more stacks surface. Adding a stack means dropping an assets/skills/<name>/ directory and rebuilding.

Quick start

go build -o mulot ./cmd/mulot        # build the MCP server binary

# local llama.cpp
python3 agent.py  --provider llamacpp --model qwen3.6-mtp --base http://localhost:8080 \
  "pwn this server http://localhost:4280/login.php and output only id and uname -a command"

# zai token
export ZAI_API_KEY=...        
python3 agent.py --provider zai --model glm-5.2 "audit http://localhost:8000"

agent.py is a small single-file harness that drives mulot over stdio MCP and talks to any OpenAI-compatible endpoint with tool calling. Presets: openrouter, llamacpp, zai. The provider is auto-detected from whichever API key is in the environment.

Environment variables:

Variable Effect
MULOT_USER_AGENT User-Agent sent by http_request/http_fuzz and the browser.
MULOT_HEADLESS Default headless mode for browser_launch (true/false).
MULOT_PROXY Upstream proxy for the browser (HTTP/SOCKS5) and for http_request/http_fuzz (HTTP/HTTPS only, SOCKS5 needs the browser tools).

Results

Running open-weights GLM-5.2 agents against web pentest challenges using only this harness (max 120 steps) produced strong results:

OverTheWire (Natas): 87% solved

Full results: 34 challenges
challenge tech pwned error
natas0.natas.labs.overthewire.org Information Disclosure
natas1.natas.labs.overthewire.org Weak client-side protection
natas2.natas.labs.overthewire.org Directory Listing
natas3.natas.labs.overthewire.org Information Disclosure (robots.txt + directory listing)
natas4.natas.labs.overthewire.org Broken Access Control (Referer spoofing)
natas5.natas.labs.overthewire.org Insecure cookie-based access control
natas6.natas.labs.overthewire.org Information Disclosure (unprotected .inc file)
natas7.natas.labs.overthewire.org Local File Inclusion (CWE-22)
natas8.natas.labs.overthewire.org Reversible encoding (obfuscation)
natas9.natas.labs.overthewire.org OS Command Injection
natas10.natas.labs.overthewire.org OS Command Injection (blocklist bypass)
natas11.natas.labs.overthewire.org Broken Cryptography (static-key XOR)
natas12.natas.labs.overthewire.org Unrestricted File Upload → RCE
natas13.natas.labs.overthewire.org Unrestricted File Upload → RCE (magic bytes bypass)
natas14.natas.labs.overthewire.org SQL Injection (CWE-89, auth bypass)
natas15.natas.labs.overthewire.org Blind SQL Injection (boolean-based)
natas16.natas.labs.overthewire.org OS Command Injection ($(...) substitution bypass)
natas17.natas.labs.overthewire.org Blind SQL Injection (time-based)
natas18.natas.labs.overthewire.org Predictable / brute-forceable session ID
natas19.natas.labs.overthewire.org Predictable session ID (username-embedded)
natas20.natas.labs.overthewire.org Session data injection (CRLF)
natas21.natas.labs.overthewire.org Session Fixation (shared session store)
natas22.natas.labs.overthewire.org Broken Access Control (redirect without exit())
natas23.natas.labs.overthewire.org PHP Type Juggling (loose comparison)
natas24.natas.labs.overthewire.org PHP Type Juggling (strcmp() on array)
natas25.natas.labs.overthewire.org LFI + Log Poisoning → RCE
natas26.natas.labs.overthewire.org PHP Object Injection (unserialize) → RCE
natas27.natas.labs.overthewire.org Auth Bypass (DB truncation + inconsistent sanitization)
natas28.natas.labs.overthewire.org AES-ECB cut-and-paste on encrypted parameter session interrupted mid-analysis of the block structure, no flag exported
natas29.natas.labs.overthewire.org OS Command Injection (Perl 2-arg open(), pipe)
natas30.natas.labs.overthewire.org SQL Injection (Perl DBI quote() context confusion)
natas31.natas.labs.overthewire.org Perl CGI magic-open / upload param confusion (unsolved) many attempts to abuse <$file> via a duplicated file param, no success in this session
natas32.natas.labs.overthewire.org Perl CGI 2-arg open() pipe RCE (unsolved) same vuln class as natas29, command-piping attempts unsuccessful
natas33.natas.labs.overthewire.org Undetermined (session interrupted) stopped after loading the PHP skill, no exploitation attempted

Root-Me (Web-Server): 73% solved

Full results: 92 challenges
challenge tech pwned error
challenge01.root-me.org/web-serveur/ch1/ Information Disclosure
challenge01.root-me.org/web-serveur/ch2/ Header manipulation
challenge01.root-me.org/web-serveur/ch3/ weak password
challenge01.root-me.org/web-serveur/ch4/ Information Disclosure
challenge01.root-me.org/web-serveur/ch5/ Broken auth
challenge01.root-me.org/web-serveur/ch6/ Directory listing
challenge01.root-me.org/web-serveur/ch7/ Broken access
challenge01.root-me.org/web-serveur/ch8/ Broken access
challenge01.root-me.org/web-serveur/ch9/ SQL Injection
challenge01.root-me.org/web-serveur/ch10/ SQL Injection
challenge01.root-me.org/web-serveur/ch11/ Backup files
challenge01.root-me.org/web-serveur/ch12/ LFI via PHP filter
challenge01.root-me.org/web-serveur/ch13/ Remote File Inclusion
challenge01.root-me.org/web-serveur/ch14/ Broken auth (SQLi/LDAP) stuck bypassing auth check, no working payload found
challenge01.root-me.org/web-serveur/ch15/ Directory listing
challenge01.root-me.org/web-serveur/ch16/ HTTP Digest auth
challenge01.root-me.org/web-serveur/ch17/ Register globals overwrite
challenge01.root-me.org/web-serveur/ch18/ SQL Injection
challenge01.root-me.org/web-serveur/ch19/ SQL Injection
challenge01.root-me.org/web-serveur/ch20/ LFI filter bypass couldn't bypass ".." traversal filter, investigation incomplete
challenge01.root-me.org/web-serveur/ch21/ Arbitrary file upload
challenge01.root-me.org/web-serveur/ch22/ Null byte upload
challenge01.root-me.org/web-serveur/ch23/ XPath Injection
challenge01.root-me.org/web-serveur/ch24/ Blind XPath Injection blind extraction planned but not completed
challenge01.root-me.org/web-serveur/ch25/ LDAP Injection
challenge01.root-me.org/web-serveur/ch26/ LDAP Injection blind LDAP extraction incomplete, auth bypass not found
challenge01.root-me.org/web-serveur/ch27/ SQL Injection (addslashes/GBK) investigation incomplete, no working payload found
challenge01.root-me.org/web-serveur/ch28/ PHP Type Juggling
challenge01.root-me.org/web-serveur/ch29/ XXE
challenge01.root-me.org/web-serveur/ch30/ SQL Injection filter bypass
challenge01.root-me.org/web-serveur/ch31/ SQL Injection (FILE read)
challenge01.root-me.org/web-serveur/ch32/ Execution After Redirect
challenge01.root-me.org/web-serveur/ch33/ INSERT SQL Injection
challenge01.root-me.org/web-serveur/ch34/ SQL Injection error-based
challenge01.root-me.org/web-serveur/ch35/ Path Truncation stuck finding truncation payload length
challenge01.root-me.org/web-serveur/ch36/ SQL Truncation
challenge01.root-me.org/web-serveur/ch37/ preg_replace /e RCE
challenge01.root-me.org/web-serveur/ch38/ NoSQL Injection
challenge01.root-me.org/web-serveur/ch39/ JS eval() Injection
challenge01.root-me.org/web-serveur/ch40/ Time-Based SQL Injection
challenge01.root-me.org/web-serveur/ch41/ SSTI (FreeMarker)
challenge01.root-me.org/web-serveur/ch42/ Multibyte SQL Injection
challenge01.root-me.org/web-serveur/ch43/ LFI (zip wrapper)
challenge01.root-me.org/web-serveur/ch44/ PHP Type Juggling
challenge01.root-me.org/web-serveur/ch45/ LFI (WAF bypass)
challenge01.root-me.org/web-serveur/ch46/ Spring Boot Actuator
challenge01.root-me.org/web-serveur/ch47/ PHP assert() Injection
challenge01.root-me.org/web-serveur/ch48/ HTTP Improper Redirect backend returned 502, unreachable entire session
challenge01.root-me.org/web-serveur/ch49/ Routed SQL Injection WAF blocked keywords, extraction incomplete
challenge01.root-me.org/web-serveur/ch50/ XSLT Injection blocked by open_basedir, flag not located
challenge01.root-me.org/web-serveur/ch51/ ZIP Upload Symlink
challenge01.root-me.org/web-serveur/ch52/ Open Redirect
challenge01.root-me.org/web-serveur/ch53/ Blind Command Injection
challenge01.root-me.org/web-serveur/ch54/ Command Injection
challenge01.root-me.org/web-serveur/ch55/ PHP Type Juggling
challenge01.root-me.org/web-serveur/ch56/ Client-Side Validation Bypass
challenge01.root-me.org/web-serveur/ch57/ PHP Code Injection
challenge01.root-me.org/web-serveur/ch58/ JWT alg:none Bypass
challenge01.root-me.org/web-serveur/ch59/ Weak JWT Secret
challenge01.root-me.org/web-serveur/ch60/ JWT Algorithm Confusion
challenge01.root-me.org/web-serveur/ch61/ Exposed .git Directory
challenge01.root-me.org/web-serveur/ch62/ File Upload Filter Bypass stuck bypassing .php extension filter, no working payload found
challenge01.root-me.org/web-serveur/ch63/ JWT Revoked Token could not crack HS256 secret to forge new token
challenge01.root-me.org/web-serveur/ch64/ IP Spoofing (X-Forwarded-For)
challenge01.root-me.org/web-serveur/ch65/ Unknown (no data) log file empty, no test data recorded
challenge01.root-me.org/web-serveur/ch66/ GraphQL Access Control
challenge01.root-me.org/web-serveur/ch67/ Prototype Pollution no working bypass found
challenge01.root-me.org/web-serveur/ch68/ IP Spoofing
challenge01.root-me.org/web-serveur/ch69/ VM2 Sandbox Escape vm2 escape research incomplete, no working exploit found
challenge01.root-me.org/web-serveur/ch70/ PHP Filter Bypass
challenge01.root-me.org/web-serveur/ch71/ YAML Deserialization
challenge01.root-me.org/web-serveur/ch72/ PHAR deserialization unable to craft valid PHAR
challenge01.root-me.org/web-serveur/ch73/ Blind SSTI unable to process zip
challenge01.root-me.org/web-serveur/ch74/ Python SSTI
challenge01.root-me.org/web-serveur/ch75/ File-based Sessions email confirmation required for registration, unavailable
challenge01.root-me.org/web-serveur/ch76/ Encrypted cookie registration blocked by anti-abuse filter, no credentials
challenge01.root-me.org/web-serveur/ch77/ GraphQL Introspection
challenge01.root-me.org/web-serveur/ch78/ GraphQL Injection
challenge01.root-me.org/web-serveur/ch79/ GraphQL SQL Injection
challenge01.root-me.org/web-serveur/ch80/ YAML Deserialization IP-gated, registration needs email verification, unavailable
challenge01.root-me.org/web-serveur/ch81/ JWT kid Injection stuck bypassing kid path-traversal filter, no flag found
challenge01.root-me.org/web-serveur/ch82/ JWT Header Injection
challenge01.root-me.org/web-serveur/ch83/ wkhtmltopdf SSRF/LFI
challenge01.root-me.org/web-serveur/ch84/ Weak Flask Secret Key
challenge01.root-me.org/web-serveur/ch85/ Werkzeug Debugger RCE
challenge01.root-me.org/web-serveur/ch86/ Second-order SQL Injection stuck extracting admin password via blind SQLi
challenge01.root-me.org/web-serveur/ch87/ Java Deserialization stuck building TemplatesImpl RCE gadget chain
challenge01.root-me.org/web-serveur/ch88/ IDOR / Broken Access
challenge01.root-me.org/web-serveur/ch89/ SSTI Path Traversal
challenge01.root-me.org/web-serveur/ch90/ API Mass Assignment
challenge01.root-me.org/web-serveur/ch91/ Weak Secret / IDOR stuck brute-forcing admin UUID secret, no flag
challenge01.root-me.org/web-serveur/ch92/ Nginx Alias Traversal

A lot of misses came from mulot's sandbox tooling that couldn't be rewritten in pure in-page JavaScript (specific object serialization, winning race conditions, some crypto operations, cracking, bruteforce, out-of-band channels).

Chain of thought examples

challenge observation
SSTI fingerprint of SSTI framework before crafting nodejs ssti injection
Time-based SQLi made its own tool for time-based SQLi in JavaScript to extract the flag
IDOR chain of thought logic
WAF Bypass chain of thought attempting hard WAF evasion
Unserialize made its own JavaScript tool to craft a PHP serialized object
Upload test different image header while uploading
DVWA dvwa pwn with qwen

Responsible use

mulot is an offensive security tool for authorized testing only: systems you own, engagements you have written permission for, and deliberately vulnerable labs such as OverTheWire, Root-Me, or DVWA. It drives real attacks against whatever target you point it at, so aiming it at a system you do not own or are not explicitly authorized to test is likely illegal and is not a supported use case. You are responsible for staying within scope and within the law. Released under Apache-2.0, with no warranty.

About

Agentic AI web pentester that drives a browser

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages