What is Attack Surface?
In cyber security, the attack surface is every point where an attacker could get into your environment, affect it, or take data out: internet-facing services, identities, cloud and SaaS tenants, endpoints, people who can be phished, and the suppliers you trust. Each part writes its own logs, so a SOC can map it from telemetry it already collects.
Definition
- Attack Surface
- In cyber security, the attack surface is every point where an attacker could get into your environment, affect it, or take data out: internet-facing services, identities, cloud and SaaS tenants, endpoints, people who can be phished, and the suppliers you trust. Each part writes its own logs, so a SOC can map it from telemetry it already collects.
How Attack Surface Works
NIST's glossary, quoting SP 800-53 Rev. 5, 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." Exits count as much as entries. An outbound path that lets data leave is part of the surface, which is why OWASP describes it as the points "where an attacker could get into a system, and where they could get data out."
A SOC needs a working version of that definition. Each part of the surface has a typical way in, and each way in writes to a log you probably collect already.
Types of attack surface and the telemetry that watches each one
| Surface | What is in it | Typical vector (ATT&CK v20) | Telemetry that sees it |
|---|---|---|---|
| External (internet-facing) | Web apps, VPN and remote-access gateways, exposed RDP or SSH, mail portals, public APIs | T1190 Exploit Public-Facing Application, T1133 External Remote Services | WAF and reverse-proxy logs, firewall allows on inbound rules, the internet-facing tag in Defender for Endpoint (DeviceInfo, column IsInternetFacing) |
| Identity | User accounts, service accounts, OAuth apps, any sign-in that skips MFA | T1078 Valid Accounts, reached through password spraying or stolen credentials | Entra ID SigninLogs, Windows logon events 4624 and 4625 on domain controllers and servers |
| Cloud and SaaS | Storage buckets, IAM roles, tenant settings, SaaS apps nobody approved | T1078.004 Cloud Accounts, plus misconfigurations that need no exploit at all | The provider's control-plane log (AWS CloudTrail, Azure Activity log) and CASB activity such as CloudAppEvents |
| Endpoints | Laptops, servers, the software installed on them and every version still unpatched | Client-side exploits delivered in a document or a web page | EDR process and network telemetry; DeviceTvmSoftwareVulnerabilities for what is still unpatched |
| Human | Staff who can be phished, called, or talked into resetting someone's MFA method | T1566 Phishing and social engineering of the help desk | Email gateway logs, the EmailEvents table in Defender XDR, user-reported phish |
| Supply chain and third parties | Software updates, open-source dependencies, MSPs and vendors with standing access | T1195 Supply Chain Compromise, T1199 Trusted Relationship | Software inventory, sign-ins by vendor accounts, network connections made by updater processes |
There is a physical surface too (USB ports, consoles, the server room). CVSS gives it its own attack vector value, Physical, but in most SOCs it shows up as little more than a device-control alert.
The table describes the boundary. Once an attacker holds one account or one host, the internal surface takes over: every share, admin protocol and service that account can reach. OWASP warns that the internal attack surface is likely to be different from the external one and that some users have a lot of access. Zero trust designs shrink that internal part by making each internal request authenticate as if it came from outside.
Attack surface vs attack vector
The surface is the set of places an attacker could try. The vector is the route actually used through one of them. A VPN appliance on the internet belongs to your surface; the authentication-bypass CVE someone exploits on it is the vector. Patch the CVE and that vector closes, but the appliance stays on the surface until the next bug. Decommission the appliance and every vector that ran through it goes with it.
CVSS puts the vector on a scale. In CVSS v4.0 the Attack Vector metric has four values, and severity is higher "the more remote (logically, and physically) an attacker can be":
| CVSS v4.0 Attack Vector | What the attacker needs | Part of the surface it maps to |
|---|---|---|
| Network (N) | A path across routers, "up to and including the entire Internet" | External, if the service is reachable from outside |
| Adjacent (A) | The same subnet, Bluetooth, NFC, Wi-Fi or a limited admin network | Internal, or physical proximity |
| Local (L) | Local or SSH access, or a user tricked into opening a file | Endpoints and people |
| Physical (P) | Hands on the device | Physical |
A Network-vector CVE on a server with no inbound path from the internet is still a problem. It is a different emergency from the same CVE on a host the internet can reach, and the next query tells the two apart.
Map the external surface from your own logs
Defender for Endpoint flags an onboarded device as internet-facing in two ways: a Microsoft external scan connected to it over TCP (or found it reachable over UDP), or the device's own network telemetry recorded incoming connections from the internet. A host or enterprise firewall rule that allows inbound internet traffic can also get a device flagged. The flag lands in the DeviceInfo table as the boolean IsInternetFacing, with the scan details in AdditionalFields. Join it with DeviceTvmSoftwareVulnerabilities and you get the exposed machines with what is unpatched on each.
// Internet-facing devices and their known CVEs, worst first (Defender XDR advanced hunting)
let exposed = DeviceInfo
| where Timestamp > ago(7d)
| where IsInternetFacing
| summarize arg_max(Timestamp, *) by DeviceId
| extend Reason = extractjson("$.InternetFacingReason", AdditionalFields, typeof(string)),
ScannedIp = extractjson("$.InternetFacingPublicScannedIp", AdditionalFields, typeof(string)),
ScannedPort = extractjson("$.InternetFacingPublicScannedPort", AdditionalFields, typeof(int))
| project DeviceId, Reason, ScannedIp, ScannedPort, ExposureLevel, AssetValue;
DeviceTvmSoftwareVulnerabilities
| lookup kind=inner exposed on DeviceId
| lookup kind=leftouter (DeviceTvmSoftwareVulnerabilitiesKB
| project CveId, CvssScore, IsExploitAvailable) on CveId
| summarize CVEs = dcount(CveId),
Cvss9Plus = dcountif(CveId, todouble(CvssScore) >= 9.0),
WithPublicExploit = dcountif(CveId, IsExploitAvailable == true),
ExploitableCves = make_set_if(CveId, IsExploitAvailable == true, 10),
Software = make_set(SoftwareName, 10)
by DeviceName, OSPlatform, Reason, ScannedIp, ScannedPort, ExposureLevel, AssetValue
| order by WithPublicExploit desc, Cvss9Plus desc, CVEs descThe JSON keys come from Microsoft's own "find all devices that are internet-facing" query, and the columns from the schema pages of the three tables. SOCSimulator has not run this query against a live tenant. Before you trust the output:
- Run it in Defender XDR advanced hunting, not in Sentinel. Microsoft says the vulnerability management tables are not ingested into Sentinel, which accepts queries that reference them and returns no results.
- An empty result does not mean an empty surface. Only Windows devices onboarded to Defender for Endpoint can currently be identified as internet-facing. Linux web servers, network appliances and SaaS tenants will never show up here.
- The tag expires. If a device has no new events for 48 hours the internet-facing tag is removed, so a server that was exposed last week can be missing today.
Reasonsays which path flagged the device: an external scan reached it, or it received incoming communication from the internet.AssetValueis yours to set (Low, Normal by default, or High), andExposureLevelcomes from the device's exposure score.
For any device on the list, the InboundExternalNetworkEvents("<DeviceId>") function returns its last seven days of incoming connections from public IP addresses.
How exposure changes the priority of the same alert
Simulated example generated by SOCSimulator Research. Host names, counts and ports are invented; the column names are Microsoft's.
Two alerts arrive ten minutes apart with the same title: the IIS worker process w3wp.exe started cmd.exe. Both servers run the same line-of-business web app.
| SRV-WEB01 | SRV-APP07 | |
|---|---|---|
IsInternetFacing | true, external scan on TCP 443 | false |
ExposureLevel / AssetValue | High / High | Medium / Normal |
| CVEs with a public exploit (query above) | 3 | 3 |
| Inbound connections from public IPs, last 7 days | 41,000 | 0 |
| First question | Which internet source sent the request? | Which internal host sent the request? |
| Priority | P1: isolate and preserve, then patch | P2 for patching, same depth of investigation |
On WEB01 the likely story is exploitation from the internet, so containment comes first and the WAF logs around the alert time give you the source. APP07 cannot have taken that request straight from the internet. If another internal host sent it, you are not looking at initial access any more; you are looking at someone already inside, moving between servers. Low exposure moved the alert down the patch queue and left the investigation as deep as before.
The same table catches the opposite mistake. A server the CMDB lists as internal that shows up with IsInternetFacing true, because a firewall rule allows inbound internet traffic, is a finding in its own right. Open a ticket for the rule even if the alert that sent you there turns out to be a false positive.
Attack surface analysis
OWASP's Attack Surface Analysis Cheat Sheet gives a method you can run on one application in an afternoon. List every path for data and commands into and out of the application and the code that protects those paths, plus the valuable data it handles (secrets, keys, personal data) and the controls around that data. Overlay the types of users who can reach each point, and look hardest at the two extremes: unauthenticated anonymous users and highly privileged admins. Then group the attack points by risk (external-facing or internal-facing), count how many of each type exist, and review a sample of each type.
Counting is what makes the analysis repeatable. When the count for a type changes (a first SSH listener open to the internet, a new unauthenticated API route), the risk profile changed and somebody should look. OWASP also points to two formal measures: Michael Howard's Relative Attack Surface Quotient at Microsoft, and a Carnegie Mellon metric that sums entry and exit points, channels (TCP and UDP ports, RPC endpoints, named pipes) and untrusted data elements, weighted by damage potential against attacker effort.
Attack surface management (ASM)
ASM is the continuous version of that inventory. It has to be continuous because the inventory drifts every time someone deploys something. External ASM works outside-in. Microsoft Defender EASM starts from "discovery seeds" (assets you confirm are yours) and recursively follows observed connections to infrastructure you own but may not have listed. It discovers domains, IP address blocks, hosts, email contacts, autonomous system numbers and Whois organizations, and marks each asset as recent or historic. The Defender for Endpoint tag from the query is the inside-out half, and it only sees machines that run the sensor. Microsoft Security Exposure Management puts endpoints, cloud resources and external attack surfaces into one view.
ASM and vulnerability management answer different questions. Vulnerability management finds and fixes flaws on the assets you know about. ASM finds the assets you did not know about, which matters because a host nobody listed never gets scanned for CVEs.
The SOC uses ASM output in two moments. When a new CVE is published, "do we expose this product?" gets answered from the inventory in minutes instead of a scan cycle. When discovery turns up an unknown host, the first job is finding its owner; the vulnerability ticket comes after.
Reducing the attack surface
- Remove what nobody uses. Retired test servers, stale DNS records and legacy protocols each take every vector that ran through them when they go.
- Keep admin interfaces off the internet. Put RDP, SSH and management consoles behind a VPN or ZTNA.
- Close the identity gaps. Require MFA on every internet-facing sign-in, and remove OAuth apps and service accounts that have no owner.
- Time-box vendor access. Give vendor accounts access for the length of the job and log every session, instead of leaving a standing account that nobody reviews.
- Review inbound firewall rules against the internet-facing list. A rule that exists only to "make it work" is surface.
Microsoft's attack surface reduction (ASR) rules are a narrower thing with a similar name: Defender for Endpoint rules that block behaviors malware commonly uses on Windows devices, such as Office apps creating child processes. They shrink the endpoint surface and do nothing about an exposed VPN gateway.
Attack Surface in SOC Operations
Check the asset before you rate an exploit or web-process alert. Three facts decide most of the severity: whether the host is reachable from the internet (the internet-facing tag or your external inventory), whether the CVE involved has a public exploit, and what the asset is worth to the business. Internet-facing, public exploit and high value together make a P1 even when the detection itself is low fidelity. An internal-only host that fires the same detection drops in the patch queue but not in the investigation queue, because the request had to come from somewhere inside. When a new CVE is announced, the most useful early answer a SOC can give is the list of exposed hosts that run the affected product, and the query on this page produces it for Windows devices. Write down every surprise you find along the way, such as a host nobody owns or an inbound rule nobody remembers adding. Those findings often outlast the alert that led you to them.
Practice Attack Surface in a Real SOC
SOCSimulator provides hands-on training with realistic SIEM, XDR, and Firewall interfaces. Build real analyst skills investigating attack surface scenarios with zero consequences, free.
Frequently Asked Questions
- What is the difference between attack surface and attack vector?
- The attack surface is every place an attacker could try to get in; the attack vector is the route used through one of those places. An internet-facing VPN gateway is part of your surface, and the CVE exploited on it is the vector. Patching closes that vector, but only removing the gateway shrinks the surface. CVSS rates the vector as Network, Adjacent, Local or Physical.
- What is attack surface management?
- Attack surface management (ASM) is the continuous discovery and monitoring of everything an organization exposes, with the focus on assets the inventory missed. External ASM tools such as Microsoft Defender EASM start from known domains and IP blocks and follow connections outward to hosts, domains and ASNs you own but did not list. Endpoint sensors add the inside-out view of which devices are internet-facing.
- What are examples of an attack surface?
- A public web application, a VPN or RDP gateway open to the internet, an API behind a mobile app, a storage bucket with public access, a user account without MFA, an OAuth app with mailbox permissions, an employee who can be phished, and a vendor with remote access to your servers. Each is a point where an attacker can enter, cause an effect or take data out.
- What is attack surface analysis?
- Mapping where a system can be attacked so you know what to review and test. OWASP's method lists every path for data and commands into and out of an application, the valuable data, and the code that protects both. It then focuses on anonymous users and highly privileged admins and counts entry points by type, so you notice when the risk profile changes.
- Is attack surface reduction the same as Microsoft's ASR rules?
- No. Reducing the attack surface means removing exposure: retiring services, closing inbound firewall rules, enforcing MFA. ASR rules are a Microsoft Defender for Endpoint feature that blocks behaviors malware commonly uses on Windows devices, such as Office apps creating child processes. They shrink the endpoint surface and do nothing about an exposed VPN gateway.
Sources
- NIST CSRC Glossary: attack surface
- OWASP Cheat Sheet Series: Attack Surface Analysis Cheat Sheet
- FIRST: CVSS v4.0 Specification Document (Attack Vector)
- Microsoft Learn: DeviceInfo table in the advanced hunting schema
- Microsoft Learn: Investigate internet-facing devices (Defender for Endpoint)
- Microsoft Learn: DeviceTvmSoftwareVulnerabilities table
- Microsoft Learn: DeviceTvmSoftwareVulnerabilitiesKB table
- Microsoft Learn: Defender External Attack Surface Management overview
- Microsoft Learn: What is Microsoft Security Exposure Management?
- Microsoft Learn: Attack surface reduction rules overview
- Microsoft Learn: EmailEvents table in the advanced hunting schema
- MITRE ATT&CK v20: T1190 Exploit Public-Facing Application
- MITRE ATT&CK v20: T1133 External Remote Services
- MITRE ATT&CK v20: T1078 Valid Accounts and T1078.004 Cloud Accounts
- MITRE ATT&CK v20: T1566 Phishing
- MITRE ATT&CK v20: T1195 Supply Chain Compromise
- MITRE ATT&CK v20: T1199 Trusted Relationship
Related Terms
Vulnerability management is the continuous process of discovering, assessing, prioritizing, remediat...
Patch management is the systematic process of acquiring, testing, approving, and deploying software ...
Zero Trust is a security architecture philosophy based on "never trust, always verify," requiring co...
In cyber security, social engineering means manipulating a person into handing an attacker access, i...
A supply chain attack compromises a trusted third-party vendor, software build process, open-source ...
A cloud access security broker (CASB) is a control point between users and the cloud services they u...
Defense in depth in cyber security stacks independent controls so that one failed or bypassed contro...
Threat hunting is the proactive search through security telemetry for attackers that existing contro...
More Concepts Terms
Related SOC Training Resources
Event ID 4624: Successful Logon, Codes & Queries
Event ID 4624 logs every successful Windows logon. SOCSimulator breaks down the logon type codes, TP/FP triage, and SPL/…
Read more Event IDEvent ID 4648: Explicit Credentials & How to Detect It
Event ID 4648 logs explicit-credential logons like runas and scheduled tasks. SOCSimulator breaks down the fields and de…
Read more TechniqueValid Accounts (T1078): Detection Training
Valid Accounts is among the hardest abuses to spot because nothing is technically broken, the adversary simply authentic…
Read more Career PathSOC Analyst (Tier 1) Career Guide: Salary & Skills
Tier 1 SOC Analysts are the front line. You monitor alert queues, triage incoming detections, classify them as true or f…
Read more Career PathDetection Engineer Career Guide: Salary & Skills
Detection Engineers build the rules, analytics, and automated workflows that determine what the SOC can see. You transla…
Read more Career PathSecurity Engineer Career Guide: Salary & Skills
Security Engineers build and maintain the infrastructure that SOC analysts depend on. You deploy SIEMs, configure firewa…
Read more ComparisonSOCSimulator vs LetsDefend: Comparison
SOCSimulator wins on operational realism. You get multi-tool shift simulation with SLA pressure, noise injection, and al…
Read more ComparisonSOCSimulator vs CyberDefenders: Comparison
SOCSimulator trains the operational workflow: alert triage, correlation, and response under pressure. CyberDefenders tra…
Read more ToolSIEM Training Console: SOCSimulator
The SIEM console in SOCSimulator replicates the workflow of enterprise platforms like Splunk Enterprise Security, Micros…
Read more ToolXDR Training Console: SOCSimulator
The XDR console in SOCSimulator replicates the investigation workflow of platforms like CrowdStrike Falcon, Microsoft De…
Read more ToolFirewall Training Console: SOCSimulator
The Firewall console in SOCSimulator replicates the log analysis experience of enterprise platforms like Palo Alto Netwo…
Read more TechniqueMITRE ATT&CK® Techniques: Detection Training Library
Browse all MITRE ATT&CK® techniques with detection strategies and example alerts.
Read more