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.

None

Proceeded with Nikto:

None

These are the commands run by hexstrike on my terminal:

None
None

šŸ” 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.

None

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.

None
None

🧪 Payload Strategy: AI Guidance vs Human Preference

HexStrike suggested:

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

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.

None

Gaining a Reverse Shell

Steps executed:

  • Started a Netcat listener on my chosen port
  • Visited the vulnerable web page:
  • 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

None

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.

None

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
None
None

🧠 Final Analysis: Did AI "Solve" the Box?

Short answer: No — but it accelerated it significantly.

Breakdown:

None

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.