Secure development

Maintaining an application attack surface inventory

Secure implementation: code, settings, gate arranged to illustrate maintaining an application attack surface inventory.

Maintaining an application attack surface inventory connects a security requirement to the behaviour of a real feature. The relevant controls need to remain effective across custom code, integrations and the production configuration. Understanding application attack surface inventory helps establish which security property the feature needs and where that property is actually enforced.

What does this involve?

Security architecture describes assets, identities, trust boundaries and the controls expected between components. Documentation is useful when it reflects real deployment and helps reviewers test important assumptions, rather than simply listing products or broad intentions.

This article describes a simple and pragmatic way of doing Attack Surface Analysis and managing an application's Attack Surface. It is targeted to be used by developers to understand and manage application security risks as they design and change an application, as well as by application security specialists doing a security risk assessment. The focus here is on protecting an application from external attack - it does not take into account attacks on the users or operators of the system (e.g. malware injection, social engineering attacks), and there is less focus on insider threats, although the principles remain the same. The internal attack surface is likely to be different from the external attack surface and some users may have a lot of access.

While Attack Surface Analysis is usually done by security architects and pen testers, developers should understand and monitor the Attack Surface as they design and build and change a system.

Why it matters

Consider a realistic failure: a newly deployed service is missing from the team's asset inventory and its routine security checks.

An undocumented trust assumption can leave a feature depending on a check that no component actually performs. Gaps may span applications, services and operational processes, making ownership and verification especially important.

Implementation guidance should be applied to a real feature and its deployment. Framework defaults, custom handlers and integrated services all influence whether the intended protection remains effective.

How penetration testers check for it

Trace the relevant feature from its entry point to the data or operation it protects, including custom code and alternate paths.

  • Map sensitive data and consequential operations.
  • Identify the component responsible for each security decision.
  • Compare documented trust relationships with deployment and code.
  • Record assumptions, exceptions and evidence of enforcement.

How to fix it

Use the appropriate maintained mechanisms and verify the result in the actual production configuration.

  • identify what functions and what parts of the system you need to review/test for security vulnerabilities.
  • identify high risk areas of code that require defense-in-depth protection - what parts of the system that you need to defend.
  • identify when you have changed the attack surface and need to do some kind of threat assessment.
  • Backward compatible interfaces with other systems – old protocols, sometimes old code and libraries, hard to maintain and test multiple versions.
  • Reduce unnecessary trust and privilege between components.
  • Verify important requirements through focused review and testing.

A diagram or checklist is planning evidence, not proof that a control works. Assurance comes from connecting the stated requirement to implementation and observed behaviour.

Recheck the changed behaviour against the original failure conditions and the legitimate user journey. Keep enough evidence to show which release and configuration were verified, and include related entry points that depend on the same security decision.

Read about our methodology or contact pentested.com to discuss secure development and code review.

See your first test report this week.

Book a 30 minute demo. We will verify one of your targets with you and run a test against it, so you can judge the results on your own systems.

Book a demo