id: jira-login-check

info:
  name: Jira Login Check
  author: parthmalhotra,pdresearch
  severity: critical
  description: Checks for a valid login on self hosted Jira instance.
  reference:
    - https://owasp.org/www-community/attacks/Credential_stuffing
  metadata:
    max-request: 1
    shodan-query: http.component:"Atlassian Jira"
    fofa-query: product="JIRA"
  tags: creds-stuffing,login-check,self-hosted,jira
variables:
  username: "{{username}}"
  password: "{{password}}"

http:
  - raw:
      - |
        POST /rest/gadget/1.0/login HTTP/1.1
        Host: {{Hostname}}
        User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8
        Connection: close

        os_username={{username}}&os_password={{password}}

    extractors:
      - type: dsl
        dsl:
          - username
          - password
    attack: pitchfork

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"loginSucceeded":true'

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