id: adminer-panel

info:
  name: Adminer Login Panel - Detect
  author: random_robbie,meme-lord,ritikchaddha
  severity: info
  description: An Adminer login panel was detected.
  reference:
    - https://blog.sorcery.ie/posts/adminer/
  classification:
    cwe-id: CWE-200
    cpe: cpe:2.3:a:adminer:adminer:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 8
    vendor: adminer
    product: adminer
    shodan-query:
      - title:"Login - Adminer"
      - cpe:"cpe:2.3:a:adminer:adminer"
      - http.title:"login - adminer"
    fofa-query:
      - title="login - adminer"
      - app="adminer" && body="4.7.8"
    hunter-query: app.name="adminer"&&web.body="4.7.8"
    google-query: intitle:"login - adminer"
  tags: panel,adminer,discovery

http:
  - method: GET
    path:
      - '{{BaseURL}}/adminer.php'
      - '{{BaseURL}}/_adminer.php'
      - '{{BaseURL}}/adminer/'
      - '{{BaseURL}}/editor.php'
      - '{{BaseURL}}/mysql.php'
      - '{{BaseURL}}/sql.php'
      - '{{BaseURL}}/wp-content/plugins/adminer/adminer.php'
      - '{{BaseURL}}/admin.php'
      - '{{BaseURL}}/modules/sfkdbmanage/adminer.php'

    headers:
      Accept-Language: en-US,en;q=0.5
    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "Adminer</title>"
          - "Adminer</a>"
        condition: or

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '<span class="version">([0-9.]+)'
# digest: 4a0a00473045022055652a1cb2282a7464c1f71af7ee22c7af270eab92188393cb6e1ce4597dc04d022100ff029a89baf82e1d24ad096893a0c89c50ba68729b6a75bb8e7fe8d92267660b:922c64590222798bb761d5b6d8e72950