The software attack surface is the complete profile of all functions in any code running in a given system that are available to an unauthenticated user.
The more surface there is, the better the chance an attacker or a piece of malware can use various exploits to gain access and run code on the target machine. The software attack surface is particularly at risk in the case of Web applications, which expose the coding to the Internet.
Flawed functions may lead to the compromise of an entire network or other system by allowing an unverified user -- who may be a hacker or a corporate spy -- to steal data or gain further access, perhaps elevating privileges to administrator level. Individual functions with security flaws can be considered attack vectors; those that may be exploited to gain further access can be seen as vulnerabilities.
Another consideration in software attack surface is insider threats. Users that authenticate with valid credentials may be able to access unprotected data beyond their authorization levels if access controls are loosely implemented.
Because any running code may have exploitable vulnerabilities, one of the simplest ways to limit the software attack surface is to reduce the amount of code being run at any given time. If a program is not being used or if other installed software can perform the same task, it should be eliminated. Antivirus, hardware and software firewalls can help block access to existing vulnerabilities; operating system and application updates sometimes patch these weaknesses. However, it is better for overall security to minimize the number of vulnerabilities to begin with. To that end, developers are increasingly considering attack vectors in their software design.
Because many attack approaches exploit a combination of attack surface types to gain access to desired resources, a comprehensive attack surface analysis is crucial to proper set up of breach detection systems (BDS), firewall, intrusion prevention systems, data policy and other security measures. Tools available to help guide that analysis include WebInspect, Microsoft attack surface analyzer and CORE Impact.
See also: network attack surface, physical attack surface, social engineering attack surface