National Cyber Warfare Foundation (NCWF)login

pphack for hunting client-side prototype pollution at scale


0 user ratings
2026-11-08 19:28:02
milo
Red Team (CNA)
"pphack

pphack is a Go-based scanner that drives a real Chromium browser via chromedp to detect and optionally confirm client-side prototype pollution during authorized web security assessments.








Tooledoardottt/pphack — advanced client-side prototype pollution scanner written in Go
CategoryWeb application security scanner (client-side JavaScript)
Primary UseDetecting prototype pollution sinks in browser context across single URLs or URL lists during authorized bug bounty and web security audit engagements
Safe UseFor authorized penetration tests, bug bounty programs with defined scope, and internal web security audits; the tool should only be pointed at assets you own or have written permission to test
Telemetry NoteEach scan spins up a real Chromium instance through chromedp, generating distinctive browser-generated HTTP traffic; custom random User-Agent headers and -rl rate-limiting may alter but not eliminate that footprint, and WAF/server logs will show repeated parameterized requests

pphack is an open-source client-side prototype pollution scanner authored by edoardottt and written in Go, currently sitting at around 250 stars under the permissive MIT License. What sets it apart from naive grep-style scanners is its architecture: it embeds a real browser engine through the chromedp library, meaning every candidate URL is actually rendered and executed in a Chromium context rather than merely fetched. That distinction matters enormously for prototype pollution, because the vulnerability class lives entirely in the client-side JavaScript runtime — the pollution of Object.prototype only becomes observable after the target page's scripts have actually parsed attacker-controlled input and merged it into the prototype chain. A tool that never executes JavaScript fundamentally cannot see this bug class.


The core workflow is deliberately minimal. You supply either a single URL with -u/-url, a file of URLs with -l/-list, or pipe targets through stdin, and pphack takes it from there. The README's examples show both idioms clearly: pphack -u https://edoardottt.github.io/pphack-test/ for one-off checks and cat targets.txt | pphack for pipeline-style bulk scanning. This makes it a natural fit for the recon-to-triage stage of an authorized assessment, where you've already enumerated a large URL inventory — from crawling, from wayback archives, from parameter mining — and now need to narrow down which endpoints actually execute dangerous client-side merge logic on untrusted query input.


Installation follows the standard Go ecosystem route: go install github.com/edoardottt/pphack/cmd/pphack@latest. The one hard dependency the README calls out is that pphack relies on chromedp, so a Chrome or Chromium-based browser must be present on the host. This is worth flagging operationally: if you're running this from a bare container in CI, you'll need to bake a headless Chromium in, and the browser binary version should stay reasonably current to avoid divergence between how the scanner's engine parses JavaScript and how real victims' browsers would.


The configuration flag surface reveals a tool designed for polite, controlled scanning at engagement scale. -c/-concurrency defaults to 50 parallel workers, -t/-timeout defaults to 20 seconds per connection, and -rl/-rate-limit lets you cap requests per second — a flag any tester who has tripped a WAF or knocked over a fragile staging environment will appreciate. There's -px/-proxy for routing traffic through an interception proxy like a Burp upstream listener, which is how you'd verify exactly what the scanner sends while debugging scope boundaries. Headers are flexible too: -H takes custom headers inline, -Hf loads them from a file, and -ua sets a User-Agent that is randomized by default — a sensible choice for realism, though testers who want their traffic to be identifiable to a client's SOC during an authorized engagement should override it with something explicit and declared.


The scan flags are where the tool's depth shows. Beyond the built-in detection logic, -p/-payload lets you substitute a custom pollution payload, which is useful when a target's framework has quirks around how query parameters are deserialized or when built-in probes generate false negatives. More interesting for researchers are -js/-javascript and -jsf/-javascript-file, which execute arbitrary JavaScript you supply inside the target's page context. That turns pphack from a fixed scanner into a small client-side instrumentation harness: you can probe for pollution, then immediately chain into downstream gadget detection within the same page session, all while chromedp reports results back to the CLI.


The -e/-exploit flag enables what the README labels automatic exploitation. From a defensive-documentation standpoint, this is the capability that elevates the tool past pure detection: rather than only reporting that a pollution vector exists, it attempts to confirm impact end-to-end in the browser session. For authorized testers this is the difference between a speculative finding and a demonstrable one — bug bounty triagers consistently reward verified impact over theoretical vectors. It should go without saying, and the README implies it by pointing to the project Wiki for usage guidance, that this flag belongs exclusively inside engagement scope. The Wiki is referenced as the canonical documentation for understanding how to operate the tool properly, which suggests the README is intentionally kept lean.


Output handling is well thought out for integration into larger toolchains. -o writes results to a file, -v gives verbose output for interactive debugging, -s silences everything except results for clean piping, and -j emits JSON for machine consumption. The JSON mode in particular makes pphack a composable stage: you can fan its output into a reporting pipeline, deduplicate against other scanners, or feed confirmed vectors into downstream manual analysis. The combination of stdin input and JSON output means it slots cleanly into the shell-first workflow most web testers already run.


The repository's topic tags — prototype-pollution, javascript-security, web-security-audit, redteam-tools, bug bounty-adjacent labels like scanner-web — accurately describe its niche. There's no attempt to be a general-purpose web scanner; this is a single-class detector, which is arguably why it can go deep where broader frameworks go shallow. The project hygiene looks healthy: a go.yml GitHub Actions badge indicates continuous integration on the default main branch, contribution guidelines require running golangci-lint run before pull requests, changes are tracked in release notes, and the author points to edoardottt.com for contact. External recognition includes coverage in the tl;dr sec newsletter, which is a reasonable signal of community uptake in the offensive-security tooling space.


For defenders, understanding how pphack operates is useful blue-team knowledge. Because it drives a genuine Chromium instance, its traffic looks browser-like rather than script-like — real JS execution, randomized User-Agent strings — but its behavioral signature is distinctive in another way: bursts of repeated requests to the same endpoints with systematically varied parameter structures probing prototype-merge behavior, potentially at high concurrency. Rate anomalies, WAF rules keyed on known pollution payload parameter patterns, and CSP deployments that limit the impact of client-side gadget chains are all relevant mitigations. The deeper fix is upstream: strict schema validation on client-side object merges and using Object.create(null) or modern framework sanitization, so the scanner finds nothing to report.


Where pphack fits in an authorized workflow is straightforward. During recon you've already gathered URL inventory; pphack triages that inventory for a high-severity, frequently under-reported vulnerability class that pure server-side scanners miss entirely. Confirmed findings from -e mode then feed directly into reports with demonstrable client-side impact. Its lightweight single-binary Go distribution, MIT licensing, and pipe-friendly I/O make it low-friction to adopt. As with any scanner that executes arbitrary JavaScript against targets, the professional boundary is scope discipline — run it against assets you own or are contracted to assess, keep the rate limiter engaged on fragile targets, and use its proxy support to keep full visibility of what it sends.



Official project repository for edoardottt/pphack.

Download Tool

Educational analysis for authorized security professionals. Use only in controlled, authorized environments.






Source: OffensiveSec
Source Link: https://www.offsecblog.com/2026/11/pphack-for-hunting-client-side.html


Comments
new comment
Nobody has commented yet. Will you be the first?
 
Forum
Red Team (CNA)



Copyright 2012 through 2026 - National Cyber Warfare Foundation - All rights reserved worldwide.