2022-08-28 09:30:17 +00:00
|
|
|
id: magento-config-disclosure
|
2022-08-21 08:52:05 +00:00
|
|
|
|
|
|
|
info:
|
2022-08-28 09:30:17 +00:00
|
|
|
name: Magento - Config Disclosure
|
|
|
|
author: ptonewreckin,danigoland,geeknik
|
2022-08-21 08:52:05 +00:00
|
|
|
severity: high
|
|
|
|
description: |
|
|
|
|
Misconfigured instances of Magento may disclose usernames, passwords, and database configurations via /app/etc/local.xml
|
|
|
|
reference:
|
|
|
|
- https://github.com/ptonewreckin/cmsDetector/blob/master/signatures/magento.py
|
|
|
|
metadata:
|
|
|
|
verified: true
|
2022-08-28 09:30:17 +00:00
|
|
|
shodan-query: http.component:"Magento"
|
2022-08-21 08:52:05 +00:00
|
|
|
tags: magento,exposure,credential,config
|
|
|
|
|
|
|
|
requests:
|
|
|
|
- method: GET
|
|
|
|
path:
|
|
|
|
- "{{BaseURL}}/app/etc/local.xml"
|
|
|
|
- "{{BaseURL}}/app/etc/local.xml.additional"
|
|
|
|
- "{{BaseURL}}/store/app/etc/local.xml"
|
|
|
|
|
|
|
|
stop-at-first-match: true
|
|
|
|
matchers-condition: and
|
|
|
|
matchers:
|
|
|
|
- type: word
|
|
|
|
part: body
|
|
|
|
words:
|
|
|
|
- "* Magento"
|
|
|
|
- "<dbname>"
|
|
|
|
condition: and
|
|
|
|
|
|
|
|
- type: word
|
|
|
|
part: header
|
|
|
|
words:
|
|
|
|
- "application/xml"
|
|
|
|
|
|
|
|
- type: status
|
|
|
|
status:
|
|
|
|
- 200
|
|
|
|
|
|
|
|
extractors:
|
2022-09-16 18:08:08 +00:00
|
|
|
- type: xpath
|
2022-08-21 08:52:05 +00:00
|
|
|
part: body
|
2022-09-16 18:08:08 +00:00
|
|
|
xpath:
|
|
|
|
- "/config/global/resources/default_setup/connection/host"
|
|
|
|
- "/config/global/resources/default_setup/connection/username"
|
|
|
|
- "/config/global/resources/default_setup/connection/password"
|
|
|
|
- "/config/global/resources/default_setup/connection/dbname"
|