← Back to list

🧠 “I Let an MCP Agent Named HexStrike Guide My Attack”

An experiment in AI‑assisted hacking inside a controlled lab

Solynth.exe · 2026-02-03 09:21 · 30 claps · 4.1 min read
#generative-ai-tools #cybersecurity #hacking #oscp-preparation #vulnerability
Open on Medium ↗
Wiki topics: AGT · AI Agents AI · AI · General 🔒 · Cybersecurity 🔬 · Science · General

🧠 “I Let an MCP Agent Named HexStrike Guide My Attack”

An experiment in AI‑assisted hacking inside a controlled lab

Disclaimer This research was conducted strictly in a controlled lab environment (PG Practice). The purpose of this write‑up is to evaluate AI‑assisted pentesting workflows, not to promote automation abuse or real‑world exploitation.

🎯 Objective

The goal of this exercise was not just to root the machine, but to evaluate:

  • How effective HexStrike AI is when used as an assistant
  • Where human judgment is still required
  • Whether AI guidance can accelerate decision‑making without replacing fundamentals

As an OSCP graduate, my focus was on methodology, reasoning, and realism.

Initial Enumeration (Human‑Driven)

I began with standard enumeration:

  • Nmap for port and service discovery
  • Nikto for basic web vulnerability assessment

These steps were performed manually. While HexStrike can suggest enumeration, I intentionally controlled this phase to:

  • Maintain accuracy
  • Reduce noise
  • Preserve situational awareness

👉 Lesson: AI is most effective after you understand the surface.

Proceeded with Nikto:

These are the commands run by hexstrike on my terminal:

🔐 Credential Discovery (Manual Decision)

At this stage, HexStrike suggested brute‑forcing users. However, I intentionally did not let HexStrike brute‑force credentials.

Why?

  • AI‑driven brute‑forcing can be time‑consuming and noisy
  • In real engagements, unnecessary brute‑force is often discouraged
  • Manual control allows better wordlist tuning

I manually brute‑forced and successfully discovered valid credentials.

👉 Reasoning: This is an example of human judgment overriding automation — a recurring theme throughout the engagement.

Consulting HexStrike: “What Now?”

After gaining authenticated access, I asked HexStrike:

“What should I do next given that I can edit website themes?”

HexStrike correctly identified this as a web‑to‑RCE opportunity and suggested leveraging theme file modification for code execution.

This aligned perfectly with real‑world CMS exploitation scenarios.

🧪 Payload Strategy: AI Guidance vs Human Preference

HexStrike suggested:

  • Generating a PHP payload using msfvenom
  • Saving it as /tmp/shell.php

While valid, I chose a slightly different approach.

Why I deviated:

  • I consistently use the PentestMonkey PHP reverse shell
  • It is simple, readable, and reliable
  • I understand its behavior deeply (important for debugging)

I:

  1. Copied the PentestMonkey PHP shell
  2. Updated the IP and port
  3. Inserted the payload into the **header.php** theme file as suggested by HexStrike

👉 Insight: AI suggestions are templates, not rules. Experienced operators adapt them to tools they trust.

Gaining a Reverse Shell

Steps executed:

  • Started a Netcat listener on my chosen port
  • Visited the vulnerable web page:
  • [http://192.168.172.239](http://192.168.172.239)
  • Successfully received a reverse shell

This confirmed:

  • Payload placement was correct
  • PHP execution context was valid
  • Network connectivity was unrestricted

i get a rev shell

Post‑Exploitation Enumeration

Once inside the system, I followed standard procedure:

Uploaded linPEAS

  • Enumerated:
  • SUID binaries
  • Writable paths
  • Kernel/version weaknesses

This phase was human‑controlled, but I used HexStrike to:

  • Interpret findings
  • Prioritize suspicious results

Privilege Escalation via SUID Binary

LinPEAS revealed a binary with the SUID bit enabled.

Rather than guessing, I asked HexStrike:

“How can this binary be abused?”

HexStrike provided:

  • A specific exploitation technique
  • A precise command to test privilege escalation

Upon executing the command:

  • Privilege escalation succeeded
  • Root access achieved

🧠 Final Analysis: Did AI “Solve” the Box?

Short answer: No — but it accelerated it significantly.

Breakdown:

HexStrike functioned as:

  • A knowledge amplifier
  • A decision validator
  • A time‑saver

Not a replacement.

📌 Key Lessons Learned

1️⃣ AI excels at direction, not execution

HexStrike was best at:

  • Suggesting logical next steps
  • Explaining exploitation paths
  • Reducing research time

2️⃣ Human judgment is still critical

Key decisions — brute‑forcing, payload choice, timing — were human‑led.

3️⃣ Blind automation is dangerous

Letting AI brute‑force or exploit blindly:

  • Increases noise
  • Reduces learning
  • Is unrealistic in real pentests

Future Advice: How to Use AI Correctly in Pentesting

If you’re an OSCP student or junior pentester:

✅ Use AI to:

  • Interpret scan results
  • Brainstorm exploit paths
  • Explain why something works
  • Improve write‑ups and reporting

❌ Don’t use AI to:

  • Replace enumeration
  • Run uncontrolled brute‑force
  • Claim “fully automated pentesting”

Conclusion

AI tools like HexStrike do not replace pentesters — but they absolutely reward those who already understand the fundamentals.

Used responsibly, AI becomes:

A force multiplier — not a crutch.

This lab reinforced an important truth: Skill first. Automation second.


메타데이터
post_id
be3b2dd2ce2a
slug
i-let-an-mcp-agent-named-hexstrike-guide-my-attack-be3b2dd2ce2a
url
https://medium.com/@eaziz74/i-let-an-mcp-agent-named-hexstrike-guide-my-attack-be3b2dd2ce2a
canonical_url
https://medium.com/@eaziz74/i-let-an-mcp-agent-named-hexstrike-guide-my-attack-be3b2dd2ce2a
author_url
https://medium.com/@eaziz74
status
ok
fetched_at
2026-07-15 22:08:41