attack surface

Everything an attacker could try to use against a system: open ports, installed programs, accounts and settings.

In more detail

Every extra package, service, open port or account is something that might have a flaw or be misused. Removing what is not needed and tightly controlling the rest shrinks the attack surface, for example by using minimal base images or publishing only the ports you need.

Examples

Multi-stage builds leave compilers, shells and package managers out of the production image.
Counting every route with whether it needs authentication and whether it changes state

Related terms

Taught in

References