Malware Forensics
Crypto Currency Miner Malware

The anonymous active malware that shook the Internet followed the footsteps of WannaCry and NotPetya, which shook the world as a result of America’s largest and most secretive intelligence agency NSA being infiltrated by the Shadow Brokers, a hacker group. The National Security Agency developed tools to gain potential information, which are, in most cases, vulnerabilities and zero-days that could tear down almost every system on the planet. They were meant to be secure and to be used as a last resort at a national-level threat, which ended up being the tools for the world’s biggest malware attacks in history.

Adylkuzz is a result of this. It is a novice malware still in the wild, probably making millions or even billions for infamous cybercriminals or a foreign nation by utilizing people’s resources for their benefit. Adylkuzz is a cryptocurrency mining malware which makes money using system resources instead of asking for a ransom.

This paper aims to understand, study and provide a forensic analysis of the malware along with its scope and a complete analysis to prevent and detect it, summing up to the worst-case scenario and how dangerous this malware can be.

🔎

Original Research Notice: At the time of writing, this forensic analysis was one of the first independent hands-on behavioral studies of Adylkuzz. The CPU evasion technique, registry changes, and network traffic patterns documented here were not widely published or independently confirmed by other researchers at the time.


Required Exposition

To completely understand the malware and why it originated, it is important to understand cryptocurrency mining and blockchain concepts and how they work. I hope to brush these topics for any reader with a lack of understanding or knowledge, just like when I started.

What Is Cryptocurrency?

Cryptocurrency is a piece of the most expensive and ultra-secure data treated as money, which came into existence to counter fiat money’s non-transparent centralized infrastructure. Fiat money is the current money system, agreed upon based on trust in the government and maintained by a bank.

Cryptocurrency is completely transparent, open, and trackable, as all the transactions and balances are stored on every computer participating in the system, which is the blockchain, rather than only the bank. But it is impossible to gain information on who is sending what to whom, which in most cases is favorable for malicious black market or dark web trades in the present world scenario.

Blockchain is a revolutionized trusted peer-to-peer data interaction system to access, verify, and transact between systems. It is a solution for decentralizing trust and enabling direct access to data, and is in most cases referred to as being invented to power cryptocurrency.

Blockchain technology uses a decentralized network of computers to hold the ledger method of information, possibly eliminating the ability to tamper with data placed by each individual in the form of chronological blocks that cannot be rewritten. For someone to place a block of information, a cryptographic puzzle must be solved by a computer and then shared with all computers on the network as a proof-of-work. This is then verified by each computer on the network, only after which it is added as the next block to the chain, which together establishes trust among each block on the chain.

How Mining Actually Works

Similar to blockchain, anyone who wants to participate in updating the ledger of a cryptocurrency transaction must guess a random number that solves an equation generated by the system. If this number is correct, the individual earns a Bitcoin and gains the ability and right to write the next page of that cryptocurrency transaction on the blockchain, after being validated by each of the other individual participants, called miners, and eventually becomes a temporary banker of that cryptocurrency, in this case Monero.

After the transaction is complete, the computer generates a fixed amount of bitcoin as a reward or compensation for the time and energy spent by the individual in solving the math problem.


The Reason for Existence

The origin of Adylkuzz points straight to the complexity of solving the math problem, in other words, cryptocurrency mining, which needs an exponential amount of computational resources and proved to be non-profitable for an individual to invest in. Hence an individual or a group of prominent hackers came up with a generation of malware, referred to as a more lucrative cousin to WannaCry, built from the tools developed by the NSA.

The logic is simple: if you cannot afford the computing power to mine profitably on your own, you steal it from thousands of others without their knowledge. Adylkuzz does exactly that.


Discovery: Why Monero?

Monero is an open-source cryptocurrency that enhances anonymity capabilities with similar functions to Bitcoin technology. As the number of users keeps increasing, the feasibility of solving the math problem, proof-of-work, for mining Bitcoin falls, resulting in almost no-profit outcomes for new miners. Due to the reputation and popularity of Bitcoin, Bitcoin blockchain data mining has emerged, through which organizations responsible for it can de-anonymize Bitcoin transactions.

To overcome these problems, Monero was developed with additional features, including ring signatures and stealth addresses, which make it a private, more secure, and untraceable currency, keeping its transactions anonymous. This is likely the reason hackers accepted payment in Monero from the WannaCry ransomware attack. It has also been observed that many darknet markets, including AlphaBay, an underground marketplace, adopted Monero, which showed a potential surge in its transaction activity.

For an attacker running a cryptomining botnet, Monero is the obvious choice: untraceable, increasingly valuable, and already normalized on criminal infrastructure.


EternalBlue

EternalBlue was developed by the NSA and intended to be kept secure and secret, used only against national-level threats. That changed when the Shadow Brokers, a group of hackers, infiltrated the NSA and leaked several exploitation tools, EternalBlue among them. The result was one of the biggest ransomware attack campaigns in history: WannaCry, and now Adylkuzz.

EternalBlue works on all Windows versions up to Windows 7, and some Windows 8, Windows 10, and Windows Server versions, taking advantage of multiple vulnerabilities in SMBv1, the Server Message Block protocol. A complete list of vulnerable versions is listed under CVE-2017-0144.


SMB Protocol

SMB is embedded into Windows as a network file-sharing protocol that allows a system to access, request, and share files or services to and from a remote server. It is also known as the Common Internet File System, functioning as an application layer network protocol that serves as a medium to share and provide access to files, printers, ports, and communication between nodes in a network.

The service has 4 widely known vulnerabilities leading to Remote Code Execution and Denial of Service. EternalBlue exploits 3 major vulnerabilities, all leading to a successful Remote Code Execution:

SMBv1 Vulnerabilities Exploited by EternalBlue

Wrong Casting Bug

Wrong Parsing Function Bug

Non-paged Pool Allocation Bug

Details available at: exploit-db.com/exploits/41987, 42030, 42031

Microsoft initially fixed all the vulnerabilities in systems above Windows 8.1, and later published patches for older versions due to the WannaCry campaign. However, completely overthrowing the vulnerability is impossible due to the large number of legacy systems and non-tech-savvy users still running unpatched versions.


DoublePulsar

Similar to EternalBlue, DoublePulsar, a backdoor implant, was leaked by the Shadow Brokers when they infiltrated the United States National Security Agency’s Equation Group. It was found that the tool infected more than 250,000 Microsoft Windows computers and is considered much more powerful than Heartbleed.

DoublePulsar is triggered by EternalBlue. It is a multi-architecture kernel-level payload that resides in memory. Because it operates at the kernel level, it gives attackers full control over the system to run any raw shellcode payloads. It uses the SMB ports on the machine to further infect the system by loading other malware. Analysis shows this malware has specific limited tasks it can perform:

DoublePulsar Capabilities

a. Running a DLL on the host system

b. Loading a shellcode

c. Uninstalling itself

d. Responding to a specific ping request

As it acts as an intermediate to load malware and further infect the system, there is a way to detect if a system is compromised. Countercept released a Python script to check this. A system infected with DoublePulsar sends a “trans2 SESSION_SETUP” request. The system responds with a different multiplexer ID: 65 (0x41) for a normal system and 81 (0x51) for an infected system. This can later be used to take control of the SMB service and further infect with other malware, launch remote code, or exfiltrate data.

Microsoft has since patched the vulnerabilities, and tools have updated enough to detect DoublePulsar, though this only allowed hackers to install custom backdoors alongside EternalBlue during the active campaign window.

Step 1
EternalBlue
SMBv1 Exploit
Step 2
DoublePulsar
Backdoor Install
Step 3
Adylkuzz
Payload Drop
Step 4
Monero
Mining Begins

Malware Analysis

The complete attack consists of 3 parts as explained earlier. However, analysis of the initial 2 parts related to EternalBlue and DoublePulsar are not conducted in this study as they are not the main objective. For a complete and clear understanding, they are included based on bibliographic study already available. The hands-on forensic analysis below covers the Adylkuzz payload itself.


Collection and Acquisition

Environment
Windows 7 Virtual Machine via VMware (vulnerable by default). Also tested on Windows 10 VM to confirm identical behavior. Windows Defender and any antivirus turned off for accurate results.
Steps
Updated VMware and took a snapshot, initialized all tools, turned off Windows Defender and Firewall in Windows 10, set virtual machine network to NAT in Windows 7 and Bridged in Windows 10 to understand and experiment with malware behavior.
Malware
Downloaded 2 different samples from any.run, the same samples available on Maltiverse.com. VirusTotal hash verification used to validate samples. Additional sample sourced from GitHub.
Tools
Process Hacker, Wireshark, Process Monitor, RegShot, PEiD, PEStudio, CFF Explorer, EXEInfo PE. Used for behavioral, network, and threat analysis.
BehavioralProcess Hacker
BehavioralProcess Monitor
NetworkWireshark
RegistryRegShot
StaticPEiD
StaticPEStudio
StaticCFF Explorer
StaticEXEInfo PE

Static Analysis

The malware is packed by VMProtect (v3.00 to 3.1.2) with entropy 7.97, has a GUI interface, and is executable. No information regarding version, libraries, identifiers, or PE header information was obtainable from PEiD or PEStudio, as the application closes as soon as the malware is loaded.

Section Headers from CFF Explorer
Section Headers of the malware obtained from CFF Explorer.
PEStudio analysis output
PEStudio analysis output. Limited static information available due to VMProtect packing.

Not much information was obtained from static analysis due to the packing. Moving to dynamic and behavioral analysis gives a much more complete picture.


Behavioral Analysis

Multiple incoming connections from a remote source were observed on the victim system’s SMB port 445, which was open and listening.

Incoming SMB port connections
Incoming connections over SMB port 445 observed during initial execution.

The incoming connections over the SMB port were attempting to deliver DoublePulsar, which was confirmed as Adylkuzz began functioning right after the end of incoming connections. This led to the conclusion that the exploit infects the SMB service to run and install a backdoor, which then pushes the actual payload. Cybereason captured these details, which were used for bibliographic research on the initial part of the attack.

DoublePulsar delivery via SMB
DoublePulsar backdoor delivery observed over SMB. KAFEINE, Adylkuzz Cryptocurrency Mining Malware Spreading for Weeks Via EternalBlue/DoublePulsar (Proofpoint, 2017).
Adylkuzz botnet download via DoublePulsar
DoublePulsar backdoor used to download Adylkuzz botnet via svchost.exe. KAFEINE, Adylkuzz Cryptocurrency Mining Malware Spreading for Weeks Via EternalBlue/DoublePulsar (Proofpoint, 2017).
Malicious IPs flagged by AV vendors
Multiple antivirus vendors flagged the IP addresses as malicious, confirming DoublePulsar used svchost.exe to download the Adylkuzz botnet from flagged infrastructure. KAFEINE, Adylkuzz Cryptocurrency Mining Malware Spreading for Weeks Via EternalBlue/DoublePulsar (Proofpoint, 2017).
Full attack chain overview
Full attack chain overview showing EternalBlue to DoublePulsar to Adylkuzz payload delivery. KAFEINE, Adylkuzz Cryptocurrency Mining Malware Spreading for Weeks Via EternalBlue/DoublePulsar (Proofpoint, 2017).

Adylkuzz Malware Behavioral Analysis

The following study was conducted under the conditions above using the mentioned tools. Wireshark was initialized to capture network traffic. Process Hacker and Process Monitor were initialized with a filter on Operation: Process Create to exactly understand the working of the malware. The malware file was run with administrator privileges, as in a real attack.

Multiple processes spawned immediately after malware execution
Multiple processes flashed on screen immediately after running the malware.
Process Monitor showing multiple processes created
Multiple processes created, captured in Process Monitor immediately after execution.

The malware used the command line to kill certain programs including hdmanager.exe, mmc.exe, and msiexev.exe, stopped and deleted a service called WELM, modified firewall rules, and added filter rules using the netsh command. As stated in the work, the malware blocked SMB port 445 to deny further communication and further exploitation by itself or any other malware.

SMB port 445 blocked via netsh firewall rule
Malware added firewall filter rules via netsh, blocking SMB port 445 to prevent further exploitation.
Monero mining application running
A program related to Monero found running, likely the mining application itself.

The malware also installed remote access to wmidap, a program used to update performance counters, likely to hide CPU usage from standard monitoring tools.

wmidap remote access installed by malware
Remote access installed via wmidap, likely used to conceal CPU usage from standard monitoring.

Another important observation: when CPU usage was viewed from Process Hacker, it started fluctuating the moment the application was closed, going to 100% and then much lower. However, msiexev.exe was found utilizing almost 100% of the CPU.

CPU usage spiking when Process Hacker is closed
CPU usage fluctuates dramatically when Process Hacker is closed. msiexev.exe observed consuming near 100% CPU.

When viewed through Task Manager, the percentage dropped to almost negligible and immediately increased when Task Manager was closed. The malware is actively aware of monitoring tools and adjusts its behavior in real time to avoid detection.

Task Manager showing CPU drop under observation
CPU usage drops when Task Manager is open, then immediately spikes when closed. Active evasion of monitoring tools confirmed.

The malware installed an application in the Windows Fonts location that is executed to kill or initiate any process, and is probably the miner itself. This application was observed running immediately after opening Task Manager to kill msiexev.exe.

Malware application installed in Windows Fonts directory
Application installed by malware in the Windows Fonts directory, likely used to restart or protect the mining process.

RegShot was used to check for changes made to the registry. The result: 24 keys and 193 values added, along with 28 values modified, summing up to 245 changes in the registry. The malware changed firewall rules, installed new applications, initialized the session, changed IPsec policies, and much more.

RegShot showing 245 registry changes
RegShot output: 24 keys added, 193 values added, 28 values modified. Total 245 registry changes.

Network Forensics

Wireshark captured multiple HTTP requests immediately after running the malware.

Wireshark HTTP requests on malware execution
Multiple HTTP requests captured by Wireshark immediately after malware execution.

The first request made was to Broadcom.com, actually establishing a device-to-device connection without passing through the router, followed by a second request: a layer 3 forwarding from the Netgear router in this case.

Device-to-device connection via Broadcom
First request: device-to-device connection to Broadcom.com bypassing the router, followed by Layer 3 forwarding.

The malware then typically announces that it is successfully installed and requests instructions.

Malware announcing successful install and requesting instructions
Malware announces successful installation to the C2 server and requests further instructions.

The malware then requested a text file containing instructions to run the Monero miner application, then closed the connection. Additional applications were also downloaded, including 64.exe.

Mining instructions text file downloaded
Malware downloads a text file containing instructions for the Monero mining application, then downloads additional tools including 64.exe.

Malware also reported the victim’s system configuration and details to a remote server.

System configuration reported to remote C2
Malware exfiltrates victim system configuration to a remote C2 server.

Malware also reported host system details to a remote server, which is quite interesting. It also attempted to get the actual external IP from icanhazip.com.

External IP lookup via icanhazip.com
Malware attempts to retrieve the victim’s actual external IP address via icanhazip.com.

It is also evident that a session is active and running, confirmed by smss.exe running in the victim system.


Indicators of Compromise

Type Indicator Notes
Hostname 08[.]super5566[.]com C2 server
Hostname pool[.]minexmr[.]com Monero mining pool
Hostname icanhazip[.]com External IP lookup
IP 45[.]77[.]127[.]212 Observed C2 traffic
IP 66[.]42[.]19[.]188 Adylkuzz server (confirmed malicious)
IP 66[.]42[.]108[.]166 Observed in network traffic
IP 104[.]22[.]19[.]188 Observed in network traffic
IP 77[.]234[.]44[.]86 Observed in network traffic
File msiexev.exe Miner process (typosquats msiexec)
File mine.txt Mining instructions downloaded from C2
File 64.exe Additional payload downloaded
File WUAUSER Persistence artifact
Hash ea16ded2-227f-4161-837b-493764d9e65b Sample identifier
Service WELM Stopped and deleted by malware
Service SMB port 445 Blocked by malware post-infection
Miner Wallet 436jRfZbdEkPXJb5eiS72Vg5zdfrMTcrp9a1q9rn9KMU1r62hZbXqqc8q7D1qrShhUcQvuDNq5gvCf7ffQXutoJGPUBJXT Monero wallet address

Conclusion

It is observed that the malware stays active and initializes even after a restart with the same remote host and creates a session. The system performance hits 100% and later hangs and becomes unusable. For Windows 10, firewall, Windows Defender and any other security should be turned off and the malware did not affect the host system in any way, working similarly in both operating systems. Later it is observed that the mining process is fixed to a hash. It is quite surprising to see the attack working on a Windows 10 system, which is possible if the initial steps of EternalBlue are somehow replaced. For this analysis it was directly downloaded from an online source. It is also evident that this 2-year-old attack campaign is still active and mining Monero cryptocurrency. The malware can be completely prevented by patching the latest updates and installing good antivirus. Indicators of compromise can be installed into detection systems, and recent updates have made it easier to detect Adylkuzz. The malware itself is quite robust and complex, capable of doing far more hideous actions to and on the victim system. The various analysis steps display how powerful the malware is and how brilliantly designed it is to stay anonymous while utilizing the resources and making money for its owner like a parasite.
Key Findings
  • Adylkuzz is a direct descendant of NSA tools stolen by the Shadow Brokers, repurposed to mine Monero by exploiting EternalBlue and DoublePulsar in a three-stage attack chain.
  • The malware actively evades monitoring tools in real time. CPU usage drops when Process Hacker or Task Manager is open and spikes the moment they are closed. This behavior was observed and documented firsthand.
  • 245 registry changes were recorded post-infection: 24 keys added, 193 values added, 28 values modified. The malware is deeply embedded and persistent across reboots.
  • The malware blocks SMB port 445 after infection to prevent further exploitation by competing malware, protecting its resource monopoly on the infected system.
  • A Monero wallet address was identified and is fixed to the mining hash, meaning all mined Monero goes to a single beneficiary wallet regardless of how many systems are infected.
  • At the time of writing, the campaign was still active and mining, 2 years after initial discovery. Patching and antivirus remain the primary prevention controls.

References

  • Bhat, Shakeel. (2017). DoublePulsar: A Very Sophisticated Payload for Windows. SecPod. secpod.com
  • Distler, Dennis. (2008). Malware Analysis: An Introduction. SANS Institute.
  • F-Secure Global. (2017). Analyzing the DoublePulsar Kernel DLL Injection Technique. f-secure.com
  • Grossman, Nadav. (2017). EternalBlue: Everything There Is To Know. Check Point Research. research.checkpoint.com
  • KAFEINE. (2017). Adylkuzz Cryptocurrency Mining Malware Spreading for Weeks Via EternalBlue/DoublePulsar. Proofpoint. proofpoint.com
  • Monaco, Fabrizio. (2017). malware-samples/Adylkuzz. GitHub. github.com
  • NIST. (2018). CVE-2017-0144 Detail. NVD. nvd.nist.gov
  • SentinelOne. (2019). EternalBlue: The NSA-Developed Exploit That Just Won’t Die. sentinelone.com
  • Wikipedia. (2020). The Shadow Brokers. wikipedia.org
Facebook
Twitter
LinkedIn

Stay In Touch

“Hey there, tech-savvy friend! If you want to be a hero and help us keep our cyber security on point, just drop your email in my on-call list. Don’t worry, I won’t spam you with cat videos or share your info. Thanks for being the Batman to our Gotham City!”