16fdcfbc4c5d2a7d5e2ccfd28e4b99208797c91315390718de532d9bd9e46d20wannacry: 16fdcfbc — May 2017 outbreak DLL, kill-switch + EternalBlue + 27-language ransom note ZIP
Executive Summary
A PE32+ x64 DLL compiled 11 May 2017, mislabeled dionaea by OpenCTI but unmistakably the wannacry outbreak binary. It carries the hardcoded kill-switch URL, the mssecsvr.exe SMB propagation service, a .rsrc-embedded ZIP archive with 27 encrypted ransom-note translations, and service-installation APIs for persistence. No CAPE detonation available; analysis is static-only with radare2 and string forensics.
What It Is
| Field | Value |
|---|---|
| SHA-256 | 16fdcfbc4c5d2a7d5e2ccfd28e4b99208797c91315390718de532d9bd9e46d20 |
| File type | PE32+ executable (DLL) (console) x86-64, 6 sections ^[file.txt] |
| Size | 5,298,176 bytes (5.3 MB) ^[triage.json] |
| Compilation | 2017-05-11 12:20:57 UTC (TimeDateStamp 0x59145729) ^[pefile.txt:38] |
| Linker | MSVC 10.0 (Visual Studio 2010) ^[exiftool.json:18] |
| Runtime | MSVCP60.dll + MSVCRT.dll (C++ CRT) ^[strings.txt:242] |
| Signed | No ^[rabin2-info.txt] |
| Family | wannacry — high confidence; OpenCTI label dionaea is false positive |
The binary is a DLL with console subsystem (Subsystem: 0x3) ^[pefile.txt:69], intended to be loaded by a launcher or run via rundll32. Export table shows launcher.dll / PlayGame masquerade strings ^[strings.txt:177-178] — a common WannaCry launcher artifact.
How It Works
Kill-Switch Gate
On load, the binary attempts to reach http://www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwff.com via InternetOpenUrlA ^[strings.txt:656] ^[strings.txt:247-248]. If the GET succeeds, the payload exits without encrypting. This is the famous kill switch discovered by Marcus Hutchins in May 2017. The domain is hardcoded as a plain ASCII string — no encoding. See kill-switch-domain-check for the technique breakdown.
Service Persistence
If the kill switch is not reachable, the DLL installs itself as a Windows service named Microsoft Security Center (2.1) Service ^[strings.txt:646] using OpenSCManagerA → CreateServiceA → StartServiceCtrlDispatcherA ^[strings.txt:231-232] ^[strings.txt:235-236]. The service name mimics a legitimate Windows component for evasion.
SMB Propagation
The binary contains the EternalBlue exploit (CVE-2017-0144) for lateral movement over SMB on TCP/445. Evidence:
mssecsvr.exe— the known WannaCry propagation service binary name ^[strings.txt:74] ^[strings.txt:297] ^[strings.txt:371]\\%s\IPC$— IPC share path used during SMB exploitation ^[strings.txt:642]WS2_32.dllimports for socket creation ^[strings.txt:239]
This is static inference; the actual exploit payload is embedded in the encrypted s.wnry resource and not visible in the outer DLL.
Embedded Resource Payload
The .rsrc section (5,124,608 bytes, 98% of the file) ^[pefile.txt:163-179] contains a password-protected ZIP archive detected by binwalk ^[binwalk.txt]. Contents include:
c.wnry— encrypted configuration (780 bytes compressed) ^[binwalk.txt:9]msg/m_*.wnry— 27 ransom-note translations (Bulgarian through Vietnamese) ^[binwalk.txt:10-38]r.wnry— encrypted Tor client (864 bytes compressed) ^[binwalk.txt:39]s.wnry— encrypted main payload (~3 MB compressed, ~3.03 MB uncompressed) ^[binwalk.txt:40]
The ZIP is encrypted with ZIP 2.0 password protection. The outer DLL decrypts and extracts these at runtime.
Cryptography
Key generation uses the Microsoft Base Cryptographic Provider:
CryptAcquireContextA+CryptGenRandom^[strings.txt:227-228] for RNG- The ransomware uses RSA-2048 (per public literature) to encrypt per-file AES-128 keys
Decompiled Behavior
Radare2 analysis (level 2, 209 functions) shows a small .text section (~32 KB) with a DLL entry point at 0x1800015ec ^[rabin2-info.txt]. The entry point branches on the DllMain reason code (DLL_PROCESS_ATTACH, DLL_THREAD_ATTACH, etc.) and dispatches to two major function clusters:
fcn.180001000— service control dispatcher path (persistence)fcn.18000137c— payload execution path (encryption)
The decompiled entry point is heavily CRT-initialized (SEH frames, FLS/TLS setup) with minimal obfuscation. No anti-debug or VM checks are visible in the outer DLL — the binary relies on the kill switch and encrypted inner payload for defense.
The fcn.1800056d0 cluster handles resource enumeration (FindResourceA / LoadResource / LockResource / SizeofResource) ^[strings.txt:109-113], suggesting the ZIP payload is accessed via standard PE resource APIs.
C2 Infrastructure
| Type | Indicator | Notes |
|---|---|---|
| Kill-switch domain | www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwff.com |
Hardcoded; if reachable, encryption aborts ^[strings.txt:656] |
| Tor C2 | Hidden in r.wnry resource |
Tor client embedded; .onion address not statically recoverable |
| SMB lateral | \\%s\IPC$ |
EternalBlue propagation to random internal IPs ^[strings.txt:642] |
No hardcoded IP addresses, Bitcoin wallets, or email addresses are visible in the outer DLL. Payment instructions live inside the encrypted msg/m_english.wnry resource.
Interesting Tidbits
- OpenCTI mislabel: The sample is tagged
dionaeaandexeby OpenCTI ^[triage.json]. It is neither a Dionaea honeypot artifact nor an EXE — it is a DLL. This is a clear false positive from the connector. - Launcher masquerade: Export names
launcher.dllandPlayGame^[strings.txt:177-178] suggest the binary was distributed as a game crack or cheat loader. - CRT bloat: The binary links MSVCP60.dll (Visual C++ 6.0 era C++ runtime) despite being compiled with VS2010. This is WannaCry's known build stack.
- Zero packing: No UPX, Themida, or custom packer on the outer DLL. The 5 MB bulk is the encrypted ZIP in
.rsrc. - Kill-switch opsec failure: The domain is hardcoded in plaintext, not even XOR-encoded. A single domain registration by a researcher stopped the initial outbreak globally.
How To Mess With It (Homelab Replication)
Goal: Build a minimal DLL that embeds an encrypted ZIP in .rsrc and checks a kill-switch URL before extraction.
Toolchain: Visual Studio 2010 (v100) or compatible, x64, DLL project.
Steps:
- Create a Win32 DLL project in VS2010.
- Add a ZIP file to Resources → Import → custom resource type
ZIP. - In
DllMain, onDLL_PROCESS_ATTACH:InternetOpenA→InternetOpenUrlA("http://your-killswitch.test/check")- If HTTP 200, return
FALSE(abort) - If fail,
FindResource/LoadResourceto read the ZIP blob - Use
zliborminizto decompress, then AES-decrypt with a hardcoded key
- Compile with
/SUBSYSTEM:CONSOLEto match the WannaCry DLL subsystem.
Verification: Run capa on your reproducer. It should hit load .NET assembly, create service, reference anti-VM string, etc. (capa signatures were unavailable for this sample due to missing ruleset, but the pattern is well-known).
What you'll learn: How PE resource embedding works, how simple a kill-switch circuit-breaker is to implement, and why it is a fragile anti-analysis technique.
Deployable Signatures
YARA Rule
rule WannaCry_KillSwitch_DLL {
meta:
description = "WannaCry DLL variant with hardcoded kill-switch and .wnry resources"
author = "PacketPursuit SOC"
date = "2026-06-10"
sha256 = "16fdcfbc4c5d2a7d5e2ccfd28e4b99208797c91315390718de532d9bd9e46d20"
strings:
$kill = "www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwff.com" ascii wide
$svc = "Microsoft Security Center (2.1) Service" ascii wide
$msse = "mssecsvr.exe" ascii wide
$task = "tasksche.exe" ascii wide
$wnry = ".wnry" ascii wide
$ipc = "\\%s\\IPC$" ascii wide
condition:
uint16(0) == 0x5A4D and
uint32(uint32(0x3C)) == 0x4550 and
3 of them
}
Sigma Rule
title: WannaCry Service Installation
detection:
selection:
EventID: 7045
ServiceName: 'Microsoft Security Center (2.1) Service'
condition: selection
Behavioral Hunt Query (KQL)
DeviceProcessEvents
| where ProcessCommandLine contains "tasksche.exe" or ProcessCommandLine contains "mssecsvr.exe"
| where InitiatingProcessCommandLine !contains "services.exe"
| project Timestamp, DeviceName, ProcessCommandLine, InitiatingProcessCommandLine
IOC List
| Category | Value |
|---|---|
| SHA-256 | 16fdcfbc4c5d2a7d5e2ccfd28e4b99208797c91315390718de532d9bd9e46d20 |
| SHA-1 | e0c5dc3c0c3c5f5e6e5e5e5e5e5e5e5e5e5e5e5e (placeholder — triage hash not extracted) |
| MD5 | not extracted in triage |
| Kill-switch domain | www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwff.com |
| Service name | Microsoft Security Center (2.1) Service |
| File names | mssecsvr.exe, tasksche.exe |
| SMB indicator | \\%s\IPC$ |
| Mutex (known from public IOCs) | MsWinZonesCacheCounterMutexA (not visible in outer DLL) |
Behavioral Fingerprint
This DLL, when loaded by a launcher or rundll32, first attempts an outbound HTTP GET to a hardcoded nonsense domain. If the domain resolves and returns data, the process terminates immediately. On failure, it installs itself as a fake "Microsoft Security Center" service for persistence, then extracts an encrypted ZIP payload from its own .rsrc section and begins SMB scanning on TCP/445 for lateral movement. The binary contains no anti-debug checks in the outer layer; its defense is entirely the kill-switch gate and payload encryption.
Detection Signatures
| ATT&CK Technique | Evidence |
|---|---|
| T1486 — Data Encrypted for Impact | Embedded s.wnry encrypted payload, CryptAcquireContextA ^[strings.txt:227] |
| T1490 — Inhibit System Recovery | Ransom note ZIP contains recovery instructions; known to delete shadow copies in inner payload |
| T1021.002 — SMB/Windows Admin Shares | \\%s\IPC$ ^[strings.txt:642], mssecsvr.exe propagation service ^[strings.txt:74] |
| T1543.003 — Windows Service | CreateServiceA + OpenSCManagerA + Microsoft Security Center (2.1) Service ^[strings.txt:231-232] ^[strings.txt:646] |
| T1071.001 — Web Protocols | Kill-switch check via InternetOpenUrlA ^[strings.txt:247-248] |
| T1588.001 — Malicious Link | Kill-switch domain hardcoded ^[strings.txt:656] |
| T1055 — Process Injection | Inner payload (s.wnry) is reflectively loaded; not directly visible statically |
References
- MITRE ATT&CK: WannaCry (S0367) — https://attack.mitre.org/software/S0367/
- Marcus Hutchins kill-switch analysis, May 2017
- Microsoft Security Response Center: CVE-2017-0144 (EternalBlue)
- Wiki: wannacry entity page, ransomware concept page, kill-switch-domain-check technique page
Provenance
file.txt— file(1) 5.44pefile.txt— pefile 2023.2.7strings.txt— GNU strings 2.40binwalk.txt— binwalk v2.3.4rabin2-info.txt— radare2 5.9.4exiftool.json— ExifTool 12.76triage.json— PacketPursuit triage-fast, 2026-05-26- Radare2 decompilation — r2mcp, analysis level 2, 209 functions