This hypothesis posits that adversaries are manipulating TLS handshakes by selecting non-standard ciphers in ServerHello messages to evade signature-based detection and establish covert communication channels. The SOC team should proactively hunt for this behavior in Azure Sentinel to identify early-stage lateral movement or command-and-control traffic that bypasses standard encryption baselines, even when initial alerts are marked as low severity.
rule FakeTLS_ServerHelloGetSelectedCipher: sharedcode
{
meta:
copyright = "2015 Novetta Solutions"
author = "Novetta Threat Research & Interdiction Group - [email protected]"
Source = "eff542ac8e37db48821cb4e5a7d95c044fff27557763de3a891b40ebeb52cc55.ex_"
strings:
/*
24 10 and al, 10h
0C 10 or al, 10h
89 07 mov [edi], eax
66 8B 44 24 14 mov ax, [esp+0Ch+wCipherSuiteID]
66 3D 00 C0 cmp ax, 0C000h
73 34 jnb short loc_4067C1
66 2D 35 00 sub ax, 35h
66 F7 D8 neg ax
1B C0 sbb eax, eax
24 80 and al, 80h
05 00 01 00 00 add eax, 100h
8B D8 mov ebx, eax
53 push ebx ; hostshort
*/
$a = { 24 10 0C 10 89 ?? 66 8? [3] 66 3? 00 C0 73 ?? 66 2? 35 00 66 F7 ?? 1B ?? 2? 80 0? 00 01 00 00 8B ?? 5? }
condition:
$a in ((pe.sections[pe.section_index(".text")].raw_data_offset)..(pe.sections[pe.section_index(".text")].raw_data_offset + pe.sections[pe.section_index(".text")].raw_data_size))
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the FakeTLS_ServerHelloGetSelectedCipher detection rule in an enterprise environment, along with suggested filters or exclusions:
Legacy Internal Monitoring Agents
pycurl v1.0) running on management servers may initiate TLS handshakes with outdated cipher suites that do not match the modern “selected” cipher expectations defined in the rule logic. These tools often poll internal services every 5 minutes, triggering the alert repeatedly during peak business hours.MGMT-SERVERS subnet and specific destination ports (e.g., TCP 8080, 9100) associated with known monitoring tools. Additionally, tune the rule to ignore connections where the User-Agent string contains “SolarWinds”, “Nagios”, or “Python-urllib”.Scheduled Certificate Renewal Tasks
AUTOMATION-CONTROLLER host group. Alternatively, exclude destination IPs identified as part of the PKI infrastructure (e.g., DNS suffix .pki.internal).**CI/CD