网络服务发现

网络服务发现是攻击者识别目标网络中可用服务及其配置信息的关键侦察技术,通常涉及端口扫描、协议探测和拓扑映射等操作。攻击者通过获取运行中的服务类型、版本及关联漏洞信息,为后续攻击链构建提供支撑。传统检测手段主要依赖流量异常分析(如端口扫描频率检测)、协议合规性验证(如非常规协议交互识别)以及云API调用审计等手段进行防御,通过关联多源日志识别可疑服务探测行为。

为规避传统检测机制,攻击者发展出新型隐匿式服务发现技术,通过分布式资源调度、协议语义模拟及云平台特性滥用等策略,将服务探测行为解构为合法网络交互或管理操作,在维持侦察效能的同时实现行为隐匿,形成难以被传统安全体系感知的"隐形侦察"能力。

当前网络服务发现匿迹技术的核心演进路径聚焦于侦察行为的业务化融合与资源抽象化利用。攻击者通过多维度技术重构突破传统检测边界:分布式代理轮询技术将集中式扫描转化为地理分散的异步探测,利用代理网络的动态切换特性破坏源地址关联分析;协议模拟探测通过构建协议状态机实现应用层交互的深度伪装,使服务识别过程完全隐藏在业务合规流量中。技术的共性在于突破协议指纹识别和流量统计检测的传统对抗维度,通过将攻击行为嵌入更高层级的业务上下文或管理流程,实现侦察活动的"白盒化"改造,使得安全设备难以在合法业务流中分离出恶意意图。

匿迹技术的演进导致基于流量特征和API调用频次的传统检测模型面临失效风险,防御方需构建云网融合检测体系,实施协议交互语义分析、API操作意图识别,并强化云服务身份凭证的动态鉴权机制,通过多维行为画像技术识别异常服务发现模式。

ID: T1046
Sub-techniques:  T1046.001, T1046.002
Tactic: 环境测绘
Platforms: Containers, IaaS, Linux, Network, Windows, macOS
Contributors: Praetorian
Version: 3.1
Created: 31 May 2017
Last Modified: 11 August 2023

匿迹效应

效应类型 是否存在
特征伪装
行为透明
数据遮蔽
时空释痕

特征伪装

攻击者通过深度协议模拟和云API调用伪装,将服务发现流量特征与合法业务流量高度融合。例如在协议模拟探测中精确复制目标网络主流应用的交互流程,使探测报文在应用层表现出完整业务语义;在云API劫持中利用合规接口参数构造查询请求,使得恶意探测被记录为正常管理操作,实现攻击特征的本质性伪装。

时空释痕

分布式代理轮询技术通过全球节点网络实施低频次探测,将传统高密度扫描行为分解为长周期、跨地域的离散请求。每个代理节点执行探测任务后即进入静默状态,同时通过动态IP池轮换机制破坏攻击源的空间关联性,使得服务发现特征被稀释在正常跨国业务流量和云平台运维操作中,传统基于短时窗口的检测策略难以有效捕获。

Procedure Examples

ID Name Description
G1030 Agrius

Agrius used the open-source port scanner WinEggDrop to perform detailed scans of hosts of interest in victim networks.[1]

G0050 APT32

APT32 performed network scanning on the network to search for open ports, services, OS finger-printing, and other vulnerabilities.[2]

G0087 APT39

APT39 has used CrackMapExec and a custom port scanner known as BLUETORCH for network scanning.[3][4]

G0096 APT41

APT41 used a malware variant called WIDETONE to conduct port scans on specified subnets.[5]

S0093 Backdoor.Oldrea

Backdoor.Oldrea can use a network scanning module to identify ICS-related ports.[6]

G0135 BackdoorDiplomacy

BackdoorDiplomacy has used SMBTouch, a vulnerability scanner, to determine whether a target is vulnerable to EternalBlue malware.[7]

S1081 BADHATCH

BADHATCH can check for open ports on a computer by establishing a TCP connection.[8]

S0089 BlackEnergy

BlackEnergy has conducted port scans on a host.[9]

G0098 BlackTech

BlackTech has used the SNScan tool to find other potential targets on victim networks.[10]

S1063 Brute Ratel C4

Brute Ratel C4 can conduct port scanning against targeted systems.[11]

C0018 C0018

During C0018, the threat actors used the SoftPerfect Network Scanner for network scanning.[12]

C0027 C0027

During C0027, used RustScan to scan for open ports on targeted ESXi appliances.[13]

S0572 Caterpillar WebShell

Caterpillar WebShell has a module to use a port scanner on a system.[14]

G0114 Chimera

Chimera has used the get -b -e -p command for network scanning as well as a custom Python tool packed into a Windows executable named Get.exe to scan IP ranges for HTTP.[15]

S0020 China Chopper

China Chopper's server component can spider authentication portals.[16]

G0080 Cobalt Group

Cobalt Group leveraged an open-source tool called SoftPerfect Network Scanner to perform network scanning.[17][18][19]

S0154 Cobalt Strike

Cobalt Strike can perform port scans from an infected host.[20][21][22]

S0608 Conficker

Conficker scans for other machines to infect.[23]

C0004 CostaRicto

During CostaRicto, the threat actors employed nmap and pscan to scan target environments.[24]

G0105 DarkVishnya

DarkVishnya performed port scanning to obtain the list of active services.[25]

G1003 Ember Bear

Ember Bear has used tools such as NMAP for remote system discovery and enumeration in victim environments.[26]

S0363 Empire

Empire can perform port scans from an infected host.[27]

G1016 FIN13

FIN13 has utilized nmap for reconnaissance efforts. FIN13 has also scanned for internal MS-SQL servers in a compromised network.[28][29]

G0037 FIN6

FIN6 used publicly available tools (including Microsoft's built-in SQL querying tool, osql.exe) to map the internal network and conduct reconnaissance against Active Directory, Structured Query Language (SQL) servers, and NetBIOS.[30]

G0117 Fox Kitten

Fox Kitten has used tools including NMAP to conduct broad scanning to identify open ports.[31][32]

S1144 FRP

As part of load balancing FRP can set healthCheck.type = "tcp" or healthCheck.type = "http" to check service status on specific hosts with TCPing or an HTTP request.[33]

S0061 HDoor

HDoor scans to identify open ports on the victim.[34]

S0698 HermeticWizard

HermeticWizard has the ability to scan ports on a compromised network.[35]

S0601 Hildegard

Hildegard has used masscan to look for kubelets in the internal Kubernetes network.[36]

C0038 HomeLand Justice

During HomeLand Justice, threat actors executed the Advanced Port Scanner tool on compromised systems.[37][38]

G1032 INC Ransom

INC Ransom has used NETSCAN.EXE for internal reconnaissance.[39][40]

S0604 Industroyer

Industroyer uses a custom port scanner to map out a network.[41]

S0260 InvisiMole

InvisiMole can scan the network for open ports and vulnerable instances of RDP and SMB protocols.[42]

S0250 Koadic

Koadic can scan for open TCP ports on the target network.[43]

G0032 Lazarus Group

Lazarus Group has used nmap from a router VM to scan ports on systems within the restricted segment of an enterprise network.[44]

G0077 Leafminer

Leafminer scanned network services to search for vulnerabilities in the victim system.[45]

S0532 Lucifer

Lucifer can scan for open ports including TCP ports 135 and 1433.[46]

G0059 Magic Hound

Magic Hound has used KPortScan 3.0 to perform SMB, RDP, and LDAP scanning.[47]

G0045 menuPass

menuPass has used tcping.exe, similar to Ping, to probe port status on systems of interest.[48]

S1146 MgBot

MgBot includes modules for performing HTTP and server service scans.[49]

S0233 MURKYTOP

MURKYTOP has the capability to scan for open ports on hosts in a connected network.[16]

G0019 Naikon

Naikon has used the LadonGo scanner to scan target networks.[50]

S0590 NBTscan

NBTscan can be used to scan IP networks.[51][52]

G0049 OilRig

OilRig has used the publicly available tool SoftPerfect Network Scanner as well as a custom tool called GOLDIRONY to conduct network scanning.[53]

C0014 Operation Wocao

During Operation Wocao, threat actors scanned for open ports and used nbtscan to find NETBIOS nameservers.[54]

S0598 P.A.S. Webshell

P.A.S. Webshell can scan networks for open ports and listening services.[55]

S0683 Peirates

Peirates can initiate a port scan against a given IP address.[56]

S0378 PoshC2

PoshC2 can perform port scans from an infected host.[57]

S0192 Pupy

Pupy has a built-in module for port scanning.[58]

S0583 Pysa

Pysa can perform network reconnaissance using the Advanced Port Scanner tool.[59]

S0458 Ramsay

Ramsay can scan for systems that are vulnerable to the EternalBlue exploit.[60][61]

G1039 RedCurl

RedCurl has used netstat to check if port 4119 is open.[62]

S0125 Remsec

Remsec has a plugin that can perform ARP scanning as well as port scanning.[63]

G0106 Rocke

Rocke conducted scanning for exposed TCP port 7001 as well as SSH and Redis servers.[64][65]

S1073 Royal

Royal can scan the network interfaces of targeted systems.[66]

S0692 SILENTTRINITY

SILENTTRINITY can scan for open ports on a compromised machine.[67]

S0374 SpeakUp

SpeakUp checks for availability of specific ports on servers.[68]

G0039 Suckfly

Suckfly the victim's internal network for hosts with ports 8080, 5900, and 40 open.[69]

G0139 TeamTNT

TeamTNT has used masscan to search for open Docker API ports and Kubernetes clusters.[70][36][71] TeamTNT has also used malware that utilizes zmap and zgrab to search for vulnerable services in cloud environments.[72]

G0027 Threat Group-3390

Threat Group-3390 actors use the Hunter tool to conduct network service discovery for vulnerable systems.[73][74]

G0081 Tropic Trooper

Tropic Trooper used pr and an openly available tool to scan for open ports on target systems.[75][76]

G1017 Volt Typhoon

Volt Typhoon has used commercial tools, LOTL utilities, and appliances already present on the system for network service discovery.[77]

S0341 Xbash

Xbash can perform port scanning of TCP and UDP ports.[78]

S0117 XTunnel

XTunnel is capable of probing the network for open ports.[79]

S0412 ZxShell

ZxShell can launch port scans.[5][80]

Mitigations

ID Mitigation Description
M1042 Disable or Remove Feature or Program

Ensure that unnecessary ports and services are closed to prevent risk of discovery and potential exploitation.

M1031 Network Intrusion Prevention

Use network intrusion detection/prevention systems to detect and prevent remote service scans.

M1030 Network Segmentation

Ensure proper network segmentation is followed to protect critical servers and devices.

Detection

ID Data Source Data Component Detects
DS0025 Cloud Service Cloud Service Enumeration

Cloud service discovery techniques will likely occur throughout an operation where an adversary is targeting cloud-based systems and services. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities based on the information obtained.Normal, benign system and network events that look like cloud service discovery may be uncommon, depending on the environment and how they are used. Monitor cloud service usage for anomalous behavior that may indicate adversarial presence within the environment.

DS0017 Command Command Execution

Monitor executed commands and arguments that may attempt to get a listing of services running on remote hosts, including those that may be vulnerable to remote software exploitation.

DS0029 Network Traffic Network Traffic Flow

Monitor network data for uncommon data flows. Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious. It should be noted that when a host/ port/ service scan is performed from a compromised machine, a single machine makes multiple calls to other hosts in the network to identify live hosts and services.

After compromising an initial machine, adversaries commonly attempt to laterally move across the network. The first step to attempt the Lateral Movement often involves conducting host identification, port and service scans on the internal network via the compromised machine using tools such as Nmap, Cobalt Strike, etc.

Note: It should be noted that when a host/ port/ service scan is performed from a compromised machine, a single machine makes multiple calls to other hosts in the network to identify live hosts and services. This can be detected using the following query

Analytic 1 - Identifying Port Scanning Activity

sourcetype='firewall_logs' dest_ip='internal_subnet' | stats dc(dest_port) as pcount by src_ip | where pcount >5

References

  1. Or Chechik, Tom Fakterman, Daniel Frank & Assaf Dahan. (2023, November 6). Agonizing Serpens (Aka Agrius) Targeting the Israeli Higher Education and Tech Sectors. Retrieved May 22, 2024.
  2. Dahan, A. (2017). Operation Cobalt Kitty. Retrieved December 27, 2018.
  3. Hawley et al. (2019, January 29). APT39: An Iranian Cyber Espionage Group Focused on Personal Information. Retrieved February 19, 2019.
  4. Rusu, B. (2020, May 21). Iranian Chafer APT Targeted Air Transportation and Government in Kuwait and Saudi Arabia. Retrieved May 22, 2020.
  5. Fraser, N., et al. (2019, August 7). Double DragonAPT41, a dual espionage and cyber crime operation APT41. Retrieved September 23, 2019.
  6. Slowik, J. (2021, October). THE BAFFLING BERSERK BEAR: A DECADE’S ACTIVITY TARGETING CRITICAL INFRASTRUCTURE. Retrieved December 6, 2021.
  7. Adam Burgher. (2021, June 10). BackdoorDiplomacy: Upgrading from Quarian to Turian. Retrieved September 1, 2021
  8. Vrabie, V., et al. (2021, March 10). FIN8 Returns with Improved BADHATCH Toolkit. Retrieved September 8, 2021.
  9. Baumgartner, K. and Garnaeva, M.. (2014, November 3). BE2 custom plugins, router abuse, and target profiles. Retrieved March 24, 2016.
  10. Threat Intelligence. (2020, September 29). Palmerworm: Espionage Gang Targets the Media, Finance, and Other Sectors. Retrieved March 25, 2022.
  11. Harbison, M. and Renals, P. (2022, July 5). When Pentest Tools Go Brutal: Red-Teaming Tool Being Abused by Malicious Actors. Retrieved February 1, 2023.
  12. Venere, G. Neal, C. (2022, June 21). Avos ransomware group expands with new attack arsenal. Retrieved January 11, 2023.
  13. Parisi, T. (2022, December 2). Not a SIMulation: CrowdStrike Investigations Reveal Intrusion Campaign Targeting Telco and BPO Companies. Retrieved June 30, 2023.
  14. ClearSky Cyber Security. (2021, January). “Lebanese Cedar” APT Global Lebanese Espionage Campaign Leveraging Web Servers. Retrieved February 10, 2021.
  15. Jansen, W . (2021, January 12). Abusing cloud services to fly under the radar. Retrieved September 12, 2024.
  16. FireEye. (2018, March 16). Suspected Chinese Cyber Espionage Group (TEMP.Periscope) Targeting U.S. Engineering and Maritime Industries. Retrieved April 11, 2018.
  17. Positive Technologies. (2017, August 16). Cobalt Strikes Back: An Evolving Multinational Threat to Finance. Retrieved September 5, 2018.
  18. Positive Technologies. (2016, December 16). Cobalt Snatch. Retrieved October 9, 2018.
  19. Matveeva, V. (2017, August 15). Secrets of Cobalt. Retrieved October 10, 2018.
  20. Strategic Cyber LLC. (2017, March 14). Cobalt Strike Manual. Retrieved May 24, 2017.
  21. Mavis, N. (2020, September 21). The Art and Science of Detecting Cobalt Strike. Retrieved September 12, 2024.
  22. Strategic Cyber LLC. (2020, November 5). Cobalt Strike: Advanced Threat Tactics for Penetration Testers. Retrieved April 13, 2021.
  23. Burton, K. (n.d.). The Conficker Worm. Retrieved February 18, 2021.
  24. The BlackBerry Research and Intelligence Team. (2020, November 12). The CostaRicto Campaign: Cyber-Espionage Outsourced. Retrieved May 24, 2021.
  25. Golovanov, S. (2018, December 6). DarkVishnya: Banks attacked through direct connection to local network. Retrieved May 15, 2020.
  26. US Cybersecurity & Infrastructure Security Agency et al. (2024, September 5). Russian Military Cyber Actors Target U.S. and Global Critical Infrastructure. Retrieved September 6, 2024.
  27. Schroeder, W., Warner, J., Nelson, M. (n.d.). Github PowerShellEmpire. Retrieved April 28, 2016.
  28. Ta, V., et al. (2022, August 8). FIN13: A Cybercriminal Threat Actor Focused on Mexico. Retrieved February 9, 2023.
  29. Sygnia Incident Response Team. (2022, January 5). TG2003: ELEPHANT BEETLE UNCOVERING AN ORGANIZED FINANCIAL-THEFT OPERATION. Retrieved February 9, 2023.
  30. FireEye Threat Intelligence. (2016, April). Follow the Money: Dissecting the Operations of the Cyber Crime Group FIN6. Retrieved June 1, 2016.
  31. CISA. (2020, September 15). Iran-Based Threat Actor Exploits VPN Vulnerabilities. Retrieved December 21, 2020.
  32. ClearSky. (2020, December 17). Pay2Key Ransomware – A New Campaign by Fox Kitten. Retrieved December 21, 2020.
  33. fatedier. (n.d.). What is frp?. Retrieved July 10, 2024.
  34. Baumgartner, K., Golovkin, M.. (2015, May). The MsnMM Campaigns: The Earliest Naikon APT Campaigns. Retrieved April 10, 2019.
  35. ESET. (2022, March 1). IsaacWiper and HermeticWizard: New wiper and worm targetingUkraine. Retrieved April 10, 2022.
  36. Chen, J. et al. (2021, February 3). Hildegard: New TeamTNT Cryptojacking Malware Targeting Kubernetes. Retrieved April 5, 2021.
  37. CISA. (2022, September 23). AA22-264A Iranian State Actors Conduct Cyber Operations Against the Government of Albania. Retrieved August 6, 2024.
  38. MSTIC. (2022, September 8). Microsoft investigates Iranian attacks against the Albanian government. Retrieved August 6, 2024.
  39. SOCRadar. (2024, January 24). Dark Web Profile: INC Ransom. Retrieved June 5, 2024.
  40. SentinelOne. (n.d.). What Is Inc. Ransomware?. Retrieved June 5, 2024.
  1. Anton Cherepanov. (2017, June 12). Win32/Industroyer: A new threat for industrial controls systems. Retrieved December 18, 2020.
  2. Hromcova, Z. and Cherpanov, A. (2020, June). INVISIMOLE: THE HIDDEN PART OF THE STORY. Retrieved July 16, 2020.
  3. Magius, J., et al. (2017, July 19). Koadic. Retrieved September 27, 2024.
  4. Vyacheslav Kopeytsev and Seongsu Park. (2021, February 25). Lazarus targets defense industry with ThreatNeedle. Retrieved October 27, 2021.
  5. Symantec Security Response. (2018, July 25). Leafminer: New Espionage Campaigns Targeting Middle Eastern Regions. Retrieved August 28, 2018.
  6. Hsu, K. et al. (2020, June 24). Lucifer: New Cryptojacking and DDoS Hybrid Malware Exploiting High and Critical Vulnerabilities to Infect Windows Devices. Retrieved November 16, 2020.
  7. DFIR Report. (2021, November 15). Exchange Exploit Leads to Domain Wide Ransomware. Retrieved January 5, 2023.
  8. PwC and BAE Systems. (2017, April). Operation Cloud Hopper: Technical Annex. Retrieved April 13, 2017.
  9. Threat Hunter Team. (2023, April 20). Daggerfly: APT Actor Targets Telecoms Company in Africa. Retrieved July 25, 2024.
  10. Vrabie, V. (2021, April 23). NAIKON – Traces from a Military Cyber-Espionage Operation. Retrieved June 29, 2021.
  11. Bezroutchko, A. (2019, November 19). NBTscan man page. Retrieved March 17, 2021.
  12. SecTools. (2003, June 11). NBTscan. Retrieved March 17, 2021.
  13. Davis, S. and Caban, D. (2017, December 19). APT34 - New Targeted Attack in the Middle East. Retrieved December 20, 2017.
  14. Dantzig, M. v., Schamper, E. (2019, December 19). Operation Wocao: Shining a light on one of China’s hidden hacking groups. Retrieved October 8, 2020.
  15. ANSSI. (2021, January 27). SANDWORM INTRUSION SET CAMPAIGN TARGETING CENTREON SYSTEMS. Retrieved March 30, 2021.
  16. InGuardians. (2022, January 5). Peirates GitHub. Retrieved February 8, 2022.
  17. Nettitude. (2018, July 23). Python Server for PoshC2. Retrieved April 23, 2019.
  18. Nicolas Verdier. (n.d.). Retrieved January 29, 2018.
  19. CERT-FR. (2020, April 1). ATTACKS INVOLVING THE MESPINOZA/PYSA RANSOMWARE. Retrieved March 1, 2021.
  20. Sanmillan, I.. (2020, May 13). Ramsay: A cyber‑espionage toolkit tailored for air‑gapped networks. Retrieved May 27, 2020.
  21. Antiy CERT. (2020, April 20). Analysis of Ramsay components of Darkhotel's infiltration and isolation network. Retrieved March 24, 2021.
  22. Tancio et al. (2024, March 6). Unveiling Earth Kapre aka RedCurl’s Cyberespionage Tactics With Trend Micro MDR, Threat Intelligence. Retrieved August 9, 2024.
  23. Kaspersky Lab's Global Research & Analysis Team. (2016, August 9). The ProjectSauron APT. Technical Analysis. Retrieved August 17, 2016.
  24. Liebenberg, D.. (2018, August 30). Rocke: The Champion of Monero Miners. Retrieved May 26, 2020.
  25. Anomali Labs. (2019, March 15). Rocke Evolves Its Arsenal With a New Malware Family Written in Golang. Retrieved April 24, 2019.
  26. Cybereason Global SOC and Cybereason Security Research Teams. (2022, December 14). Royal Rumble: Analysis of Royal Ransomware. Retrieved March 30, 2023.
  27. Salvati, M. (2019, August 6). SILENTTRINITY Modules. Retrieved March 24, 2022.
  28. Check Point Research. (2019, February 4). SpeakUp: A New Undetected Backdoor Linux Trojan. Retrieved April 17, 2019.
  29. DiMaggio, J. (2016, May 17). Indian organizations targeted in Suckfly attacks. Retrieved August 3, 2016.
  30. Cado Security. (2020, August 16). Team TNT – The First Crypto-Mining Worm to Steal AWS Credentials. Retrieved September 22, 2021.
  31. Darin Smith. (2022, April 21). TeamTNT targeting AWS, Alibaba. Retrieved August 4, 2022.
  32. Quist, N. (2020, October 5). Black-T: New Cryptojacking Variant from TeamTNT. Retrieved September 22, 2021.
  33. Dell SecureWorks Counter Threat Unit Threat Intelligence. (2015, August 5). Threat Group-3390 Targets Organizations for Cyberespionage. Retrieved August 18, 2018.
  34. Falcone, R. and Lancaster, T. (2019, May 28). Emissary Panda Attacks Middle East Government Sharepoint Servers. Retrieved July 9, 2019.
  35. Alintanahin, K. (2015). Operation Tropic Trooper: Relying on Tried-and-Tested Flaws to Infiltrate Secret Keepers. Retrieved June 14, 2019.
  36. Chen, J.. (2020, May 12). Tropic Trooper’s Back: USBferry Attack Targets Air gapped Environments. Retrieved May 20, 2020.
  37. CISA et al.. (2024, February 7). PRC State-Sponsored Actors Compromise and Maintain Persistent Access to U.S. Critical Infrastructure. Retrieved May 15, 2024.
  38. Xiao, C. (2018, September 17). Xbash Combines Botnet, Ransomware, Coinmining in Worm that Targets Linux and Windows. Retrieved November 14, 2018.
  39. Belcher, P.. (2016, July 28). Tunnel of Gov: DNC Hack and the Russian XTunnel. Retrieved August 3, 2016.
  40. Allievi, A., et al. (2014, October 28). Threat Spotlight: Group 72, Opening the ZxShell. Retrieved September 24, 2019.