Skip to content

Continuous monitoring

4 min readRecon Atlas

When a public program launches, hundreds of hunters run the same pipeline within hours. Your first-day results look like theirs. After that, the program’s attack surface keeps changing: teams deploy new apps, spin up staging copies, move things to new cloud accounts. Every new host starts with zero testers.

New hosts also tend to be less finished. Debug settings, missing auth middleware and default credentials show up most in the first days after a deploy. A daily diff tells you about them before the crowd notices.

  1. Cron runs a script every day.
  2. The script runs passive enumeration and resolution, as in phases 2 and 4.
  3. anew appends names to a master list and prints only the ones it has not seen before.
  4. httpx probes the new names.
  5. notify sends the new hosts, with status and title, to Discord or Telegram.
Approach Delay Sources Cost and risk
Daily cron About a day subfinder, crt.sh, Chaos One VPS. Light. Once a day stays inside a free API quota
Certificate stream Seconds to minutes Certstream, certificate transparency logs A process that stays running. Many new certificates are names with no DNS yet
HTTP diff Every 6 to 12 hours httpx on hosts you already have, watching title, body hash, and headers Steady requests. Easy to trip a WAF limit

Run the daily job. Use a certificate stream when a program has just opened and minutes matter. Alert on names that answer HTTP. A bare DNS name is not a target yet.

Polling SecurityTrails or Chaos every couple of hours burns a free monthly quota in a few days. Once a day is enough for those sources.

notify reads its channels from ~/.config/notify/provider-config.yaml. You can define several and pick one by id.

~/.config/notify/provider-config.yaml
discord:
- id: "recon"
discord_channel: "recon-alerts"
discord_username: "recon-atlas"
discord_format: "{{data}}"
discord_webhook_url: "https://discord.com/api/webhooks/XXXX/YYYY"
telegram:
- id: "recon-tg"
telegram_api_key: "123456:ABCDEF"
telegram_chat_id: "123456789"
telegram_format: "{{data}}"
Terminal window
# Send a test message to the Discord channel
echo "notify works" | notify -id recon

Create the Discord webhook under the channel’s settings, Integrations, Webhooks. For Telegram, create a bot with BotFather and get your chat ID from the bot API.

Save as ~/tools/monitor.sh and make it executable.

monitor.sh
#!/usr/bin/env bash
# monitor.sh: daily diff of subdomains for every target under ~/recon
# that has scope/roots.txt and a file named .monitor in its folder.
set -uo pipefail
export PATH="$PATH:/usr/local/go/bin:$HOME/go/bin:$HOME/.pdtm/go/bin"
RESOLVERS="$HOME/wordlists/resolvers-trusted.txt"
NOTIFY_ID="recon"
TODAY=$(date +%F)
for dir in "$HOME"/recon/*/; do
# only monitor targets you opted in with: touch ~/recon/<target>/.monitor
[[ -f "$dir/.monitor" && -s "$dir/scope/roots.txt" ]] || continue
target=$(basename "$dir")
mkdir -p "$dir/monitor"
cd "$dir" || continue
# 1. passive enumeration for every in-scope root
subfinder -dL scope/roots.txt -all -silent > "monitor/subs-$TODAY.txt" 2>/dev/null
# 2. keep names that resolve, drop out-of-scope ones
dnsx -l "monitor/subs-$TODAY.txt" -r "$RESOLVERS" -silent 2>/dev/null \
| grep -vxFf <(cat scope/out-of-scope.txt 2>/dev/null) \
> "monitor/resolved-$TODAY.txt"
# 3. anew prints only names never seen before, and records them
anew subs/all.txt < "monitor/resolved-$TODAY.txt" > "monitor/new-$TODAY.txt"
[[ -s "monitor/new-$TODAY.txt" ]] || continue
# 4. probe new names so the alert carries status and title
httpx -l "monitor/new-$TODAY.txt" -sc -title -td -rl 10 -silent \
> "monitor/new-http-$TODAY.txt" 2>/dev/null
# 5. alert: a header line, then one line per new host
{
echo "New assets for $target ($(wc -l < "monitor/new-$TODAY.txt"))"
if [[ -s "monitor/new-http-$TODAY.txt" ]]; then
cat "monitor/new-http-$TODAY.txt"
else
cat "monitor/new-$TODAY.txt"
fi
} | notify -id "$NOTIFY_ID" -bulk -silent
done
  1. Seed the master list once, so the first run does not alert on every existing host: run phase 2 and 4 by hand and write the results to subs/all.txt.

  2. Opt a target in with touch ~/recon/example.com/.monitor.

  3. Run ~/tools/monitor.sh once by hand and check that nothing alerts, because nothing is new yet.

  4. Add the cron entry below.

Terminal window
# Open your crontab for editing
crontab -e
# Run the monitor every day at 06:17 server time, log output
17 6 * * * /home/youruser/tools/monitor.sh >> /home/youruser/recon/monitor.log 2>&1

Cron runs with a minimal PATH, which is why the script sets its own. Use your real home path in the crontab line. An odd minute such as :17 avoids the crowd of jobs that start at :00.

New assets for example.com (1)
https://dev-partner-api.example.com [200] [Partner Authentication Staging] [Node.js,Express]

This record asserts the name was new, it resolved, and an HTTP GET returned 200 with that title and those technologies.

This record does not assert the host pays a bounty. It may belong to an excluded subsidiary, or to a partner on a name under the same suffix.

A raw DNS line, monitor/new-YYYY-MM-DD.txt

Section titled “A raw DNS line, monitor/new-YYYY-MM-DD.txt”
alb-internal-4029.example.com

This record asserts a passive source observed a DNS name under example.com that subs/all.txt did not have.

This record does not assert the name is reachable on the internet. It may resolve to an RFC 1918 address. When httpx writes nothing, the script sends these bare names. Treat that message as unresolved names.

  • Open the new host within the day if you can. Being first is the point.
  • Check it is in scope. New names under a wildcard can still be a vendor’s CNAME.
  • Run the deep phases on just that host: URLs, JavaScript, parameters, content discovery.
  • Note the date in notes.md. Some programs consider when an asset appeared when judging duplicates.

Next, turn a new host into a test queue in vulnerability hunting.

Connections9 backlinks · 6 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.