r/Malware • u/inkman97 • 32m ago
Reversed a Recovered WannaCry Worm Payload With the Kill Switch Patched Out
Hi all, I reversed a WannaCry sample that turned out to be the payload one infected machine sends to the next, and wrote up the analysis.
Quick summary:
- The file is a 64-bit launcher.dll (single export, PlayGame) with a full copy of mssecsvc.exe appended to it. I found the function in the worm that builds exactly this packet for DoublePulsar, and the first 0xC8A4 bytes of the sample match its embedded x64 launcher byte for byte
- The kill switch is patched out: the worm still requests the domain, but the JNZ after InternetOpenUrlA is replaced by two NOPs, so the result is ignored
- The sample is damaged. Half of the embedded worm is overwritten with NT paths from the victim's disk (AVG temp files, ru-RU language files), probably from an imperfect disk or memory recovery. The ZIP at the end of the chain is cut short, and t.wnry, u.wnry and the helper tools are missing
- The worm scans its own subnets, plus the /24 of every gateway and DNS server, and also 128 threads of random internet IPs. On each host it runs the MS17-010 check (status 0xC0000205), EternalBlue, then the DoublePulsar ping (Multiplex ID 0x51) and upload
- tasksche.exe extracts the XIA resource with the password WNcry@2ol7. I recovered c.wnry with the 5 Tor C2 onions and the 3 Bitcoin addresses, plus the wallpaper, the FAQ and the ransom text in 28 languages
- The RSA private key embedded in tasksche only decrypts t.wnry (header WANACRY!). It's there to keep the encryption module encrypted on disk, not to protect the victims' files
- On chain, the 3 addresses show about 51.9 BTC cashed out in August 2017
Full writeup with IOCs and YARA rules: https://inkman97.github.io/wannacry-analysis/

