id: pulmi-login-check

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

self-contained: true

http:
  - raw:
      - |
        POST https://api.pulumi.com/api/console/email/login HTTP/1.1
        Host: api.pulumi.com
        Content-Type: application/json
        Origin: https://app.pulumi.com
        Referer: https://app.pulumi.com/

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

    extractors:
      - type: dsl
        dsl:
          - username
          - password

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - pulumiAccessToken
          - userInfo

      - type: status
        status:
          - 200
# digest: 490a00463044022024457f2748577435cfe2fa8b08eaf1a549d81de394ac26fa8979c4cf5cfce3c3022068c98ce9a7320b2a712913d6121466e922a371044fce9992cb5e0efa382f0fe3:922c64590222798bb761d5b6d8e72950