Loading...
Loading...
Threat modeling using STRIDE methodology. Data flow diagrams, trust boundaries, attack surface mapping, and risk assessment. Use when analyzing system security, designing secure architectures, or conducting security reviews.
npx skill4agent add projectious-work/aibox threat-modeling| Category | Threat | Property Violated |
|---|---|---|
| Spoofing | Pretending to be someone else | Authentication |
| Tampering | Modifying data or code | Integrity |
| Repudiation | Denying an action occurred | Non-repudiation |
| Information Disclosure | Exposing data to unauthorized | Confidentiality |
| Denial of Service | Making the system unavailable | Availability |
| Elevation of Privilege | Gaining unauthorized access | Authorization |
Trust Boundary
+---------------------------------+
[User Browser] ---|---> [Web Server] ---> [App Server] ---> [Database]
| | |
| v v
| [Static Files] [Cache (Redis)]
+---------------------------------+
|
v
[External Auth Provider]| Rating | Likelihood | Impact |
|---|---|---|
| High | Exploitable with public tools | Data breach, full compromise |
| Medium | Requires some skill or access | Partial data exposure, downtime |
| Low | Requires insider access or luck | Minor data exposure, degradation |
| Likelihood \ Impact | High | Medium | Low |
|---|---|---|---|
| High | Critical | High | Medium |
| Medium | High | Medium | Low |
| Low | Medium | Low | Low |
| STRIDE Category | Common Mitigations |
|---|---|
| Spoofing | MFA, certificate pinning, mutual TLS |
| Tampering | Digital signatures, checksums, immutable audit logs |
| Repudiation | Audit logging, tamper-evident logs, digital signatures |
| Information Disclosure | Encryption (TLS, AES), access controls, data masking |
| Denial of Service | Rate limiting, auto-scaling, CDN, circuit breakers |
| Elevation of Privilege | Least privilege, input validation, sandboxing |
## Threat Model: [System Name]
### System Description
Brief description of the system and its purpose.
### Data Flow Diagram
ASCII diagram showing components and trust boundaries.
### Assets
List of valuable data and resources to protect.
### Threats
| ID | STRIDE | Component | Threat | Risk | Mitigation |
|----|--------|-----------|--------|------|------------|
| T1 | S | Login API | Credential stuffing | High | Rate limiting, MFA |
| T2 | I | Database | SQL injection leaks PII | Critical | Parameterized queries |
### Recommendations
Prioritized list of security improvements.User: Create a threat model for our e-commerce application.
Agent: Reads the architecture and codebase, then produces:
1. Data flow diagram showing: browser -> CDN -> load balancer -> API servers
-> database / cache / payment gateway. Trust boundaries at each hop.
2. STRIDE analysis of each component:
- Spoofing: session hijacking on API server (Medium risk).
- Tampering: price manipulation in cart requests (High risk).
- Info Disclosure: PII exposure in error messages (Medium risk).
- DoS: no rate limiting on search endpoint (High risk).
3. Risk-prioritized mitigation recommendations.User: Review our microservices architecture for security threats.
Agent: Maps service communication patterns:
- Identifies 12 services with 28 inter-service data flows.
- Trust boundaries: public internet, API gateway, service mesh, database tier.
- Key findings:
- 3 services communicate over unencrypted HTTP internally (Tampering, Info Disclosure).
- No mutual TLS between services (Spoofing).
- Shared database credentials across services (Elevation of Privilege).
- No circuit breakers — cascade failure risk (DoS).
Recommends: service mesh with mTLS, per-service DB credentials, circuit breakers.User: We're launching next week. Do a threat model focused on the highest risks.
Agent: Focuses on critical-path components:
- Payment flow: identifies missing webhook signature verification (Tampering, Critical).
- User registration: no rate limiting (DoS, High), email enumeration (Info Disclosure).
- Admin panel: accessible without VPN (Elevation of Privilege, Critical).
- File uploads: no type validation (Injection via uploaded HTML, High).
Produces a prioritized punch list:
1. [Critical] Add webhook signature verification before processing payments.
2. [Critical] Restrict admin panel to VPN or IP allowlist.
3. [High] Add rate limiting to registration and login.
4. [High] Validate file upload types and serve from separate domain.