Sample captures, HTTP
HTTP beacon every 30 seconds
A client checks in with the same request six times, 30 seconds apart.
- Packets
- 60
- Duration
- 150.108 s
- Size
- 5.8 KB
- Protocols
- TCP, HTTP
- License
- CC0
What it shows
Six connections to cdn-update.badexample.net, 30 seconds apart, each with the same GET /api/v1/status?id=7f3a9c21, an old Internet Explorer User-Agent and a base64 cookie: the rhythm of a command-and-control beacon.
For counting rules. A plain rule fires on every request; one with threshold (Suricata) or detection_filter (Snort 3) fires once the count is reached.
Rules for this capture
Suricata 8 and 7
Try these rulesalert http any any -> any any (msg:"Beacon request"; flow:established,to_server; http.uri; content:"/api/v1/status?id="; sid:1000001; rev:1;) alert http any any -> any any (msg:"Beacon: 5 requests in 5 minutes"; flow:established,to_server; http.uri; content:"/api/v1/status?id="; threshold:type threshold, track by_src, count 5, seconds 300; sid:1000002; rev:1;)
Snort 3
Try these rulesalert http any any -> any any (msg:"Beacon request"; flow:established,to_server; http_uri; content:"/api/v1/status?id="; sid:1000001; rev:1;) alert http any any -> any any (msg:"Beacon: more than 5 requests in 5 minutes"; flow:established,to_server; http_uri; content:"/api/v1/status?id="; detection_filter:track by_src, count 5, seconds 300; sid:1000002; rev:1;)
Packets
| No. | Time | Source | Destination | Protocol | Info |
|---|---|---|---|---|---|
| 1 | 0.000 | 192.0.2.10:49710 | 203.0.113.66:80 | TCP | SYN |
| 2 | 0.012 | 203.0.113.66:80 | 192.0.2.10:49710 | TCP | SYN ACK |
| 3 | 0.024 | 192.0.2.10:49710 | 203.0.113.66:80 | TCP | ACK |
| 4 | 0.036 | 192.0.2.10:49710 | 203.0.113.66:80 | TCP | PSH ACK, GET /api/v1/status?id=7f3a9c21 HTTP/1.1 |
| 5 | 0.048 | 203.0.113.66:80 | 192.0.2.10:49710 | TCP | ACK |
| 6 | 0.060 | 203.0.113.66:80 | 192.0.2.10:49710 | TCP | PSH ACK, HTTP/1.1 200 OK |
| 7 | 0.072 | 192.0.2.10:49710 | 203.0.113.66:80 | TCP | ACK |
| 8 | 0.084 | 192.0.2.10:49710 | 203.0.113.66:80 | TCP | FIN ACK |
| 9 | 0.096 | 203.0.113.66:80 | 192.0.2.10:49710 | TCP | FIN ACK |
| 10 | 0.108 | 192.0.2.10:49710 | 203.0.113.66:80 | TCP | ACK |
| 11 | 30.000 | 192.0.2.10:49711 | 203.0.113.66:80 | TCP | SYN |
| 12 | 30.012 | 203.0.113.66:80 | 192.0.2.10:49711 | TCP | SYN ACK |
| 13 | 30.024 | 192.0.2.10:49711 | 203.0.113.66:80 | TCP | ACK |
| 14 | 30.036 | 192.0.2.10:49711 | 203.0.113.66:80 | TCP | PSH ACK, GET /api/v1/status?id=7f3a9c21 HTTP/1.1 |
| 15 | 30.048 | 203.0.113.66:80 | 192.0.2.10:49711 | TCP | ACK |
| 16 | 30.060 | 203.0.113.66:80 | 192.0.2.10:49711 | TCP | PSH ACK, HTTP/1.1 200 OK |
| 17 | 30.072 | 192.0.2.10:49711 | 203.0.113.66:80 | TCP | ACK |
| 18 | 30.084 | 192.0.2.10:49711 | 203.0.113.66:80 | TCP | FIN ACK |
| 19 | 30.096 | 203.0.113.66:80 | 192.0.2.10:49711 | TCP | FIN ACK |
| 20 | 30.108 | 192.0.2.10:49711 | 203.0.113.66:80 | TCP | ACK |
| 21 | 60.000 | 192.0.2.10:49712 | 203.0.113.66:80 | TCP | SYN |
| 22 | 60.012 | 203.0.113.66:80 | 192.0.2.10:49712 | TCP | SYN ACK |
| 23 | 60.024 | 192.0.2.10:49712 | 203.0.113.66:80 | TCP | ACK |
| 24 | 60.036 | 192.0.2.10:49712 | 203.0.113.66:80 | TCP | PSH ACK, GET /api/v1/status?id=7f3a9c21 HTTP/1.1 |
| 25 | 60.048 | 203.0.113.66:80 | 192.0.2.10:49712 | TCP | ACK |
| 26 | 60.060 | 203.0.113.66:80 | 192.0.2.10:49712 | TCP | PSH ACK, HTTP/1.1 200 OK |
| 27 | 60.072 | 192.0.2.10:49712 | 203.0.113.66:80 | TCP | ACK |
| 28 | 60.084 | 192.0.2.10:49712 | 203.0.113.66:80 | TCP | FIN ACK |
| 29 | 60.096 | 203.0.113.66:80 | 192.0.2.10:49712 | TCP | FIN ACK |
| 30 | 60.108 | 192.0.2.10:49712 | 203.0.113.66:80 | TCP | ACK |
| 31 | 90.000 | 192.0.2.10:49713 | 203.0.113.66:80 | TCP | SYN |
| 32 | 90.012 | 203.0.113.66:80 | 192.0.2.10:49713 | TCP | SYN ACK |
| 33 | 90.024 | 192.0.2.10:49713 | 203.0.113.66:80 | TCP | ACK |
| 34 | 90.036 | 192.0.2.10:49713 | 203.0.113.66:80 | TCP | PSH ACK, GET /api/v1/status?id=7f3a9c21 HTTP/1.1 |
| 35 | 90.048 | 203.0.113.66:80 | 192.0.2.10:49713 | TCP | ACK |
| 36 | 90.060 | 203.0.113.66:80 | 192.0.2.10:49713 | TCP | PSH ACK, HTTP/1.1 200 OK |
| 37 | 90.072 | 192.0.2.10:49713 | 203.0.113.66:80 | TCP | ACK |
| 38 | 90.084 | 192.0.2.10:49713 | 203.0.113.66:80 | TCP | FIN ACK |
| 39 | 90.096 | 203.0.113.66:80 | 192.0.2.10:49713 | TCP | FIN ACK |
| 40 | 90.108 | 192.0.2.10:49713 | 203.0.113.66:80 | TCP | ACK |
| 41 | 120.000 | 192.0.2.10:49714 | 203.0.113.66:80 | TCP | SYN |
| 42 | 120.012 | 203.0.113.66:80 | 192.0.2.10:49714 | TCP | SYN ACK |
| 43 | 120.024 | 192.0.2.10:49714 | 203.0.113.66:80 | TCP | ACK |
| 44 | 120.036 | 192.0.2.10:49714 | 203.0.113.66:80 | TCP | PSH ACK, GET /api/v1/status?id=7f3a9c21 HTTP/1.1 |
| 45 | 120.048 | 203.0.113.66:80 | 192.0.2.10:49714 | TCP | ACK |
| 46 | 120.060 | 203.0.113.66:80 | 192.0.2.10:49714 | TCP | PSH ACK, HTTP/1.1 200 OK |
| 47 | 120.072 | 192.0.2.10:49714 | 203.0.113.66:80 | TCP | ACK |
| 48 | 120.084 | 192.0.2.10:49714 | 203.0.113.66:80 | TCP | FIN ACK |
| 49 | 120.096 | 203.0.113.66:80 | 192.0.2.10:49714 | TCP | FIN ACK |
| 50 | 120.108 | 192.0.2.10:49714 | 203.0.113.66:80 | TCP | ACK |
| 51 | 150.000 | 192.0.2.10:49715 | 203.0.113.66:80 | TCP | SYN |
| 52 | 150.012 | 203.0.113.66:80 | 192.0.2.10:49715 | TCP | SYN ACK |
| 53 | 150.024 | 192.0.2.10:49715 | 203.0.113.66:80 | TCP | ACK |
| 54 | 150.036 | 192.0.2.10:49715 | 203.0.113.66:80 | TCP | PSH ACK, GET /api/v1/status?id=7f3a9c21 HTTP/1.1 |
| 55 | 150.048 | 203.0.113.66:80 | 192.0.2.10:49715 | TCP | ACK |
| 56 | 150.060 | 203.0.113.66:80 | 192.0.2.10:49715 | TCP | PSH ACK, HTTP/1.1 200 OK |
| 57 | 150.072 | 192.0.2.10:49715 | 203.0.113.66:80 | TCP | ACK |
| 58 | 150.084 | 192.0.2.10:49715 | 203.0.113.66:80 | TCP | FIN ACK |
| 59 | 150.096 | 203.0.113.66:80 | 192.0.2.10:49715 | TCP | FIN ACK |
| 60 | 150.108 | 192.0.2.10:49715 | 203.0.113.66:80 | TCP | ACK |
More HTTP samples
- HTTP download: curl downloads an .exe over plain HTTP: handshake, request, response, close.
- HTTP download, capture started mid-connection: The same download without the TCP handshake, as when a capture starts late.
- HTTP download with offloaded checksums: The same download captured on the client, whose outgoing packets have bad TCP checksums.
- HTTP on port 8080: The same download to a server on port 8080 instead of 80.
- WordPress login form POST: A browser posts a username and password to /wp-login.php and is redirected to /wp-admin/.
- HTTP response, chunked and gzip-compressed: A web page sent gzip-compressed in chunks, with a script that's only visible after decompression.
- PowerShell download cradle: PowerShell fetches a script that decodes base64 and runs it with Invoke-Expression.