非标准端口技术指攻击者故意使用非约定俗成的网络端口进行通信,通过打破协议与端口的传统映射关系规避检测。传统防御主要依赖端口黑名单过滤和协议合规性检查,通过分析端口使用规范性(如80端口是否承载HTTP流量)及流量特征匹配(如SSH握手模式)识别异常。缓解措施包括深度包检测、协议指纹识别以及异常端口流量基线监控等技术。
为突破传统检测机制,攻击者发展出多维度的端口匿迹技术,通过协议-端口解耦、动态通道切换、服务深度伪装等手法,构建具备形式合规性和行为隐蔽性的新型通信矩阵。这些技术将恶意活动隐藏在端口使用的"灰色地带",利用防御方在协议解析深度与监控覆盖广度之间的平衡难点实现突破。
现有非标准端口匿迹技术的核心逻辑聚焦于协议栈特征与网络行为的双重混淆。攻击者通过协议端口复用打破检测预期,利用合法协议的白名单特性绕过初步过滤;动态端口跳跃技术通过时空维度分散通信特征,破坏基于会话持续性的检测模型;协议模拟伪装在应用层实现深度合规性,对抗协议指纹识别系统。技术的关键在于创造性地解构"协议-端口-行为"的固有关联,通过多层次的特征合法化改造,使得恶意流量同时满足形式合规与意图隐藏的双重要求,显著提高传统基于规则匹配的防御体系漏检概率。
匿迹技术的演进导致单纯依赖端口特征或协议合规的防御策略面临失效风险,防御方需构建协议行为动态建模、跨端口流量关联分析等能力,结合终端端口使用监控与网络元数据学习,实现对非标准端口滥用行为的深度感知。同时应建立协议-端口映射基线,对非常规端口承载的协议服务实施增强型深度检测。
| 效应类型 | 是否存在 |
|---|---|
| 特征伪装 | ✅ |
| 行为透明 | ❌ |
| 数据遮蔽 | ✅ |
| 时空释痕 | ✅ |
攻击者通过协议栈重构和交互逻辑模拟,使非标准端口流量呈现合法协议特征。例如在8080端口精确模拟HTTP协议交互流程,或在53端口构建符合DNS协议规范的C2信道。这种深度协议伪装使得流量在语法和语义层面均通过合规性检查,有效规避基于协议指纹的检测系统。
动态端口跳跃中,攻击者结合TLS加密传输恶意载荷,利用加密通道隐藏非标准端口的实际通信内容。例如通过HTTPS over 8443端口传输加密C2指令,使得防御方无法通过内容解密验证端口使用的合法性,形成加密层与端口层的双重隐匿保护。
动态端口切换机制将单次攻击会话拆分为多个离散的端口通信事件,通过时间维度分散特征浓度。例如每小时自动切换C2连接端口,使得每个端口的通信频次低于检测阈值,同时破坏防御方进行跨端口行为关联分析的能力,显著延长攻击链的潜伏周期。
| ID | Name | Description |
|---|---|---|
| G0099 | APT-C-36 | |
| G0050 | APT32 |
An APT32 backdoor can use HTTP over a non-standard TCP port (e.g 14146) which is specified in the backdoor configuration.[2] |
| G0064 | APT33 |
APT33 has used HTTP over TCP ports 808 and 880 for command and control.[3] |
| S0245 | BADCALL |
BADCALL communicates on ports 443 and 8000 with a FakeTLS method.[4] |
| S0239 | Bankshot |
Bankshot binds and listens on port 1058 for HTTP traffic while also utilizing a FakeTLS method.[5] |
| S0574 | BendyBear |
BendyBear has used a custom RC4 and XOR encrypted protocol over port 443 for C2.[6] |
| C0018 | C0018 |
During C0018, the threat actors opened a variety of ports, including ports 28035, 32467, 41578, and 46892, to establish RDP connections.[7] |
| C0032 | C0032 |
During the C0032 campaign, TEMP.Veles used port-protocol mismatches on ports such as 443, 4444, 8531, and 50501 during C2.[8] |
| S1155 | Covenant |
Covenant listeners and controllers can be configured to use non-standard ports.[9] |
| S0687 | Cyclops Blink |
Cyclops Blink can use non-standard ports for C2 not typically associated with HTTP or HTTPS traffic.[10] |
| G0105 | DarkVishnya |
DarkVishnya used ports 5190 and 7900 for shellcode listeners, and 4444, 4445, 31337 for shellcode C2.[11] |
| S0021 | Derusbi | |
| G1003 | Ember Bear |
Ember Bear has used various non-standard ports for C2 communication.[13] |
| S0367 | Emotet |
Emotet has used HTTP over ports such as 20, 22, 443, 7080, and 50000, in addition to using ports commonly associated with HTTP/S.[14][15] |
| G0046 | FIN7 |
FIN7 has used port-protocol mismatches on ports such as 53, 80, 443, and 8080 during C2.[16] |
| S0493 | GoldenSpy |
GoldenSpy has used HTTP over ports 9005 and 9006 for network traffic, 9002 for C2 requests, 33666 as a WebSocket, and 8090 to download files.[17] |
| S0237 | GravityRAT |
GravityRAT has used HTTP over a non-standard port, such as TCP port 46769.[18] |
| S0246 | HARDRAIN |
HARDRAIN binds and listens on port 443 with a FakeTLS method.[19] |
| S0376 | HOPLIGHT |
HOPLIGHT has connected outbound over TCP port 443 with a FakeTLS method.[20] |
| C0035 | KV Botnet Activity |
KV Botnet Activity generates a random port number greater than 30,000 to serve as the listener for subsequent command and control activity.[21] |
| G0032 | Lazarus Group |
Some Lazarus Group malware uses a list of ordered port numbers to choose a port for C2 traffic, creating port-protocol mismatches.[22][23] |
| S1016 | MacMa | |
| G0059 | Magic Hound |
Magic Hound malware has communicated with its C2 server over TCP ports 4443 and 10151 using HTTP.[25][26] |
| S0455 | Metamorfo |
Metamorfo has communicated with hosts over raw TCP on port 9999.[27] |
| S0149 | MoonWind |
MoonWind communicates over ports 80, 443, 53, and 8080 via raw sockets instead of the protocols usually associated with the ports.[28] |
| S0385 | njRAT | |
| C0014 | Operation Wocao |
During Operation Wocao, the threat actors used uncommon high ports for its backdoor C2, including ports 25667 and 47000.[30] |
| S0352 | OSX_OCEANLOTUS.D |
OSX_OCEANLOTUS.D has used a custom binary protocol over TCP port 443 for C2.[31] |
| S1145 | Pikabot |
Pikabot uses non-standard ports, such as 2967, 2223, and others, for HTTPS command and control communication.[32] |
| S1031 | PingPull | |
| S0428 | PoetRAT |
PoetRAT used TLS to encrypt communications over port 143[34] |
| S0262 | QuasarRAT |
QuasarRAT can use port 4782 on the compromised host for TCP callbacks.[35] |
| S1130 | Raspberry Robin |
Raspberry Robin will communicate via HTTP over port 8080 for command and control traffic.[36] |
| S0153 | RedLeaves |
RedLeaves can use HTTP over non-standard ports, such as 995, for C2.[37] |
| G0106 | Rocke | |
| S1078 | RotaJakiro |
RotaJakiro uses a custom binary protocol over TCP port 443.[39] |
| S0148 | RTM | |
| G0034 | Sandworm Team |
Sandworm Team has used port 6789 to accept connections on the group's SSH server.[41] |
| S1085 | Sardonic |
Sardonic has the ability to connect with actor-controlled C2 servers using a custom binary protocol over port 443.[42] |
| G0091 | Silence |
Silence has used port 444 when sending data about the system from the client to the server.[43] |
| S0491 | StrongPity |
StrongPity has used HTTPS over port 1402 in C2 communication.[44] |
| S1049 | SUGARUSH |
SUGARUSH has used port 4585 for a TCP connection to its C2.[45] |
| S0266 | TrickBot |
Some TrickBot samples have used HTTP over ports 447 and 8082 for C2.[46][47][48] Newer versions of TrickBot have been known to use a custom communication protocol which sends the data unencrypted over port 443. [49] |
| S0263 | TYPEFRAME |
TYPEFRAME has used ports 443, 8080, and 8443 with a FakeTLS method.[50] |
| S0515 | WellMail |
WellMail has been observed using TCP port 25, without using SMTP, to leverage an open port for secure command and control communications.[51][52] |
| G0090 | WIRTE | |
| S0412 | ZxShell |
ZxShell can use ports 1985 and 1986 in HTTP/S communication.[54] |
| ID | Mitigation | Description |
|---|---|---|
| M1031 | Network Intrusion Prevention |
Network intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. |
| M1030 | Network Segmentation |
Properly configure firewalls and proxies to limit outgoing traffic to only necessary ports for that particular network segment. |
| ID | Data Source | Data Component | Detects |
|---|---|---|---|
| DS0029 | Network Traffic | Network Traffic Content |
Analyze packet contents to detect communications that do not follow the expected protocol behavior for the port that is being used. |
| Network Traffic Flow |
Monitor network data flows for unexpected patterns and metadata that may be indicative of a mismatch between protocol and utilized port. |