IncidentResponsev2

4.63 Validate No Unauthorized Network Traffic or Command and Control (C2) Channels Exist (Local, Cloud, Perimeter)

Task

Ensure that no unauthorized network traffic, including Command and Control (C2) channels, data exfiltration tunnels, or rogue external communications exist across local, enterprise, cloud, and perimeter environments.


Conditions

Given access to endpoint monitoring, perimeter security devices, internal network monitoring, and cloud-native traffic analysis tools.


Standards


End State

All unauthorized network communication paths are identified, blocked/removed, and documented. C2 channels and malicious connections are terminated.


Notes


Manual Steps

Step 1: Identify and Capture Network Traffic (Local)

Windows / Linux / macOS

Use tcpdump (Linux/macOS) or Wireshark (Windows/Linux/macOS):

sudo tcpdump -nn -i eth0

or

# Windows using PowerShell (requires capture tool installed)
Get-NetTCPConnection

Look for:

Operator Note: Sort by destination → identify “outlier” traffic not used by other systems.


Step 2: Review Perimeter Firewall and Proxy Logs

Firewalls / IDS/IPS (Examples: Palo Alto, Fortinet, Cisco)

Web Proxy Logs (Squid, Zscaler, Cloud SWG)

grep -i "CONNECT" /var/log/squid/access.log

Operator Note: Proxies block many exfil attempts → validate proxy coverage.


Step 3: Review Endpoint DNS Requests (DNS Tunneling / Beaconing)

Windows

Get-DnsClientCache

Linux/macOS

dig +short <domain>

SIEM

# Example Splunk
index=dns sourcetype=dns
| stats count by query
| sort -count

Look for:

Operator Note: DNS is frequently used for stealth → validate against approved DNS domains.


Step 4: Review Cloud Provider Network Logs

AWS → VPC Flow Logs + GuardDuty

aws ec2 describe-flow-logs
aws guardduty list-findings

Look for:

Azure → NSG Flow Logs + Defender for Cloud

Get-AzNetworkWatcherFlowLog

Look for:

Azure Sentinel:

AzureNetworkAnalytics_CL
| where FlowType_s == "Outbound"
| summarize count() by DestinationIP_s

GCP → VPC Flow Logs + Security Command Center

gcloud compute networks subnets list
gcloud compute instances list --filter="EXTERNAL_IP:*"

Look for:

Operator Note: Cloud-native IDS/IPS (GuardDuty, Defender, SCC) should be reviewed for automated detections.


Step 5: Investigate Suspicious Connections

Operator Note: In-memory malware or LOLBins (Living Off the Land Binaries) often perform C2.


Step 6: Block and Remediate

Firewall / Proxy

EDR/Endpoint

Cloud

AWS
aws ec2 modify-instance-attribute --instance-id i-1234567890abcdef0 --no-source-dest-check
aws ec2 stop-instances --instance-ids i-1234567890abcdef0
Azure
Stop-AzVM -ResourceGroupName "RG" -Name "VM"
GCP
gcloud compute instances stop INSTANCE_NAME

Operator Note: Quarantine or shutdown → safest route for active C2 channels.


Step 7: Validate and Document


Dependencies


Other Available Tools

Tool Platform Installation Usage
Wireshark / tcpdump Cross-platform Native Packet capture
Splunk / Sentinel / Elastic SIEM Native Network telemetry search
AWS GuardDuty AWS Native Threat detection
Azure Sentinel + Defender Azure Native Threat detection
GCP SCC + VPC Flow Logs GCP Native Threat detection

Operator Recommendations and Additional Tools

Operator Checklist

Best Practices


References


Revision History

Date Version Description Author
2025-05-02 1.0 Created from scratch with deep operator-focused C2 and unauthorized traffic detection/removal workflow Leo