Attack Surface
The sum of all the points where an attacker can try to get into a system, feed it data or pull data out of it.
Also known as: Attack Surface Reduction, Attack Surface Analysis, Attack Surface Management, Attack Vectors
Category: Software Development
Tags: security, cybersecurity, risk-management, software-architecture, threat-modeling, vulnerabilities
Explanation
The attack surface of a system is everything about it that an attacker can reach and interact with. Each reachable piece is a place where an attack can start. The bigger the surface, the more places to defend, and the higher the odds that one of them has a flaw.
**What it includes**:
- **Network**: Open ports, exposed services, public APIs, admin interfaces, cloud storage buckets
- **Software**: Every endpoint, parameter, file parser and input field. Also every dependency and every enabled feature
- **People**: Employees who can be phished, called or bribed. Accounts with too many rights
- **Physical**: Devices, USB ports, offices, lost laptops
- **Supply chain**: Vendors, build pipelines, third-party libraries, update mechanisms
- **AI systems**: Every piece of text a model reads is a possible prompt injection. Every tool it can call is a possible way out
**Reducing it**:
- **Remove what you don't need**: Features, endpoints, services, accounts, dependencies. Code that doesn't exist can't be exploited
- **Close what doesn't have to be open**: Nothing is exposed by default (see Secure by Default)
- **Limit who can reach what**: Network segmentation, authentication before anything else, least privilege
- **Accept less**: Narrow input formats, strict validation, smaller and simpler parsers
- **Keep track**: You can't defend what you don't know you have. Forgotten test servers and old API versions are classic entry points
**Surface vs. vectors**:
An attack vector is one specific path an attacker uses. The attack surface is the set of all the possible paths.
**Link with the robustness principle**:
Being liberal in what you accept grows the attack surface. Every tolerated variation, every legacy format that is still parsed and every lenient fallback is more code that handles untrusted input.
**Why it's a useful idea**:
It gives a simple question to ask about any design decision: does this add to the surface, or reduce it? You can't prove that a system is secure. You can always check whether its surface grew.
Related Concepts
← Back to all concepts