Powered by Pagefind — search only works after pnpm build
Lesson 6 of 6 · 20 min read
Network Containment Actions — Blocks, Blocks, and What to Block
Network containment is the bridge between investigation and remediation. A vague block request can cause an outage worse than the attack. A precise, well-specified block stops the threat without collateral damage.
The Containment Action Decision Tree
Is the attacker currently active (live session)?│├─YES → Isolate host first (EDR isolation) → THEN block│ Reason: blocking without isolation alerts attacker;│ host isolation is atomic and cuts all channels│└─NO → Direct block (no active session to alert attacker) ↓ What are you blocking? ├─ IP address → verify it's not a CDN │ → firewall outbound block, specific port if possible ├─ Domain → DNS sinkhole (preferred — catches all infected hosts) │ → proxy URL block as backup └─ URL path → proxy block (domain may be legitimate; path is malicious)
Block Specification Format
IP Block
ACTION: Outbound Block — IPTarget: 185.220.101.7Protocol: TCPPort: 443Direction: Outbound (from internal network)Duration: Until IR ticket IR-2024-0892 closes, then reviewRisk check: Not a CDN IP (confirmed via ipinfo.io — this is a single-tenant Tor exit node)Justification: Confirmed C2 IP for Cobalt Strike beacon on CORP-PC-022 (see alert TKT-4421)Owner: firewall-team
Domain Block (DNS Sinkhole)
ACTION: DNS SinkholeTarget: update.windowsmirror.netSinkhole IP: 10.0.0.250 (internal sinkhole address for logging)Duration: Permanent (attacker-registered domain, no legitimate use)Risk check: No legitimate business purpose (domain registered 9 days ago, not a vendor)Additional: Also block at proxy (in case of DoH bypass)Justification: C2 domain for Cobalt Strike beacon (see alert TKT-4421)Side effect: Will reveal any other hosts querying this domain — check sinkhole logsOwner: dns-team
URL Block (Proxy)
ACTION: URL Block at ProxyTarget: https://legitimate-cdn.com/malicious-path/payload.exeMethod: Block full URL (not the domain — domain serves legitimate content)Duration: 90 days, then reviewRisk check: legitimate-cdn.com serves other content — DO NOT block the domainJustification: Phishing attachment delivery URL — malware download confirmed via sandboxOwner: proxy-team
What Not to Block (Without Checking First)
Target
Risk
Safer Alternative
CDN IPs (Cloudflare, AWS)
Blocks thousands of unrelated domains
Block domain at DNS/proxy
*.microsoft.com
Breaks Office 365, Azure
Block specific subdomains only
Large ASNs (e.g., /8 block)
Massive collateral damage
Block specific IPs or /24 at most
Google Drive domain
Breaks all GDrive access
Block at CASB; restrict by account
Port 443 outbound
Breaks all HTTPS
Block specific IPs/domains only
Sinkhole Monitoring
When you sinkhole a C2 domain, every host that queries it is revealed:
# Sinkhole server logs (10.0.0.250):14:32:01 query from 10.1.2.3 for windowsmirror.net → sinkholed14:32:08 query from 10.4.5.6 for windowsmirror.net → sinkholed ← NEW VICTIM14:32:15 query from 10.1.7.8 for windowsmirror.net → sinkholed ← NEW VICTIM
A sinkhole that shows 3 internal hosts querying the C2 domain means 3 infected hosts — not just the one you found originally. The sinkhole turns a single-host investigation into a campaign scope assessment.
Post-Block Validation
After implementing blocks, verify they’re effective and not causing collateral damage:
1. Confirm block is in effect: - From an internal test machine: attempt connection to blocked IP/domain - Should fail (connection refused or DNS NXDOMAIN from sinkhole)2. Confirm no collateral damage: - Check service monitoring dashboards for alerts in the 10 minutes post-block - Check helpdesk for user tickets related to the blocked scope - Spot-check that related legitimate domains still resolve3. Monitor for C2 fallback: - After host isolation + C2 block, watch for new outbound connections from adjacent hosts — the malware may have already spread