Apache ActiveMQ Exploit Leads to LockBit Ransomware – The DFIR Report

A threat actor exploited CVE-2023-46604 on an internet-facing Apache ActiveMQ server to gain RCE, deliver a Metasploit/Meterpreter stager, dump LSASS memory, and move laterally. Eighteen days after initial eviction they re-exploited the same server and used stolen credentials to deploy LockBit ransomware (likely built with the leaked LockBit builder) via RDP and AnyDesk, communicating with C2 at 166.62.100.52. #CVE-2023-46604 #LockBit

Keypoints

  • Initial access was achieved by exploiting CVE-2023-46604 in an exposed Apache ActiveMQ instance using a malicious Java Spring XML payload to run commands and download a Metasploit stager.
  • The Metasploit/Meterpreter stager (uFSyLszKsuR.exe) provided SYSTEM privileges via a getsystem-like sequence, and LSASS process memory was dumped to harvest credentials.
  • Lateral movement was performed through remote service execution (Metasploit-created services) and RDP, enabling access to domain controllers, backup and file servers.
  • The actor was evicted after the first intrusion but re-exploited the same unpatched ActiveMQ server 18 days later and reused previously stolen credentials to escalate rapidly.
  • During the second engagement the actor installed AnyDesk for persistence/remote access, deployed LockBit ransomware binaries (LB3_pass.exe, LB3.exe), and executed them interactively over RDP to encrypt hosts.
  • Ransom notes deviated from standard LockBit infrastructure (using Session messaging), indicating likely use of the leaked LockBit builder by an independent operator; Time to Ransom was ~419 hours from initial access to encryption.

MITRE Techniques

  • [T1190 ] Exploit Public-Facing Application – Exploited CVE-2023-46604 in Apache ActiveMQ by sending a malicious OpenWire Exception Response with a Java Spring ClassPathXmlApplicationContext pointing to a malicious XML payload (‘RCE was accomplished by sending the Java Spring org.springframework.context.support.ClassPathXmlApplicationContext class, along with a URL to a maliciously crafted Java Spring bean configuration XML file’).
  • [T1105 ] Ingress Tool Transfer – Downloaded the Metasploit stager and other executables using CertUtil to retrieve payloads from a remote host (‘downloaded and executed a Metasploit stager named uFSyLszKsuR.exe using CertUtil as the download tool’).
  • [T1059.001 ] PowerShell – Used obfuscated PowerShell and in-memory shellcode loading to execute staged code (Base64 → VirtualAlloc → CreateThread flow) (‘This code performs the following actions: Converts a Base64-encoded string … Allocates memory … Creates a new thread to execute the code in the allocated memory’).
  • [T1059.003 ] Command and Scripting Interpreter: Windows CMD – Created and executed batch scripts (rdp.bat) and ran CMD commands to enable RDP, open ports, and remove artifacts (‘After the creation of the rdp.bat file, several commands were executed via a CMD process to modify the host configuration, specifically to permit RDP through the firewall and set the RDP port number to 3389’).
  • [T1569.002 ] System Services: Service Execution – Created and used services (e.g., kesknq) to execute payloads and escalate privileges via Meterpreter/getsystem behavior (‘we observed the creation of a new service named kesknq’ and ‘This pattern of activity is commonly associated with running the getsystem command in a Meterpreter shell’).
  • [T1003.001 ] OS Credential Dumping: LSASS Memory – Accessed LSASS process memory to harvest credentials used for later lateral movement and RDP access (‘LSASS process memory was accessed on the beachhead by the Metasploit process’).
  • [T1021.001 ] Remote Services: Remote Desktop Protocol (RDP) – Used RDP extensively for lateral movement and interactive ransomware deployment across backup, file, and other servers (‘They then began using RDP to log into other servers, including a backup server and a file server’).
  • [T1543.003 ] Create or Modify System Process: Windows Service – Installed AnyDesk which created a service configured to AutoStart for persistent remote access (‘AnyDesk application created a service and configured it to AutoStart’).
  • [T1218.011 ] Signed Binary Proxy Execution: SystemSettingsAdminFlows.exe – Abused the legitimate SystemSettingsAdminFlows.exe binary to disable Windows Defender settings (LOLBIN abuse) (‘the threat actor used a legitimate Windows executable, SystemSettingsAdminFlows.exe … This LOLBIN was used to disable Windows Defender settings on the server’).
  • [T1070.001 ] Indicator Removal on Host: Clear Windows Event Logs – Cleared System, Application, and Security event logs to hinder detection and investigation (‘the threat actor was observed clearing out both System and Application event logs … as well as clearing the Security event logs’).
  • [T1071 ] Application Layer Protocol: C2 – Metasploit stager and C2 communicated with 166.62.100[.]52 (port 2460 observed) and AnyDesk logins tied to the same IP, linking exploit and later activity (‘communicated with 166.62.100[.]52’ and ‘Logged in from 166.62.100.52:6761’).
  • [T1486 ] Data Encrypted for Impact – Deployed LockBit ransomware (LB3_pass.exe, LB3.exe) to encrypt systems, drop ransom notes, and change desktop backgrounds (‘These files were LockBit ransomware executables’ and ‘ransom notes were written to directories across affected hosts as the systems were encrypted’).

Indicators of Compromise

  • [IP Address ] C2 and AnyDesk login – 166.62.100[.]52 (C2 communication and AnyDesk login observed).
  • [File Hash ] Ransomware and tool hashes – LB3_pass.exe SHA256: C8646CFB574FF2C6F183C3C3951BF6B2C6CF16FF8A5E949A118BE27F15962FAE, LB3.exe SHA256: 8CEEE89550C521BA43F59D24BA53A22A3B69EAD0FCE118508D0A87A383D6A7B6 (and 2 more hashes including Advanced IP Scanner and netscan.exe hashes listed in the report).
  • [File Name ] Dropped executables and scripts – lb3_pass.exe, lb3.exe (LockBit binaries); advanced_ip_scanner.exe (renamed scanner); rdp.bat (RDP configuration script).
  • [AnyDesk Client ID ] Remote access identifier – AnyDesk Client ID 1148037084 linked to AnyDesk login activity from 166.62.100[.]52.


Read more: https://thedfirreport.com/2026/02/23/apache-activemq-exploit-leads-to-lockbit-ransomware/