A comprehensive learning path covering cybersecurity from foundational concepts to advanced offensive and defensive techniques. Designed for software engineers, cloud practitioners, and anyone building or defending systems.

Prerequisites#

  • Basic networking knowledge (TCP/IP, DNS, HTTP)
  • Familiarity with Linux command line
  • Understanding of web applications and APIs
  • Basic programming ability (Python recommended)

Learning Path#

#TopicFileDescription
1Threat Landscape & Attacker Mindset01-threat-landscape.mdThreat actors, kill chain, MITRE ATT&CK
2Cryptography02-cryptography.mdSymmetric, asymmetric, hashing, PKI, TLS
3Network Security03-network-security.mdFirewalls, IDS/IPS, segmentation, zero trust
4Web Application Security04-web-application-security.mdOWASP Top 10, injection, XSS, CSRF, SSRF
5Identity & Access Management05-identity-access-management.mdOAuth, SAML, RBAC/ABAC, PAM, federation
6Operating System Security06-operating-system-security.mdHardening, patching, logging, endpoint protection
7Cloud Security07-cloud-security.mdShared responsibility, IAM, CSPM, misconfigurations
8Vulnerability Management08-vulnerability-management.mdScanning, CVE/CVSS, prioritization, remediation
9Security Operations & Incident Response09-security-operations.mdSOC, SIEM, IR lifecycle, forensics
10Secure Software Development10-secure-development.mdSSDLC, SAST/DAST, supply chain, threat modeling
11Compliance & Governance11-compliance-governance.mdISO 27001, NIST, SOC 2, risk management
12Offensive Security12-offensive-security.mdPenetration testing, red team, bug bounty

1. Threat Landscape & Attacker Mindset#

Understanding who attacks systems, why, and how is the foundation of all security work. Defenders must think like attackers to build effective controls.

Threat Actors#

ActorMotivationSophisticationExamples
Script KiddiesFun, notorietyLowUsing pre-built exploit tools
HacktivistsPolitical/social causeLow–MediumAnonymous, DDoS campaigns
CybercriminalsFinancial gainMedium–HighRansomware gangs, card fraud
InsidersRevenge, money, negligenceVariesDisgruntled employees
Nation-States (APT)Espionage, sabotageVery HighAPT28, APT29, Lazarus Group
CompetitorsBusiness advantageMediumCorporate espionage

Cyber Kill Chain (Lockheed Martin)#

flowchart LR
    R["1: Reconnaissance"] --> W["2: Weaponization"]
    W --> D["3: Delivery"]
    D --> E["4: Exploitation"]
    E --> I["5: Installation"]
    I --> C["6: Command & Control"]
    C --> A["7: Actions on Objectives"]

Each phase is a detection opportunity — the earlier you break the chain, the less damage occurs.

MITRE ATT&CK Framework#

A knowledge base of adversary tactics and techniques based on real-world observations:

TacticQuestionExample Techniques
ReconnaissanceHow do they gather info?Scanning, OSINT, phishing for info
Initial AccessHow do they get in?Phishing, exploit public-facing app
ExecutionHow do they run code?PowerShell, scripting, user execution
PersistenceHow do they stay?Registry keys, scheduled tasks, implants
Privilege EscalationHow do they get more power?Exploit vulnerability, token manipulation
Defense EvasionHow do they hide?Obfuscation, disabling logging
Credential AccessHow do they steal creds?Keylogging, credential dumping
Lateral MovementHow do they spread?RDP, SMB, pass-the-hash
ExfiltrationHow do they steal data?Encrypted channels, cloud storage
ImpactWhat damage do they cause?Encryption (ransomware), data destruction

Attack Surface#

Everything exposed to potential attackers:

  • External: Public IPs, domains, APIs, web apps, email
  • Internal: Employee workstations, internal services, databases
  • Human: Phishing susceptibility, social engineering
  • Supply chain: Third-party libraries, SaaS providers, contractors

2. Cryptography#

Cryptography provides confidentiality, integrity, and authentication — the mathematical foundation of all security.

Symmetric Encryption#

Same key encrypts and decrypts. Fast, used for bulk data.

AlgorithmKey SizeStatusUse Case
AES-256256 bitsStandardDisk encryption, TLS data
ChaCha20256 bitsModernMobile, TLS alternative
3DES168 bitsDeprecatedLegacy systems only

Asymmetric Encryption#

Key pair: public key encrypts, private key decrypts. Slow, used for key exchange and signatures.

AlgorithmKey SizeUse Case
RSA2048–4096 bitsKey exchange, signatures
ECDSA256–384 bitsTLS certificates, SSH
Ed25519256 bitsSSH keys, modern signatures

Hashing#

One-way function — cannot be reversed. Used for integrity and password storage.

AlgorithmOutputUse Case
SHA-256256 bitsFile integrity, certificates
SHA-3VariableModern alternative to SHA-2
bcrypt184 bitsPassword hashing (with salt + cost)
Argon2VariablePassword hashing (memory-hard)

How TLS Uses All Three#

sequenceDiagram
    participant C as Client
    participant S as Server
    
    Note over C,S: Asymmetric (key exchange)
    C->>S: ClientHello + supported ciphers
    S->>C: ServerHello + certificate (public key)
    C->>S: Pre-master secret (encrypted with server's public key)
    Note over C,S: Both derive symmetric session key
    
    Note over C,S: Symmetric (bulk data)
    C->>S: Application data (AES-encrypted)
    S->>C: Response (AES-encrypted)
    
    Note over C,S: Hashing (integrity)
    Note over C: HMAC on every message ensures no tampering

Public Key Infrastructure (PKI)#

Chain of trust for certificates:

Root CA (self-signed, offline)
  └── Intermediate CA (signs server certs)
        └── Server Certificate (your-domain.com)
ComponentRole
Certificate Authority (CA)Issues and signs certificates
CertificateBinds public key to identity
CRL / OCSPRevocation checking
Certificate TransparencyPublic log of all issued certs

3. Network Security#

Protecting data in transit and controlling what can communicate with what.

Defense in Depth#

flowchart TD
    Internet["Internet"] --> FW["Firewall / WAF"]
    FW --> DMZ["DMZ (public-facing)"]
    DMZ --> IFW["Internal Firewall"]
    IFW --> App["Application Tier"]
    App --> DB["Database Tier"]
    
    style Internet fill:#ff6b6b
    style DB fill:#51cf66

Firewalls#

TypeLayerInspectsUse Case
Packet FilterL3–L4IP, port, protocolBasic perimeter
StatefulL3–L4Connection stateStandard perimeter
Application (WAF)L7HTTP content, headersWeb app protection
Next-Gen (NGFW)L3–L7All + threat intelligenceEnterprise perimeter

Network Segmentation#

Divide the network into zones to limit blast radius:

ZoneContainsAccess
DMZWeb servers, load balancersInternet → DMZ allowed
ApplicationApp servers, APIsDMZ → App allowed
DataDatabases, storageApp → Data allowed
ManagementAdmin tools, CI/CDRestricted access

Zero Trust Architecture#

“Never trust, always verify” — no implicit trust based on network location.

PrincipleImplementation
Verify explicitlyAuthenticate every request (mTLS, tokens)
Least privilegeJust-in-time, just-enough access
Assume breachMicro-segmentation, encrypt everything

IDS/IPS#

SystemFunctionAction
IDS (Intrusion Detection)Monitors and alertsPassive — alerts only
IPS (Intrusion Prevention)Monitors and blocksActive — drops malicious traffic

Detection methods: signature-based (known patterns), anomaly-based (deviations from baseline), behavior-based (suspicious sequences).


4. Web Application Security#

Web apps are the most common attack surface. The OWASP Top 10 defines the most critical risks.

OWASP Top 10 (2021)#

#RiskDescription
A01Broken Access ControlUsers act outside intended permissions
A02Cryptographic FailuresSensitive data exposed (weak crypto, plaintext)
A03InjectionUntrusted data sent to interpreter (SQL, OS, LDAP)
A04Insecure DesignMissing security controls in architecture
A05Security MisconfigurationDefault configs, open cloud storage, verbose errors
A06Vulnerable ComponentsUsing libraries with known vulnerabilities
A07Auth & Identification FailuresBroken authentication, session management
A08Software & Data Integrity FailuresUntrusted updates, insecure CI/CD, deserialization
A09Security Logging & Monitoring FailuresInsufficient logging, no alerting
A10Server-Side Request Forgery (SSRF)Server makes requests to unintended locations

SQL Injection#

User input:  ' OR 1=1 --
Query becomes: SELECT * FROM users WHERE name='' OR 1=1 --'
Result: Returns ALL users

Prevention: Parameterized queries (prepared statements), never string concatenation.

Cross-Site Scripting (XSS)#

TypeVectorPersistence
ReflectedURL parameter → responseNone (one-time)
StoredDatabase → rendered pagePersistent
DOM-basedClient-side JS manipulationNone

Prevention: Output encoding, Content Security Policy (CSP), input validation.

Cross-Site Request Forgery (CSRF)#

Tricks authenticated user into making unintended requests:

sequenceDiagram
    participant V as Victim (logged in)
    participant E as Evil Site
    participant B as Bank
    
    V->>E: Visits evil site
    E->>V: Hidden form auto-submits
    V->>B: POST /transfer (with victim's cookies)
    B->>B: Transfers money (request looks legitimate)

Prevention: CSRF tokens, SameSite cookies, checking Origin/Referer headers.

Server-Side Request Forgery (SSRF)#

Attacker makes the server fetch internal resources:

Input: url=http://169.254.169.254/latest/meta-data/iam/security-credentials/
Result: Server fetches AWS credentials from metadata service

Prevention: Allowlist URLs, block internal IP ranges, use IMDSv2 (requires token).


5. Identity & Access Management#

Controlling who can access what, and proving they are who they claim to be.

Authentication Protocols#

ProtocolTypeUse Case
SAML 2.0XML-based SSOEnterprise SSO (legacy)
OAuth 2.0Authorization delegationAPI access, third-party apps
OpenID ConnectAuth layer on OAuthModern SSO, web/mobile
FIDO2/WebAuthnPasswordlessHardware keys, biometrics
KerberosTicket-basedActive Directory, on-prem

OAuth 2.0 Flows#

FlowClient TypeUse Case
Authorization Code + PKCEPublic (SPA, mobile)Standard for all modern apps
Client CredentialsConfidential (server)Machine-to-machine
Device CodeInput-limited devicesSmart TVs, CLI tools

Privileged Access Management (PAM)#

Controls for high-privilege accounts:

  • Just-in-time access — elevate only when needed, auto-revoke
  • Session recording — audit trail of admin actions
  • Credential vaulting — secrets stored centrally, rotated automatically
  • Break-glass procedures — emergency access with full audit

Federation#

Trust relationships between identity providers:

flowchart LR
    User["User"] --> IdP["Identity Provider<br/>(Okta, Azure AD)"]
    IdP --> SP1["Service Provider 1"]
    IdP --> SP2["Service Provider 2"]
    IdP --> SP3["Service Provider 3"]

One login, access to many services — reduces password fatigue and attack surface.


6. Operating System Security#

The OS is the foundation — if compromised, everything above it is compromised.

Hardening Principles#

PrincipleActions
Minimize attack surfaceRemove unused packages, disable services
Least privilegeNon-root users, sudo with constraints
Patch managementAutomated updates, vulnerability scanning
Secure defaultsDisable root SSH, enforce strong passwords
Audit and logEnable auditd, ship logs to SIEM

Linux Security Mechanisms#

MechanismPurpose
File permissions (rwx)Basic access control
SELinux / AppArmorMandatory Access Control (MAC)
iptables / nftablesHost-based firewall
cgroups / namespacesProcess isolation (containers)
seccompRestrict system calls
auditdKernel-level audit logging

Endpoint Detection and Response (EDR)#

Modern endpoint protection beyond traditional antivirus:

CapabilityDescription
Behavioral analysisDetect suspicious process behavior
Threat huntingProactive search for indicators
Automated responseIsolate host, kill process
Forensic dataFull timeline for investigation

Patch Management Lifecycle#

flowchart LR
    Discover["Discover<br/>Vulnerability"] --> Assess["Assess<br/>Risk"]
    Assess --> Test["Test<br/>Patch"]
    Test --> Deploy["Deploy<br/>(staged)"]
    Deploy --> Verify["Verify<br/>& Monitor"]

7. Cloud Security#

Cloud introduces new attack vectors and a fundamentally different security model.

Shared Responsibility Model#

LayerIaaS (you manage)PaaS (provider manages)SaaS (provider manages)
Data✓ You✓ You✓ You
Application✓ You✓ YouProvider
Runtime/OS✓ YouProviderProvider
NetworkSharedProviderProvider
PhysicalProviderProviderProvider

Common Cloud Misconfigurations#

MisconfigurationRiskPrevention
Public S3 bucketsData exposureBlock public access by default
Overly permissive IAMPrivilege escalationLeast privilege, access analyzer
Unencrypted storageData breachEnforce encryption policies
Open security groupsUnauthorized accessNo 0.0.0.0/0 ingress
Missing loggingNo visibilityEnable CloudTrail, flow logs
Exposed secretsAccount takeoverUse secrets manager, scan commits

Cloud Security Posture Management (CSPM)#

Automated tools that continuously scan cloud environments for misconfigurations:

  • AWS: Security Hub, Config Rules, Access Analyzer
  • Multi-cloud: Prisma Cloud, Wiz, Orca, Lacework
  • IaC scanning: Checkov, tfsec, KICS (shift-left)

Container Security#

LayerThreatsControls
ImageVulnerable base images, malwareScan images, use minimal bases (distroless)
RegistryTampered imagesSign images, private registry
RuntimeContainer escape, privilege escalationRead-only FS, no root, seccomp
OrchestrationMisconfigured RBAC, exposed APINetwork policies, pod security standards

8. Vulnerability Management#

The systematic process of finding, assessing, and fixing security weaknesses.

CVE and CVSS#

TermMeaning
CVECommon Vulnerabilities and Exposures — unique ID (CVE-2024-1234)
CWECommon Weakness Enumeration — vulnerability category (CWE-89: SQL Injection)
CVSSCommon Vulnerability Scoring System — severity 0.0–10.0

CVSS Severity Ratings#

ScoreRatingTypical Response
0.0NoneInformational
0.1–3.9LowFix in normal cycle
4.0–6.9MediumFix within 30 days
7.0–8.9HighFix within 7 days
9.0–10.0CriticalFix immediately (24–48h)

Vulnerability Lifecycle#

flowchart LR
    Discover["Discover"] --> Assess["Assess<br/>(CVSS + context)"]
    Assess --> Prioritize["Prioritize<br/>(exploitability, exposure)"]
    Prioritize --> Remediate["Remediate<br/>(patch, mitigate, accept)"]
    Remediate --> Verify["Verify<br/>(rescan)"]
    Verify --> Report["Report<br/>(metrics, trends)"]

Scanning Types#

TypeWhat It ScansWhen
SASTSource codeDuring development
DASTRunning applicationIn staging/test
SCADependencies (libraries)CI/CD pipeline
InfrastructureOS, network, cloud configContinuous
ContainerDocker imagesBuild + registry

9. Security Operations & Incident Response#

Detecting, responding to, and recovering from security incidents.

Security Operations Center (SOC)#

TierRoleResponsibility
Tier 1Alert AnalystTriage alerts, initial classification
Tier 2Incident ResponderDeep investigation, containment
Tier 3Threat HunterProactive hunting, advanced analysis
EngineeringDetection EngineerBuild rules, tune alerts, automate

SIEM (Security Information and Event Management)#

Aggregates logs from all sources, correlates events, triggers alerts:

flowchart LR
    FW["Firewall Logs"] --> SIEM["SIEM"]
    EP["Endpoint Logs"] --> SIEM
    Cloud["Cloud Logs"] --> SIEM
    App["Application Logs"] --> SIEM
    SIEM --> Alert["Alerts"]
    SIEM --> Dash["Dashboards"]
    SIEM --> Hunt["Threat Hunting"]

Incident Response Lifecycle (NIST SP 800-61)#

PhaseActivities
1. PreparationPlaybooks, tools, training, communication plans
2. Detection & AnalysisAlert triage, scope assessment, evidence collection
3. ContainmentIsolate affected systems, prevent spread
4. EradicationRemove threat, patch vulnerability
5. RecoveryRestore services, verify clean state
6. Post-IncidentLessons learned, improve defenses

Incident Severity#

SeverityDefinitionResponse Time
SEV-1 (Critical)Active breach, data exfiltrationImmediate (all hands)
SEV-2 (High)Confirmed compromise, containedWithin 1 hour
SEV-3 (Medium)Suspicious activity, unconfirmedWithin 4 hours
SEV-4 (Low)Policy violation, minor anomalyNext business day

10. Secure Software Development#

Building security into the development process rather than bolting it on after.

Secure SDLC#

flowchart LR
    Req["Requirements<br/>· Threat Model"] --> Design["Secure Design<br/>· Architecture Review"]
    Design --> Code["Secure Coding<br/>· SAST"]
    Code --> Test["Security Testing<br/>· DAST/Pentest"]
    Test --> Deploy["Secure Deploy<br/>· Config Review"]
    Deploy --> Operate["Monitor<br/>· Respond"]

Threat Modeling (STRIDE)#

ThreatDefinitionExample
SpoofingPretending to be someone elseForged authentication token
TamperingModifying data or codeMan-in-the-middle attack
RepudiationDenying an actionNo audit log of deletion
Information DisclosureExposing dataError messages with stack traces
Denial of ServiceMaking system unavailableResource exhaustion
Elevation of PrivilegeGaining unauthorized accessExploiting admin endpoint

Supply Chain Security#

RiskMitigation
Compromised dependencyLock versions, verify checksums, use SCA
TyposquattingVerify package names, use private registries
Compromised build pipelineSign artifacts, protect CI/CD secrets
Malicious maintainerMonitor dependency changes, use SBOM

Security Testing in CI/CD#

Commit → SAST (code) → SCA (dependencies) → Build → DAST (running app) → Deploy
         ↓                ↓                           ↓
    Block on critical   Alert on high          Block on critical

11. Compliance & Governance#

Frameworks and processes that ensure security is managed systematically.

Major Frameworks#

FrameworkScopeType
ISO 27001Information security managementCertifiable standard
NIST CSFCybersecurity risk managementVoluntary framework
SOC 2Service organization controlsAudit report
PCI DSSPayment card dataMandatory (if processing cards)
GDPRPersonal data (EU)Regulation (law)
HIPAAHealth information (US)Regulation (law)
NIS2Critical infrastructure (EU)Directive (law)

Risk Management#

flowchart LR
    Identify["Identify<br/>Risks"] --> Assess["Assess<br/>(likelihood × impact)"]
    Assess --> Treat["Treat<br/>(mitigate, accept, transfer, avoid)"]
    Treat --> Monitor["Monitor<br/>& Review"]
    Monitor --> Identify

Risk Treatment Options#

OptionWhenExample
MitigateReduce likelihood or impactImplement MFA
AcceptCost of fix > riskLow-severity, no sensitive data
TransferShare risk with third partyCyber insurance
AvoidEliminate the activityDon’t store data you don’t need

Security Controls#

CategoryExamples
PreventiveFirewalls, encryption, access controls
DetectiveSIEM, IDS, log monitoring
CorrectiveIncident response, patching, backups
DeterrentSecurity policies, legal warnings
CompensatingAlternative control when primary isn’t feasible

12. Offensive Security#

Understanding attacks to build better defenses. Ethical hacking with authorization.

Penetration Testing Methodology#

flowchart LR
    Scope["1: Scope &<br/>Rules of Engagement"] --> Recon["2: Reconnaissance"]
    Recon --> Enum["3: Enumeration"]
    Enum --> Exploit["4: Exploitation"]
    Exploit --> Post["5: Post-Exploitation"]
    Post --> Report["6: Reporting"]

Testing Types#

TypeKnowledgeSimulates
Black BoxNo internal infoExternal attacker
Grey BoxPartial info (credentials, docs)Insider or compromised account
White BoxFull access (source code, architecture)Comprehensive audit

Red Team vs Penetration Test#

AspectPentestRed Team
GoalFind vulnerabilitiesTest detection & response
ScopeDefined targetsFull organization
DurationDays–weeksWeeks–months
StealthNot requiredEssential
OutputVulnerability listNarrative of attack path

Common Tools#

CategoryTools
ReconnaissanceNmap, Shodan, theHarvester, Amass
Web TestingBurp Suite, OWASP ZAP, sqlmap
ExploitationMetasploit, Cobalt Strike
PasswordHashcat, John the Ripper, Hydra
Post-ExploitationBloodHound, Mimikatz, LinPEAS
WirelessAircrack-ng, Kismet

Responsible Disclosure#

ApproachProcess
Bug BountyReport to program, receive reward
Coordinated DisclosureReport to vendor, wait for fix (90 days), then publish
Full DisclosurePublish immediately (controversial, last resort)

Key Takeaways#

  1. Defense in depth — no single control is sufficient; layer multiple defenses
  2. Think like an attacker — understand the kill chain to break it early
  3. Shift left — integrate security into development, not after deployment
  4. Least privilege everywhere — users, services, network, cloud
  5. Assume breach — design systems that limit damage when (not if) compromised
  6. Automate — manual security doesn’t scale; use SAST, DAST, CSPM, SIEM
  7. Compliance ≠ security — frameworks provide structure, but real security requires continuous effort
  8. People are the weakest link — training, awareness, and culture matter as much as technology