Special welcome gift. Get 10% off your first purchase with code “WELCOME10”. Find out more!10% off your first order: WELCOME10

Cover image: Medium Scope Recon: Working Through Wildcard Domains

Medium Scope Recon: Working Through Wildcard Domains

When a program lists *.example.com in scope, the target changes shape. You are no longer looking at one application. You are looking at every subdomain under that domain, and many of them are not linked from anywhere. Medium scope recon is the work of finding those hosts, checking which ones are alive, and deciding which ones deserve your time.

This post walks through a practical medium scope recon workflow for wildcard domains. It builds on my small scope recon guide, because once you find a live host, you still recon it like a single application. For how all three scope levels fit together, see the overview of small, medium and large scope recon.

What Medium Scope Means

In Harsh Bothra’s 2020 talk on scope-based recon, medium scope means specific wildcards such as *.target.com. The recon includes everything from small scope, plus:

  • Subdomain enumeration and checks for subdomain takeover
  • Misconfigured third-party services
  • Misconfigured cloud storage such as S3 buckets
  • GitHub recon
  • Internet search engines such as Shodan, Censys, FOFA and BinaryEdge

One important note: a wildcard covers subdomains of the listed domain only. example.net or example-cdn.com are different domains. Check the program rules for any exclusions, such as “*.example.com except blog.example.com”.

Finding and Resolving Subdomains

Step 1: Passive subdomain enumeration

Start with passive sources. These query public data (certificate logs, DNS datasets, search engines) without sending traffic to the target.

subfinder -d example.com -all -silent -o subfinder.txt
amass enum -passive -d example.com -o amass.txt
cat subfinder.txt amass.txt | sort -u > passive.txt

Many passive sources work better with free API keys. Add them to each tool’s config file. My subdomain enumeration guide explains the sources and setup in more depth.

You can also pull names directly from certificate transparency logs:

curl -s "https://crt.sh/?q=%25.example.com&output=json" | jq -r '.[].name_value' | sort -u > crtsh.txt

Step 2: Brute force and permutations

Passive sources miss hosts that never appeared in public data. Two techniques help here.

DNS brute force. Try a wordlist of common names against the domain, using a list of trusted public resolvers. puredns handles wildcard DNS filtering for you:

puredns bruteforce words.txt example.com -r resolvers.txt -w brute.txt

Permutations. If you know api.example.com and dev.example.com exist, names like api-dev.example.com or api2.example.com might too. alterx generates these patterns from your known list:

cat passive.txt brute.txt | sort -u > known.txt
alterx -l known.txt -o perms.txt
puredns resolve perms.txt -r resolvers.txt -w perms-resolved.txt

Permutation lists grow fast. Keep them small at first, and keep your resolver rate reasonable.

Step 3: Resolve and find live web hosts

Now combine everything, resolve it, and see which hosts serve a website.

cat passive.txt crtsh.txt brute.txt perms-resolved.txt | sort -u > all-subs.txt
dnsx -l all-subs.txt -silent -a -resp -o resolved.txt
httpx -l all-subs.txt -title -status-code -tech-detect -o live.txt

The live.txt file is your working list. It shows status codes, titles and technologies, which already helps you sort hosts. A login page titled “Jenkins” or “Grafana” on an odd subdomain is more interesting than the main marketing site.

Medium Scope Recon Checks Beyond Subdomains

Finding subdomains is only half the work. These checks often give more value than the list itself.

Subdomain takeover candidates

Look for subdomains with a CNAME that points to a third-party service (hosting, CDN, helpdesk, storage) where the resource no longer exists. The DNS record is still there, but nothing is behind it.

dnsx -l all-subs.txt -cname -resp -o cnames.txt
nuclei -l live.txt -tags takeover -rl 10

If a host looks vulnerable, do not try to claim it unless the program rules clearly allow a harmless proof. Report it with the DNS evidence.

Third-party services and cloud storage

Subdomains often point to support desks, status pages, documentation platforms and storage buckets. Note the service name for each. A misconfigured storage bucket or a third-party page that exposes internal data is a valid finding when the asset is in scope. Report it; do not download or change data.

GitHub recon

Search code platforms for the domain name and internal hostnames. Developers sometimes commit config files that mention subdomains you did not find through DNS. My GitHub recon guide covers search queries. If you find credentials, never use them. Report them.

Internet search engines

Shodan, Censys and FOFA index services by hostname and certificate. A Shodan search such as hostname:example.com or ssl.cert.subject.cn:example.com can show hosts and ports you missed. Only test results that sit inside the wildcard.

Organising Wildcard Recon Data

Medium scope produces a lot of files. I keep a simple structure:

example.com/
  subs/
    passive.txt
    crtsh.txt
    brute.txt
    perms-resolved.txt
    all-subs.txt
  live.txt
  cnames.txt
  hosts/
    api.example.com/
    admin.example.com/
  notes.md

Each interesting live host gets its own folder under hosts/, and inside it I follow the small scope steps: content discovery, JavaScript, archived URLs, parameters and a feature map. That way medium scope becomes a set of small scope targets, ordered by priority.

To choose the order, I sort live.txt roughly like this:

  1. Login panels, admin tools and internal-looking apps
  2. APIs and developer portals
  3. Staging, dev and test hosts (if in scope)
  4. Apps built on a different stack from the main site
  5. Main marketing pages last

Tips and Common Mistakes

  • Do not trust one tool. Each source finds different names. Combine several.
  • Handle wildcard DNS. Some domains answer for every name. Without filtering, your list fills with fake hosts. puredns and dnsx help with this.
  • Use good resolvers. Bad resolvers return wrong answers and waste hours.
  • Check exclusions. A wildcard program may still exclude specific hosts.
  • Do not stop at the list. A list of 2,000 subdomains is not a finding. The value is in what you do with the top 20.
  • Rerun later. New subdomains appear over time. Save your old list and compare.

For the last point, a small trick with the anew tool shows only new names:

cat all-subs-today.txt | anew all-subs.txt

Wildcards Are Many Small Targets

Medium scope recon is a funnel. Collect subdomains from passive sources, brute force and permutations. Resolve them, find live web hosts, check for takeovers, third-party services, storage and leaks. Then treat each important host as its own small scope target. Stay inside the wildcard, respect rate limits, and report instead of exploit.

If you want this full process with more examples and wordlist advice, my Medium Scope Recon ebook goes step by step. The Medium Scope Reconnaissance course is launching soon, and the waitlist is open on the course page.

You May Also Like

Only one URL in scope? Here is how to recon a single web application in depth, from fingerprinting and JS...
A simple system for recon data and notes: folders per program, dated runs, a note template and evidence ready for...
A practical guide to finding hidden directories and files with ffuf, feroxbuster and dirsearch, and checking what you find before...