Deeper OSINT into credential testing
The recon phases found secrets with truffleHog and gitleaks, email patterns with theHarvester, and mail DNS records along the way. A found secret is not a finding until you show it is live. Showing it is live is exactly where you can cross a line. This part is about doing that safely.
From leak triage to safe testing
Section titled “From leak triage to safe testing”The safe order is: prove the secret is valid with the smallest possible action, then stop and report.
-
Classify the secret. A session cookie, an API key, a database string and a private key each need a different, minimal check.
-
Find the smallest read-only call that returns a yes or no. For an API key, a “who am I” or quota endpoint. Never a call that reads other users’ data.
-
Run it once. One request that returns your own identity or a 200 is enough.
-
Stop. Do not explore, do not pivot, do not read customer data. Record the request and response and report.
A database URL is the check you are most likely to overdo. If you have to show it connects, run SELECT version(); and disconnect. Do not dump tables.
Leaked API keys without the bill
Section titled “Leaked API keys without the bill”truffleHog already verifies many key types, so --results=verified output is live keys. The danger with a live third-party key is cost. The provider charges per call, and some actions (sending email, provisioning, SMS) cost money or reach real people. Enumerate capability with the cheapest identity call only.
| Key type | Safe “is it live” check | Avoid |
|---|---|---|
| AWS | aws sts get-caller-identity |
Listing or reading S3, launching anything |
| SendGrid, Mailgun | the account or profile endpoint | Sending a test email |
| Stripe | GET /v1/account (secret key) |
Creating charges or refunds |
| Slack | auth.test |
Posting messages, reading channels |
| Twilio | account fetch | Sending SMS |
# AWS key capability check: identity only, no resource access, no costAWS_ACCESS_KEY_ID=AKIA... AWS_SECRET_ACCESS_KEY=... aws sts get-caller-identityA live key comes back like this.
{ "UserId": "AIDACKCEVSQ6C2EXAMPLE", "Account": "123456789012", "Arn": "arn:aws:iam::123456789012:user/backup-user"}The output names the account and principal, which proves the key is live and whose it is, without touching data or running up a bill. That is your evidence. Match Account to the target. A key that returns someone else’s personal account is not their production role. InvalidClientTokenId means the key is dead. Drop it. The KeyHacks reference lists a safe check per provider.
SendGrid’s read-only check is the scopes list. A list of scopes means the token is live. It does not mean you should send mail.
# SendGrid: scopes only, no mail sendcurl -s -H "Authorization: Bearer SG.exampleTokenString" https://api.sendgrid.com/v3/scopesEmail and account patterns
Section titled “Email and account patterns”theHarvester and Hunter.io give you the email format (first.last@example.com) and real addresses. In a pentest this feeds a username list. In bug bounty, logging in as an employee is almost always out of scope, so this stays recon. It helps you understand the org, spot service accounts (noreply@, jenkins@, svc-deploy@), and recognise an account you are allowed to test. Do not run the list against a login form unless the program explicitly allows credential testing.
SPF, DKIM and DMARC
Section titled “SPF, DKIM and DMARC”# Read the three email-auth records for a domaindig +short TXT example.com | grep -i 'v=spf1'dig +short TXT _dmarc.example.comdig +short TXT selector._domainkey.example.comv=DMARC1; p=none; sp=none; rua=mailto:dmarc-reports@example.comA missing SPF, or a DMARC record with p=none, means mail from the domain can be spoofed. p=none asks receivers not to reject or quarantine that mail. Whether that is a finding depends entirely on the program. Some accept email spoofing on a primary domain as low severity. Many list it as out of scope because it is a mail-config issue, not an app bug. The case that still matters is a password-reset host-header bug that uses this policy to send mail as the company. Check the policy before you spend time here, and never actually send a spoofed email to a real person to prove it.
Next, check the 2026-era surface such as AI endpoints and metadata files in modern surface.
Open local graph around this page
Recon AtlasFor authorized testing only. Your scope is the map edge.