Skip to content
PHASE 14/16OP WHISPER

OSINT and leaks

Noise
Passive
Reads
org/domains.txtsubs/all.txt
Writes
osint/dorks.mdosint/github.mdosint/secrets/osint/people.md
5 min readRecon Atlas

Mistakes that employees publish stay online for years, and they are free to find. This phase uses open-source intelligence (OSINT) to find what the company and its people published by accident. Typical finds are indexed documents, code with credentials, public API collections, and old pages that the Wayback Machine kept. None of this touches the target’s servers, so you can do it on any program, any time.

Tool Noise Role Status
Google dorks and the GHDB Passive Search operators for exposed files and panels Online service
GitHub code search Passive Hostnames, keys and configs in public code Online service
GitDorker Passive Runs many GitHub dorks with your tokens Rarely updated
truffleHog Passive Scans repos and history for secrets, verifies many key types Maintained
gitleaks Passive Fast secret scanner for repos and directories Maintained
Postman public workspaces Passive Public API collections, sometimes with tokens Online service
theHarvester Passive Emails, names, hosts from public sources Maintained
SpiderFoot Passive Automated OSINT with many modules and a web UI Open-source version rarely updated
recon-ng Passive Modular framework with a module marketplace Maintained
Maltego Passive Graph link analysis, free community edition Commercial
Hunter.io Passive Corporate email formats and addresses Online service
Wayback Machine Passive Old versions of pages, files and robots.txt Online service
OSINT Framework Passive Directory of OSINT tools by category Online reference

Some modules in SpiderFoot, recon-ng and theHarvester do resolve or contact hosts. Check module descriptions if a program is strict.

Detector: AWS
Verification: Successful
File: deploy/terraform/main.tf
Commit: a1b2c3d4e5f6

truffleHog verified an AWS key in deploy/terraform/main.tf. The provider accepted the key at scan time. It does not mean the key belongs to the company’s production account. It may be a personal account or a sandbox. It also does not say which permissions are attached. Report the leak. Do not explore the account.

Workspace: Example Mobile Core, public
Variable: STAGING_AUTH_TOKEN
URL: https://billing-staging.internal.example.com

A public workspace published a token and an internal hostname. The collection was world-readable. The token may already be dead. The hostname may not resolve on the public internet. Resolve it in phase 4 before you add it to live hosts.

https://api.example.com/v1/debug/pprof 200 20220412153022

The CDX API says that path returned 200 in April 2022. The archive saw it then. It does not mean the route is mounted today. Request it once. A 404 means it is gone. A 401 means it moved behind a login.

cypress.env.json or .env.test in a personal repo holds a key-shaped string next to https://api.example.com. The API answers 401 and the body says the token was revoked. The repo is a test suite, and the string is dead. Keys copied from a vendor’s docs fail the same check.

A code search finds internal.example.com, and the name resolves to a loopback address or a private range. You found a string. You did not find a host you can reach. Keep it in your notes. Do not file it as an exposed server.

  1. Google dorks. Start with the Google Hacking Database for ideas, then adapt them.

    # Exposed files on the target's hosts
    site:example.com ext:log | ext:env | ext:sql | ext:bak | ext:conf
    # Subdomains other than www
    site:*.example.com -www
    # Login and admin pages
    site:example.com inurl:login | inurl:admin | inurl:signin
    # API documentation that maps the whole surface
    site:example.com inurl:swagger | inurl:api-docs | inurl:openapi.json
    # Documents that may hold internal data
    site:example.com ext:pdf | ext:docx | ext:xlsx "internal" | "confidential"
    # Third-party sites that mention the target
    site:trello.com "example.com"
    site:pastebin.com "example.com"
    site:s3.amazonaws.com "example"

    Record useful queries and hits in osint/dorks.md.

    An API-docs hit is worth chasing because the document lists every route and parameter at once. When the dork finds nothing, probe the common paths directly on each live host, as a light-active check in phase 11:

    /swagger.json
    /swagger/v1/swagger.json
    /swagger-ui/
    /swagger-ui/index.html
    /v2/api-docs
    /v3/api-docs
    /openapi.json
    /api-docs
    /redoc
  2. GitHub code search. Search for hostnames rather than the company name. Engineers rarely type “Example Inc” in code, but they paste api.internal.example.com all the time.

    # Internal hosts mentioned in public code
    "internal.example.com"
    # Config files that mention the domain
    "example.com" path:*.env
    "example.com" language:YAML password
    # Code in the company's own GitHub org
    org:example-inc "api_key"
    # CI pipelines, where deploy tokens and internal hostnames collect
    org:example-inc path:.github/workflows
    "example.com" filename:.gitlab-ci.yml

    Check the company’s GitHub org, then the personal accounts of employees who list the company in their profile. Personal repos are where work code leaks. CI files such as .github/workflows/*.yml and .gitlab-ci.yml are worth opening first: they name internal registries, deploy hosts, and the secret names the pipeline expects, even when the values are masked.

  3. Scan repos for secrets. truffleHog verifies many key types against the provider’s API, which removes most false positives.

    Terminal window
    # Every public repo in the company's GitHub org, verified secrets only
    trufflehog github --org=example-inc --results=verified > osint/secrets/trufflehog-org.txt
    Terminal window
    # One repo including full git history
    trufflehog git https://github.com/example-inc/legacy-app --results=verified
    Terminal window
    # gitleaks on a cloned repo, with a JSON report
    git clone https://github.com/example-inc/legacy-app /tmp/legacy-app
    gitleaks git -v --report-path osint/secrets/gitleaks-legacy-app.json /tmp/legacy-app

    GitDorker automates many dork queries but has not been updated in years; GitHub’s own search syntax now covers most of what it did.

  4. Postman public workspaces. Search postman.com/explore for the domain and the company name. Look at environments and collection variables, where tokens often sit.

  5. People and email formats. theHarvester and Hunter.io show the email pattern (first.last@example.com) and names. In a pentest this helps build username lists. In bug bounty, social engineering is almost always out of scope, so use it only to understand the org.

    Terminal window
    # Emails and hosts from a couple of free sources
    theHarvester -d example.com -b crtsh,duckduckgo -f osint/harvester
  6. Frameworks for automated OSINT. SpiderFoot runs a local web UI; recon-ng is a console with installable modules.

    Terminal window
    # Start SpiderFoot's web UI on localhost
    python3 sf.py -l 127.0.0.1:5001
    Terminal window
    # Start recon-ng in a workspace named after the target
    recon-ng -w example

    Maltego’s community edition draws the same kind of data as a graph, which helps on large orgs with many brands.

  7. The Wayback Machine. Old robots.txt files list paths the company wanted hidden. Old JS files show APIs that may still exist.

    Terminal window
    # Every archived URL for the domain that returned 200, deduplicated by URL
    curl -s "https://web.archive.org/cdx/search/cdx?url=example.com/*&output=txt&fl=original&filter=statuscode:200&collapse=urlkey" > osint/wayback-cdx.txt
    # Old robots.txt versions, opened in a browser
    https://web.archive.org/web/2018*/example.com/robots.txt

    Old JavaScript is the richer seam. A bundle from two years ago often calls APIs the live site has since dropped but never decommissioned. Pull the archived .js with the CDX API, download a few old snapshots, and grep them the same way as phase 9.

    Terminal window
    # List every archived JS capture for the domain, newest copy per URL
    curl -s "https://web.archive.org/cdx/search/cdx?url=example.com/*&output=txt&fl=original,timestamp&filter=mimetype:application/javascript&collapse=urlkey" > osint/wayback-js.txt
    Terminal window
    # Fetch one archived version by timestamp (the id_ suffix returns the raw file)
    curl -s "https://web.archive.org/web/20220412153022id_/https://app.example.com/static/main.js" -o osint/old-js/main.js

    Grep the downloaded copies for endpoints and key shapes, then resolve any new hostnames through phase 4.

  8. When stuck, browse the OSINT Framework for a source type you have not tried.

  • Hostnames from GitHub, dorks and Wayback go into subs/all.txt and back through phase 4.
  • Old paths and files from Wayback go into urls/raw.txt and through phase 8.
  • Bucket names and cloud references feed phase 15.
  • Searching only for the company name. Search for hostnames and internal project names.
  • Ignoring employees’ personal repos and gists.
  • Reporting keys without checking whether they are live or meant to be public.
  • Using leaked credentials beyond what the policy allows.
What to look for
  • .env, config.yml, application.properties, docker-compose.yml files in public repos that mention the domain
  • CI files (.github/workflows, .gitlab-ci.yml) with hardcoded tokens
  • Postman environments with Authorization headers or api_key variables
  • Internal hostnames, IPs and project code names in public issues or wikis
  • Paths in old robots.txt that still respond today

Next, check the cloud storage the target owns in phase 15.

Connections5 backlinks · 5 outgoingFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

Recon AtlasFor authorized testing only. Your scope is the map edge.