Why HTTP is popular with attackers
HTTP traffic is everywhere. Every network allows it. Firewalls pass it through. Proxies inspect it but often miss subtle abuse. For an attacker, hiding malicious activity inside HTTP means blending into the noise of legitimate web browsing.
This lesson focuses on spotting malicious HTTP traffic. If you need a refresher on how HTTP works in a capture, check the "Reading HTTP traffic" lesson in Protocol Analysis first.
Signs of C2 over HTTP
Command-and-control (C2) traffic over HTTP often has these characteristics:
Regular beaconing intervals
Malware typically checks in with its C2 server at regular intervals. If you see HTTP requests to the same host every 30 seconds, every 5 minutes, or at any other consistent interval, that is suspicious. Legitimate browsing is irregular and human-driven.
Filter for requests to a specific host and look at the timestamps. If the intervals are suspiciously consistent, you may be looking at beaconing.
Unusual User-Agent strings
Legitimate browsers send well-known User-Agent strings. Malware often sends:
- Generic strings like
Mozilla/4.0without the detailed version information real browsers include - Completely custom strings that do not match any known browser
- No User-Agent at all
Encoded or obfuscated data in URLs
Watch for URLs with long base64-encoded parameters, unusual query strings, or paths that look like random characters. Attackers encode commands and data in URL parameters to communicate with their C2.
Example of suspicious URL patterns:
/update?d=SGVsbG8gV29ybGQ=(base64 in parameters)/images/logo.php?id=4a6f686e(hex-encoded data)/api/v1/aHR0cDovL2V4YW1wbGUuY29t(base64 in path)
Large POST requests to unusual endpoints
Data exfiltration over HTTP often uses POST requests to send stolen data. If you see large POST bodies going to a domain you do not recognise, that is worth investigating.
Filter: http.request.method == POST && http.content_length > 10000
Payload delivery
Attackers use HTTP to download malware onto compromised systems. Look for:
Executable downloads
HTTP responses with Content-Type: application/octet-stream or file extensions like .exe, .dll, .ps1, .bat in the URL or Content-Disposition header.
Script downloads
JavaScript, PowerShell, or VBScript files downloaded from unusual domains. These are often the first stage of an attack, downloading and executing the actual malware.
Redirects to malicious sites
A chain of HTTP 302 redirects bouncing through multiple domains before landing on a malware download. Legitimate redirects usually go through one or two hops. Five or more is suspicious.
Practical detection checklist
- Check User-Agents: filter for unusual or missing User-Agent headers
- Look for beaconing: sort by time and look for regular intervals to the same host
- Inspect POST bodies: large POST requests to unknown domains may be exfiltration
- Check response types: executable or script content types from unexpected sources
- Follow redirects: chains of 302 responses may indicate malicious redirect chains
- Cross-reference domains: look up unfamiliar domains in threat intelligence feeds
Encrypted C2 over HTTPS is increasingly common. If you see suspicious beaconing patterns but the traffic is encrypted, look at the TLS handshake (SNI, certificate, JA3) for indicators instead of the HTTP content.
You notice HTTP GET requests to the same external host every 60 seconds, each with a different base64-encoded query parameter. The User-Agent is "Mozilla/4.0". What does this suggest?
What is the most reliable way to detect data exfiltration over HTTP?