Not Everything on Port 80 Is HTTP: What Scanners Sent, and How to Turn It Into Detections
My web honeypot received TLS handshakes, RDP and Siemens S7 requests, fake njRAT and Gh0st victims hunting for malware controllers, and proxy tests on port 80. Scanners hunting for C2 servers handed me the exact check-in bytes of two RATs. Here's how to use them to find infected hosts in your own network, in Splunk + CrowdStrike and Sentinel + Defender for Endpoint.
Part of my honeypot detection series. Org A runs Splunk with CrowdStrike Falcon. Its Falcon queries use Event Search field names; on raw FDR data, apply the normalisation macro first. Org B runs Microsoft Sentinel with Defender for Endpoint. The web-layer KQL on this page ran against the honeypot's real logs. The network and endpoint queries are written from the probe bytes captured here, so adapt the field names to your environment.
1. What Hit the Server
Port 80 is the web port, but nothing forces a client to speak HTTP to it. nginx logs anything that isn't valid HTTP as a 400 with no method. That makes non-HTTP traffic easy to pick out of a web log:
| What the first bytes were | Lines | Sources |
|---|---|---|
| TLS handshake (HTTPS on the plain-HTTP port) | 570 | 273 |
| Other binary protocols | 168 | 37 |
HTTP/2 cleartext preface (PRI * HTTP/2.0) | 97 | 90 |
| TPKT: RDP or Siemens S7 | 42 | 10 |
| Empty | 27 | 7 |
| RAT check-ins (Gh0st, njRAT) | 16 | 3 |
| WebLogic T3 | 10 | 3 |
| SSH banner | 2 | 2 |
A packet capture showed even more: probes for MongoDB, SQL Server, Oracle, Redis, SMB, MQTT, DNP3, IPMI and the Niagara Fox building-automation protocol. They came from nine addresses in one cloud provider. The scanner reset each connection before nginx could even log it. That census is pure reconnaissance, and there's nothing to defend against except your own exposure.
The interesting part for a defender is the RAT traffic. Three addresses sent messages that look exactly like a computer infected with njRAT or Gh0st checking in with its controller. They weren't infected. They were checking whether my server was a RAT controller, which would have answered. Security vendors run these scans to map malware infrastructure. And in doing so, they handed me the exact bytes that a real infected machine sends. That's what makes this post useful: those bytes are what you look for leaving your own network.
2. The Probes, Decoded
Recon TLS, HTTP/2 and the protocol census
Internet-wide scanners try TLS and HTTP/2 on every open port, because services run on unexpected ports and the only way to find out is to ask (T1595.001, T1046). The census probes carried tool names: mstshash=zgrab in an RDP cookie, an MQTT client ID of LZR, and an Oracle program name of lzrORA. Those are fingerprints of the open-source zgrab and LZR scanners. Anyone can run those tools, so the names tell you the tool, not who was running it.
Command and Control njRAT check-ins (what an infected host sends)
njRAT separates fields with |'|'|. Here's the 0.6.4 "new victim" message as it arrived:
lv|'|'|VHJvamFuX0M0NkY2RTk=|'|'|MARK|'|'|user|'|'|2013-11-22|'|'||'|'|Win XP|'|'|No|'|'|0.6.4|'|'|..|'|'||'|'|[endof]
Field 0 (lv) is the command. The base64 victim name decodes to Trojan_C46F6E9, followed by a user, an install date, the OS, whether there's a webcam, and the RAT version. The 0.7d variant sends its config too. Decoded, it names a campaign, a controller address and njRAT's default port, 5552:
HacKed
192.168.92.222:5552
Desktop
clienta.exe
False
False
True
False
The controller is a private address, so this is a lab recording being replayed at the whole internet. On your network, the same message structure leaving a workstation means a real njRAT infection (T1071.001, T1095 for the raw-TCP variants).
Command and Control Gh0st RAT login
Gh0st packets start with the five-byte magic Gh0st, then two little-endian lengths, then a zlib-compressed body:
0000 47 68 30 73 74 ad 00 00 00 e0 00 00 00 78 9c 4b Gh0st........x.K
0010 53 60 60 98 c3 c0 c0 c0 06 c4 8c 40 bc 51 96 81 S``........@.Q..
0020 81 09 48 07 a7 16 95 65 26 a7 2a 04 24 26 67 2b ..H....e&.*.$&g+
[... compressed body continues ...]
Decompressed, it's a login packet: OS version (Service Pack 1), the local IP 192.168.1.60 and host name WIN-T9UN4HIIHEC. 66.240.205[.]34 sent it on six different days over three weeks. It was re-checking my server each time to see whether it had turned into a controller.
Recon Open-proxy tests
Eleven sources sent 20 CONNECT requests to IP-echo services like api.ipify.org and internetdb.shodan.io. If the echo came back, my server would be an open proxy that anyone could use to hide their traffic (T1090). All of them got a 400.
Recon Made-up HTTP methods
Some requests used random methods like OCHH, INVI and JMTX. Apache passes unknown methods to PHP, and PHP serves the page as if it were a GET. My server answered every one with a 200. That's how scanners find servers where a WAF only filters GET and POST, so a different verb walks straight past it.
3. Pyramid of Pain
| Level | Indicator | What I'd do with it |
|---|---|---|
| IP addresses | RAT hunters 143.244.175[.]42, 66.240.205[.]34, 66.228.41[.]140; census pool in Linode space | Ignore. These are research scanners, not attackers. |
| Network artefacts | mstshash=zgrab, LZR, lzrORA, fake victim names like HacKed_D4990627 | Useful for labelling scanner traffic so analysts don't chase it. |
| Protocol structure | njRAT's |'|'| delimiter and lv/ll commands; the Gh0st magic and header | This is the gift. The operator can rename every field, but the wire format is the malware family. Detect it leaving your network. |
| TTPs | Non-HTTP on a web port (T1571); raw-IP beacons from user-writable paths (T1071, T1095) | The durable rule: something that isn't HTTP or TLS on 80 or 443, or a regular raw-IP connection from an unsigned binary in AppData. It works for families you've never heard of. |
4. Web-Layer Detections
For Org B I've parsed the honeypot's nginx log into a WebAccess function. Swap in your own source and keep the column names. Org A uses the CIM Web data model, or raw nginx where we need the request line as sent.
let WebAccess = Syslog
| where SyslogMessage startswith "php_http: "
| extend j = parse_json(substring(SyslogMessage, 10))
| project TimeGenerated, DestHost = Computer, SrcIp = tostring(j.client), Method = tostring(j.method), Request = tostring(j.request),
Url = tostring(j.uri), Status = toint(j.status), BytesOut = toint(j.bytes_out),
UserAgent = tostring(j.user_agent), ContentType = tostring(j.content_type), Body = tostring(j.body);
W1. Classify non-HTTP traffic on web ports (T1046, T1571)
Org B Tested: produced the table in section 1.
WebAccess
| where isempty(Method) and Status == 400
| extend B0 = toint(unicode_codepoints_from_string(substring(Request, 0, 1))[0])
| extend Kind = case(
B0 == 22, "TLS handshake",
Request startswith "PRI * HTTP/2", "HTTP/2 cleartext preface",
Request startswith "Gh0st" or Request has "|'|'|", "RAT check-in (Gh0st / njRAT)",
B0 == 3, "TPKT (RDP / Siemens S7)",
Request startswith "SSH-", "SSH banner",
Request startswith "t3 ", "WebLogic T3",
isempty(Request), "empty",
"other binary")
| summarize Lines = count(), Sources = dcount(SrcIp), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by Kind
| order by Lines desc
Org A
index=web sourcetype=nginx:access status=400 NOT method=*
| eval b0=substr(request,1,1)
| eval kind=case(
b0==urldecode("%16"), "TLS handshake",
like(request,"PRI * HTTP/2%"), "HTTP/2 cleartext preface",
like(request,"Gh0st%") OR like(request,"%|'|'|%"), "RAT check-in (Gh0st / njRAT)",
b0==urldecode("%03"), "TPKT (RDP / Siemens S7)",
like(request,"SSH-%"), "SSH banner",
like(request,"t3 %"), "WebLogic T3",
request=="", "empty",
true(), "other binary")
| stats count as lines dc(clientip) as sources min(_time) as first max(_time) as last by kind
| sort - lines
Run it as a weekly dashboard, not an alert. TLS on port 80 is constant background noise. Watch the RAT and TPKT rows. If an internal address ever appears in them, you've found something.
W2. Open-proxy behaviour (T1090)
Org B Tested: 20 attempts from 11 sources, 0 answered.
WebAccess
| where Method == "CONNECT" or Request startswith "CONNECT "
| summarize Attempts = count(), Answered = countif(Status between (200 .. 299)), Targets = make_set(Url, 10) by SrcIp
| summarize Sources = count(), Attempts = sum(Attempts), Answered = sum(Answered)
Org A
| tstats count from datamodel=Web where Web.http_method="CONNECT" by Web.src Web.dest Web.url Web.status
| rename Web.* as *
| eval answered=if(status>=200 AND status<300, count, 0)
| stats sum(count) as attempts sum(answered) as answered values(url) as targets by src dest
| where answered > 0
Attempts are noise. One answered CONNECT is a misconfiguration that turns your server into someone else's anonymiser. Alert at high severity on Answered > 0.
W3. Unknown HTTP methods that get a 200
Org B Tested: four outside sources sent made-up methods (OCHH, INVI, JMTX, YEQW), and all four got a 200. My own authorised scanner accounts for every other row.
WebAccess
| where isnotempty(Method)
and Method !in ("GET","POST","HEAD","OPTIONS","PUT","DELETE","PATCH","CONNECT","PROPFIND","TRACE")
| summarize Requests = count(), Answered200 = countif(Status == 200) by Method, SrcIp
Org A
| tstats count from datamodel=Web
where NOT Web.http_method IN ("GET","POST","HEAD","OPTIONS","PUT","DELETE","PATCH","CONNECT","PROPFIND","TRACE")
by Web.src Web.dest Web.http_method Web.status
| rename Web.* as *
| where status=200
This is a posture finding rather than an attack alert. If a random verb gets a 200, check that your WAF rules cover every method, or reject non-standard methods at the web server.
5. Network and Endpoint Detections
Now point the same knowledge outward. An infected host inside your network sends the same check-in that the scanners faked for me.
E1. RAT protocol on the wire
Org B Defender for Endpoint's network protection inspects traffic and records a sample of what it saw, in NetworkSignatureInspected events:
DeviceNetworkEvents
| where Timestamp > ago(7d)
| where ActionType == "NetworkSignatureInspected"
| extend Af = parse_json(AdditionalFields)
| extend Signature = tostring(Af.SignatureName), Sample = tostring(Af.SamplePacketContent)
| where Sample has_any ("Gh0st", "|'|'|") or Sample startswith "lv|" or Signature has_any ("Gh0st", "njRAT")
| project Timestamp, DeviceName, InitiatingProcessFileName, InitiatingProcessFolderPath,
RemoteIP, RemotePort, Signature, Sample
Org A Falcon doesn't keep packet content, so for the protocol view Org A needs network telemetry. Here it's Zeek or Palo Alto App-ID in Splunk, looking for traffic on web ports that isn't HTTP or TLS:
index=network (sourcetype=zeek:conn OR sourcetype=bro:conn_json)
| eval src_ip=coalesce('id.orig_h', src_ip), dest_ip=coalesce('id.resp_h', dest_ip), dest_port=coalesce('id.resp_p', dest_port)
| where dest_port IN (80, 443, 8080) AND NOT (cidrmatch("10.0.0.0/8", dest_ip) OR cidrmatch("172.16.0.0/12", dest_ip) OR cidrmatch("192.168.0.0/16", dest_ip))
| where isnull(service) OR NOT match(service, "http|ssl|tls")
| eval service=coalesce(service, "unknown")
| stats count dc(dest_ip) as dests sum(orig_bytes) as bytes_out by src_ip dest_port service
| where count >= 5
index=pan sourcetype="pan:traffic" dest_port IN (80, 443) app IN ("unknown-tcp", "not-applicable", "insufficient-data")
direction=outbound
| stats count dc(dest_ip) as dests by src_ip dest_port app
Outbound traffic on 80 or 443 that isn't HTTP or TLS has very few legitimate sources once you've allowlisted a handful of VPN and game clients. It catches njRAT, Gh0st and plenty of families that haven't been named yet (T1571 Non-Standard Port, T1095). High severity for any match with the Gh0st magic or the |'|'| delimiter.
E2. Raw-IP beaconing from a user-writable path
Both RATs install into user-writable folders and call a hard-coded IP or dynamic-DNS name at regular intervals. This catches the behaviour even if the traffic is wrapped in TLS:
Org B
let Browsers = dynamic(["chrome.exe","msedge.exe","firefox.exe","iexplore.exe","brave.exe","opera.exe"]);
DeviceNetworkEvents
| where Timestamp > ago(7d)
| where ActionType == "ConnectionSuccess" and RemoteIPType == "Public"
| where RemotePort in (80, 443, 5552, 1177, 8080)
| where InitiatingProcessFileName !in~ (Browsers)
| where isempty(RemoteUrl) // connected by raw IP, no DNS name
| where InitiatingProcessFolderPath has_any (@"\AppData\", @"\Temp\", @"\ProgramData\", @"\Users\Public\")
| summarize Connections = count(), Hours = dcount(bin(Timestamp, 1h)), Ports = make_set(RemotePort)
by DeviceName, InitiatingProcessFileName, InitiatingProcessFolderPath, InitiatingProcessSHA256, RemoteIP
| where Hours >= 6
Org A
index=crowdstrike event_platform=Win event_simpleName=NetworkConnectIP4
RemotePort IN (80, 443, 5552, 1177, 8080)
| where NOT cidrmatch("10.0.0.0/8", RemoteAddressIP4) AND NOT cidrmatch("172.16.0.0/12", RemoteAddressIP4)
AND NOT cidrmatch("192.168.0.0/16", RemoteAddressIP4)
| join type=inner aid ContextProcessId_decimal
[ search index=crowdstrike event_platform=Win event_simpleName=ProcessRollup2
(ImageFileName="*\\AppData\\*" OR ImageFileName="*\\Temp\\*" OR ImageFileName="*\\ProgramData\\*" OR ImageFileName="*\\Users\\Public\\*")
| rename TargetProcessId_decimal as ContextProcessId_decimal
| fields aid ContextProcessId_decimal ImageFileName SHA256HashData ]
| bin _time span=1h
| stats dc(_time) as hours count as connections values(RemotePort) as ports
by aid ComputerName ImageFileName SHA256HashData RemoteAddressIP4
| where hours >= 6
"Connected out by raw IP in at least six different hours, from a binary in AppData, Temp or ProgramData" is a short list in most environments. Expect some updaters and helper apps the first time you run it. Allowlist them by signer or hash, and what's left is worth a look. Medium severity, raised to high if the binary is unsigned or new to your estate.
6. When It Fires
- W1 to W3 with external sources: recon. Label it and move on. Fix any proxy or method posture issues.
- E1 or E2 on an internal host: treat it as an active RAT. Org A Network-contain the host in Falcon and pull the binary through RTR. Org B Isolate the device, collect an investigation package, and submit the file for deep analysis.
- Decode the check-in. If you have the bytes, the njRAT fields give you the campaign name, the controller address and port, and the install path. That gives you three IOCs to sweep the rest of the estate with.
- Hunt the controller address across firewall, proxy and DNS logs for the last 30 days. RAT campaigns rarely hit one machine.
- Reset credentials for whoever used the machine. Both RATs keylog and steal saved passwords.
7. Hardening
- Default-deny outbound from servers. Workstations should go out through a proxy that only speaks HTTP and TLS, so raw TCP on 80 or 443 simply fails.
- Reject non-standard HTTP methods at the web server or WAF.
- Never enable
CONNECTor forward-proxy modules on a public web server. - Don't expose database, ICS or management protocols to the internet on any port. The census shows someone checks every port for them, and does it every day.
8. IOCs
Mostly research scanners, listed so you can label them rather than chase them.
| Type | Value | Context |
|---|---|---|
| RAT controller hunters | 143.244.175[.]42, 66.240.205[.]34, 66.228.41[.]140 | Fake njRAT 0.6.4 / 0.7d and Gh0st check-ins |
| Fake victim names | Trojan_C46F6E9, HacKed_D4990627, WIN-JNAPIER0859, WIN-T9UN4HIIHEC | Inside the probes |
| Protocol census | 45.79.115[.]59, 45.79.207[.]71, 45.33.109[.]10, 198.74.56[.]135, 45.33.12[.]122, 192.155.88[.]231, 45.33.14[.]5, 45.79.163[.]53, 173.255.221[.]189 | Linode address space, client reset before data |
| Tool strings | lzrORA, MQTT client LZR, mstshash=zgrab, SSH-2.0-probe | Scanner fingerprints |