Complete Study Guide β Paper Exam Prep
β οΈ Priority topics: Cyber Attacks Β· Cryptography Β· VPN Β· ACL Β· Firewalls Β· Labs
Use this guide to replace opening PowerPoints manually. Each chapter has full notes, tables, examples, and embedded questions. The Flashcards and Quiz sections provide active recall practice.
| Chapter | Key Topics | Priority |
|---|---|---|
| 1 β Network Security Concepts | CIA Triad, threats, malware, IDS/IPS, social engineering | Medium |
| 2 β Firewall Technologies | Packet filter, stateful, NGFW, DMZ, Cisco ASA, security levels | High |
| 3 β Cryptography | Symmetric, Asymmetric, Hashing, PKI, TLS, Digital Signatures | High |
| 4 β VPN | IPsec, AH, ESP, IKE phases, SSL VPN, GRE, tunnel vs transport | High |
| 5 β ACL | Standard, Extended, Named, wildcard masks, placement rules | High |
| 6 β Cyber Attacks | DoS/DDoS, SYN Flood, MITM, ARP, phishing, SQL injection, kill chain | High |
| Labs | Nmap, Deauth, hping3 SYN flood, rockyou, Wifite | High |
The three foundational security principles every control must address:
| Pillar | Definition | Attack Example | Control Example |
|---|---|---|---|
| Confidentiality | Only authorized parties can read data | Eavesdropping, sniffing | Encryption, ACLs, VPNs |
| Integrity | Data is not altered without authorization | MITM tampering, hash collision | Hashing (SHA-256), digital signatures |
| Availability | Systems/data accessible when needed | DoS/DDoS, ransomware | Redundancy, backups, rate limiting |
| Term | Definition |
|---|---|
| Threat | Potential cause of an unwanted event (e.g., an attacker) |
| Vulnerability | Weakness that can be exploited |
| Exploit | Code or technique that takes advantage of a vulnerability |
| Risk | Likelihood Γ Impact of a threat materializing |
| Attack surface | All possible entry points for an attacker |
| Zero-day | Unknown vulnerability with no available patch |
| CVE | Common Vulnerabilities and Exposures β public database of known vulnerabilities |
| Type | Motivation | Skill Level |
|---|---|---|
| Script Kiddie | Curiosity / bragging rights | Low (uses existing tools) |
| Hacktivist | Political / ideological | Medium |
| Cybercriminal | Financial gain | MediumβHigh |
| Nation-state / APT | Espionage, sabotage | Very High |
| Insider Threat | Disgruntled employee / accidental | Variable |
| Type | Behavior | Example |
|---|---|---|
| Virus | Attaches to host file, spreads when file executes | ILOVEYOU |
| Worm | Self-replicates across network without host file | WannaCry, Morris |
| Trojan | Looks legitimate, hides malicious payload | Remote-access Trojans |
| Ransomware | Encrypts data, demands payment for decryption key | CryptoLocker, NotPetya |
| Rootkit | Hides itself/other malware at OS or firmware level | Sony BMG rootkit |
| Spyware | Silently monitors/steals user data | Pegasus, keyloggers |
| Adware | Displays unwanted ads, may redirect browser | β |
| Botnet/Bot | Compromised host controlled by C2 server for attacks | Mirai (IoT botnet) |
| Logic Bomb | Dormant until trigger condition (date, event) | β |
| Feature | IDS (Intrusion Detection System) | IPS (Intrusion Prevention System) |
|---|---|---|
| Position | Out-of-band (passive tap) | Inline (in traffic path) |
| Action on alert | Logs and alerts only | Drops/blocks malicious traffic |
| Impact on traffic | None (no blocking) | Adds latency; can block legitimate traffic (false positive) |
| Failure mode | Fail-open (traffic continues) | Fail-open or fail-closed (configurable) |
Layered security strategy β no single control is sufficient. Layers include:
A firewall is a network security device that monitors and controls incoming/outgoing traffic based on predefined security rules. It establishes a barrier between trusted internal networks and untrusted external networks.
| Type | OSI Layer | How it works | Pros | Cons |
|---|---|---|---|---|
| Packet Filtering (1st gen) | 3β4 | Inspects each packet in isolation: src/dst IP, port, protocol | Fast, simple, low overhead | No state tracking, easily spoofed, no application awareness |
| Stateful Inspection (2nd gen) | 3β4 | Tracks TCP/UDP connection state table; allows return traffic for established sessions | Better than packet filter; tracks state | No application awareness; can't inspect encrypted payloads |
| Application Layer / Proxy (3rd gen) | 7 | Acts as proxy; deep packet inspection of application data (HTTP, FTP, DNS) | Can block malicious payloads; URL filtering | Slow, complex, must decode each protocol |
| NGFW (Next-Gen) | 2β7 | Stateful + DPI + Application ID + IPS + SSL inspection + user identity + URL filtering | Comprehensive visibility and control | Expensive, high CPU, complex config |
The firewall maintains a state table (connection tracking table). For each TCP connection:
Example State Table Entry:
Src: 192.168.1.10:54321 Dst: 8.8.8.8:80 Proto: TCP State: ESTABLISHED
A DMZ is a separate network segment that sits between the external (Internet-facing) and internal networks, hosting public-facing services like web servers, mail servers, and DNS servers.
Internet ββββ [Firewall Outside] ββββ DMZ (Web/Mail/DNS) ββββ [Firewall Inside] ββββ Internal LAN
ASA assigns a security level (0β100) to each interface:
| Level | Interface Name | Trust | Default behavior |
|---|---|---|---|
| 100 | Inside | Most trusted | Traffic flows out freely |
| 0 | Outside | Least trusted | Traffic blocked inbound by default |
| 1β99 | DMZ (custom) | Intermediate | Depends on level difference |
! Enter privileged exec mode
enable
! Enter global configuration mode
configure terminal
! Configure interface
interface GigabitEthernet0/0
nameif outside
security-level 0
ip address 203.0.113.1 255.255.255.0
no shutdown
interface GigabitEthernet0/1
nameif inside
security-level 100
ip address 192.168.1.1 255.255.255.0
no shutdown
interface GigabitEthernet0/2
nameif dmz
security-level 50
ip address 172.16.1.1 255.255.255.0
no shutdown
! NAT β inside to outside
nat (inside,outside) dynamic interface
! Access list β permit HTTP from outside to DMZ web server
access-list OUTSIDE_IN permit tcp any host 172.16.1.10 eq 80
access-group OUTSIDE_IN in interface outside
! Show commands
show interface
show running-config
show access-list
show conn (connection table)
| NAT Type | Description | Use Case |
|---|---|---|
| Dynamic NAT | One-to-one mapping from pool | Multiple internals β multiple public IPs |
| Dynamic PAT (overload) | Many-to-one, different port numbers | Most common; home routers |
| Static NAT | Fixed one-to-one mapping | Servers accessible from outside (DMZ) |
| Identity NAT | No address translation | VPN traffic (bypass NAT for IPsec) |
| Mode | Layer | Has IP? | Best for |
|---|---|---|---|
| Routed mode | 3 (default) | Yes β each interface has IP | Standard deployment, can route between subnets |
| Transparent mode | 2 (bridge) | No (uses management IP only) | Drop-in between existing segments without re-IP |
| Term | Definition |
|---|---|
| Plaintext | Original readable data |
| Ciphertext | Encrypted unreadable data |
| Encryption | Converting plaintext β ciphertext using a key and algorithm |
| Decryption | Converting ciphertext β plaintext using a key and algorithm |
| Key | Secret value that controls the encryption/decryption process |
| Algorithm (Cipher) | Mathematical function for encryption |
Same key used for encryption and decryption. Fast, used for bulk data.
The key must be securely shared before communication begins. With N parties, you need N(N-1)/2 keys.
| Algorithm | Key Size | Block Size | Status | Notes |
|---|---|---|---|---|
| DES | 56-bit effective | 64-bit | β Broken | Vulnerable to brute force (exhausted in <24h) |
| 3DES (Triple DES) | 112 or 168-bit | 64-bit | β οΈ Deprecated | Apply DES three times: E-D-E with 3 keys |
| AES | 128, 192, 256-bit | 128-bit | β Current standard | Adopted by NIST 2001; used in WPA2, TLS, IPsec |
| RC4 | Variable (40β2048 bit) | Stream cipher | β Broken | Used in WEP, SSL (both broken) |
| Blowfish | 32β448-bit | 64-bit | β οΈ Older | Fast, public domain |
| Mode | Name | Notes |
|---|---|---|
| ECB | Electronic Codebook | Same block β same ciphertext; DO NOT USE for images/structured data |
| CBC | Cipher Block Chaining | Each block XOR'd with previous ciphertext; needs IV. Most common. |
| CTR | Counter Mode | Turns block cipher into stream cipher; parallelizable |
| GCM | Galois/Counter Mode | Authenticated encryption (confidentiality + integrity); used in TLS 1.3 |
Uses a mathematically linked key pair: public key (share freely) + private key (keep secret).
| Algorithm | Key Size | Based On | Use Case |
|---|---|---|---|
| RSA | 2048β4096 bit | Factoring large primes | Key exchange, digital signatures, PKI |
| Diffie-Hellman (DH) | 2048+ bit | Discrete logarithm | Key exchange only (no encryption/signing directly); IKE Phase 1 |
| ECC (Elliptic Curve) | 256β521 bit | Elliptic curve discrete log | Smaller keys, same security as RSA; TLS, mobile |
| DSA | 1024β3072 bit | Discrete logarithm | Digital signatures only (not encryption) |
A one-way function that produces a fixed-size digest (fingerprint) from any input. Cannot be reversed.
| Algorithm | Output Size | Status | Notes |
|---|---|---|---|
| MD5 | 128-bit (32 hex) | β Broken (collisions) | Still used for checksums, NOT security |
| SHA-1 | 160-bit (40 hex) | β Deprecated | Collisions found in 2017 (SHAttered) |
| SHA-256 | 256-bit (64 hex) | β Current standard | Part of SHA-2 family; Bitcoin, TLS, IPsec |
| SHA-3 | 224β512 bit | β Approved | Different design from SHA-2; Keccak algorithm |
| HMAC | Depends on hash | β Used widely | Hash + shared secret key β authentication + integrity |
Process for authenticating data origin and ensuring integrity:
PKI is the framework of policies, procedures, and technologies for managing digital certificates and public keys.
| Component | Role |
|---|---|
| CA (Certificate Authority) | Issues and signs digital certificates (e.g., DigiCert, Let's Encrypt) |
| RA (Registration Authority) | Verifies identity before CA issues certificate |
| Digital Certificate (X.509) | Binds public key to an entity; signed by CA |
| CRL (Certificate Revocation List) | List of revoked certificates |
| OCSP | Online Certificate Status Protocol β real-time revocation check |
Root CA β Intermediate CA β End-entity Certificate. Browser trusts root CAs in built-in trust store.
TLS secures communications over TCP. Successor to SSL (SSL is deprecated).
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
β β β β β β
β β β β β ββ Hash (HMAC)
β β β β ββ Mode
β β β ββ Bulk encryption algorithm + key size
β β ββ Authentication (certificate type)
β ββ Key Exchange (ECDHE = Elliptic Curve Diffie-Hellman Ephemeral)
ββ Protocol
| Feature | Symmetric | Asymmetric |
|---|---|---|
| Keys | One shared key | Key pair (public + private) |
| Speed | Fast (1000x faster) | Slow |
| Key distribution | Difficult (must share secret) | Easy (public key is public) |
| Use case | Bulk data encryption | Key exchange, digital signatures, authentication |
| Examples | AES, 3DES, DES | RSA, DH, ECC |
| In TLS | Session data encryption | Key exchange + certificate authentication |
A VPN creates an encrypted tunnel over a public network (Internet), allowing remote hosts to communicate as if on the same private network.
| VPN Type | Use Case | Protocol |
|---|---|---|
| Site-to-Site | Connect two office networks permanently | IPsec |
| Remote Access | Individual users connect to corporate network | SSL VPN, IPsec with client |
| Extranet | Connect to partner/supplier network | IPsec |
IPsec is a suite of protocols that provides authentication, integrity, and confidentiality at the IP layer (Layer 3).
| Protocol | Purpose | Provides | Header added? |
|---|---|---|---|
| AH (Authentication Header) | Integrity + Authentication | Authentication, anti-replay, no encryption | Yes β IP Protocol 51 |
| ESP (Encapsulating Security Payload) | Encryption + optional Auth | Confidentiality, integrity, authentication | Yes β IP Protocol 50 |
| Mode | What's protected | Original IP header | Use case |
|---|---|---|---|
| Transport Mode | Only the payload (data) | Preserved (visible) | End-to-end between hosts (e.g., L2TP/IPsec client) |
| Tunnel Mode | Entire original IP packet | Encapsulated (hidden) | Site-to-site VPN between gateways |
Transport Mode: [Original IP Header | ESP Header | Payload | ESP Trailer | ESP Auth]
Tunnel Mode: [New IP Header | ESP Header | Original IP Header | Payload | ESP Trailer | ESP Auth]
IKE is the protocol that negotiates and establishes IPsec SAs (Security Associations). Uses UDP port 500 (IKEv1) or UDP 500/4500 (IKEv2).
Goal: Establish a secure, authenticated channel (ISAKMP SA) to protect Phase 2 negotiation.
Goal: Establish the actual IPsec SA for data encryption. Uses the Phase 1 tunnel for protection.
An SA is a one-directional logical connection that defines: protocol (ESP/AH), key, SPI (Security Parameter Index), encryption/hash algorithm. Identified by: (SPI, destination IP, protocol).
! Step 1: ISAKMP Policy (Phase 1)
crypto isakmp policy 10
encr aes 256
hash sha256
authentication pre-share
group 14
lifetime 86400
crypto isakmp key MY_SECRET_KEY address 203.0.113.2
! Step 2: IPsec Transform Set (Phase 2)
crypto ipsec transform-set MY_SET esp-aes 256 esp-sha256-hmac
mode tunnel
! Step 3: Crypto Map
crypto map MY_MAP 10 ipsec-isakmp
set peer 203.0.113.2
set transform-set MY_SET
match address VPN_ACL
! Step 4: ACL to define interesting traffic
ip access-list extended VPN_ACL
permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
! Step 5: Apply to interface
interface Serial0/0
crypto map MY_MAP
Operates at Layer 4β7. Uses standard HTTPS (port 443) so it works through most firewalls without special configuration.
| Feature | SSL VPN | IPsec VPN |
|---|---|---|
| Layer | 4β7 (Application/Transport) | 3 (Network) |
| Port | 443 (HTTPS) | UDP 500, 4500; ESP (IP 50) |
| NAT traversal | Excellent (no issues) | Requires NAT-T (UDP 4500) |
| Client required | Browser or thin client | VPN client software required |
| Use case | Remote workers, BYOD | Site-to-site, full-tunnel remote access |
GRE encapsulates any Layer 3 protocol inside IP. It is NOT encrypted by itself β used with IPsec for GRE-over-IPsec tunnels.
! GRE Tunnel Configuration
interface Tunnel0
ip address 10.0.0.1 255.255.255.252
tunnel source Serial0/0
tunnel destination 203.0.113.2
L2TP encapsulates PPP frames at Layer 2. Like GRE, it provides no encryption by itself β always combined with IPsec (L2TP/IPsec) for security.
| Protocol | Layer | Encrypts? | Authentication | Port | Common Use |
|---|---|---|---|---|---|
| IPsec | 3 | Yes (ESP) | PSK, Certificates | UDP 500, 4500 | Site-to-site, enterprise |
| SSL/TLS VPN | 4β7 | Yes | Certificate | TCP 443 | Remote access, BYOD |
| GRE | 3 | No | None | IP Proto 47 | Tunnel for routing protocols |
| L2TP | 2 | No | PPP auth | UDP 1701 | Used with IPsec |
| OpenVPN | 3β4 | Yes | Certificate | UDP/TCP 1194 | Open-source remote access |
An ACL is an ordered list of permit/deny statements applied to a router interface to filter traffic based on packet attributes. Processed top-down; stops at first match.
deny any any β any traffic not explicitly permitted is denied.| Type | Number Range | Filters on | Placement |
|---|---|---|---|
| Standard (numbered) | 1β99, 1300β1999 | Source IP only | Close to destination |
| Extended (numbered) | 100β199, 2000β2699 | Src IP, Dst IP, Protocol, Port | Close to source |
| Named | Any name | Standard or Extended | Same rules as above |
Wildcard masks are the inverse of subnet masks. Used in ACLs to define address ranges.
| Subnet | Subnet Mask | Wildcard Mask | Matches |
|---|---|---|---|
| 192.168.1.0/24 | 255.255.255.0 | 0.0.0.255 | 192.168.1.0β192.168.1.255 |
| 192.168.1.0/25 | 255.255.255.128 | 0.0.0.127 | 192.168.1.0β192.168.1.127 |
| 10.0.0.0/8 | 255.0.0.0 | 0.255.255.255 | 10.x.x.x |
| Any host | β | 255.255.255.255 | Keyword: any |
| Specific host | β | 0.0.0.0 | Keyword: host x.x.x.x |
! Numbered Standard
access-list 10 permit 192.168.1.0 0.0.0.255
access-list 10 deny host 10.0.0.5
access-list 10 permit any
! Named Standard
ip access-list standard BLOCK_HOST
deny host 192.168.2.100
permit any
! Apply to interface
interface GigabitEthernet0/1
ip access-group 10 in ! Filter inbound traffic
ip access-group 10 out ! Filter outbound traffic
! Syntax:
access-list [number] [permit|deny] [protocol] [src] [src-wildcard] [dst] [dst-wildcard] [operator] [port]
! Examples:
! Deny FTP from 192.168.1.0/24 to any
access-list 100 deny tcp 192.168.1.0 0.0.0.255 any eq 21
! Permit HTTP from any to DMZ web server
access-list 100 permit tcp any host 172.16.1.10 eq 80
! Permit HTTPS from any to DMZ web server
access-list 100 permit tcp any host 172.16.1.10 eq 443
! Permit ICMP (ping) from 10.0.0.0/8 to anywhere
access-list 100 permit icmp 10.0.0.0 0.255.255.255 any
! Implicit deny all (already there, but can be explicit)
access-list 100 deny ip any any log
! Named Extended
ip access-list extended SECURE_TRAFFIC
permit tcp 192.168.1.0 0.0.0.255 host 10.0.0.1 eq 443
permit icmp 192.168.1.0 0.0.0.255 any
deny ip any any log
| Port | Protocol | Service |
|---|---|---|
| 20 | TCP | FTP Data |
| 21 | TCP | FTP Control |
| 22 | TCP | SSH |
| 23 | TCP | Telnet |
| 25 | TCP | SMTP (email) |
| 53 | TCP/UDP | DNS |
| 80 | TCP | HTTP |
| 110 | TCP | POP3 |
| 143 | TCP | IMAP |
| 443 | TCP | HTTPS / SSL/TLS |
| 500 | UDP | IKE (IPsec) |
| 3389 | TCP | RDP |
| Operator | Meaning | Example |
|---|---|---|
| eq | Equal to port | eq 80 (HTTP) |
| neq | Not equal | neq 23 |
| lt | Less than | lt 1024 (well-known ports) |
| gt | Greater than | gt 1023 (ephemeral) |
| range | Range of ports | range 20 21 (FTP) |
show access-lists ! Show all ACLs with hit counts
show ip access-lists ! Show IP ACLs only
show running-config | include access ! Find ACL in config
show ip interface GigabitEthernet0/1 ! Show which ACLs applied to interface
access-list 100 deny tcp any any eq 23Attack from a single source that exhausts target resources (bandwidth, CPU, memory, connections), making services unavailable.
Coordinated attack from multiple compromised hosts (botnet). Much harder to block because traffic comes from many IPs.
| Type | Method | Target |
|---|---|---|
| Volumetric | Flood bandwidth with traffic (UDP flood, ICMP flood) | Network bandwidth |
| Protocol | Exploit protocol weaknesses (SYN Flood, ping of death, Smurf) | Network equipment / servers |
| Application Layer | Flood with legitimate-looking requests (HTTP GET flood, slowloris) | Web server resources |
Exploits the TCP 3-way handshake:
# Basic SYN flood
hping3 --flood -S -p 80 192.168.1.1
# Full lab attack:
hping3 -c 15000 -d 120 -S -w 64 -p 80 --flood --rand-source 192.168.1.159
# -c 15000 = 15000 packets
# -d 120 = data size 120 bytes
# -S = SYN flag
# -w 64 = window size 64
# -p 80 = target port 80
# --flood = send as fast as possible
# --rand-source = randomize source IP (spoofing)
# Wireshark filter to detect:
tcp.flags.syn==1 and tcp.flags.ack==0
Attacker secretly intercepts and possibly alters communications between two parties who believe they are communicating directly.
ARP (Address Resolution Protocol) is stateless β hosts accept ARP replies even without sending requests.
| Attack Type | Method | Defense |
|---|---|---|
| Brute Force | Try every possible combination | Account lockout, long passwords |
| Dictionary Attack | Try words from a wordlist (e.g., rockyou.txt) | Complex passwords not in dictionaries |
| Rainbow Table | Precomputed hash lookup table | Salting passwords (makes rainbow tables useless) |
| Credential Stuffing | Use leaked username/password pairs from breaches | Unique passwords, MFA |
| Password Spraying | Try one common password against many accounts | Block after X failures, MFA |
/usr/share/wordlists/rockyou.txt.gz in Kali Linuxgzip -d /usr/share/wordlists/rockyou.txt.gzInjecting malicious SQL code into user input fields to manipulate database queries.
Normal query: SELECT * FROM users WHERE username='admin' AND password='pass'
Injected: SELECT * FROM users WHERE username='admin' --' AND password=''
Result: '--' comments out the password check β logs in as admin
Defense: Parameterized queries / prepared statements, input validation, WAF.
Injecting malicious JavaScript into web pages viewed by other users.
Impact: Cookie theft, session hijacking, redirecting users to malicious sites.
Defense: Input sanitization, Content Security Policy (CSP), HttpOnly cookies.
Tricks authenticated user's browser into sending unauthorized requests to a trusted site.
Defense: CSRF tokens, SameSite cookies, re-authentication for sensitive actions.
IEEE 802.11 management frames (including deauth) are unauthenticated by default. Attacker sends forged deauthentication frames to force client to disconnect.
# Step 1: Enable monitor mode
airmon-ng start wlan0
# Creates wlan0mon interface
# Step 2: Find target network
airodump-ng wlan0mon
# Shows BSSID (AP MAC), SSID, channel, clients
# Step 3: Deauthentication attack (send 100 deauth frames)
aireplay-ng -0 100 -a [AP_BSSID] -c [CLIENT_MAC] wlan0mon
# -0 = deauth attack
# 100 = number of frames (0 = continuous)
# -a = AP MAC address
# -c = client MAC address
# Detection in Wireshark:
# Filter: wlan.fc.type_subtype == 0x0c
# Deauth frames are subtype 12 (0x0c)
Capture the WPA 4-way handshake, then crack the password offline using dictionary attack.
# Automated with Wifite:
wifite --wpa --dict /usr/share/wordlists/rockyou.txt --kill
# Manual process:
# 1. airmon-ng start wlan0
# 2. airodump-ng --bssid [AP_MAC] -c [channel] -w capture wlan0mon
# 3. aireplay-ng -0 5 -a [AP_MAC] wlan0mon (force reconnect to capture handshake)
# 4. aircrack-ng capture-01.cap -w rockyou.txt (offline crack)
| Term | Definition |
|---|---|
| SSID | Service Set Identifier β human-readable network name |
| BSSID | Basic SSID β MAC address of the AP |
| ESSID | Extended SSID β used when multiple APs share the same SSID |
| WPA Handshake | 4-way handshake between client and AP that proves both know the PSK; captured for offline cracking |
| Phase | Name | Description | Example |
|---|---|---|---|
| 1 | Reconnaissance | Research the target | Nmap scanning, OSINT |
| 2 | Weaponization | Create malware payload | Embed exploit in Word document |
| 3 | Delivery | Transmit weapon to target | Phishing email, USB drop |
| 4 | Exploitation | Exploit vulnerability on target | Execute malicious macro |
| 5 | Installation | Install malware/backdoor | Drop RAT, create scheduled task |
| 6 | C2 (Command & Control) | Establish communication channel | Beacon to C2 server |
| 7 | Actions on Objectives | Accomplish goal | Data exfiltration, ransomware deployment |
| Detail | Value |
|---|---|
| Source | 2009 RockYou.com data breach |
| Size | 14,341,564 unique passwords |
| Path in Kali | /usr/share/wordlists/rockyou.txt.gz |
| Decompress | gzip -d /usr/share/wordlists/rockyou.txt.gz |
# Use with aircrack-ng
aircrack-ng handshake.cap -w /usr/share/wordlists/rockyou.txt
# Use with hashcat (WPA)
hashcat -m 2500 handshake.hccapx /usr/share/wordlists/rockyou.txt
# Use with John the Ripper
john --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt
| Command | Flag | Description |
|---|---|---|
| Ping scan | -sn | Host discovery only (no port scan). Also called "ping scan". |
| SYN scan (stealth) | -sS | Half-open scan. Sends SYN, receives SYN-ACK, sends RST (doesn't complete handshake). Requires root. |
| Connect scan | -sT | Full TCP connect. Doesn't require root but more detectable. |
| UDP scan | -sU | Scan UDP ports (slower) |
| Version detection | -sV | Detect service version running on open ports |
| OS detection | -O | Detect target OS (requires root) |
| Aggressive | -A | Enables OS detection + version + scripts + traceroute |
| Output to file | -oN file | Save output in normal format. (-oX = XML, -oA = all formats) |
| Scan all ports | -p- | Scan all 65535 ports |
| Fast scan | -F | Scan only top 100 common ports |
| Timing | -T0 to -T5 | T0=paranoid (slow, stealthy), T3=default, T5=insane (fast, detectable) |
# Common examples:
nmap -sn 192.168.1.0/24 # Discover live hosts
nmap -sS -p 1-1000 192.168.1.1 # Stealth scan ports 1-1000
nmap -A 192.168.1.1 # Aggressive scan
nmap -sV -p 22,80,443 10.0.0.1 # Version detect on specific ports
nmap -oN output.txt 192.168.1.0/24 # Save results
# hping3 SYN flood β basic
hping3 --flood -S -p 445 192.168.1.1
# --flood: no delay between packets
# -S: set SYN flag
# -p 445: target port 445 (SMB)
# Full lab attack:
hping3 -c 15000 -d 120 -S -w 64 -p 80 --flood --rand-source 192.168.1.159
# -c 15000: send 15000 packets
# -d 120: data payload 120 bytes
# -S: SYN flag
# -w 64: TCP window size 64
# -p 80: target port 80 (HTTP)
# --flood: saturate link, no delays
# --rand-source: randomize source IP (simulate DDoS, evade IP-based blocks)
# 192.168.1.159: target IP
# Wireshark filter to detect SYN flood:
tcp.flags.syn==1 and tcp.flags.ack==0
# This shows only SYN packets without ACK (half-open connections)
| hping3 Flag | Meaning |
|---|---|
-S | Set SYN flag |
-A | Set ACK flag |
-F | Set FIN flag |
-R | Set RST flag |
-P | Set PUSH flag |
-c | Packet count |
-d | Data size (bytes) |
-p | Destination port |
--flood | Max speed, no stats |
--rand-source | Random source IP |
# Aircrack-ng suite commands:
# Step 1: Check wireless interfaces
iwconfig
# Step 2: Kill conflicting processes
airmon-ng check kill
# Step 3: Enable monitor mode
airmon-ng start wlan0
# Creates: wlan0mon
# Step 4: Scan for networks
airodump-ng wlan0mon
# Shows: BSSID, PWR, CH, ESSID, connected clients
# Step 5: Focus on target network
airodump-ng --bssid AA:BB:CC:DD:EE:FF -c 6 wlan0mon
# Step 6: Send deauth frames
aireplay-ng -0 100 -a AA:BB:CC:DD:EE:FF -c 11:22:33:44:55:66 wlan0mon
# -0 100: deauth attack, 100 frames
# -a: Access Point (AP) MAC = BSSID
# -c: Client MAC address
# Use -0 0 for continuous attack
# Detection:
# Wireshark filter: wlan.fc.type_subtype == 0x0c
# Deauth frame = management frame (type 0), subtype 12 (0x0c = 12 decimal)
| Term | Definition |
|---|---|
| BSSID | MAC address of the Access Point |
| SSID | Human-readable network name ("MyWiFi") |
| ESSID | Extended SSID (same SSID across multiple APs in a network) |
| Monitor mode | Wireless card mode that captures all frames (not just those addressed to it) |
| Managed mode | Normal client mode β only processes frames addressed to its MAC |
# Automated attack
wifite --wpa --dict /usr/share/wordlists/rockyou.txt --kill
# What Wifite does automatically:
# 1. Enables monitor mode (airmon-ng)
# 2. Scans for WPA networks (airodump-ng)
# 3. Sends deauth to capture handshake (aireplay-ng)
# 4. Captures WPA 4-way handshake
# 5. Cracks offline with aircrack-ng using provided wordlist
# Manual equivalent:
airmon-ng start wlan0
airodump-ng --bssid [AP] -c [CH] -w capture wlan0mon
aireplay-ng -0 5 -a [AP] wlan0mon
aircrack-ng capture-01.cap -w /usr/share/wordlists/rockyou.txt
# Network information
ifconfig / ip addr # Show IP addresses
iwconfig # Wireless interface info
netstat -an # Active connections
route # Routing table
# File operations
ls -la # List files with permissions
cat /etc/passwd # Read file
grep -r "pattern" /dir # Search recursively
find / -name "file.txt" # Find file
# Process management
ps aux # List processes
kill -9 [PID] # Force kill process
service [name] start/stop # Manage services
# Network tools
ping [host] # ICMP test
traceroute [host] # Trace route
nslookup [domain] # DNS lookup
nc -lvp 4444 # Netcat listener
Click any card to flip it. Filter by topic below.
Select answers and submit to see your score. Explanations shown after submission.