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

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: 490a0046304402205dfef45e615eb6f33d55b14665d70a699e1d27838f119c7656805f366baf9a21022007081309e99a834b0d25da780959dd338377b89934c3084dbf018dfc7a33b8e6:922c64590222798bb761d5b6d8e72950