Nightcrawler v0.1.0 – Local AI Pentesting Agent for Smartphones
Overview
Nightcrawler v0.1.0 demonstrates that a full penetration‑testing workflow can be performed autonomously on a smartphone using a locally‑run AI model, eliminating the need for cloud APIs or internet connectivity.
How Nightcrawler Works
The agent operates in a loop: it selects a target host, builds context from past observations, queries a 1.2 B‑parameter LLM for the next action, validates the proposed command through a scope‑enforcement proxy, executes the command via a Kali MCP server, parses the output to update host memory, and then repeats.
Architecture
Nightcrawler runs on a OnePlus 8 with Kali NetHunter; the LFM2.5‑1.2B‑Instruct‑Heretic model is served by llama.cpp on port 8080 via OpenCL on the Adreno 650 GPU. The agent loop (main.py) communicates with a scope proxy that validates every command before it reaches the Kali MCP server, which runs actual tools such as nmap, curl, and smbclient. A web dashboard on port 8888 provides real‑time monitoring and control, while an SQLite database stores hosts, vulnerabilities, credentials, and executed commands.
Key Features
- Fully autonomous operation with no human in the loop during a test.
- 100% local inference; the AI model runs on the phone’s GPU.
- Two‑layer scope enforcement (scope proxy and command filter) prevents out‑of‑scope or destructive actions.
- Stealth‑first scanning: slow rates, host rotation, cover traffic, and nmap -T2 only.
- Includes 27 multi‑step exploit playbooks that can be executed directly.
- Contains a local CVE database with 24,956 entries for version‑aware vulnerability matching.
- Provides a web dashboard for live feed, host cards, network map, vulnerability details, and C2 controls.
- Supports WiFi breach mode using an external USB adapter for autonomous WPA2 cracking.
- Performs passive discovery of mDNS/NBNS/DHCP/ARP broadcasts.
- Isolates data per network and survives DHCP changes via MAC‑keyed host records.
- Implements self‑healing mechanisms: garbage detection, duplicate detection, time‑based stuck detection, and watchdogs. -ogs.
- Logs successful interactions for future model fine‑tuning.
- Generates downloadable pentest reports with findings, exploit chains, and remediation advice.
Hardware Requirements
- Required: Android phone with Kali NetHunter (continues)
- Captures training data from successful interactions for potential model fine‑tuning.
- Generates structured reports summarizing vulnerabilities, exploit chains, and remediation steps.
Performance Metrics
On the OnePlus 8’s Adreno 650 GPU using OpenCL:
- LFM2.5‑1.2B‑Instruct‑Heretic (Q8_0) achieves ~115 prompt tokens/second and ~13 generated tokens/second.
- Battery operation triggers a GPU governor daemon that forces maximum performance and throttles when battery falls below 15% to avoid a ~6× slowdown. During autonomous testing the agent has demonstrated:
- Discovery of 30+ hosts per network.
- Execution of 2,000+ commands.
- Identification of 10+ vulnerabilities across services.
- Execution of 6+ exploit playbooks via direct execution.
- Stable memory usage of 35‑50 MB with no leaks.
Usage and Deployment
- Install Kali NetHunter on a supported Android device (tested on OnePlus 8) and gain root access via Magisk.
- Ensure at least 12 GB of RAM is available.
- Inside the NetHunter chroot run
bash INSTALL.sh. - Wait for the llama‑server health endpoint (
curl -s http://127.0.0.1:8080/health) to return{"status":"ok"}. - Start all services with
bash scripts/run-36h.sh. - Access the web dashboard from any device on your Tailscale network at
https://<your-tailscale-hostname>:8888. A dry‑run mode (NC_DRY_RUN=1 python3 main.py) allows testing the agent loop without executing real network commands.
Legal and Ethical Considerations
Nightcrawler is intended solely for authorized penetration testing. Written permission (Rules of Engagement) from the network owner is required before deployment. Unauthorized use against networks you do not own or have permission to test is illegal.
Community Feedback
"What does the 50% look like when it fails? Garbage the parser throws out is easy to handle, but a well formed command aimed at the wrong host gets past the scope check, and you would only catch that reading the report afterward." — @haeseong
"The following rant is not against the owner/project - but... What an irony. I cant publish a attack surface mapping / pentesting tool i wrote which runs fully deterministic and really controlable due to "dual use" legal problems - but llm driven tools hit public space......" — @voodooEntity
"I completely forgot that AI can very much also attack networks/devices in the wild. Interesting project." — @kreidema
"Why phone? This cuts out a lot of phones. Why not on a computer?" — @oquidave
"I built Nightcrawler, an open-source autonomous penetration-testing agent that runs entirely on an Android phone. The project started with a question: how much of a real pentesting workflow could I run locally on relatively old mobile hardware, without relying on a cloud model or API? Nightcrawler runs a 1.2B-parameter model locally on the Adreno GPU of a OnePlus 8. The model chooses targets and tools, while a separate scope-enforcement proxy validates every command before execution. The system maintains per-host memory in SQLite, rotates between targets, matches detected versions against a local CVE database, executes multi-step playbooks, and generates a structured report. A few implementation details that may be interesting: Local inference runs at roughly 115 prompt tokens/sec and 13 generated tokens/sec. The small model only produces a usable command around 50% of the time, so much of the engineering is recovery logic, duplicate detection, persistent memory, and deterministic playbooks. Every command passes through a separate scope and safety layer rather than trusting the model to remain in scope. The project includes a dry-run mode, so the agent loop can be tested without executing real network commands or owning the phone hardware. I've had it running on my home network for the past 3 months uninterrupted" — @NickySlicks (author)
"Will this work on iphones as well." — @imranshah10140
"Judas Priest reference?" — @aaa_aaa
"little bit unrelated, but I watched the IG video and I thought the visual design of the app was cool af! what inspired the style?" — @baddash
"This looks interesting. My current phone is an Asus ROG Phone 3, which I think suffices (Snapdragon 865+ plus 12Gb RAM) but isn't rooted. Even on outdated Android 12 this phone covers everything I could possibly need as-is, and I don't intend to replace it. But, this might be the final push to upgrade ROM to something newer. I saw crDroid 16.0 still supports this ROG variant. Will this work with Nethunter Rootless, or ir Magisk support w/root imperative?" — @vctrnk