Overview
Pwnbook’s threat modeling feature lets you create visual threat models directly within an engagement. Instead of static spreadsheets or disconnected diagrams, threat models in Pwnbook are interactive, shareable, and linked to the rest of your engagement data. Each engagement can have one or more threat models, making it easy to model different components or attack surfaces separately.Creating a threat model
- Open an engagement and navigate to the Threat Models tab.
- Click New Threat Model.
- Give the model a name (e.g., “Authentication Flow” or “Payment Processing”).
- Click Create to open the diagram canvas.
The diagram canvas
The canvas is an interactive diagram editor where you visually construct your threat model. You can zoom, pan, and drag elements freely to build the layout that best represents your target system.Adding assets
Assets represent components of the system you’re modeling — servers, databases, user clients, external services, and so on. To add an asset:- Click the Add Asset button or drag an asset type from the left panel.
- Choose the asset type (e.g., Web Server, Database, User, External API).
- Position the asset on the canvas.
- Click the asset to edit its label and properties.
Identifying threats
Threats represent potential security issues that could affect assets. For each asset, you can attach one or more threats. To add a threat to an asset:- Click an asset on the canvas.
- In the properties panel, click Add Threat.
- Enter the threat name and description.
- Optionally categorize the threat using the STRIDE model (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege).
- Assign a severity level (Critical, High, Medium, Low, Informational).
Threat vectors
Threat vectors define the paths an attacker might take to exploit a threat. They connect assets on the canvas to show attack routes. To add a threat vector:- Hover over a source asset until the connection handle appears.
- Click and drag to a target asset to create a vector.
- Click the vector line to give it a label and associate it with a specific threat.
GitHub PR integration
GitHub integration must be configured before using this feature. See GitHub Integration.
- Pwnbook analyzes the diff for security-relevant changes.
- A threat model review is triggered for the affected engagement.
- Suggested threats are added to the relevant threat model.
- You receive a notification (and optionally a Slack message) to review the suggestions.
Sharing threat models
Threat models are visible to all members of the engagement’s organization. To share a specific threat model externally (e.g., with a client), export it as a PDF or image from the canvas toolbar.Best practices
Start with a data flow diagram
Start with a data flow diagram
Before adding threats, map out how data flows through the system. This makes it much easier to identify where threats apply.
Use one threat model per trust boundary
Use one threat model per trust boundary
Separate threat models for separate trust zones (e.g., one for the public-facing API, one for internal services) keep models manageable and focused.
Link findings to threats
Link findings to threats
As you discover vulnerabilities during the engagement, reference them in your threat model. This creates a clear audit trail from threat identification to confirmed finding.