During 2017, WannaCry became a national headline for the United Kingdom and many other nations targeting companies, such as FedEx, Honda, Nissan, and the National Health Service (NHS) in the United Kingdom [1]. A Ransomware and Cryptoworm, that utilized the ETERNABLUE exploit and the DOUBLEPULSAR backdoor to propagate across unpatched Microsoft Windows systems is the centre of this article.
- Threat Intelligence - A Diamond Model mapping, a campaign timeline, and, impact assessment of WannaCry
- Basic Static Analysis - Conducting fingerprinting of the application and the subsequent mapping of the binary to MITRE ATT&CK and the Malware Behaviour Catalogue
- Basic Dynamic Analysis - Initial detonation with and without networking
- Advanced Static Analysis - A reverse engineering of the binary
- Advanced Dynamic Analysis - A further dynamic test reviewing new findings based on the work of the Advanced Static Analysis section
- Indicators of Compromise - A comprehensive list of Indicators-of-Compromise
- Malware Behaviour Catalogue - Categorising the WannaCry malware against the MBC catalogue
- Classification - The classification of the malware based on the Computer Antivirus Research Organization (CARO) malware naming scheme
- Defender Recommendations - Recommendations for a proactive and reactive approach to WannaCry, with example YARA rules
- Conclusion - A wrap up of the findings
- References - A collection of URL references and their usage in the work
Threat Intelligence
Diamond Model
| Category | Data Point(s) |
|---|---|
| Adversary | The United States of America and the United Kingdom attribute these attacks to North Korea and the Lazarus Group [2] [3] |
| Infrastructure | Killswitch Domain: iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea Tor C2 Domains: gx7ekbenv2riucmf[.]onion 57g7spgrzlojinas[.]onion xxlvbrloxvriy2c5[.]onion 76jdd2ir2embyv47[.]onion cwwnhwhlz52maqm7[.]onion |
| Victim | The victim list is broad, however, for the United Kingdom, Manufacturing, Government, Healthcare, and Logistics were most prevalent |
| Capability | The ETERNALBLUE [4] and DOUBLEPULSAR [5], along with the Ransomware were the core capabilities in the attack |
![]() |
| Figure 1: Diamond Model |
Campaign Timeline
Pre-Attack
| Date | Event |
|---|---|
| 2016-08-13 | The Shadow Brokers emerge publicly, announcing stolen NSA Equation Group tooling via Twitter and GitHub [6]. |
| 2017-02 (approx.) | An early variant of WannaCry (version 1.0) appears in a limited number of targeted attacks. This version does not use ETERNALBLUE, instead relying on compromised credentials to propagate through networks [7]. |
| 2017-03-14 | Microsoft releases security bulletin MS17-010, patching the SMBv1 vulnerability across all supported Windows versions from Vista through Server 2016 [8]. |
| 2017-04-14 | The Shadow Brokers release the Lost in Translation dump, containing ETERNALBLUE, DOUBLEPULSAR, and several other NSA exploits [9]. |
| 2017-04-21 to 2017-04-25 | Thousands of systems already compromised with DOUBLEPULSAR, growing to hundreds of thousands by 25 April [10] [11]. |
| 2017-05-05 | The Spanish CERTSI (Computer Emergency Response Team for Security and Industry) publishes an early warning bulletin citing WannaCry ransomware attacks [12]. |
| 2017-05-05 | Reports of the attack began circulating on Twitter, specifically, Spanish companies [12]. |
Attack Day - 12 May 2017
| Time (UTC) | Event |
|---|---|
| ~07:24 | First WannaCry 2.0 infections recorded in Europe (reported as 3:24 AM EDT by multiple sources). [10] |
| ~07:44 | Evidence of initial infection in Asia. The worm begins propagating via ETERNALBLUE over SMBv1 port 445, scanning both local network ranges and random public IP addresses [10]. |
| ~11:00 | Reports begin circulating on Twitter. The first named organisations are Spanish companies, including Telefónica, Vodafone, and Banco Bilbao Vizcaya Argentaria [12]. |
| 15:03 | Marcus Hutchins (MalwareTech) registers the killswitch domain iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea[.]com, halting propagation for samples that successfully resolve the domain before executing [13] [14]. |
| 16:00 | NHS England declares cyber attack a major incident [15] |
Immediate Aftermath - 13 to 22 May 2017
| Date | Event |
|---|---|
| 2017-05-13 | Microsoft releases emergency out-of-band patches for unsupported operating systems, including Windows XP, Windows 8, and Server 2003 [10]. The three hardcoded Bitcoin wallet addresses are publicly identified:
|
| 2017-05-14 | WannaCry variants without the killswitch begin appearing. US-CERT publishes Alert TA17-132A with indicators and YARA rules [16]. |
| 2017-05-15 | The attack count exceeds 200,000 systems across 150+ countries. The three wallets have received approximately 151 transactions totalling ~24.76 BTC (~$42,641 USD) [12]. |
| 2017-05-18 | Payments slow significantly. 271 transactions totalling ~44.16 BTC (~$79,711 USD) across the three wallets, with fewer than 10 payments over $200 in 24 hours [17]. |
| 2017-05-19 | Hackers try to DDoS the killswitch domain using a Mirai botnet variant and begin to work on a new version of WannaCry [8]. |
| 2017-05-22 | Hutchins improves the DDoS resilience of the killswitch domain. Independently, researchers from University College London and Boston University publish a method to recover WannaCry encryption keys, later automated as the WannaKey tool [8]. |
Financial - Wallet Activity & Withdrawal
| Date / Time (UTC) | Event |
|---|---|
| 2017-08-03, ~03:06 | The first outgoing transaction is recorded on the blockchain, moving 8.73 BTC from the WannaCry wallets. Between 03:00 and 03:30 UTC, all three wallets are emptied through six transactions completed within approximately 15 minutes. [18] |
| 2017-08-03, 07:08 | The first transaction hits Changelly, a cryptocurrency exchange with no email registration requirement. This is a 0.1 BTC transaction, likely a test before the bulk conversions. [18] |
| 2017-08-03, 07:44 to 09:53 | Eight transactions move approximately 13.53 BTC through ShapeShift, converting BTC to Monero (XMR). Separately, approximately 38.33 BTC are routed through Changelly. The total conversion yields approximately 820.80 XMR via ShapeShift, plus an unknown quantity via Changelly. The use of Monero is significant as it is a privacy-focused cryptocurrency that hides both ends of a transaction and the amount transferred. [18] [19] |
| 2017-08-03 (afternoon) | ShapeShift confirms the WannaCry attackers used their service in breach of their terms, blacklists the associated addresses, and begins cooperating with law enforcement. Changelly confirms approximately 5.2 BTC moved through their exchange and begins cooperating with Europol. [20] |
| 2017-08-17 | The Monero holdings are consolidated in three transactions on ShapeShift.[19] |
| 2017-11-02 | Approximately 536 XMR is exchanged to Bitcoin Cash (BCH) on ShapeShift across nine transactions, completing the chain-hopping laundering cycle: BTC → XMR → BCH. [19] |
Attribution & Legal
| Date | Event |
|---|---|
| 2017-12-19 | The United States and United Kingdom publicly attribute WannaCry to North Korea. White House Homeland Security Advisor Tom Bossert formally names North Korea in a Wall Street Journal op-ed [2] [3]. |
| 2018-09-06 | The U.S. Department of Justice unseals a criminal complaint charging Park Jin Hyok, a North Korean programmer working for Chosun Expo Joint Venture (affiliated with Lab 110, a component of DPRK military intelligence). The complaint connects Park to the Lazarus Group and names him as a conspirator in WannaCry, the 2014 Sony Pictures attack, and the 2016 Bangladesh Bank SWIFT heist. The U.S. Treasury simultaneously sanctions Park and Chosun Expo [21]. |
| 2021-02-17 | The DOJ expands the indictment, adding two further Lazarus Group members, Jon Chang Hyok and Kim Il, both members of the Reconnaissance General Bureau (RGB). The expanded indictment details additional financial crimes totalling over $1.3 billion in attempted theft across banks, cryptocurrency services, and extortion campaigns conducted from 2017 through 2020 [21]. |
Basic Static Analysis
The following section provides a basic analysis of the Ransomware.wannacry.exe.malware binary, focused on fingerprinting the binaries hashes, framework coverage, imports, strings, and virtual vs raw size.
Fingerprinting & Framework Coverage
Using Mandiant's CAPA tool [22], we can profile a lot of the binary to help build the broad strokes of the binary.
Running the command, capa Ransomware.wannacry.exe.malware, provides the following:
- MD5 - db349b97c37d22f5ea1d1841e3c89eb4
- SHA1 - e889544aff85ffaf8b0d0da705105dee7c97fe26
- SHA256 - 24d004a104d4d54034dbcffc2a4b19a11f39008a575aa614ea04703480b1022c
- Analysis - static
- Operating System - Windows
- Format - Portable Executable (PE)
- Architecture - i386
- VirusTotal: https://www.virustotal.com/gui/file/24d004a104d4d54034dbcffc2a4b19a11f39008a575aa614ea04703480b1022c/details
The MD5, SHA1, and SHA256, allows us as the researcher to identify if there are any samples known in the wild, our typical first stop is to use VirusTotal to help identify the binary. As the link below shows, we searched using the SHA256 identifier, which points directly to the WannaCry.exe.
Additionally, we can confirm that the binary is a Windows PE binary using the x86 architecture. These components all help identify our binaries execution requirements for both stages of the dynamic testing, but also our Advanced Static Analysis component.
Researchers Note: While we can trust many of the VirusTotal findings, we should use it as a component in the investigation but also look to verify the findings.
In addition to its initial profiling, CAPA provides a thorough output of the coverage against the MITRE ATT&CK [23] and Malware Behaviour Catalogue (discussed towards the end of the post) [24].
MITRE ATT&CK
- Defense Evasion
- Obfuscated Files or Information::Indicator Removal from Tools [T1027.005]
- Discovery
- File and Directory Discovery [T1083]
- System Information Discovery [T1082]
- System Network and Configuration Discovery [T1016]
- Execution
- Shared Modules [T1129]
- System Services::Service Execution [T1569.002]
- Persistence
- Create or Modify System Processes: Windows Service [T1543.003]
Portable Executable and String Analysis
The next point of call after we have fingerprinted the binary is to look at the strings to help provide us with any leads on what it could be doing. While the traditional tool strings can be used, Mandiant released FLARE-FLOSS, that de-obfuscates the Malware to get a reverted binary for analysis [25].
Using the command : floss Ransomware.wannacry.exe.malware -n 10 the following strings of interest were found:
- URL: www[dot]iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea[dot]com
- String Interpolation: C:\%s\qeriuwjhrf and cmd.exe /c
- Cryptography Functions: CryptGenKey, CryptDecrypt/Encrypt, Crypt Destroy, and CryptAcquireContextA
- Persistence: tasksche.exe and icacls . /grant Everyone:F /T /C /Q
Of note, there are many other strings of interest, however, these are also covered by PEStudio, such as the imports table illustrated in Figure 2.
Figure 2, illustrates the cryptographic controls that are being imported into the Malware. This helps strengthen the evidence of its cryptographic capabilities, whether this is for encrypting the system or for encrypted communication channels.
![]() |
| Figure 2: PEStudio Import of Cryptographic Controls |
Basic Dynamic Analysis
The following section is broken into two parts, networking and no networking. This is to identify if there is any difference in the malware and any trigger points that could occur.
Networking
![]() |
| Figure 3: Wireshark capture of WannaCry.exe |
No Networking
Advanced Static Analysis
Figure 4, illustrates the usage of the URL found in the strings section of the Basic Static Analysis section. Reviewing the findings, we can see that the binary tries to reach out to the URL and if successful will terminate the process. This is confirmed in the Basic Dynamic Analysis, whereby running the Malware binary with the simulated network and no-simulated network experiments.
| Figure 5: Ghidra Analysis highlighting the use of the URL in the binary |
Stage One
Stage Two
![]() |
| Figure 10: XIA Encrypted Zip |
![]() |
| Figure 11: Extract encrypted zip shown in Ghidra |
![]() |
| Figure 12: WNcry@2o17 moved to EBX |
- r.wnry - This is the ransomware message
- s.wnry - This is a tor client
- b.wnry - This is the bitmap image that is loaded once the contents has been encrypted
- c.wnry - The data in this provides tor onion addresses
- u.wnry - This is the decryption tool
- t.wnry - This is the encryption tool
- taskdl.exe - This is the WNCRYT file deletion tool
- taskse.exe - This launches the decryption tool
Dumping the contents of the c.wnry, the C2 Tor onion addresses are identified:
- gx7ekbenv2riucmf[.]onion
- 57g7spgrzlojinas[.]onion
- xxlvbrloxvriy2c5[.]onion
- 76jdd2ir2embyv47[.]onion
- cwwnhwhlz52maqm7[.]onion
Lastly, the identification of the Bitcoin addresses can be easily done via the strings utility within Ghidra, by taking the Bitcoin address from the basic dynamic analysis tests we did and searching for one of them, the identification of the other two is easily found.
- 13AM4VW2dhxYgXeQepoHkHSQuy6NgaEb94 - Bitcoin Address Tracker
- 12t9YDPgwueZ9NyMgw519p7AA8isjr6SMw - Bitcoin Address Tracker
- 115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn - Bitcoin Address Tracker
By searching for references of the Bitcoin address strings, the following function conducts the randomisation of which address to use during the execution of the ransomware as shown in Figure 15.
![]() |
| Figure 15: Bitcoin addresses and randomisation function |
| Figure 16: Bitcoin addresses at function locations |
Advanced Dynamic Analysis
Network Reconnaissance
![]() |
| Figure 17: TCP connections going to port 445 |
![]() |
| Figure 18: Procmon of TCP connectivity |
Exploitation
![]() |
| Figure 20: ETERNALBLUE exploitation caught via Wireshark |
![]() |
| Figure 21: Metasploitable3 ETERNALBLUE and WannaCry |
Persistence
![]() |
| Figure 22: Stage One persistence with Microsoft Security Center (2.0) Service |
![]() |
| Figure 23: WannaCry.exe second stage storage location |
Indicators of Compromise
Below is a collection of Indicators of Compromise (IoC) relating to the WannaCry directory upon infection:
| File | MD5 | SHA1 | SHA256 |
|---|---|---|---|
b.wnry |
c17170262312f3be7027bc2ca825bf0c | f19eceda82973239a1fdc5826bce7691e5dcb4fb | d5e0e8694ddc0548d8e6b87c83d50f4ab85c1debadb106d6a6a794c3e746f4fa |
c.wnry |
ae08f79a0d800b82fcbe1b43cdbdbefc | f6b08523b1a836e2112875398ffefffde98ad3ca | 055c7760512c98c8d51e4427227fe2a7ea3b34ee63178fe78631fa8aa6d15622 |
r.wnry |
3e0020fc529b1c2a061016dd2469ba96 | c3a91c22b63f6fe709e7c29cafb29a2ee83e6ade | 402751fa49e0cb68fe052cb3db87b05e71c1d950984d339940cf6b29409f2a7c |
s.wnry |
ad4c9de7c8c40813f200ba1c2fa33083 | d1af27518d455d432b62d73c6a1497d032f6120e | e18fdd912dfe5b45776e68d578c3af3547886cf1353d7086c8bee037436dff4b |
t.wnry |
5dcaac857e695a65f5c3ef1441a73a8f | 7b10aaeee05e7a1efb43d9f837e9356ad55c07dd | 97ebce49b14c46bebc9ec2448d00e1e397123b256e2be9eba5140688e7bc0ae6 |
taskdl.exe |
4fef5e34143e646dbf9907c4374276f5 | 47a9ad4125b6bd7c55e4e7da251e23f089407b8f | 4a468603fdcb7a2eb5770705898cf9ef37aade532a7964642ecd705a74794b79 |
taskse.exe |
8495400f199ac77853c53b5a3f278f3e | be5d6279874da315e3080b06083757aad9b32c23 | 2ca2d550e603d74dedda03156023135b38da3630cb014e3d00b1263358c5f00d |
u.wnry |
7bf2b57f2a205768755c07f238fb32cc | 45356a9dd616ed7161a3b9192e2f318d0ab5ad10 | b9c5d4339809e0ad9a00d4d3dd26fdf44a32819a54abf846bb9b560d81391c25 |
Malware Behaviour Catalogue
The following Malware Behaviour Catalogue (MBC) mappings are based on the static and dynamic analysis conducted in this post. Behaviours marked with ★ extend the existing MBC WannaCry corpus entry. For MITRE ATT&CK technique mappings, see ATT&CK: WannaCry - Techniques Used.
The following Malware Behaviour Catalogue (MBC) mappings are based on the static and dynamic analysis conducted in this post. Behaviours marked with ★ extend the existing MBC WannaCry corpus entry. For MITRE ATT&CK technique mappings, see ATT&CK: WannaCry - Techniques Used.
Enhanced ATT&CK Techniques
Objective Behaviour ID Evidence Impact Data Encrypted for Impact E1486 WannaCry encrypts files for ransom using CryptEncrypt API. Identified via static analysis of cryptographic imports and confirmed during dynamic detonation. Defence Evasion Obfuscated Files or Information E1027 ★ The XIA ZIP archive embedded in the stage two payload is password-encrypted (WNcry@2o17), requiring reverse engineering or debugging to extract contents. Persistence Create or Modify System Process::Windows Service E1543.003 ★ Creates "Microsoft Security Center (2.0) Service" for stage one persistence. Confirmed in Ghidra and captured in dynamic analysis via Task Manager. Lateral Movement Exploitation of Remote Services E1210 ★ Exploits ETERNALBLUE (MS17-010) over SMBv1 on port 445 to propagate. Captured via Wireshark and confirmed on a Metasploitable3 target. Discovery Remote System Discovery E1018 ★ Scans for hosts on port 445 for lateral movement targets. Observed in Procmon and Wireshark TCP connection logs. Execution System Services::Service Execution E1569.002 ★ Uses service execution for both the stage one persistence service and the stage two tasksche.exe service. Command and Control Ingress Tool Transfer E1105 ★ Drops a Tor client (s.wnry) from the encrypted XIA archive to establish a C2 communication channel. Defence Evasion File and Directory Permissions Modification E1222 ★ Executes icacls . /grant Everyone:F /T /C /Q to grant full permissions to all users, identified via string analysis.
| Objective | Behaviour | ID | Evidence |
|---|---|---|---|
| Impact | Data Encrypted for Impact | E1486 | WannaCry encrypts files for ransom using CryptEncrypt API. Identified via static analysis of cryptographic imports and confirmed during dynamic detonation. |
| Defence Evasion | Obfuscated Files or Information | E1027 ★ | The XIA ZIP archive embedded in the stage two payload is password-encrypted (WNcry@2o17), requiring reverse engineering or debugging to extract contents. |
| Persistence | Create or Modify System Process::Windows Service | E1543.003 ★ | Creates "Microsoft Security Center (2.0) Service" for stage one persistence. Confirmed in Ghidra and captured in dynamic analysis via Task Manager. |
| Lateral Movement | Exploitation of Remote Services | E1210 ★ | Exploits ETERNALBLUE (MS17-010) over SMBv1 on port 445 to propagate. Captured via Wireshark and confirmed on a Metasploitable3 target. |
| Discovery | Remote System Discovery | E1018 ★ | Scans for hosts on port 445 for lateral movement targets. Observed in Procmon and Wireshark TCP connection logs. |
| Execution | System Services::Service Execution | E1569.002 ★ | Uses service execution for both the stage one persistence service and the stage two tasksche.exe service. |
| Command and Control | Ingress Tool Transfer | E1105 ★ | Drops a Tor client (s.wnry) from the encrypted XIA archive to establish a C2 communication channel. |
| Defence Evasion | File and Directory Permissions Modification | E1222 ★ | Executes icacls . /grant Everyone:F /T /C /Q to grant full permissions to all users, identified via string analysis. |
MBC Behaviours
Objective Behaviour ID Evidence Defence Evasion Hidden Files and Directories::File Attribute F0005 WannaCry uses the +h attribute to hide its dropped files from directory listings. Persistence Registry Run Keys / Startup Folder F0012 WannaCry creates two registry run keys to ensure persistence across reboots. Defence Evasion Self Deletion F0007 Killswitch mechanism: if the hardcoded domain resolves via DNS, the binary terminates and deletes itself. Confirmed via Ghidra reversing and the networking vs. no-networking dynamic tests. Discovery Self Discovery B0038 WannaCry checks the size of the file it loads into memory before proceeding with execution. Discovery Self Discovery::Validate Data B0038.002 Checks a string, key length, and magic number before decrypting an embedded DLL. Discovery Self Discovery::Validate Data Length B0038.003 Checks the data length of a PE section before decrypting an embedded DLL. Execution Install Additional Program B0023 ★ Stage one extracts the stage two PE from its resources (r.exe), which then extracts and deploys the XIA archive contents including tasksche.exe, taskdl.exe, and the .wnry components. Command and Control C2 Communication B0030 ★ Communicates via Tor using five onion addresses extracted from c.wnry. Port 9050 connections observed via SysInternals during advanced dynamic analysis.
| Objective | Behaviour | ID | Evidence |
|---|---|---|---|
| Defence Evasion | Hidden Files and Directories::File Attribute | F0005 | WannaCry uses the +h attribute to hide its dropped files from directory listings. |
| Persistence | Registry Run Keys / Startup Folder | F0012 | WannaCry creates two registry run keys to ensure persistence across reboots. |
| Defence Evasion | Self Deletion | F0007 | Killswitch mechanism: if the hardcoded domain resolves via DNS, the binary terminates and deletes itself. Confirmed via Ghidra reversing and the networking vs. no-networking dynamic tests. |
| Discovery | Self Discovery | B0038 | WannaCry checks the size of the file it loads into memory before proceeding with execution. |
| Discovery | Self Discovery::Validate Data | B0038.002 | Checks a string, key length, and magic number before decrypting an embedded DLL. |
| Discovery | Self Discovery::Validate Data Length | B0038.003 | Checks the data length of a PE section before decrypting an embedded DLL. |
| Execution | Install Additional Program | B0023 ★ | Stage one extracts the stage two PE from its resources (r.exe), which then extracts and deploys the XIA archive contents including tasksche.exe, taskdl.exe, and the .wnry components. |
| Command and Control | C2 Communication | B0030 ★ | Communicates via Tor using five onion addresses extracted from c.wnry. Port 9050 connections observed via SysInternals during advanced dynamic analysis. |
Micro-Behaviours
Micro-Objective Micro-Behaviour ID Evidence Cryptography Encrypt Data C0027 CryptEncrypt API imported and used for file encryption. Identified via PEStudio import table and FLOSS string analysis. Cryptography Decrypt Data C0031 CryptDecrypt API imported for decryption of embedded DLL and archive contents. Cryptography Generate Pseudo-random Sequence C0021 CryptGenKey API used for key generation. Bitcoin address randomisation function identified in Ghidra. File System Create File C0016 Stage two payload files written to disk. Procmon CreateFile operations captured during dynamic analysis showing the storage location for second stage components. Process Create Process C0017 Launches tasksche.exe as a new service process and executes commands via cmd.exe /c.
| Micro-Objective | Micro-Behaviour | ID | Evidence |
|---|---|---|---|
| Cryptography | Encrypt Data | C0027 | CryptEncrypt API imported and used for file encryption. Identified via PEStudio import table and FLOSS string analysis. |
| Cryptography | Decrypt Data | C0031 | CryptDecrypt API imported for decryption of embedded DLL and archive contents. |
| Cryptography | Generate Pseudo-random Sequence | C0021 | CryptGenKey API used for key generation. Bitcoin address randomisation function identified in Ghidra. |
| File System | Create File | C0016 | Stage two payload files written to disk. Procmon CreateFile operations captured during dynamic analysis showing the storage location for second stage components. |
| Process | Create Process | C0017 | Launches tasksche.exe as a new service process and executes commands via cmd.exe /c. |
Classification
For the classification of the Malware based on its findings, the Computer Anti-Virus Research Organization (CARO) malware naming scheme [26] identifies WannaCry as:
Ransom:Win32/WannaCrypt
The justification for this breakdown is as follows:
- Ransom - Based on the ransomware note provided upon infection
- Win32 - Based on the architecture during the basic analysis stage, i.e., i386 + PE format
- WannaCrypt - Based on the identification provided by other security researchers






















