Attack surface management for a small team: find what answers from the internet

Attack surface management is keeping a current list of everything you own that answers from the internet (domains, subdomains, IP addresses, open ports, the services behind them) and closing what should not be there. For a small team it comes down to three checks you can run yourself: search the public certificate logs for your domain, read your DNS records, and scan the ports of your own server.

The team behind Keybrum's attacksUpdated 10 min read

In short

  • NIST defines the attack surface as the set of points where an attacker can try to enter a system, cause an effect on it or extract data from it. Managing it starts with a list.
  • Every TLS certificate is written to public logs that anyone can query. A search for your domain shows the subdomains you have issued certificates for, including the staging site you forgot.
  • A DNS record that still points at a service you deleted can be claimed by someone else. Remove DNS records first when you shut a service down.
  • On a server you run, a database port open to the internet is the costliest mistake. Docker's documentation warns that published container ports bypass ufw firewall rules.
  • The surface changes each time you deploy, add a subdomain or try a new tool. A list made once goes stale, so repeat the checks on a schedule.
On this page

What is attack surface management?

Your attack surface is everything a stranger can reach. NIST's glossary defines it as "the set of points on the boundary of a system, a system component, or an environment where an attacker can try to enter, cause an effect on, or extract data from, that system, component, or environment". Attack surface management, often shortened to ASM, is the habit of keeping that set known and small: you find what is exposed, decide what should be, close the rest, and look again.

The phrase usually means the external attack surface: what answers from the internet without any access to your network. Large companies buy platforms for it because they have thousands of addresses, several cloud accounts and firms they acquired. A small team has the same problem at a size that fits on one page, and can do the work by hand.

OWASP's attack surface analysis cheat sheet gives the priorities: focus on remote entry points, especially where the system allows anonymous, public access, and reduce the size of the surface when you can. It also notes that the surface usually grows over time, so the review has to be repeated.

What your attack surface is made of

LayerWhat it isWhat is often forgotten
Domains and subdomainsEvery name in your DNS zone that resolves to somethingstaging, dev, old, admin, the demo you made for one customer
DNS records pointing outwardCNAME records that send a name to a hosting providerA record that still points at a project you deleted
Servers and IP addressesA VPS or a cloud machine you runThe server's direct address, reachable around the CDN you put in front
Open portsServices listening on that serverPostgres, Redis or MongoDB published by a Docker compose file; an admin console; a dev server
Tools next to the appn8n, a vector database, a model server, a notebook, a dashboardInstalled for a test on a subdomain, never given a password
The app itselfPages, API routes, the Supabase or Firebase backend behind themTables, functions and storage buckets, which are endpoints too
MailThe SPF and DMARC records of your domainA DMARC policy of p=none, which reports forged mail and delivers it anyway

If your app runs entirely on a platform such as Lovable, Vercel or Netlify with Supabase behind it, the server rows are the platform's job. Your surface is the first two rows, the app and its backend. The Supabase security guide and the Firebase security guide cover that backend. If you rent a server, every row is yours.

Check 1: search the certificate logs for your domain

Certificate Transparency is the system that makes this check possible. Each time a certificate authority issues a TLS certificate, it is recorded in public logs. The project's documentation describes the logs as append-only: certificates can only be added, never deleted or modified, and anyone can query them. Chrome and Safari require certificates to be logged.

So every subdomain you ever put behind HTTPS left a public trace. Attackers read these logs to find forgotten sites. Read them first. crt.sh is a free search over the logs:

bash
# Every name that has had a certificate on your own domain
curl -s "https://crt.sh/?q=%25.yourdomain.com&output=json" \
  | grep -o '"name_value":"[^"]*"' | sort -u
Replace yourdomain.com with your own domain. You can also type %.yourdomain.com in the search box at crt.sh. The search only reads public logs: it touches no server.

Go through the list. For each name, answer three questions: does it still resolve, do I know what runs there, and does it need to be public? A wildcard certificate hides individual names, so also write down the subdomains you remember creating.

Check 2: read your DNS records and look for dangling ones

Open the DNS page of your registrar or of Cloudflare and export the zone. Each record is a door. The dangerous ones are CNAME records that point at a hosting provider where your project no longer exists.

MDN's page on subdomain takeovers explains the risk: if you remove a site from a hosting provider and leave the DNS entry in place, an attacker can create their own site with that provider, claim your subdomain and host their content under it. From there, MDN notes, they can potentially read cookies set from the main domain.

bash
# Where does each of your subdomains point?
dig +short CNAME blog.yourdomain.com
dig +short CNAME staging.yourdomain.com

# Your mail policy
dig +short TXT yourdomain.com | grep spf
dig +short TXT _dmarc.yourdomain.com
A CNAME that points at a provider where you no longer have a project should be deleted today.

Check 3: scan the ports of your own server

Skip this check if you have no server of your own. If you rent a VPS or a cloud machine, scan it from outside your network, for example from your laptop on a phone connection. Nmap is the standard tool. Its own documentation advises getting written authorization before scanning anything that is not yours, so keep to the addresses you own.

bash
# Your own server only. Databases, Docker API, common app ports.
nmap -Pn -p 5432,3306,27017,6379,9200,2375,3000,8080 YOUR.SERVER.IP
For a web app, ports 80 and 443 should be open. A database port or 2375 (the Docker API) reported as open needs to be closed now.

The classic trap is Docker. A line such as ports: "5432:5432" in a compose file publishes Postgres on every network interface. Docker's documentation on packet filtering and firewalls warns that traffic to a container is diverted before it goes through the ufw firewall settings, so a published port stays reachable even when ufw says the port is denied. The fix is in the compose file: do not publish database ports at all when only other containers need them, or bind them to 127.0.0.1.

  • Only 80, 443 and your SSH port answer from outside.
  • No database port (5432, 3306, 27017, 6379, 9200) is reachable from the internet.
  • The Docker API (2375) is not exposed. Anyone who reaches it can run containers on the machine.
  • Admin consoles and dev servers are behind a login or a private network.
  • If a CDN sits in front, the server's direct IP address refuses requests that do not come from the CDN.

Keep the list current

A surface mapped once is a snapshot. OWASP's cheat sheet suggests asking two questions after each change: what has changed, and what holes could you have opened? For a small team, a routine is enough:

  1. 1

    Write the inventory down

    One table: name, what runs there, who owns it, which provider hosts it, whether it should be public. Ten lines for most startups.

  2. 2

    Repeat the certificate search every month

    A new name on the list that nobody recognises is either a teammate's experiment or a problem. Both are worth knowing.

  3. 3

    Scan your server after every infrastructure change

    A new compose file, a new tool, a new machine: run the port scan again.

  4. 4

    Shut things down in the right order

    DNS record first, then the service. Remove the line from the inventory.

  5. 5

    Test what stays public

    An address on the list is only known. Whether it leaks data is a second question, answered by attacking it. The external penetration testing guide covers that step.

When a platform is worth it

Enterprise attack surface management platforms discover assets from much more than a domain name: IP ranges registered to the company, cloud accounts, brands, subsidiaries, leaked credentials. If you have hundreds of hosts, several cloud accounts or a compliance team asking for an asset inventory, that is the right purchase and nothing on this page replaces it.

If you have one domain, a handful of subdomains and one or two servers, the three checks above cover the same ground. What you then need is the next step that inventory tools rarely take: proof of what each public address gives away. A vulnerability scan lists what might be wrong. An attack shows what a stranger gets.

What Keybrum does on this subject, and what it does not

Keybrum is an attack tool for live apps, with a part that covers the surface around the app. It is not an enterprise ASM platform. Here is exactly what it does.

  • Other addresses on your domain, weekly. For apps on a plan that live on their own domain, Keybrum reads the public certificate logs and DNS once a week and lists the other names that answer: the staging site, the old admin, the tool on a subdomain. It announces new ones. It requests the home page of those addresses only when you proved ownership of the whole domain with a DNS record. Nothing on them is attacked until you add the address as an app.
  • Dangling records. During an attack run it looks up the CNAME of your domain's common subdomains and of the names found in the certificate logs. When a record points at a hosting provider that answers "no such site", it reports the record with the lookup and the answer as proof. It claims nothing.
  • The server behind the app. It finds your server through DNS, or you give its address. It first confirms that the address serves your app, and it never probes a shared hosting platform. Then it knocks once on the ports that should not face the internet: Postgres, MySQL, MongoDB, Redis, Elasticsearch, CouchDB and Memcached, the Docker and etcd APIs, admin consoles, dev servers, and tools such as n8n, Ollama or Jupyter left open. It reads the greeting and sends no guessed password.
  • Around the CDN and in the mail records. It reports a server that answers directly when a CDN is supposed to stand in front, and a domain whose SPF and DMARC records let anyone send mail in its name.

What it does not do: scan all 65,535 ports, discover IP ranges or cloud accounts, watch other domains you own that it was not given, or monitor leaked employee passwords. It works from your app's address and your domain. And it only attacks apps whose owner proved ownership, so it cannot be pointed at someone else's server.

The surface checks come with the attack on the app itself: tables, storage, keys in the bundle, an exposed .env file, one account reading another's records. A one-time report costs €49. Plans start at €29 a month excluding VAT for 5 apps and include the weekly listing of addresses and an attack on every deploy.

Questions

What is external attack surface management (EASM)?

It is attack surface management limited to what is reachable from the internet with no inside access: domains, subdomains, IP addresses, open ports and the services on them. It is the view an outside attacker has, which is why most small teams should start there.

What is the difference between attack surface management and vulnerability scanning?

Attack surface management answers "what do we have out there?". Vulnerability scanning answers "what is wrong with the things we know about?". A scanner only tests the addresses it is given, so an asset missing from the inventory is never scanned.

How do I find all subdomains of my domain?

Combine three sources: your DNS zone export, a search of the certificate transparency logs for your domain at crt.sh, and the list of projects in your hosting accounts. The certificate logs often show names that are no longer in anyone's memory.

Is it legal to scan ports?

Scan only machines you own or administer. Nmap's documentation advises securing written authorization before scanning a network that is not yours. Some cloud providers also have rules for scans, so read your host's policy.

Does a small startup need an attack surface management tool?

Usually a monthly routine is enough at first: the certificate search, the DNS review and a port scan of your own server. A tool earns its price when the list is too long to check by hand or when new addresses appear without anyone telling you.

Does Keybrum replace an ASM platform?

No. Keybrum lists the other addresses on your domain from certificate logs and DNS, checks dangling records and the ports of the server behind your app, and attacks the apps you add. It does not discover IP ranges, cloud accounts or domains it was not given.

Sources

  1. 1.Glossary: attack surface (NIST SP 800-53 Rev. 5), NIST
  2. 2.Attack Surface Analysis Cheat Sheet, OWASP
  3. 3.How CT works, Certificate Transparency
  4. 4.Subdomain takeovers, MDN Web Docs
  5. 5.Packet filtering and firewalls, Docker Docs
  6. 6.Legal issues, Nmap

Your app is public. So are its mistakes.

Check what any attacker can already see in it, free, in ten seconds. The full attack, with proof and fixes: €49 once, or €29 a month on a plan.

or continue with Google or GitHub