A simple scanner/exploitation tool written in GO which automatically exploits known and existing gadgets (checks for specific variables in the global context) to perform XSS via Prototype Pollution. NOTE: The program only exploits known gadgets, but does not cover code analysis or any advanced Prototype Pollution exploitation, which may include custom gadgets.
Requirements
Make sure to have chromedp installed:
go get -u github.com/chromedp/chromedp
Installation
Automatically
chmod +x ppmap
Manually (compile it yourself)
git clone https://github.com/kleiton0x00/ppmap.git
cd ~/ppmap
go build ppmap.go
Usage
Using the program is very simple, you can either:
scan a directory/file (or even just the website): echo 'https://target.com/index.html' | ./ppmap
or endpoint: echo 'http://target.com/something/?page=home' | ./ppmap
For mass scanning:
cat url.txt | ./ppmap
where url.txt contains all url(s) in column.
Demo
Feel free to test the tool on the following websites as a part of demonstration:
https://msrkp.github.io/pp/2.html
https://ctf.nikitastupin.com/pp/known.html
Workflow
Credits
Many thanks to @Tomnomnom for the inspiration: https://www.youtube.com/watch?v=Gv1nK6Wj8qM&t=1558s
The workflow of this program is hugely based on this article: https://infosecwriteups.com/javascript-prototype-pollution-practice-of-finding-and-exploitation-f97284333b2
The fingerprint javascript file is based on this git: https://gist.github.com/nikitastupin/b3b64a9f8c0eb74ce37626860193eaec
Download Ppmap
camo.githubusercontent.com/87f422644420b45d4a485317b0f69adc1bc6a5dfe0acbd39895a4b81d529dd85/68747470733a2f2f692e696d6775722e636f6d2f30356e766677582e676966
gist.github.com/nikitastupin/b3b64a9f8c0eb74ce37626860193eaec
github.com/chromedp/chromedp
github.com/kleiton0x00/ppmap
github.com/kleiton0x00/ppmap/releases
msrkp.github.io/pp/2.html