Exposed JDWP Interface Exploited to Deploy XMRig Miner and Establish Persistence

· Original article ↗

Summary

Wiz researchers observed attackers exploit exposed JDWP on a TeamCity honeypot to run commands, deploy a customized XMRig miner, and establish persistence. Their tests detected JDWP exploitation attempts within hours.

Key points

  • The attackers reached a Wiz TeamCity honeypot with JDWP exposed on port 5005; Wiz observed exploitation attempts within hours of exposing test machines.
  • The attackers used JDWP protocol commands to locate Java Runtime methods and execute shell commands, likely using a modified jdwp-shellifier variant.
  • A dropper downloaded a customized XMRig miner disguised as the logrotate utility; the hardcoded configuration avoided suspicious command-line arguments.
  • The dropper installed persistence through shell startup files, boot scripts, systemd, and cron jobs, and could re-fetch and relaunch itself.
  • The miner used pool proxies to obscure the cryptocurrency wallet address, according to the researchers.
  • Wiz found more than 6,000 unique IP addresses scanning for JDWP endpoints in GreyNoise data from the previous 90 days.
  • The article lists indicators including payload servers at awarmcorner[.]world and canonicalconnect[.]com, and a miner pool at 185.208.156[.]247:3333.

Article Details

Attack Vectors
  • The attacker scanned the internet for exposed JDWP ports, then used a JDWP handshake and protocol requests to inspect JVM classes and methods and invoke java.lang.Runtime.exec() to run commands.
  • Commands downloaded and launched a dropper script, which fetched a modified XMRig miner from remote payload servers.
  • The dropper established persistence through systemd, cron jobs, shell startup files, and distribution-specific boot scripts.
Defensive Notes
  • Do not expose JDWP interfaces to the internet; restrict debugger access and secure debug configurations.
  • Monitor for unexpected JDWP connections and Java Runtime command execution, as well as changes to cron entries, systemd services, shell startup files, and boot scripts.
  • Investigate suspicious files named logrotate, especially in ~/.config, and look for unauthorized XMRig processes or unusually high CPU usage.
  • Wiz reports that its agentless malware detection and Runtime Sensor can detect related malware and behaviors.

Indicators of compromise

TypeIndicatorContext
IPV4176[.]65[.]148[.]239IP address identified as a JDWP scanner.
IPV4176[.]65[.]148[.]57IP address identified as a JDWP scanner.
IPV4176[.]65[.]148[.]86IP address identified as a JDWP scanner.
IPV4185[.]196[.]8[.]123Payload server serving the logservice.sh script, also listed as a file server.
IPV4185[.]196[.]8[.]41IP address identified as a mining pool.
IPV4185[.]196[.]8[.]86File server identified as hosting payloads.
SHA10851a95d46f035c7759782299422bcfd794e2aecSHA-1 hash identified in the article for the malicious logrotate-named payload.
SHA11879d5fa0c2ca816fcb261e96338e325e76dca09SHA-1 hash identified in the article for the logservice.sh dropper.
SHA118d83ba336ca6926ce8b9d68f104cff053f0c2f9SHA-1 hash identified in the article for o.sh, an attack script.
SHA12d4a23e861ef41df6953195fa4cda115e37a7218SHA-1 hash identified in the article for the malicious logrotate-named payload.
SHA17074d674d120d19aa7e44e29dd126af152ccdb7cSHA-1 hash identified in the article for the malicious logrotate-named payload.
SHA1815bc1a79440cdc4a7e1d876ff2dc7bc4f53d25eSHA-1 hash identified in the article for the malicious logrotate-named payload.
SHA1a923de9df0766d6c4be46191117b8cc6486cf19cSHA-1 hash identified in the article for the logservice.sh dropper.
SHA1baf0a3b92225f56499c6879b176a3d6163b9d3efSHA-1 hash identified in the article for the malicious logrotate-named payload.
SHA1ea7c97294f415dc8713ac8c280b3123da62f6e56SHA-1 hash identified in the article for XMRig 6.22 used as a mining payload.
URLhxxps[:]//aheatcorner[.]worldDomain identified as a previous payload file server.
URLhxxps[:]//awarmcorner[.]world/silicon64blueprints.pngPayload URL used to download the miner for x86_64 systems.
URLhxxps[:]//awarmcorner[.]world/siliconarmblueprints.pngPayload URL used to download the miner for aarch64 systems.
URLhxxps[:]//awarmcorner[.]world/siliconarmv7blueprints.pngPayload URL used to download the miner for armv7l systems.
URLhxxps[:]//canonicalconnect[.]com/logservice.shDropper download URL used in the observed JDWP exploitation commands.
URLhxxps[:]//cozy[.]yachtsDomain identified as a previous payload file server.
URLhxxps[:]//s3[.]tebi[.]io/dhcpdc/o.shPayload URL identified in the article's IOC list.

MITRE ATT&CK

Malware

Products

Tools

Related Articles