THE DFIR BLOG
Menu

    Cyber Security

Enumeration Techniques

5/23/2021

0 Comments

 
I started this post in 2021 as a list of recon notes. Reading it again in 2026, the idea still holds, but the angle was wrong. The useful question isn't "how do I enumerate a target." It's "what would someone find if they looked at me first?"
Every incident I've worked on started with the attacker knowing something about the environment that the defenders didn't. A forgotten subdomain. A staging server nobody patched. A storage bucket with a name that gave away exactly what was inside. Recon is cheap, and attackers do it before anything else. You should do it too, on your own assets, on a schedule.
Here's the checklist I'd run. Everything below is meant for domains and accounts you own or are authorized to test.
Step 1: Find every hostname you actually haveYour asset inventory is probably wrong. Mine usually was. The fastest reality check is certificate transparency. Every public TLS certificate gets logged, which means every subdomain that ever had a certificate is sitting in a public database.
# List hostnames from certificate transparency logs for YOUR domain domain=example.com curl -s "https://crt.sh/?q=%25.${domain}&output=json" \ | jq -r '.[].name_value' | tr 'A-Z' 'a-z' | sed 's/^\*\.//' | sort -u Compare that list to what your team thinks exists. The gaps are the interesting part. Old marketing microsites, vendor-hosted pages, a "dev" or "test" host someone spun up three years ago. Those are where attackers look first, because nobody is watching them.
What to do with the results:
  • Every hostname needs an owner. If nobody claims it, that's your first finding.
  • Check for dangling DNS. A CNAME pointing at a deleted cloud resource can be taken over by someone else.
  • Retire what you don't need. The safest server is the one that no longer exists.
Step 2: See how your endpoints answer a strangerThe original draft started with "send a basic request and see what comes back." That's still the right instinct. How a server responds to an anonymous request tells you a lot about how it was configured.
# Check what a server exposes to an unauthenticated request curl -sI https://app.example.com/ # headers: server banner, cookies, security headers curl -s -o /dev/null -w '%{http_code}\n' -X OPTIONS https://app.example.com/api/ # does OPTIONS answer? What I look for:
  • Version banners in headers like Server or X-Powered-By. They tell an attacker exactly which advisories to check. PHP2Shell this week is a good reminder of why that matters.
  • HTTP methods the app doesn't need. If an endpoint accepts PUT or DELETE without a reason, find out why.
  • Authentication gaps. Which paths answer without any login at all? An API that returns data to an anonymous request is a finding, even if the data looks harmless.
  • Missing security headers like HSTS and Content-Security-Policy on anything that handles logins.
Step 3: Find the paths you forgot you publishedAttackers run content discovery tools against web apps to find admin panels, backup files and old API versions. You can run the same tools against your own apps, with permission, and find them first. Tools like ffuf and gobuster work fine for this.
The usual suspects I find:
  • /.git/ or /.env left in a web root after a deploy
  • Old API versions like /api/v1/ still running next to v3
  • Backup files such as config.php.bak or site.zip
  • Admin and debug pages that were never meant to be public
The fix is almost always in the build pipeline, not the server. If deploys can't put those files in the web root, nobody has to remember to delete them.
Step 4: Check your own storage bucketsMy 2021 notes said most cloud breaches came from S3. That was close enough to true back then. It's less true now, partly because AWS changed the defaults. Since April 2023, new buckets block public access and disable ACLs out of the box.
But "new buckets" is doing a lot of work in that sentence. Old buckets keep their old settings, and plenty of accounts are older than 2023. So check, don't assume.
#!/usr/bin/env bash # s3-exposure-check.sh: read-only check of YOUR AWS account's S3 buckets. # Needs the AWS CLI and read permissions. Changes nothing. set -u account=$(aws sts get-caller-identity --query Account --output text) echo "Account-level Block Public Access for $account:" aws s3control get-public-access-block --account-id "$account" \ --query 'PublicAccessBlockConfiguration' --output table 2>/dev/null \ || echo " [!] Not set at the account level" echo echo "Buckets whose policy makes them public:" for b in $(aws s3api list-buckets --query 'Buckets[].Name' --output text); do public=$(aws s3api get-bucket-policy-status --bucket "$b" \ --query 'PolicyStatus.IsPublic' --output text 2>/dev/null) [ "$public" = "True" ] && echo " [!] $b" done echo "Done. Review every [!] line." What to do with the results:
  • Turn on Block Public Access at the account level. Then any bucket that truly needs to be public becomes a documented exception, not an accident.
  • Look at your bucket names. Names are globally unique and can leak information, so acme-payroll-exports tells a stranger exactly what to go after. Boring names are a small, free win.
  • Remember that S3 is only one service. Run the same "is this public?" question against snapshots, storage accounts in other clouds and shared drives.
Make it a habit, not a projectThe difference between teams that get surprised and teams that don't isn't tooling. It's frequency. Attackers re-scan the internet constantly. If you look at your own exposure once a year during an audit, you'll always be the second one to know.
What works for me:
  • Weekly: run the certificate transparency check and diff it against last week.
  • On every deploy: block secrets and dotfiles from reaching the web root.
  • Monthly: run the S3 check across every account, not just production.
  • Always: give every internet-facing asset a named owner.
You don't need to out-hack attackers. You just need to stop being surprised by your own infrastructure.
0 Comments



Leave a Reply.

    RSS Feed

    Subscribe to Newsletter

    Categories

    All
    AI
    CISO
    CISSP
    CKC
    Data Beach
    Incident Response
    LLM
    SOC
    Technology
    Threat Detection
    Threat Hunting
    Threat Modelling

  • Infosec
  • Mac Forensics
  • Windows Forensics
  • Linux Forensics
  • Memory Forensics
  • Incident Response
  • Blog
  • About Me
  • Infosec
  • Mac Forensics
  • Windows Forensics
  • Linux Forensics
  • Memory Forensics
  • Incident Response
  • Blog
  • About Me
Home·Blog·About·The Book·gouravnagar.com·LinkedIn·RSS
© 2026 Gourav Nagar · The DFIR Blog · Practical digital forensics and incident response since 2015