Detect Encrypted Channel in Splunk
This detection identifies adversaries using custom or non-standard encryption to conceal command and control (C2) traffic. Unlike legitimate TLS/HTTPS, malware implementing encrypted channels often exhibits behavioral anomalies: unusual processes making encrypted connections, connections to raw IP addresses without SNI, self-signed or short-lived certificates, high-frequency beaconing intervals, non-browser processes using port 443/8443 with atypical TLS fingerprints (JA3), and data volumes inconsistent with the application type. This detection correlates process lineage, network destinations, certificate characteristics, and traffic timing to surface encrypted C2 channels used by threat actors such as Tropic Trooper, Lazarus Group, and malware families including RCSession, Cryptoistic, Gomir, and Chaes.
MITRE ATT&CK
- Tactic
- Command and Control
- Technique
- T1573 Encrypted Channel
- Canonical reference
- https://attack.mitre.org/techniques/T1573/
SPL Detection Query
index=* sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=3
| eval RemotePort=coalesce('dst_port', RemotePort)
| eval RemoteIp=coalesce('dst_ip', DestinationIp, RemoteIp)
| eval Image=coalesce('process', Image)
| where RemotePort IN ("443", "8443", "4443", "8080", "9443", "3443", "7443")
| where NOT match(RemoteIp, "^(10\\.|172\\.(1[6-9]|2[0-9]|3[01])\\.|192\.168\\.|127\\.)")
| eval ProcessName=lower(mvindex(split(Image, "\\"), -1))
| where NOT ProcessName IN ("chrome.exe", "firefox.exe", "msedge.exe", "iexplore.exe", "outlook.exe", "teams.exe", "onedrive.exe", "slack.exe", "zoom.exe", "msiexec.exe", "wuauclt.exe")
| eval IsIPOnly=if(match(DestinationHostname, "^\\d{1,3}\.\\d{1,3}\.\\d{1,3}\.\\d{1,3}$") OR isnull(DestinationHostname) OR DestinationHostname="", 1, 0)
| eval SuspiciousParent=if(match(lower(ParentImage), "cmd\.exe|powershell\.exe|wscript\.exe|cscript\.exe|mshta\.exe|regsvr32\.exe|rundll32\.exe"), 1, 0)
| bin _time span=1h
| stats
count AS ConnectionCount,
dc(RemoteIp) AS UniqueDestIPs,
values(RemoteIp) AS DestIPs,
values(DestinationHostname) AS DestHostnames,
values(RemotePort) AS Ports,
max(IsIPOnly) AS HasIPOnlyConn,
max(SuspiciousParent) AS HasSuspiciousParent,
first(ParentImage) AS ParentProcess,
first(User) AS UserAccount,
first(CommandLine) AS CommandLine
by _time, host, ProcessName, Image
| eval RiskScore=case(
HasIPOnlyConn=1 AND HasSuspiciousParent=1, "Critical",
HasIPOnlyConn=1 OR (ConnectionCount >= 10 AND UniqueDestIPs=1), "High",
HasSuspiciousParent=1 OR ConnectionCount >= 5, "Medium",
1=1, "Low"
)
| where RiskScore IN ("Critical", "High", "Medium")
| eval BeaconIndicator=if(ConnectionCount >= 5 AND UniqueDestIPs=1, "Possible beaconing detected", "Single or varied connections")
| table _time, host, RiskScore, ProcessName, CommandLine, ParentProcess, UserAccount, DestIPs, DestHostnames, Ports, ConnectionCount, UniqueDestIPs, HasIPOnlyConn, HasSuspiciousParent, BeaconIndicator
| sort - RiskScore, - ConnectionCount Uses Sysmon Event ID 3 (Network Connection) to identify non-browser/non-system processes making encrypted outbound connections on common TLS ports. Flags connections to raw IP addresses without hostnames (indicative of certificate-less or self-signed TLS), suspicious parent processes spawning encrypted connections, and high-frequency connections to single destinations consistent with C2 beaconing.
Data Sources
Required Sourcetypes
False Positives & Tuning
- Internal custom applications or scripts that communicate with known services over HTTPS — add these to the process exclusion list
- IT management agents (SCCM client, antivirus update services, patch management tools) making regular encrypted check-ins
- Development tools and package managers (npm, pip, git) connecting to package repositories on port 443
- Remote desktop or remote access solutions that establish encrypted tunnels
- Database replication services and backup agents using SSL/TLS on non-standard ports
Other platforms for T1573
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Simulate Custom Encrypted C2 Beacon Using PowerShell SSL
Expected signal: Sysmon Event ID 3 (NetworkConnect) with Image=powershell.exe, DestinationPort=443, DestinationHostname=ifconfig.me; Sysmon Event ID 1 showing PowerShell execution with -ExecutionPolicy Bypass flag; DeviceNetworkEvents showing 5 connections at ~30 second intervals (low jitter beaconing pattern)
- Test 2Simulate C2 Connection to Raw IP Address Over HTTPS
Expected signal: Sysmon Event ID 3 with Image=powershell.exe, DestinationIp=1.1.1.1, DestinationPort=443, DestinationHostname empty or equal to the IP address; DeviceNetworkEvents showing IsIPOnlyConnection=true with RemoteUrl matching RemoteIP
- Test 3Simulate Encrypted C2 Beacon from LOLBin (mshta.exe)
Expected signal: Sysmon Event ID 1 showing mshta.exe execution with HTA file path argument; Sysmon Event ID 3 with Image=mshta.exe, DestinationPort=443, DestinationHostname=httpbin.org; DeviceProcessEvents and DeviceNetworkEvents correlation showing mshta.exe as initiating process
- Test 4Linux Custom Encrypted Beacon Simulation Using OpenSSL
Expected signal: Auditd SYSCALL records for connect() calls from openssl process; syslog entries showing openssl process network activity; on hosts with Sysmon for Linux, Event ID 3 showing openssl making TLS connections to external IP on port 443 at ~30 second intervals
References (9)
- https://attack.mitre.org/techniques/T1573/
- https://www.secureworks.com/research/bronze-president-targets-southeast-asia
- https://www.sentinelone.com/labs/lazarus-on-the-hunt-for-big-game/
- https://symantec-enterprise-blogs.security.com/threat-intelligence/troll-stealer-golang
- https://www.cybereason.com/blog/chaes-malware-targets-brazils-banking-customers
- https://www.trendmicro.com/en_us/research/20/e/tropic-trooper-s-back-usbferry-attack-targets-air-gapped-environments.html
- https://engineering.salesforce.com/tls-fingerprinting-with-ja3-and-ja3s-247362855967/
- https://www.sans.org/white-papers/36277/
- https://github.com/salesforce/ja3
Unlock Pro Content
Get the full detection package for T1573 including response playbook, investigation guide, and atomic red team tests.