View a markdown version of this page

Running a threat model for a penetration test - AWS Continuum

Running a threat model for a penetration test

Run a threat model to analyze your application's architecture and identify security threats. A threat model produces two main outputs: a system overview that describes how your system is built and behaves, and a set of threats that describe how the system could be attacked. Each threat has a severity level, a STRIDE classification, and actionable recommendations.

In AWS Continuum, you run a threat model from a penetration test. The threat model analyzes the source code that you add to the test. It reads the source repositories that you connect through GitHub or GitLab integrations, and the source code that you upload.

Note

A threat model needs source code. You can't run a threat model for a test that has only documents. In AWS Continuum, you also can't create, edit, or delete a threat model, or add or edit individual threats. You can start and stop threat model runs and review their results.

Prerequisites

Before you begin, ensure that you have the following:

AWS Continuum returns an error if you set the threat modeling strategy to Once or On every run on a test that has no uploaded source code or repository from an integration. It also returns an error if you remove the last source from such a test, or start a threat model run for a test without one. Documents alone aren't enough. Add source code to the test, or set the strategy to Off.

Choosing when threat models run

For each penetration test, you choose when AWS Continuum runs a threat model. When you create or edit the test, on the Additional configuration page, under Automation, choose one of the following options for Threat model:

  • Off – AWS Continuum doesn't run a threat model when the test runs. This is the default.

  • Once – AWS Continuum runs a threat model the first time that you start a full run of the test. After the test has a threat model run that didn't fail, it doesn't start another one. This includes a run that's in progress, a run that you stopped, and a run that you started yourself. If every earlier threat model run failed or was aborted, AWS Continuum tries again at the next full run.

  • On every run – AWS Continuum runs a threat model every time you start a full run of the test. Revalidation runs don't start a threat model run.

When a threat model run starts

When you start a full run of a penetration test, AWS Continuum starts a threat model run based on the test's threat modeling strategy. You can also start a threat model run for a test on its own from the console. A run that you start this way doesn't depend on the test's threat modeling strategy.

To run a threat model
  1. Open the AWS Continuum console at https://console.aws.amazon.com/continuum/.

  2. In the navigation pane, under Penetration testing, choose Overview.

  3. Choose the environment name, and then choose the penetration test.

  4. Make sure that the threat modeling strategy of the test is Once or On every run. To change the strategy, edit the test.

  5. Start the penetration test. For details, see Starting a run.

To start a threat model run for a test without starting a penetration test run, use the following procedure.

To run a threat model on its own
  1. Open the AWS Continuum console at https://console.aws.amazon.com/continuum/.

  2. In the navigation pane, under Penetration testing, choose Overview.

  3. Choose the environment name, and then choose the penetration test.

  4. Choose the Threat models tab, and then choose Run threat model.

The Threat models tab of the test shows the latest threat model run and lists all of the threat model runs for the test. For each run, the list shows the start time, status, duration, and run ID. To see how the system overview and threats change after you update your source code, start a new threat model run, or start a new run of a test whose strategy is On every run.

Monitoring a threat model run

Track the progress of your threat model as it runs. The run page header displays a status indicator:

  • In progress – The threat model agent is running.

  • Stopping – A cancel was requested. The agent is finishing its current task before it stops.

  • Completed – The run finished successfully.

  • Failed – The run encountered an error. The page displays an error message with details. Start a new run after you resolve the issue.

  • Stopped – You canceled the run. AWS Continuum keeps any threats that it generated before the run stopped.

To stop a run that's in progress, choose Stop run.

If a run fails, check the following:

  • The test still has source code, and the integration that provides it is still connected.

  • The service role of the environment can still be assumed and has the permissions that it needs. For more information, see Service role for penetration testing.

Reviewing a threat model

After a threat model run completes, review the system overview and the threats to understand how your application could be attacked and what to do about it.

Reviewing the system overview

The system overview describes how AWS Continuum understands your system. It's a structured document that can include the following:

  • Purpose – What the system does and who it serves.

  • Capabilities – Key functionality that the system provides.

  • Architecture – How the system is built, including deployment patterns and communication protocols.

  • Components – A table of system components with their purpose and key interactions.

  • Trust boundaries – Where security contexts change, including what protections exist at each crossing.

  • Data flows – How data moves through the system, including protocols, credentials, and protections at each step.

  • Security posture – Current authentication, encryption, and access control mechanisms.

  • Sensitive assets – Data and credentials that require protection, with their classification and exposure points.

  • Key assumptions – Security-relevant assumptions that AWS Continuum made about the system.

To review the system overview
  1. Open the completed threat model run.

  2. Choose the Overview tab.

  3. Review the run summary, which shows the run ID, start time, status, and duration.

  4. Review the severity chart, which shows the number of threats at each severity level.

  5. Review the threat categories chart, which shows how many threats fall into each STRIDE category: Spoofing, Tampering, Repudiation, Information disclosure, Denial of service, and Elevation of privilege.

  6. In the system overview section, read the full analysis.

If the system overview doesn't accurately reflect your system, refine your inputs. Add the relevant repositories as sources or upload more complete source code, and then start a new threat model run.

Reviewing threats

Choose the Threats tab to view the threats that the run identified. Each threat shows its title, severity, status, and the time it was last updated. Choose a threat to see its details.

A threat has one of the following severities:

  • Critical and High – Require prompt attention. Exploitation could result in a significant security impact, up to full system compromise.

  • Medium – Should be addressed in a reasonable timeframe. The threat contributes to the overall security risk.

  • Low and Info – Can be addressed as part of regular maintenance. The immediate risk is minimal.

A threat's details include the following:

  • Severity – The risk level that AWS Continuum assigned.

  • STRIDE categories – The threat classification: Spoofing, Tampering, Repudiation, Information disclosure, Denial of service, or Elevation of privilege.

  • Statement – A natural-language description of the threat. It describes what the threat source can do, what the impact is, and what conditions enable it.

  • Source – The actor or origin of the threat, such as an authenticated user or an external attacker.

  • Action – What the threat source can do, such as inject SQL queries into the search parameter.

  • Impact – The direct consequence of the threat action, such as unauthorized access to customer records.

  • Affected assets – The specific assets that the threat affects, such as customer payment records or a DynamoDB table.

  • Prerequisites – Conditions that must be true for the threat to be exploitable.

  • Impacted goals – The security goals that the threat affects.

  • Evidence – The source code file paths that support the threat.

  • Anchor – A code reference that links the threat to a specific node in your source code.

  • Recommendation – Actionable guidance for addressing the threat.

Reviewing preflight checks and logs

To investigate how AWS Continuum reached its conclusions, or to debug a partial failure, use the following tabs:

  • Preflight – The status of the checks that run before threat analysis begins. Each check shows its status. You can expand a completed check to view its detailed log output.

  • Logs – A filterable list of the tasks that AWS Continuum performed during the run. Select a task to view its detailed log output in the side panel.

Next steps

  • Address high-severity threats first, based on the recommendations.

  • Start a new threat model run to verify that your changes address the threats.

  • Run a penetration test to find out which threats are exploitable. See Starting a run.