OSCP Study Guide: Introduction to CyberSecurity
Chapter 01 — Foundational Concepts for Offensive Security
This guide covers the core cybersecurity principles every penetration tester must understand. Each topic includes technical explanations, tools, and penetration testing relevance.
Table of Contents
- CIA Triad
- AAA Framework
- Threat Models and Threat Actors
- Attack Lifecycle
- Defense in Depth
- Network Security Fundamentals
- Cryptography Basics
- Common Attack Types
- Security Frameworks
- Ethical Hacking and Legal Considerations
- Penetration Testing Methodology
- OWASP Top 10
- Red Team vs Blue Team vs Purple Team
- Security Operations Center (SOC)
1. CIA Triad
The CIA Triad is the foundational model of information security. Every security control maps to one or more of these three objectives.
1.1 Core Concepts
| Pillar |
Definition |
Goal |
Penetration Testing Relevance |
| Confidentiality |
Only authorized parties can access data |
Prevent unauthorized disclosure |
Test for information leakage, weak encryption, default credentials |
| Integrity |
Data remains accurate and unaltered |
Prevent unauthorized modification |
Test for tampering, file manipulation, database injection |
| Availability |
Systems and data accessible when needed |
Prevent service disruption |
Test for DoS vulnerabilities, resource exhaustion |
1.2 Technical Elaboration
Confidentiality Controls:
- Encryption at rest (AES-256, LUKS, BitLocker)
- Encryption in transit (TLS 1.2/1.3, SSH)
- Access control lists (ACLs)
- Data classification and labeling
- Need-to-know principle
Integrity Controls:
- Hashing (SHA-256, SHA-3) for data verification
- Digital signatures for authenticity
- File integrity monitoring (AIDE, OSSEC)
- Version control and change management
- Checksums and HMACs
Availability Controls:
- Redundancy (RAID, clustering, load balancing)
- Backup and disaster recovery
- Rate limiting and DDoS protection
- Patch management
- Capacity planning
1.3 Mermaid Diagram: CIA Triad Relationships
graph TD
subgraph CIA_Triad [CIA Triad]
C[Confidentiality]
I[Integrity]
A[Availability]
end
C -->|Encryption| E1[TLS / SSL]
C -->|Access Control| E2[RBAC / ACLs]
C -->|Tokenization| E3[Data Masking]
I -->|Hashing| H1[SHA-256]
I -->|Signatures| H2[Digital Signatures]
I -->|Monitoring| H3[AIDE / OSSEC]
A -->|Redundancy| R1[Load Balancing]
A -->|Backups| R2[Disaster Recovery]
A -->|Protection| R3[DDoS Mitigation]
style C fill:#4CAF50,color:#fff
style I fill:#2196F3,color:#fff
style A fill:#FF9800,color:#fff
| Tool |
Purpose |
CIA Pillar |
openssl |
Encryption, hashing, certificates |
Confidentiality, Integrity |
testssl.sh |
TLS/SSL testing |
Confidentiality |
hashcat |
Password cracking |
Confidentiality |
john (John the Ripper) |
Password cracking |
Confidentiality |
AIDE |
File integrity monitoring |
Integrity |
2. AAA Framework
AAA stands for Authentication, Authorization, and Accounting — the three pillars of access control.
2.1 Core Concepts
| Component |
Question Answered |
Mechanism |
Example |
| Authentication |
“Who are you?” |
Verify identity |
Passwords, MFA, certificates, biometrics |
| Authorization |
“What can you do?” |
Grant/deny permissions |
RBAC, ABAC, ACLs |
| Accounting (Auditing) |
“What did you do?” |
Log and track activity |
Syslog, audit logs, SIEM |
2.2 Technical Elaboration
Authentication Methods (by strength):
| Method |
Strength |
Description |
| Single-factor (password) |
Weak |
Something you know |
| Two-factor (2FA) |
Medium |
Two of: know, have, are |
| Multi-factor (MFA) |
Strong |
Three or more factors |
| Certificate-based |
Strong |
X.509 client certificates |
| Biometric |
Varies |
Fingerprint, facial recognition |
Authentication Protocols:
| Protocol |
Use Case |
Security Level |
| RADIUS |
Network access (WIFI, VPN) |
Medium (uses shared secret) |
| TACACS+ |
Network device admin |
Strong (encrypts entire payload) |
| Kerberos |
Windows domain auth |
Strong (ticket-based) |
| LDAP / LDAPS |
Directory services |
Medium/Strong (with TLS) |
| OAuth 2.0 / OIDC |
Web app delegation |
Strong (token-based) |
| SAML |
Enterprise SSO |
Strong (XML-based assertions) |
Authorization Models:
| Model |
Description |
Pros |
Cons |
| DAC |
Discretionary — owner decides |
Flexible |
Hard to manage at scale |
| MAC |
Mandatory — system-enforced |
Strong control |
Rigid, complex |
| RBAC |
Role-Based — roles define access |
Scalable |
Role explosion |
| ABAC |
Attribute-Based — context-aware |
Granular |
Complex policy management |
2.3 Mermaid Diagram: AAA Flow
sequenceDiagram
participant U as User
participant Auth as Authentication
participant Authz as Authorization
participant Audit as Accounting
participant Res as Resource
U->>Auth: Credentials (username + password)
Auth->>Auth: Verify identity
alt Valid credentials
Auth-->>U: Authenticated
U->>Authz: Request access to resource
Authz->>Authz: Check permissions
alt Authorized
Authz-->>U: Access granted
U->>Res: Access resource
Res-->>Audit: Log activity
else Not authorized
Authz-->>U: Access denied
Authz-->>Audit: Log denial
end
else Invalid credentials
Auth-->>U: Authentication failed
Auth-->>Audit: Log failed attempt
end
| Tool |
Purpose |
AAA Component |
hydra |
Brute-force authentication |
Authentication |
medusa |
Login brute-forcing |
Authentication |
enum4linux |
Enumerate SMB/Windows auth |
Authentication |
ldapsearch |
LDAP enumeration |
Authentication |
kerbrute |
Kerberos brute-force |
Authentication |
Impacket suite |
Windows auth attacks |
Authentication |
3. Threat Models and Threat Actors
3.1 Threat Modeling Frameworks
| Framework |
Description |
Best For |
| STRIDE |
Spoofing, Tampering, Repudiation, Info Disclosure, DoS, Elevation of Privilege |
Microsoft applications, software design |
| PASTA |
7-step risk-centric process |
Enterprise risk analysis |
| LINDDUN |
Privacy-focused threat model |
Privacy-by-design |
| VAST |
Scalable, automated threat modeling |
DevSecOps, agile |
| Attack Trees |
Hierarchical decomposition of attacks |
Specific system analysis |
3.2 STRIDE Breakdown
| Category |
Threat Type |
Example |
Mitigation |
| Spoofing |
Fake identity |
IP spoofing, credential theft |
Strong authentication, MFA |
| Tampering |
Modify data/code |
SQL injection, file modification |
Input validation, integrity checks |
| Repudiation |
Deny action |
No audit logs |
Logging, non-repudiation |
| Information Disclosure |
Leak sensitive data |
Error messages, unencrypted traffic |
Encryption, least privilege |
| Denial of Service |
Disrupt service |
Flood attacks, resource exhaustion |
Rate limiting, redundancy |
| Elevation of Privilege |
Gain higher access |
Buffer overflow, misconfig |
Principle of least privilege |
3.3 Threat Actor Classification
| Actor Type |
Motivation |
Resources |
Typical Targets |
Examples |
| Script Kiddies |
Notoriety, fun |
Low |
Easy targets |
Using Metasploit without understanding |
| Hacktivists |
Political/social causes |
Low-Medium |
Government, corporations |
Anonymous, hacktivist groups |
| Cybercriminals |
Financial gain |
Medium-High |
Banks, e-commerce, individuals |
Ransomware gangs, APT-for-hire |
| Insiders |
Revenge, greed, negligence |
Varies |
Own organization |
Disgruntled employees |
| Nation-State (APT) |
Espionage, sabotage |
Very High |
Government, critical infrastructure |
APT28, APT29, Lazarus Group |
| Competitors |
Business advantage |
Medium |
Rival companies |
Industrial espionage |
3.4 Mermaid Diagram: Threat Actor Spectrum
graph LR
subgraph Low_Maturity [Low Maturity]
SK[Script Kiddies]
V[Vandals]
end
subgraph Medium_Maturity [Medium Maturity]
H[Hacktivists]
CC[Cybercriminals]
I[Insiders]
end
subgraph High_Maturity [High Maturity]
APT[Advanced Persistent Threats]
NS[Nation-State Actors]
C[Corporate Espionage]
end
Low_Maturity -->|Increasing capability| Medium_Maturity
Medium_Maturity -->|Increasing capability| High_Maturity
SK -->|Resources: Low| R1[Off-the-shelf tools]
CC -->|Resources: Medium| R2[Custom malware, botnets]
APT -->|Resources: Very High| R3[Zero-days, custom C2]
style SK fill:#FFCDD2
style CC fill:#FFF9C4
style APT fill:#FF8A80
3.5 Key Concepts for Penetration Testing
- Understand the threat actor profile to tailor attack simulations
- Map findings to STRIDE categories for structured reporting
- Use MITRE ATT&CK to correlate techniques with real-world actors
- Consider insider threat scenarios during assessment scope definition
4. Attack Lifecycle
4.1 Cyber Kill Chain (Lockheed Martin)
The Kill Chain models the attack from the adversary’s perspective. Disrupting any phase stops the attack.
| Phase |
Description |
Attacker Actions |
Defender Detection |
Pen Tester Tools |
| 1. Reconnaissance |
Gather target intelligence |
OSINT, scanning, social engineering |
Anomaly detection, honeypots |
theHarvester, maltego, shodan |
| 2. Weaponization |
Create attack payload |
Pair exploit with malware |
N/A (pre-delivery) |
msfvenom, custom exploit dev |
| 3. Delivery |
Deliver weapon to target |
Email, USB, drive-by download |
Email filtering, DLP |
Social-Engineer Toolkit, gophish |
| 4. Exploitation |
Trigger vulnerability |
Run exploit code |
IDS/IPS, EDR alerts |
metasploit, cobalt strike |
| 5. Installation |
Establish foothold |
Install backdoor, rootkit |
File integrity monitoring |
Web shells, reverse shells |
| 6. C2 |
Command and control |
Establish communication channel |
Network monitoring, DNS analysis |
Sliver, Cobalt Strike, Empire |
| 7. Actions on Objectives |
Achieve mission |
Exfiltrate data, destroy systems |
DLP, behavioral analytics |
Data exfiltration simulation |
4.2 Mermaid Diagram: Cyber Kill Chain
graph LR
A[1. Reconnaissance] --> B[2. Weaponization]
B --> C[3. Delivery]
C --> D[4. Exploitation]
D --> E[5. Installation]
E --> F[6. Command & Control]
F --> G[7. Actions on Objectives]
style A fill:#E3F2FD,stroke:#1565C0
style B fill:#E3F2FD,stroke:#1565C0
style C fill:#E3F2FD,stroke:#1565C0
style D fill:#FFF3E0,stroke:#E65100
style E fill:#FFF3E0,stroke:#E65100
style F fill:#FFEBEE,stroke:#C62828
style G fill:#FFEBEE,stroke:#C62828
4.3 MITRE ATT&CK Framework
MITRE ATT&CK is a knowledge base of adversary tactics and techniques based on real-world observations.
| Component |
Description |
| Tactics |
The “why” — adversary’s goal (14 tactics) |
| Techniques |
The “how” — way to achieve a tactic |
| Sub-techniques |
Specific implementations of a technique |
| Procedures |
Observed real-world examples |
| Mitigations |
Defenses against techniques |
| Datasources |
Data needed for detection |
4.4 MITRE ATT&CK Tactics Matrix (Enterprise)
| Tactic |
ID |
Description |
Example Techniques |
| Initial Access |
TA0001 |
Gain entry to target |
Phishing, Valid Accounts, Exploit Public App |
| Execution |
TA0002 |
Run malicious code |
Command-Line Interface, PowerShell, Scripts |
| Persistence |
TA0003 |
Maintain access |
Registry Run Keys, Scheduled Tasks, SSH Keys |
| Privilege Escalation |
TA0004 |
Gain higher privileges |
Exploit for Priv Esc, Token Manipulation |
| Defense Evasion |
TA0005 |
Avoid detection |
Obfuscated Files, Indicator Removal, Masquerading |
| Credential Access |
TA0006 |
Obtain credentials |
LSASS Memory, Dumping, Kerberoasting |
| Discovery |
TA0007 |
Enumerate environment |
Network Service Discovery, Account Discovery |
| Lateral Movement |
TA0008 |
Move through network |
Remote Services, Pass the Hash |
| Collection |
TA0009 |
Gather target data |
Data from Local System, Email Collection |
| Command and Control |
TA0011 |
Communicate with infrastructure |
Application Layer Protocol, C2 Over C2 |
| Exfiltration |
TA0010 |
Steal data |
Exfil Over C2, Archive Before Exfil |
| Impact |
TA0040 |
Disrupt operations |
Data Destruction, Ransomware, Denial of Service |
4.5 Mermaid Diagram: ATT&CK Kill Chain Mapping
flowchart TD
subgraph Recon [Reconnaissance]
R1[OSINT Gathering]
R2[Target Scanning]
end
subgraph InitialAccess [Initial Access - TA0001]
IA1[Phishing]
IA2[Exploit Public-Facing App]
IA3[Valid Accounts]
end
subgraph Execution [Execution - TA0002]
EX1[PowerShell]
EX2[Command & Scripting Interpreter]
end
subgraph Persistence [Persistence - TA0003]
P1[Registry Run Keys]
P2[Scheduled Task/Job]
end
subgraph PrivEsc [Privilege Escalation - TA0004]
PE1[Exploit for Priv Esc]
PE2[Token Impersonation]
end
subgraph DefenseEvasion [Defense Evasion - TA0005]
DE1[Obfuscated Files]
DE2[Indicator Removal]
end
subgraph Lateral [Lateral Movement - TA0008]
LM1[Remote Services: RDP]
LM2[Pass the Hash]
end
subgraph Exfil [Exfiltration - TA0010]
EF1[Exfil Over C2 Channel]
EF2[Archive Before Exfil]
end
Recon --> InitialAccess
InitialAccess --> Execution
Execution --> Persistence
Execution --> PrivEsc
Persistence --> DefenseEvasion
PrivEsc --> Lateral
Lateral --> Exfil
style Recon fill:#E8EAF6,stroke:#283593
style InitialAccess fill:#E3F2FD,stroke:#1565C0
style Execution fill:#E0F2F1,stroke:#00695C
style Persistence fill:#F3E5F5,stroke:#6A1B9A
style PrivEsc fill:#FFF3E0,stroke:#E65100
style DefenseEvasion fill:#FBE9E7,stroke:#BF360C
style Lateral fill:#FFEBEE,stroke:#C62828
style Exfil fill:#FFCDD2,stroke:#B71C1C
| Tool |
Kill Chain Phase |
ATT&CK Mapping |
nmap |
Reconnaissance |
T1595 - Active Scanning |
metasploit |
Exploitation |
T1190 - Exploit Public-Facing App |
mimikatz |
Credential Access |
T1003 - OS Credential Dumping |
BloodHound |
Discovery |
T1087 - Account Discovery |
Cobalt Strike |
C2 |
T1071 - Application Layer Protocol |
Sliver |
C2 |
T1090 - Proxy |
5. Defense in Depth
5.1 Concept Overview
Defense in Depth (also called layered security) uses multiple security controls across different layers. If one layer fails, others provide protection.
5.2 Security Layers
| Layer |
Controls |
Examples |
Pen Tester Focus |
| Physical |
Access to facilities |
Biometric locks, CCTV, guards |
Social engineering, tailgating |
| Perimeter |
Network boundary |
Firewall, WAF, IDS/IPS |
Firewall rules, WAF bypass |
| Network |
Internal segmentation |
VLANs, ACLs, NAC |
Network pivoting, segmentation bypass |
| Host |
Endpoint protection |
EDR, AV, HIPS, patching |
Local privilege escalation, AV evasion |
| Application |
App-level security |
Input validation, auth, encryption |
Web app attacks, API abuse |
| Data |
Information protection |
Encryption, DLP, tokenization |
Data exfiltration, decryption |
| Identity |
Access management |
MFA, SSO, PAM |
Credential attacks, token theft |
| Human |
Awareness & training |
Security training, phishing sims |
Social engineering, phishing |
5.3 Mermaid Diagram: Defense in Depth Layers
graph TD
subgraph External [External Threats]
T[Threat Actors]
end
T --> L1
subgraph Layer8 [Layer 8: Human / Awareness]
L8[Security Training<br/>Phishing Awareness]
end
subgraph Layer7 [Layer 7: Identity & Access]
L7[MFA / SSO / PAM<br/>RBAC / ABAC]
end
subgraph Layer6 [Layer 6: Data Protection]
L6[Encryption at Rest<br/>DLP / Tokenization]
end
subgraph Layer5 [Layer 5: Application]
L5[WAF / Input Validation<br/>Auth / Session Mgmt]
end
subgraph Layer4 [Layer 4: Host / Endpoint]
L4[EDR / AV / HIPS<br/>Patch Mgmt / Hardening]
end
subgraph Layer3 [Layer 3: Network]
L3[VLANs / ACLs / NAC<br/>Segmentation / Zero Trust]
end
subgraph Layer2 [Layer 2: Perimeter]
L2[Firewall / IDS/IPS<br/>Proxy / CASB]
end
subgraph Layer1 [Layer 1: Physical]
L1[Access Control<br/>CCTV / Guards]
end
L8 --> L7
L7 --> L6
L6 --> L5
L5 --> L4
L4 --> L3
L3 --> L2
L2 --> L1
style L1 fill:#E8F5E9,stroke:#2E7D32
style L2 fill:#E3F2FD,stroke:#1565C0
style L3 fill:#E0F7FA,stroke:#00838F
style L4 fill:#F3E5F5,stroke:#6A1B9A
style L5 fill:#FFF3E0,stroke:#E65100
style L6 fill:#FBE9E7,stroke:#BF360C
style L7 fill:#FFEBEE,stroke:#C62828
style L8 fill:#FFCDD2,stroke:#B71C1C
5.4 Key Principles
- No single point of failure — each layer is independent
- Fail securely — defaults should deny access
- Least privilege — minimum access needed
- Separation of duties — no single person has full control
- Continuous monitoring — detect failures in any layer
6. Network Security Fundamentals
6.1 Firewall Types
| Type |
OSI Layer |
Description |
Pros |
Cons |
| Packet Filter |
L3/L4 |
Inspects headers (IP, port, protocol) |
Fast, simple |
No deep inspection |
| Stateful |
L3/L4 |
Tracks connection state |
Better than stateless |
Still limited visibility |
| Application Proxy |
L7 |
Acts as intermediary for apps |
Deep inspection |
Performance overhead |
| Next-Gen (NGFW) |
L3-L7 |
DPI, app awareness, IPS built-in |
Comprehensive |
Complex, expensive |
| WAF |
L7 |
Web-specific protection |
OWASP attack blocking |
Web-only coverage |
6.2 IDS vs IPS
| Feature |
IDS (Intrusion Detection) |
IPS (Intrusion Prevention) |
| Mode |
Passive (monitor only) |
Active (inline, can block) |
| Placement |
Out-of-band (SPAN port) |
In-line (traffic path) |
| Action |
Alert / log |
Alert + block / drop |
| False Positive Impact |
Low (just alerts) |
High (can block legitimate traffic) |
| Types |
NIDS, HIDS |
NIPS, HIPS |
6.3 Network Segmentation
| Technique |
Description |
Use Case |
| VLANs |
Logical network separation |
Department isolation |
| Subnetting |
IP-based segmentation |
DMZ, internal, management |
| Micro-segmentation |
Workload-level isolation |
Zero Trust, cloud |
| Air Gap |
Physical network separation |
Highly sensitive systems |
| Zero Trust |
Never trust, always verify |
Modern enterprise security |
6.4 Mermaid Diagram: Network Security Architecture
graph TB
subgraph Internet [Internet]
AT[Attacker]
end
subgraph DMZ [DMZ Zone]
FW1[Edge Firewall]
WAF[WAF]
WEB[Web Server]
MAIL[Mail Server]
DNS[DNS Server]
end
subgraph Internal [Internal Network]
FW2[Internal Firewall]
IDS[IDS/IPS]
VLAN1[VLAN: Users]
VLAN2[VLAN: Servers]
VLAN3[VLAN: Management]
SW[Core Switch]
end
subgraph Secure [Secure Zone]
DB[Database]
DC[Domain Controller]
SIEM[SIEM / Log Server]
end
AT --> FW1
FW1 --> WAF
WAF --> WEB
WAF --> MAIL
WAF --> DNS
FW1 --> FW2
FW2 --> IDS
IDS --> SW
SW --> VLAN1
SW --> VLAN2
SW --> VLAN3
VLAN2 --> DB
VLAN3 --> DC
VLAN3 --> SIEM
style AT fill:#FFCDD2,stroke:#B71C1C
style FW1 fill:#E3F2FD,stroke:#1565C0
style FW2 fill:#E3F2FD,stroke:#1565C0
style IDS fill:#FFF3E0,stroke:#E65100
style DC fill:#E8F5E9,stroke:#2E7D32
style DB fill:#E8F5E9,stroke:#2E7D32
| Tool |
Purpose |
Category |
nmap |
Port scanning, service detection |
Reconnaissance |
masscan |
Fast internet-wide scanning |
Reconnaissance |
Wireshark |
Packet capture and analysis |
Analysis |
tcpdump |
Command-line packet capture |
Analysis |
ettercap |
MITM attacks, ARP poisoning |
Attack |
responder |
LLMNR/NBT-NS poisoning |
Attack |
BetterCAP |
Network attack framework |
Attack |
Snort |
IDS/IPS engine |
Defense |
Suricata |
IDS/IPS engine |
Defense |
7. Cryptography Basics
7.1 Cryptography Types
| Type |
Key Usage |
Speed |
Use Case |
Algorithms |
| Symmetric |
Same key for encrypt/decrypt |
Fast |
Bulk data encryption |
AES, 3DES, ChaCha20 |
| Asymmetric |
Public + private key pair |
Slow |
Key exchange, signatures |
RSA, ECC, DSA |
| Hashing |
One-way, no key |
Fast |
Integrity verification |
SHA-256, SHA-3, MD5 |
7.2 Symmetric Encryption Deep Dive
| Algorithm |
Key Size |
Mode |
Security Status |
| AES-128 |
128-bit |
CBC, GCM, CTR |
Strong |
| AES-256 |
256-bit |
CBC, GCM, CTR |
Very Strong |
| 3DES |
168-bit (effective 112) |
CBC |
Deprecated |
| ChaCha20-Poly1305 |
256-bit |
Stream + AEAD |
Strong (used by TLS 1.3) |
| Blowfish |
Up to 448-bit |
CBC, CFB |
Legacy |
Block Cipher Modes:
| Mode |
Type |
IV Required |
Parallelizable |
Authenticated |
| ECB |
Block |
No |
Yes |
No (INSECURE) |
| CBC |
Block |
Yes |
No (encrypt) |
No |
| CTR |
Stream |
Yes (nonce) |
Yes |
No |
| GCM |
Stream + Auth |
Yes (nonce) |
Yes |
Yes (AEAD) |
| CCM |
Stream + Auth |
Yes (nonce) |
No |
Yes (AEAD) |
7.3 Asymmetric Encryption Deep Dive
| Algorithm |
Key Size (equiv. 128-bit security) |
Use Case |
| RSA-2048 |
2048-bit |
Signatures, key exchange (legacy) |
| RSA-3072 |
3072-bit |
Signatures (recommended minimum) |
| RSA-4096 |
4096-bit |
High-security signatures |
| ECC (P-256) |
256-bit |
Modern key exchange, signatures |
| ECC (P-384) |
384-bit |
High-security |
| Ed25519 |
256-bit |
Fast signatures (SSH, TLS) |
7.4 Hashing Algorithms
| Algorithm |
Output Size |
Security Status |
Use Case |
| MD5 |
128-bit |
BROKEN — collisions found |
Legacy only |
| SHA-1 |
160-bit |
DEPRECATED — collisions found |
Legacy only |
| SHA-256 |
256-bit |
Strong |
General purpose, TLS, Git |
| SHA-384 |
384-bit |
Strong |
High-security |
| SHA-512 |
512-bit |
Strong |
High-security |
| SHA-3 |
Variable |
Strong |
NIST standard (Keccak) |
| bcrypt |
Variable |
Strong (slow) |
Password hashing |
| scrypt |
Variable |
Strong (memory-hard) |
Password hashing |
| Argon2 |
Variable |
Strongest (memory-hard) |
Password hashing (recommended) |
7.5 Digital Certificates and PKI
| Component |
Description |
| CA (Certificate Authority) |
Trusted entity that issues certificates |
| CSR (Certificate Signing Request) |
Request sent to CA for certificate issuance |
| X.509 |
Standard format for public key certificates |
| Certificate Chain |
Path from leaf cert to root CA |
| CRL / OCSP |
Certificate revocation checking mechanisms |
| Self-signed |
Certificate signed by itself (not trusted by default) |
| Wildcard |
Covers subdomain (*.example.com) |
| EV Certificate |
Extended Validation (highest trust level) |
7.6 Mermaid Diagram: TLS Handshake (Simplified)
sequenceDiagram
participant C as Client
participant S as Server
C->>S: ClientHello<br/>(supported TLS versions, cipher suites)
S->>C: ServerHello<br/>(chosen version, cipher suite)
S->>C: Certificate<br/>(Server's X.509 cert)
S->>C: ServerKeyExchange (if needed)
S->>C: ServerHelloDone
C->>C: Verify server certificate
C->>C: Generate pre-master secret
C->>S: ClientKeyExchange<br/>(encrypted pre-master secret)
C->>C: Derive session keys
S->>S: Derive session keys
C->>S: ChangeCipherSpec
C->>S: Finished (encrypted)
S->>C: ChangeCipherSpec
S->>C: Finished (encrypted)
C<->>S: Encrypted application data
| Tool |
Purpose |
Crypto Area |
openssl |
Full crypto toolkit |
All |
testssl.sh |
TLS/SSL vulnerability scanning |
TLS |
sslscan |
SSL/TLS cipher enumeration |
TLS |
hashcat |
Password/hash cracking |
Hashing |
john |
Password/hash cracking |
Hashing |
hash-identifier |
Identify hash types |
Hashing |
certutil |
Certificate management |
Certificates |
tshark |
TLS analysis |
TLS |
8. Common Attack Types
8.1 Malware Types
| Type |
Description |
Behavior |
Detection |
| Virus |
Attaches to legitimate files |
Spreads via file execution |
Signature-based AV |
| Worm |
Self-replicating, network-borne |
Spreads autonomously |
Network monitoring |
| Trojan |
Disguised as legitimate software |
Creates backdoors |
Behavioral analysis |
| Ransomware |
Encrypts files, demands payment |
Locks user data |
Backup, EDR |
| Rootkit |
Hides deep in OS |
Conceals malware presence |
Kernel-level scanning |
| Spyware |
Monitors user activity |
Keylogging, screen capture |
Behavioral analysis |
| Botnet |
Network of compromised machines |
DDoS, spam, mining |
Network anomaly detection |
| Fileless Malware |
Runs in memory only |
Uses PowerShell, WMI |
Memory scanning, EDR |
8.2 Phishing Types
| Type |
Description |
Target |
Example |
| Email Phishing |
Mass deceptive emails |
General users |
Fake invoice emails |
| Spear Phishing |
Targeted at specific individual |
Specific person |
Fake CEO email |
| Whaling |
Targets senior executives |
C-level executives |
Fake board communications |
| Vishing |
Voice phone calls |
Anyone |
Fake IT support calls |
| Smishing |
SMS text messages |
Mobile users |
Fake delivery notifications |
| Clone Phishing |
Resent legitimate email with malicious link |
Recipients of original |
Modified attachment |
| Evil Twin |
Rogue WiFi access point |
WiFi users |
Fake corporate WiFi |
| Watering Hole |
Compromise frequently visited sites |
Specific group |
Industry portal compromise |
8.3 DoS / DDoS Attacks
| Type |
Layer |
Description |
Mitigation |
| SYN Flood |
L4 |
Half-open connections exhaust server |
SYN cookies, rate limiting |
| UDP Flood |
L4 |
Flood with UDP packets |
Rate limiting, blackhole |
| ICMP Flood |
L3 |
Ping flood |
ICMP rate limiting |
| HTTP Flood |
L7 |
Legitimate-looking HTTP requests |
WAF, CAPTCHA |
| Slowloris |
L7 |
Slow partial HTTP requests |
Timeout tuning |
| DNS Amplification |
L3/L4 |
Reflected DNS queries |
BCP38, upstream filtering |
| NTP Amplification |
L3/L4 |
Reflected NTP queries |
Disable monlist |
| Volumetric |
L3/L4 |
Massive bandwidth consumption |
CDN, scrubbing centers |
8.4 Social Engineering
| Technique |
Description |
Real-World Example |
| Pretexting |
Create fabricated scenario |
Fake IT technician |
| Baiting |
Offer something tempting |
Infected USB drive |
| Tailgating |
Follow authorized person |
Piggybacking into building |
| Quid Pro Quo |
Offer service for access |
Fake tech support |
| Impersonation |
Pretend to be someone else |
CEO impersonation |
| Shoulder Surfing |
Observe someone entering data |
Watching PIN entry |
8.5 Mermaid Diagram: Attack Type Taxonomy
mindmap
root((Attack Types))
Malware
Virus
Worm
Trojan
Ransomware
Rootkit
Spyware
Botnet
Fileless
Phishing
Email
Spear Phishing
Whaling
Vishing
Smishing
DoS / DDoS
SYN Flood
HTTP Flood
Amplification
Volumetric
Social Engineering
Pretexting
Baiting
Tailgating
Impersonation
Network Attacks
MITM
ARP Poisoning
DNS Spoofing
Man-on-Side
Web Attacks
XSS
SQL Injection
CSRF
SSRF
| Tool |
Attack Type |
Purpose |
Social-Engineer Toolkit (SET) |
Phishing, social engineering |
Automated phishing framework |
gophish |
Phishing |
Open-source phishing platform |
Cobalt Strike |
Malware, C2 |
Advanced adversary simulation |
Sliver |
Malware, C2 |
Open-source C2 framework |
hashcat |
Credential attacks |
GPU-accelerated cracking |
Responder |
Network attacks |
LLMNR/NBT-NS poisoning |
BetterCAP |
MITM |
Network attack framework |
9. Security Frameworks
9.1 NIST Cybersecurity Framework (CSF 2.0)
| Function |
Description |
Key Categories |
| GOVERN (GV) |
Organizational cybersecurity risk management |
Risk management strategy, Supply chain risk, Cybersecurity oversight |
| IDENTIFY (ID) |
Understand environment |
Assets, vulnerabilities, threat intelligence, supply chain |
| PROTECT (PR) |
Safeguard systems |
Access control, awareness, data protection, platform security |
| DETECT (DE) |
Identify security events |
Anomalies, continuous monitoring, detection processes |
| RESPOND (RS) |
Act on detected events |
Response planning, mitigation, analysis, improvement |
| RECOVER (RC) |
Restore capabilities |
Recovery planning, improvements, communications |
9.2 NIST CSF 2.0 Flow
flowchart LR
GV[GOVERN] --> ID[IDENTIFY]
ID --> PR[PROTECT]
PR --> DE[DETECT]
DE --> RS[RESPOND]
RS --> RC[RECOVER]
RC -->|Continuous Improvement| GV
style GV fill:#E8EAF6,stroke:#283593
style ID fill:#E3F2FD,stroke:#1565C0
style PR fill:#E8F5E9,stroke:#2E7D32
style DE fill:#FFF3E0,stroke:#E65100
style RS fill:#FFCDD2,stroke:#B71C1C
style RC fill:#F3E5F5,stroke:#6A1B9A
9.3 ISO 27001 Overview
| Component |
Description |
| ISMS |
Information Security Management System |
| Annex A |
93 controls across 4 themes |
| Theme 1 |
Organizational controls (37 controls) |
| Theme 2 |
People controls (8 controls) |
| Theme 3 |
Physical controls (14 controls) |
| Theme 4 |
Technological controls (34 controls) |
9.4 Framework Comparison
| Framework |
Focus |
Type |
Best For |
| NIST CSF |
Risk management |
Voluntary framework |
Organizations of all sizes |
| NIST 800-53 |
Security controls |
Catalog of controls |
US federal systems |
| ISO 27001 |
ISMS certification |
International standard |
Global compliance |
| CIS Controls |
Prioritized safeguards |
Best practices |
Practical implementation |
| PCI DSS |
Payment card security |
Compliance standard |
Payment card handlers |
| SOC 2 |
Service org controls |
Audit framework |
SaaS, cloud providers |
9.5 CIS Critical Security Controls (Top 6)
| Control |
Description |
| 1. Inventory & Control of Enterprise Assets |
Know what you have |
| 2. Inventory & Control of Software Assets |
Know what software runs |
| 3. Data Protection |
Protect sensitive data |
| 4. Secure Configuration |
Harden systems |
| 5. Account Management |
Manage access |
| 6. Security Monitoring & Logging |
Detect and respond |
9.6 Key Concepts for Penetration Testing
- Map findings to NIST CSF functions for executive reporting
- Reference CIS Controls for remediation recommendations
- Use ISO 27001 Annex A controls as remediation guidance
- Align test scope with risk-based approach from frameworks
10. Ethical Hacking and Legal Considerations
10.1 Ethical Hacking Principles
| Principle |
Description |
| Authorization |
Always have written permission before testing |
| Scope |
Stay within agreed boundaries and targets |
| Confidentiality |
Protect discovered data and findings |
| Non-malicious intent |
Never cause harm or disruption |
| Reporting |
Document and report all findings responsibly |
| Data handling |
Securely handle and destroy test data |
| Disclosure |
Follow responsible disclosure practices |
10.2 Types of Penetration Testing
| Type |
Description |
Knowledge Level |
Use Case |
| Black Box |
No prior knowledge |
Zero |
Simulate external attacker |
| White Box |
Full knowledge |
Complete |
Thorough assessment |
| Gray Box |
Partial knowledge |
Limited |
Simulate insider threat |
| Double Blind |
Defender unaware |
N/A |
Test detection and response |
10.3 Legal Frameworks
| Jurisdiction |
Law |
Key Points |
| USA |
CFAA (Computer Fraud and Abuse Act) |
Unauthorized access is federal crime |
| USA |
GDPR (for EU data) |
Data protection, breach notification |
| EU |
GDPR |
Strict data protection, fines up to 4% revenue |
| EU |
NIS Directive |
Critical infrastructure security |
| UK |
Computer Misuse Act 1990 |
Unauthorized access, modification |
| **Singapore |
Computer Misuse Act |
Unauthorized access, data interference |
| China |
Cybersecurity Law |
Data localization, security assessments |
10.4 Rules of Engagement (RoE)
Every engagement must define:
| Element |
Description |
| Scope |
Targets, IP ranges, domains, applications |
| Timeline |
Start/end dates, testing windows |
| Methods |
Allowed techniques, restricted techniques |
| Contacts |
Emergency contacts, points of escalation |
| Data Handling |
How to handle discovered data |
| Reporting |
Format, timeline, delivery method |
| Stop Conditions |
When to halt testing immediately |
| Liability |
Responsibility for damages |
10.5 Mermaid Diagram: Ethical Hacking Decision Flow
flowchart TD
A[Start Engagement] --> B{Written Authorization?}
B -->|No| C[STOP - Do Not Proceed]
B -->|Yes| D{Scope Defined?}
D -->|No| E[Define Scope & RoE]
D -->|Yes| F{Methods Agreed?}
F -->|No| G[Negotiate Methods]
F -->|Yes| H[Begin Testing]
H --> I{Within Scope?}
I -->|No| J[STOP - Report Finding]
I -->|Yes| K{Critical Finding?}
K -->|Yes| L[Notify Client Immediately]
K -->|No| M[Continue Testing]
L --> M
M --> N{Testing Complete?}
N -->|No| H
N -->|Yes| O[Generate Report]
O --> P[Deliver Report]
P --> Q[Debrief & Remediation Support]
style C fill:#FFCDD2,stroke:#B71C1C
style J fill:#FFCDD2,stroke:#B71C1C
style L fill:#FFF3E0,stroke:#E65100
style Q fill:#E8F5E9,stroke:#2E7D32
10.6 Key Concepts
- Responsible Disclosure: Report vulnerabilities to vendor before public disclosure
- Bug Bounty Programs: Legal way to test and get rewarded
- Safe Harbor: Legal protection for researchers following program rules
- Chain of Custody: Document handling of evidence during testing
11. Penetration Testing Methodology
11.1 PTES (Penetration Testing Execution Standard)
| Phase |
Description |
Key Activities |
| 1. Pre-engagement Interactions |
Define scope and rules |
RoE, scope, timeline, legal |
| 2. Intelligence Gathering |
Collect target information |
OSINT, footprinting, enumeration |
| 3. Threat Modeling |
Identify attack paths |
Attack trees, vulnerability analysis |
| 4. Vulnerability Analysis |
Find and validate weaknesses |
Scanning, manual verification |
| 5. Exploitation |
Gain access |
Exploit vulnerabilities, gain foothold |
| 6. Post-Exploitation |
Maximize access |
Privilege escalation, pivoting, persistence |
| 7. Reporting |
Document findings |
Executive summary, technical details, remediation |
11.2 Detailed Phase Breakdown
| Sub-phase |
Description |
Tools |
| Passive Recon |
Gather info without touching target |
theHarvester, maltego, shodan, whois |
| Active Recon |
Interact with target systems |
nmap, dnsenum, nikto |
| OSINT |
Open-source intelligence |
Google dorking, social media, GitHub |
| Footprinting |
Map the attack surface |
Subdomain enumeration, tech stack identification |
Phase 2: Scanning and Enumeration
| Technique |
Description |
Tools |
| Port Scanning |
Discover open ports |
nmap, masscan, rustscan |
| Service Enumeration |
Identify services and versions |
nmap scripts, whatweb |
| Vulnerability Scanning |
Find known vulnerabilities |
OpenVAS, Nessus, Qualys |
| Web App Scanning |
Find web vulnerabilities |
Burp Suite, OWASP ZAP, Nikto |
| Directory Enumeration |
Find hidden resources |
gobuster, dirb, ffuf |
Phase 3: Exploitation
| Category |
Description |
Tools |
| Remote Exploitation |
Exploit network services |
metasploit, custom exploits |
| Web Exploitation |
Exploit web apps |
Burp Suite, sqlmap, xsser |
| Credential Attacks |
Brute-force, spray, crack |
hydra, hashcat, john |
| Social Engineering |
Human-based attacks |
SET, gophish |
| Zero-Day |
Unknown vulnerabilities |
Custom research, exploit dev |
Phase 4: Post-Exploitation
| Objective |
Description |
Tools |
| Privilege Escalation |
Gain higher privileges |
linPEAS, winPEAS, manual techniques |
| Persistence |
Maintain access |
Backdoors, scheduled tasks, SSH keys |
| Pivoting |
Move laterally |
chisel, ssh tunneling, proxychains |
| Credential Dumping |
Extract credentials |
mimikatz, secretsdump.py |
| Data Exfiltration |
Extract sensitive data |
Custom scripts, encoded channels |
Phase 5: Reporting
| Section |
Content |
| Executive Summary |
High-level findings, risk rating, business impact |
| Methodology |
Approach, tools, scope |
| Findings |
Each vulnerability with evidence |
| Risk Rating |
CVSS scores, business impact |
| Remediation |
Specific fix recommendations |
| Appendix |
Technical evidence, screenshots, logs |
11.3 Mermaid Diagram: Penetration Testing Lifecycle
flowchart TD
subgraph Pre [Pre-Engagement]
P1[Define Scope & RoE]
P2[Legal Authorization]
end
subgraph Recon [Reconnaissance]
R1[Passive Recon / OSINT]
R2[Active Scanning]
R3[Enumeration]
end
subgraph Vuln [Vulnerability Analysis]
V1[Vulnerability Scanning]
V2[Manual Verification]
V3[Risk Prioritization]
end
subgraph Exploit [Exploitation]
E1[Initial Access]
E2[Proof of Concept]
end
subgraph PostExploit [Post-Exploitation]
PE1[Privilege Escalation]
PE2[Persistence]
PE3[Pivoting / Lateral Movement]
PE4[Data Exfiltration]
end
subgraph Report [Reporting]
RP1[Document Findings]
RP2[Risk Assessment]
RP3[Remediation Guidance]
RP4[Executive Summary]
end
P1 --> P2
P2 --> R1
R1 --> R2
R2 --> R3
R3 --> V1
V1 --> V2
V2 --> V3
V3 --> E1
E1 --> E2
E2 --> PE1
PE1 --> PE2
PE2 --> PE3
PE3 --> PE4
PE4 --> RP1
RP1 --> RP2
RP2 --> RP3
RP3 --> RP4
style Pre fill:#E8EAF6,stroke:#283593
style Recon fill:#E3F2FD,stroke:#1565C0
style Vuln fill:#E8F5E9,stroke:#2E7D32
style Exploit fill:#FFF3E0,stroke:#E65100
style PostExploit fill:#FFCDD2,stroke:#B71C1C
style Report fill:#F3E5F5,stroke:#6A1B9A
| Phase |
Primary Tools |
| Recon |
theHarvester, maltego, shodan, subfinder, amass |
| Scanning |
nmap, masscan, rustscan, OpenVAS, Nessus |
| Web Testing |
Burp Suite, OWASP ZAP, sqlmap, nikto, gobuster |
| Exploitation |
metasploit, searchsploit, exploitpack |
| Post-Exploit |
mimikatz, linPEAS, winPEAS, CrackMapExec |
| C2 |
Cobalt Strike, Sliver, Mythic, Empire |
| Reporting |
Custom templates, Dradis, Pentera |
12. OWASP Top 10
The OWASP Top 10 represents the most critical web application security risks.
12.1 OWASP Top 10 (2021)
| Rank |
Category |
ID |
Description |
Common Attack |
Mitigation |
| A01 |
Broken Access Control |
A01:2021 |
Users can act outside intended permissions |
IDOR, privilege escalation |
Enforce access controls, deny by default |
| A02 |
Cryptographic Failures |
A02:2021 |
Sensitive data exposed |
Data breach, credential theft |
Encrypt data, strong algorithms |
| A03 |
Injection |
A03:2021 |
Untrusted data sent to interpreter |
SQLi, NoSQLi, OS command injection |
Parameterized queries, input validation |
| A04 |
Insecure Design |
A04:2021 |
Flaws in architecture and design |
Business logic abuse |
Threat modeling, secure design patterns |
| A05 |
Security Misconfiguration |
A05:2021 |
Incomplete or ad-hoc configuration |
Default creds, verbose errors |
Hardening, automation, scanning |
| A06 |
Vulnerable and Outdated Components |
A06:2021 |
Using components with known vulnerabilities |
Exploiting known CVEs |
SCA, patch management |
| A07 |
Identification and Authentication Failures |
A07:2021 |
Weak auth mechanisms |
Credential stuffing, brute force |
MFA, strong password policies |
| A08 |
Software and Data Integrity Failures |
A08:2021 |
Code/config not protected |
CI/CD poisoning, deserialization |
Code signing, integrity checks |
| A09 |
Security Logging and Monitoring Failures |
A09:2021 |
Insufficient detection and response |
Undetected attacks |
Comprehensive logging, SIEM |
| A10 |
Server-Side Request Forgery (SSRF) |
A10:2021 |
Server makes requests to unintended locations |
Internal network access |
URL validation, allowlisting |
12.2 Injection Attacks Deep Dive
| Type |
Description |
Example Payload |
Detection |
| SQL Injection |
Inject SQL into queries |
' OR 1=1-- |
WAF, parameterized queries |
| NoSQL Injection |
Inject into NoSQL queries |
{"$gt": ""} |
Input validation |
| Command Injection |
Inject OS commands |
; cat /etc/passwd |
Input sanitization |
| LDAP Injection |
Inject LDAP queries |
`)(uid=))( |
(uid=*` |
| XPath Injection |
Inject XPath queries |
' or '1'='1 |
Parameterized queries |
| XML External Entity (XXE) |
Malicious XML processing |
<!ENTITY xxe SYSTEM "file:///etc/passwd"> |
Disable external entities |
12.3 Mermaid Diagram: OWASP Top 10 Categories
mindmap
root((OWASP Top 10<br/>2021))
A01 Broken Access Control
IDOR
Privilege Escalation
Forced Browsing
A02 Cryptographic Failures
Weak Algorithms
Hardcoded Keys
Unencrypted Data
A03 Injection
SQL Injection
Command Injection
LDAP Injection
XXE
A04 Insecure Design
Missing Threat Modeling
Flawed Business Logic
A05 Security Misconfiguration
Default Credentials
Verbose Errors
Open Cloud Storage
A06 Vulnerable Components
Known CVEs
Unpatched Libraries
Deprecated Tech
A07 Auth Failures
Weak Passwords
Session Fixation
Credential Stuffing
A08 Integrity Failures
Insecure Deserialization
CI/CD Poisoning
Code Signing Bypass
A09 Logging Failures
Insufficient Logging
No Monitoring
No Alerting
A10 SSRF
Internal Network Access
Cloud Metadata Access
Port Scanning from Server
| Tool |
OWASP Category |
Purpose |
Burp Suite |
All |
Web app security testing platform |
OWASP ZAP |
All |
Open-source web scanner |
sqlmap |
A03 Injection |
Automated SQL injection |
Nikto |
A05 Misconfiguration |
Web server scanner |
ffuf |
A01 Access Control |
Fuzzing tool |
nuclei |
A06 Components |
Template-based scanning |
commix |
A03 Injection |
Command injection tool |
xxeftp |
A03 XXE |
XXE exploitation |
13. Red Team vs Blue Team vs Purple Team
13.1 Team Comparison
| Aspect |
Red Team |
Blue Team |
Purple Team |
| Role |
Offense (attackers) |
Defense (defenders) |
Collaboration |
| Goal |
Find and exploit weaknesses |
Detect and prevent attacks |
Improve both sides |
| Mindset |
Think like an adversary |
Think like a defender |
Think like both |
| Activities |
Pen testing, adversary simulation |
Monitoring, incident response |
Joint exercises, knowledge sharing |
| Tools |
Metasploit, Cobalt Strike, custom exploits |
SIEM, EDR, IDS/IPS, SOAR |
Both red and blue tools |
| Metrics |
Time to compromise, findings |
MTTD, MTTR, detection rate |
Improvement in both metrics |
| Reporting |
Exploitation report, risk assessment |
Incident reports, threat intel |
Joint lessons learned |
13.2 Mermaid Diagram: Team Interaction
graph TD
subgraph Red [Red Team - Offense]
R1[Penetration Testing]
R2[Adversary Simulation]
R3[Social Engineering]
R4[Exploit Development]
end
subgraph Blue [Blue Team - Defense]
B1[SIEM Monitoring]
B2[Incident Response]
B3[Threat Hunting]
B4[Vulnerability Management]
end
subgraph Purple [Purple Team - Collaboration]
P1[Joint Exercises]
P2[Knowledge Sharing]
P3[Detection Engineering]
P4[Lessons Learned]
end
Red <-->|Attack vs Detect| Blue
Red <-->|Share techniques| Purple
Blue <-->|Share detections| Purple
Purple -->|Improve| Red
Purple -->|Improve| Blue
style Red fill:#FFCDD2,stroke:#B71C1C
style Blue fill:#BBDEFB,stroke:#0D47A1
style Purple fill:#E1BEE7,stroke:#4A148C
| Team |
Primary Tools |
| Red |
Metasploit, Cobalt Strike, Sliver, BloodHound, Mimikatz, Responder |
| Blue |
Splunk, Elastic SIEM, CrowdStrike EDR, Snort/Suricata, Wireshark |
| Purple |
Atomic Red Team, Caldera, MITRE ATT&CK Navigator, Detectify |
14. Security Operations Center (SOC)
14.1 SOC Functions
| Function |
Description |
Tools |
| Monitoring |
24/7 surveillance of security events |
SIEM, SOAR |
| Triage |
Initial assessment of alerts |
SIEM dashboards, playbooks |
| Analysis |
Deep investigation of incidents |
Forensic tools, threat intel |
| Response |
Contain and remediate incidents |
IR playbooks, automation |
| Reporting |
Document and communicate findings |
Dashboards, reports |
| Threat Intelligence |
Gather and analyze threat data |
TI platforms, feeds |
14.2 SOC Maturity Levels
| Level |
Description |
Characteristics |
| Level 1 |
Initial |
Ad-hoc processes, manual response |
| Level 2 |
Developing |
Basic SIEM, some automation |
| Level 3 |
Defined |
Standardized processes, SOAR |
| Level 4 |
Managed |
Proactive threat hunting, advanced analytics |
| Level 5 |
Optimized |
AI/ML, continuous improvement, predictive |
14.3 Key Metrics
| Metric |
Description |
Target |
| MTTD |
Mean Time to Detect |
< 1 hour |
| MTTR |
Mean Time to Respond |
< 4 hours |
| Alert Volume |
Number of alerts per day |
Reduce via tuning |
| False Positive Rate |
Percentage of false alerts |
< 10% |
| Coverage |
Percentage of assets monitored |
> 95% |
| SLA Compliance |
Meeting response time targets |
> 95% |
14.4 Mermaid Diagram: SOC Incident Response Flow
flowchart TD
A[Alert Generated] --> B{Triage}
B -->|Low Priority| C[Automated Handling]
B -->|Medium Priority| D[Analyst Level 1]
B -->|High Priority| E[Analyst Level 2]
C --> F[Close]
D --> G{Valid Incident?}
E --> G
G -->|False Positive| H[Document & Tune]
G -->|True Positive| I[Containment]
I --> J[Eradication]
J --> K[Recovery]
K --> L[Lessons Learned]
L --> M[Update Playbooks]
H --> N[Close Ticket]
M --> N
style A fill:#E3F2FD,stroke:#1565C0
style E fill:#FFCDD2,stroke:#B71C1C
style I fill:#FFF3E0,stroke:#E65100
style L fill:#E8F5E9,stroke:#2E7D32
| Category |
Tools |
Purpose |
| SIEM |
Splunk, Elastic, IBM QRadar, Sentinel |
Log aggregation, correlation |
| SOAR |
Phantom, XSOAR, TheHive |
Automation, orchestration |
| EDR |
CrowdStrike, SentinelOne, Carbon Black |
Endpoint detection and response |
| Threat Intel |
MISP, AlienVault OTX, VirusTotal |
Threat intelligence sharing |
| Vulnerability Mgmt |
Nessus, Qualys, OpenVAS |
Vulnerability scanning |
| Forensics |
Autopsy, FTK, Volatility |
Digital forensics |
| Network Security |
Wireshark, Zeek, Suricata |
Network analysis |
14.6 Penetration Testing Relevance
- Understand SOC detection capabilities to test evasion techniques
- Know alert thresholds to craft attacks that trigger (or avoid) detection
- Use SOC metrics to measure the effectiveness of your findings
- Coordinate with SOC during authorized engagements to avoid false incidents
- Provide detection recommendations in penetration test reports
Reconnaissance
| Tool |
Command Example |
Purpose |
nmap |
nmap -sV -sC -O target |
Service version + OS detection |
gobuster |
gobuster dir -u http://target -w wordlist.txt |
Directory brute-forcing |
subfinder |
subfinder -d target.com |
Subdomain enumeration |
theHarvester |
theHarvester -d target.com -b all |
OSINT gathering |
shodan |
shodan search "target.com" |
Internet device search |
Exploitation
| Tool |
Command Example |
Purpose |
metasploit |
use exploit/multi/handler |
Exploitation framework |
sqlmap |
sqlmap -u "http://target?id=1" --dbs |
SQL injection |
hydra |
hydra -l user -P pass.txt ssh://target |
Brute-force |
hashcat |
hashcat -m 0 hash.txt rockyou.txt |
Hash cracking |
searchsploit |
searchsploit apache 2.4.49 |
Exploit database search |
Post-Exploitation
| Tool |
Command Example |
Purpose |
mimikatz |
sekurlsa::logonpasswords |
Credential dumping |
linPEAS |
./linpeas.sh |
Linux privesc enumeration |
winPEAS |
.\winPEAS.exe |
Windows privesc enumeration |
CrackMapExec |
cme smb target -u user -p pass |
Network pivoting |
BloodHound |
SharpHound.exe -c All |
AD reconnaissance |
Appendix B: CVSS v3.1 Scoring Reference
| Metric |
Values |
Description |
| Attack Vector (AV) |
Network / Adjacent / Local / Physical |
How remote is the attack? |
| Attack Complexity (AC) |
Low / High |
Conditions needed for exploit |
| Privileges Required (PR) |
None / Low / High |
Auth needed before exploit |
| User Interaction (UI) |
None / Required |
User action needed? |
| Scope (S) |
Unchanged / Changed |
Does it affect other components? |
| Confidentiality (C) |
None / Low / High |
Impact on confidentiality |
| Integrity (I) |
None / Low / High |
Impact on integrity |
| Availability (A) |
None / Low / High |
Impact on availability |
Severity Ratings:
| Score Range |
Severity |
| 0.0 |
None |
| 0.1 - 3.9 |
Low |
| 4.0 - 6.9 |
Medium |
| 7.0 - 8.9 |
High |
| 9.0 - 10.0 |
Critical |
Appendix C: OSCP Exam Relevance
| Topic |
Exam Relevance |
Priority |
| Network scanning (nmap) |
HIGH — used on every machine |
Must master |
| Web app attacks (OWASP) |
HIGH — many web challenges |
Must master |
| Privilege escalation |
HIGH — required for root/admin |
Must master |
| Password cracking |
HIGH — common initial access |
Must master |
| Active Directory attacks |
HIGH — AD machines are common |
Must master |
| Metasploit usage |
MEDIUM — useful but manual preferred |
Should know |
| Buffer overflow |
MEDIUM — may appear |
Should know |
| Social engineering |
LOW — not typically tested |
Nice to know |
| Cryptography attacks |
LOW — basic understanding |
Nice to know |
| SOC/Blue team |
LOW — context only |
Nice to know |
Summary
This chapter establishes the foundational knowledge required for offensive security operations. Key takeaways:
- CIA Triad is the foundation — every attack targets one or more pillars
- AAA controls access — authentication is the first line of defense
- Threat modeling helps understand attacker perspectives
- Kill Chain and ATT&CK provide structured attack frameworks
- Defense in Depth means multiple layers — test each one
- Network security is the battlefield — know firewalls, IDS/IPS, segmentation
- Cryptography protects data — know how to break and bypass it
- Attack types vary widely — know the full spectrum
- Frameworks provide structure — use them for reporting
- Ethics and legality are non-negotiable — always have authorization
- Methodology ensures thoroughness — follow a structured approach
- OWASP Top 10 covers web risks — essential for web assessments
- Red/Blue/Purple teams work together — understand all perspectives
- SOC operations detect attacks — know what you might trigger
“The best way to learn defense is to understand offense. The best way to learn offense is to understand defense.”
End of Chapter 01: Introduction to CyberSecurity
Next: Chapter 02 — Linux Fundamentals for Penetration Testing