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

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: 490a0046304402202cfeb85946995474986c795d6a8ad6bbd6c384973bcb4b7f392c275a5c898bf002205dd88d6ad113c4818b82b56baf67c624ff07f2f09875185ae066dd9af16560e0:922c64590222798bb761d5b6d8e72950