CompTIA Security+ SY0-701
Ultimate Cheat Sheet
Everything you need in one page — ports, attacks, crypto, acronyms, formulas, and memory aids. Print it, bookmark it, master it.
Domain Weights & Focus Areas
General Security Concepts
CIA Triad, AAA, PKI, Zero Trust, Crypto basics
Threats, Vulns & Mitigations
Malware, Phishing, Injection, Social Engineering, IoCs
Security Architecture
Cloud, DMZ, VPN, Firewall, SDN, Zero Trust design
Security Operations
SIEM, IR, Forensics, IAM, PAM, Vuln Mgmt, EDR
Security Program Mgmt
Risk, BIA, BCP, GDPR, HIPAA, PCI-DSS, Compliance
Domain Strategy
Critical Ports & Protocols
Common Services
File Transfer — 21=control, 20=data (insecure)
Secure remote shell, secure file transfer
Unencrypted remote shell (AVOID — use SSH)
Outbound email sending
Domain name resolution (UDP usually, TCP for zone transfers)
IP address assignment (server/client)
Trivial FTP — UDP, no auth (used in PXE boot, network devices)
Unencrypted web traffic (replace with HTTPS)
Email retrieval (insecure — use 995 POP3S)
Network news transfer
Network Time Protocol — critical for log accuracy & Kerberos
Windows remote procedure calls
Windows file/printer sharing (legacy)
Email retrieval (insecure — use 993 IMAPS)
Secure & Encrypted
Directory services (insecure — use 636 LDAPS)
Encrypted web traffic (TLS)
Windows file sharing — common attack vector (EternalBlue)
Secure email sending (587=STARTTLS preferred)
Log forwarding (UDP — use 6514 for TLS syslog)
Encrypted LDAP — use instead of 389
Encrypted email retrieval
Encrypted POP3
Microsoft SQL Server
Oracle database
VPN (outdated — use IKEv2/OpenVPN/WireGuard)
MySQL database server
Remote Desktop Protocol — high-value attack target
VoIP signaling (5060=UDP/TCP, 5061=TLS)
Security & Management
Network device management (v3 = encrypted)
Notifications from devices to manager
Active Directory queries
VPN key exchange
Log aggregation
VPN (UDP/TCP)
VPN tunneling (use with IPSec)
IPSec through NAT
Web proxy, alternate HTTP
Alternate HTTPS
Modern VPN protocol
Remember for Exam
Attack Types & Defenses
| Attack | What It Does | Key Detail | Defense |
|---|---|---|---|
| Phishing | Fraudulent emails to steal creds or deliver malware | Spear=targeted, Whaling=executives, Vishing=voice, Smishing=SMS | Email filtering, MFA, Security awareness training |
| SQL Injection | Malicious SQL in input fields manipulates DB | UNION, blind, time-based variations | Parameterized queries, WAF, input validation |
| XSS | Injects scripts into web pages viewed by others | Stored (DB), Reflected (URL), DOM-based | Input sanitization, CSP, output encoding |
| CSRF | Forces user to submit unintended requests | Exploits authenticated session | Anti-CSRF tokens, SameSite cookies |
| Buffer Overflow | Writes past buffer boundary to execute code | Stack/heap overflow, DEP bypass | Input validation, ASLR, DEP/NX bit, safe languages |
| Man-in-the-Middle | Intercepts communication between two parties | ARP spoofing, SSL stripping, DNS poisoning | TLS/HTTPS, certificate pinning, HSTS |
| DoS / DDoS | Overwhelms system to deny service | Volumetric, Protocol, App-layer, Amplification | Rate limiting, CDN, DDoS scrubbing, anycast |
| Ransomware | Encrypts files and demands payment | Double extortion: encrypt + exfiltrate | Backups (3-2-1), email filtering, patching, EDR |
| Supply Chain | Compromises software/hardware before delivery | SolarWinds attack (malicious update) | Vendor vetting, code signing, SBOM |
| Watering Hole | Compromises sites targets visit | Drive-by download delivery | Web filtering, browser hardening, threat intel |
| Password Spraying | Few common passwords against many accounts | Avoids account lockout policies | MFA, unusual login alerting, lockout policies |
| Credential Stuffing | Breached creds used on other services | Exploits password reuse | MFA, password managers, breach monitoring |
| Brute Force | Tries all password combinations systematically | Slow — use rainbow tables or wordlists | Account lockout, MFA, long complex passwords |
| Rainbow Table | Precomputed hash lookup to crack passwords | Eliminated by salting | Salt passwords before hashing |
| Replay Attack | Captures and retransmits valid authentication | Session token reuse | Timestamps, nonces, TLS session tokens |
| Kerberoasting | Requests Kerberos tickets to crack offline | Targets service accounts with SPNs | Long random service account passwords, AES encryption |
| Pass the Hash | Uses captured NTLM hash without cracking | Windows lateral movement technique | Credential Guard, privileged account hygiene |
| Social Engineering | Manipulates humans into revealing info | Pretexting, baiting, quid pro quo, tailgating | Security awareness training, verification procedures |
| Zero-Day | Exploits unknown/unpatched vulnerability | No patch exists yet | Defense-in-depth, behavior analytics, network segmentation |
| Fileless Malware | Runs in memory, leaves no disk artifacts | Uses PowerShell, WMI, or LOLBins | EDR, memory scanning, script block logging |
| Rootkit | Hides deep in OS or bootloader | Kernel-mode hardest to detect | Secure Boot, trusted boot, OS reinstall |
| Drive-By Download | Malware downloaded by just visiting a site | No user action required beyond browsing | Browser patching, content filtering, NoScript |
| Vishing | Voice phishing calls impersonating trusted orgs | Often targets call center staff or employees | Verification callbacks, training, caller ID validation |
| Smishing | SMS phishing messages with malicious links | Targets mobile users | User training, mobile security policies |
| Spear Phishing | Targeted phishing using personal info about victim | Research done via OSINT beforehand | Training, DMARC/SPF/DKIM, email authentication |
Cryptography Quick Reference
Algorithms at a Glance
| Algorithm | Type | Key/Size | Use Case |
|---|---|---|---|
| AES | Symmetric | 128/192/256-bit | Block encryption (gold standard) |
| 3DES | Symmetric | 112/168-bit | Legacy block cipher (deprecated) |
| ChaCha20 | Symmetric | 256-bit | Mobile/IoT encryption, TLS 1.3 |
| RSA | Asymmetric | 2048-4096-bit | Key exchange, digital signatures |
| ECC/ECDSA | Asymmetric | 256-bit ≈ RSA 3072 | Smaller key, same strength |
| DH/DHE | Asymmetric | 2048+ bit | Key exchange (PFS with DHE) |
| ECDHE | Asymmetric | 256-bit | PFS key exchange (TLS 1.3) |
| SHA-256/512 | Hash | 256/512-bit output | Integrity verification |
| SHA-3 | Hash | Variable | Newest NIST hash standard |
| MD5 | Hash | 128-bit | BROKEN — do not use for security |
| HMAC | Hash+Key | Variable | Message authentication + integrity |
| bcrypt | KDF | Variable | Password hashing (slow by design) |
| PBKDF2 | KDF | Variable | Key stretching (NIST recommended) |
| scrypt | KDF | Variable | Memory-hard password hashing |
PKI Trust Chain
- →CRL = revocation list (periodic download)
- →OCSP = real-time revocation check
- →OCSP Stapling = cert proves its own validity
- →Certificate Pinning = hardcoded cert in app
- →Wildcard cert = *.example.com (one level only)
- →SAN cert = multiple domains in one cert
Block Cipher Modes
AVOID — identical blocks produce identical ciphertext
Each block XOR with previous — good but IV matters
Turns block cipher into stream cipher, parallelizable
Authenticated encryption — preferred in TLS 1.3
Used in WPA3, IoT (IEEE 802.11)
Key Crypto Concepts
Incident Response & Forensics
IR Lifecycle (NIST SP 800-61)
Order of Volatility (most → least volatile)
Key Forensics Concepts
- →Chain of Custody: Document every handler, transfer, and action on evidence
- →Legal Hold: Stop destroying records when litigation is anticipated
- →Write Blocker: Hardware device preventing writes during forensic imaging
- →Disk Image: Bit-for-bit copy — always hash (MD5/SHA) before AND after
- →Locard's Principle: Every contact leaves a trace — digital evidence too
- →Containment types: Segmentation (network), Isolation (host), Removal (asset)
- →FIRST action in breach: Contain THEN eradicate — never eradicate first (destroys evidence)