dot-credentials-exposure: Dot Credentials - Exposure

2026-01-24 Dot Credentials PoC Public

Description

Detected the presence of a .credentials file and extracts sensitive authentication tokens, passwords, or API keys.

PoC

id: dot-credentials-exposure

info:
  name: Dot Credentials - Exposure
  author: theamanrawat
  severity: high
  description: |
    Detected the presence of a .credentials file and extracts sensitive authentication tokens, passwords, or API keys.
  metadata:
    verified: true
    max-request: 1
  tags: exposure,config,credentials,sensitive,token,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/.credentials"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "client_id"
          - "client_secret"
          - "access_token"
          - "refresh_token"
          - "password"
          - "aws_access_key_id"
        condition: or

      - type: word
        part: body
        words:
          - "<html"
          - "<body"
          - "<!DOCTYPE"
          - "<script"
          - "<?php"
        negative: true

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        name: aws_access_key
        group: 1
        regex:
          - "(?i)aws_access_key_id\\s*[:=]\\s*[\"']?([A-Z0-9]{20})[\"']?"

      - type: regex
        part: body
        name: aws_secret_key
        group: 1
        regex:
          - "(?i)aws_secret_access_key\\s*[:=]\\s*[\"']?([A-Za-z0-9/+=]{40})[\"']?"

      - type: regex
        part: body
        name: generic_secrets
        group: 1
        regex:
          - "(?i)(?:client_secret|access_token|refresh_token|password|secret)\\s*[:=]\\s*[\"']?([a-zA-Z0-9_\\-\\.~]+)[\"']?"

      - type: regex
        part: body
        name: client_id
        group: 1
        regex:
          - "(?i)client_id\\s*[:=]\\s*[\"']?([a-zA-Z0-9_\\-\\.]+)[\"']?"
# digest: 4b0a00483046022100bdaaa15d055535f3fc1acea9dae21832bde882364d498eb58fd1941bd030e5eb022100b8723465a4b97b4bb9726c07ecf308ea2ae94ed78b0ee8f327691c8bbeb9e10a:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities