An attack surface is
|“||[t]he set of ways in which an adversary can enter a system and potentially cause damage.||”|
|“||[a]n information system's characteristics that permit an adversary to probe, attack, or maintain presence in the information system.||”|
The attack surface of a software environment is the code within a computer system that can be run by unauthenticated users. This includes, but is not limited to: user input fields, protocols, interfaces, and services.
One approach to improving information security is to reduce the attack surface of a system or software. By turning off unnecessary functionality, there are fewer security risks. All code has a nonzero probability of containing vulnerabilities. By having less code available to unauthenticated users, there will tend to be fewer failures. Although attack surface reduction helps prevent security failures, it does not mitigate the amount of damage a hacker can inflict once a vulnerability is found.