v1.0.0 · free and open source

Find what was planted in your WordPress, without running a line of it.

WPware scans a WordPress folder for web shells, backdoors and tampering. It compares every file with the official wordpress.org checksums, and unwraps obfuscated PHP so you can read the real payload. One binary. Read-only.

Linux, macOS and Windows · Other platforms · MIT or Apache-2.0

curl -fsSL https://github.com/hina-kura49/wpware/releases/latest/download/wpware-linux-x86_64.tar.gz | tar -xz wpware && sudo install wpware /usr/local/bin/
0 false positivesin 19,621 files of stock WordPress 7.1.5 with five popular plugins
1 static binaryNo PHP, Python or database. Linux, macOS and Windows.
Text · JSON · SARIFClear reports for people, and formats for scripts and GitHub code scanning
When you'll use it

Four moments where WPware pays off

WPware is built for the person who gets the call when a WordPress site goes wrong, and for the people who would rather know before that call comes.

Incident response

A client says their site redirects to spam

Visitors from Google land on a pharmacy page, but the owner sees nothing wrong. Copy the site or SSH in and scan it. In about a minute you see the changed core files, the .htaccess rule that only redirects search-engine visitors, and the decoded backdoor in uploads that wrote it.

wpware scan ./client-site --lang en
After a disclosure

A plugin you run just had a vulnerability disclosed

You updated it. But were you hit before the patch? WPware checks wordpress.org plugins against the official files for their exact version, and flags PHP that should not be there. You find out whether to start incident response or move on.

wpware scan /var/www/html --lang en --show high
Monitoring

A nightly cron check that exits non-zero

Run it from cron with --fail-on high. It exits with a non-zero code only when something serious shows up, so you get an email on the night a web shell is planted, and silence on every other night.

0 3 * * * wpware scan /var/www/html --lang en --fail-on high > /tmp/wpware.txt || mail -s "WPware: check $(hostname)" you@example.com < /tmp/wpware.txt
CI and code scanning

Feed SARIF to GitHub code scanning

If your site lives in a Git repository, the bundled GitHub Action writes SARIF and uploads it. New findings show up under Security → Code scanning on every push, next to your other alerts.

- uses: hina-kura49/wpware@v1
  with:
    path: public_html
    fail-on: high
Features

Quiet on clean sites. Specific on infected ones.

Every finding says which file, why it is suspicious, and what to do next.

Official checksums first

Core files and wordpress.org plugins are compared with the official checksums for your exact version and locale. Untouched files are set aside, so only what changed is left.

Web shells and backdoors

Built-in YARA-X rules catch request data passed to system or eval, request-triggered admin logins, file-manager shells and PHP hidden in images. Add your own rules with --rules.

Suspicious places

PHP in uploads, auto_prepend_file in .htaccess or .user.ini, images run as PHP, search-engine-only redirects, mu-plugins, and names like wp-c0nfig.php.

Static deobfuscation

Layers of base64_decode, gzinflate, str_rot13 and friends are undone in Rust, one by one, and the result is scanned again. You see system($_POST['c']);, not just "obfuscated code".

Reports people can act on

Readable reports in English (--lang en) or Japanese, grouped by file and colored by severity. --json and --sarif carry the same results for tools.

Made for automation

Exit codes follow severity (0 clean, 2 low/medium, 3 high, 4 critical). Reviewed findings can be silenced with a hash-pinned ignore file. Works offline with cached checksums.

How it works

Cheapest checks first, then dig into what is left

  1. Integrity

    Reads the version from wp-includes/version.php as text and fetches the matching checksums from api.wordpress.org.

  2. Location

    Looks at where files live and what they are called: uploads, .htaccess, mu-plugins, look-alike names.

  3. Signatures

    Runs YARA-X rules for the shapes web shells take, built into the binary.

  4. Heuristics

    Flags packed code: very long lines, high entropy, long runs without a word break.

  5. Deobfuscation

    Evaluates decoders on string literals, layer by layer, and scans the decoded code again.

Safety

Safe to point at an infected site

A scanner that runs inside the compromised site, or executes its code, can be fooled or turned against you. WPware does neither.

  • Read-only. Files are only opened for reading. Nothing is written, moved or deleted.
  • Never executes PHP. No eval, no include, no PHP interpreter. Each decoder is a small Rust function with size and depth limits.
  • Stays inside the folder. Symbolic links are never followed, and every read re-checks that the path is a regular file.
  • Minimal network. Only api.wordpress.org and downloads.wordpress.org, only for checksums. Use --offline to send nothing.
  • Your files stay with you. Nothing is uploaded. Checksum lookups contain only the WordPress version, locale and plugin slugs and versions.

"Nothing found" does not mean "clean"

WPware looks at files. It does not see:

  • the database (injected <script> tags, rogue admin accounts),
  • checksums for premium plugins and themes (their content is still scanned),
  • obfuscation that only resolves at runtime,
  • anything outside the folder you scan.

If a site was compromised, take a full backup and keep the access logs before you clean anything.

Install

Download WPware

These links always point to the newest release. Check the file against SHA256SUMS before you run it.

PlatformFileNotes
Linux x86_64wpware-linux-x86_64.tar.gzMost servers
Linux arm64wpware-linux-aarch64.tar.gzGraviton, Ampere
macOS Apple siliconwpware-macos-aarch64.tar.gzM1 and later
macOS Intelwpware-macos-x86_64.tar.gz
Windows x86_64wpware-windows-x86_64.zipRun from PowerShell
ChecksumsSHA256SUMSSHA-256 of every file

All versions and release notes: GitHub Releases

Install on a server

Download, verify and install in one go (use shasum -a 256 -c - on macOS).

f=wpware-linux-x86_64.tar.gz
u=https://github.com/hina-kura49/wpware/releases/latest/download
curl -fsSLO "$u/$f"
curl -fsSL "$u/SHA256SUMS" | grep " $f\$" | sha256sum -c -
tar -xzf "$f" wpware && sudo install wpware /usr/local/bin/

Build with Cargo

Needs Rust 1.95 or later.

cargo install --locked --git https://github.com/hina-kura49/wpware wpware

GitHub Actions

Downloads the release binary, verifies it, and uploads SARIF to code scanning. Needs security-events: write.

- uses: actions/checkout@v4
- uses: hina-kura49/wpware@v1
  with:
    path: public_html   # folder with wp-includes/
    fail-on: high
    args: --lang en
FAQ

Questions

WPware flagged a file. Should I delete it?

Not yet. First take a full backup, including the database and the access logs, and note the file's timestamps: they tell you when the intruder got in. Then compare the file with the official one, or read the decoded payload in the report. Deleting a web shell without closing the hole it came through usually means it comes back.

Does it clean or repair the site?

No. WPware is read-only on purpose, so it is safe to run on evidence. It tells you what to look at and what to do next; the cleanup is up to you (or a professional).

Does WPware upload my files anywhere?

No. The only outgoing requests are checksum lookups to wordpress.org, which contain the WordPress version, the locale, and the slugs and versions of your plugins. With --offline nothing is sent at all.

Can I run it on a server without internet access?

Yes. Scan a copy once on a machine with internet access using --cache-dir, copy that folder to the server, and scan with --offline.

I'm getting a false positive.

Signature rules lean towards reporting. Silence a reviewed finding with --emit-ignore and --ignore-file (pinned to the file's hash, so tampering brings it back), and please open an issue with the rule ID and a harmless, minimal snippet. Do not attach the real file.

Why are reports in Japanese by default?

WPware was first built for small businesses in Japan whose sites were compromised. Add --lang en for English. Rule IDs and severities are the same in both languages, so tooling does not depend on the language.

Is it free?

Yes. WPware is open source under MIT or Apache-2.0, at your option. The detection rules were written from scratch from public information.