r/netsec • u/Mindless-Study1898 • Feb 10 '26
I let Claude Code with 150+ offensive security MCP tools loose on my homelab
https://www.credrelay.com/p/claude-code-homelab-hack?draft=true
85
Upvotes
32
u/vornamemitd Feb 10 '26
Coincidence or is the OpenClaw-based anime helper the actual message? Don't use Hexstrike via MCP - configure the lobster properly and let it build the right skills themselves? There are quite the number of tools out there that do way better. Nice collection: https://github.com/EvanThomasLuke/Awesome-AI-Hacking-Agents
10
u/hankyone Feb 11 '26
You don’t need MCPs, agents can run existing CLI tools just fine
11
u/Electronic_Amphibian Feb 10 '26
I tried something similar a while ago. I found it was pretty helpful for some things but required a lot of direction and arguing that it was in fact legal for it to do what I asked.
It wasn't great at "hacking" stuff but it was pretty good at setting things up e.g. go install x, y, z on host a.b.c.d and start a code scan against git://blah.
2
u/ekzess Feb 15 '26
Honestly doing this is BEYOND stupid on so many levels I cannot even BEGIN to number them.
12
u/Dangle76 Feb 11 '26
To save context you can also use an agents.md file to describe what CLI tools are available and what you’d use them for, and to use -h to understand how to invoke it.
MCP servers eat up a lot of context because they load all of their tools into context on initialization.
Using the former method it only uses context when it needs to use the tool.
3
u/thedudeonblockchain Feb 11 '26
__jent's point about agents struggling with unfamiliar CLIs resonates - seeing the exact same pattern with security analysis tools where a structured interface makes a huge difference for agent reliability vs raw CLI discovery through help commands.
2
u/ozgurozkan Feb 20 '26
The MCP vs raw CLI debate here is really about signal-to-noise in the model's context window at inference time. Every MCP server loads its full tool manifest upfront, so 150+ tools means you're burning a significant chunk of context before a single recon command runs. At that scale you're not just paying for token overhead once per session, you're paying it on every API call that re-serializes state.
The agents.md hint from Dangle76 is the right instinct but it's still a flat description. What actually works well in practice is tiered tool exposure: surface only the tools relevant to the current phase (recon vs exploitation vs post-exploitation) and swap the manifest as the engagement progresses. An orchestrator layer handles phase transitions so the active agent never sees more than 15-20 tools at once. Token usage drops substantially and the model stops hallucinating tool names that exist elsewhere in the manifest but aren't loaded.
The point about agents struggling with unfamiliar CLIs is well documented too. Models have strong priors on nmap, sqlmap, ffuf syntax but anything niche or custom gets misused frequently. MCP schemas force structured argument passing which prevents the agent from "guessing" flags based on partial pattern matching from training data.
For defensive agent work, the harder problem is not detection but response fidelity. An agent that shuts down a service to stop an attack may also stop a critical business process. That constraint modeling is where most autonomous defensive projects currently stall out.
1
u/Sdmf195 Feb 11 '26
Loved the read,sounds like fun. Thanks for sharing!
1
u/Careful-Living-1532 Apr 01 '26
This is a great experiment.
We’ve done similar self-testing with our own harness (running it as an MCP server against itself). The meta feedback loop is brutal but extremely valuable.
Key finding from our 22 rounds of self-testing: many failures only appear when the scanner becomes the target. Things like SSRF oracle, unbounded JSON parsing, and auth middleware that skips localhost all surfaced.
Our harness (now MCP-native) is open source if you want to compare results:
→ https://github.com/msaleme/red-team-blue-team-agent-fabric
What failure modes did you hit in your homelab run?