Attack surface describes the points of entry that an attacker can exploit to compromise an application or system. The larger the attack surface, the more insecure the system.

When you design your application, consider what the attack surface will look like. Identify items such as:

  • The networking protocols enabled by default
  • The endpoints that should support authentication and authorization. Eliminate anonymous endpoints where possible.
  • The off-by-default features. Look for code that autostarts or executes when accessed, such as services, daemons, ISAPI filters and applications, SOAP services, and Web roots.
  • The reusable components
  • The process identities for all the code you run
  • The user accounts installed

To reduce the attack surface:

  • Reduce the amount of code executing by default
  • Reduce the volume of code that is accessible to untrusted users by default
  • Limit the damage if the code is exploited