- Warning
- Do not play with the samples unless you really know what you’re doing.
All Windows versions before Windows 10 are still vulnerable to the WannaCry (WannaCrypt, WannaCry, WanaCrypt0r, WCrypt or WCRY) ransomware if not patched for MS-17-010.
The ransom is between $300 to $600, there is code to delete files in the virus, so it’s not just a threat.
The worm loops through every RDP session on a system to run the ransomware as that user, also installs the DOUBLEPULSAR backdoor and it corrupts shadow volumes to make recovery harder.
If the website www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com (ayylmaotjhsstasdfasdfasdfasdfasdfasdfasdf.com in the b9318a66 version) is up the virus exits instead of infecting the host. The domains have been sink-holed, stopping the spread of the ransomware worm.
It uses the ETERNALBLUE MS-17-010 vulnerability to propagate, vulnerability developed by the Equation Group (closely tied to the NSA) and leaked by the Shadow Brokers.
The binary blob in the PE is encrypted with the pass WNcry@2ol7, you can use 7z to uncompress the files:
| |
The archive contains the following files:
| |
The contents are as following:
- b.wnry – Ransom desktop wallpaper.
- c.wnry – Configuration file containing C2 server addresses, BitCoin Wallet etc.
- r.wnry – Ransom note.
- s.wnry – ZIP archive containing the TOR client.
- t.wnry – The encryption part of the ransomware encrypted using a WanaCry specific format; can be decrypted using the private key embedded inside the ransomware executable.
- u.wnry – Decrypter executable.
- Taskdl.exe – Deletes all temporary files created during encryption.
- Taskse.exe – Runs given program in all user sessions.
- msg directory – Language files.

Cryptography
- Each infection generates a new
RSA-2048key-pair. - The public key is exported as blob and saved to
00000000.pky. - The private key is encrypted with the ransomware public key and saved as
00000000.eky. - Each file is encrypted using
AES-128-CBC, with a unique AES key per file. - The AES key is encrypted using the infection specific RSA key-pair.
Malware tries initially to open 00000000.dky, if it is available, will import the key into Crypto API object. Presumably this would be decryption key from the authors of ransomware.
If cannot open *.dky file, it will generate new RSA key pair of 2048-bits. The public key is exported as blob and saved to 00000000.pky. Private key is exported as blob and encrypted with ransomware public key before being saved to 00000000.eky.
The RSA public key used to encrypt the users RSA key pair is embedded inside the DLL. The AES-128 key generated for each file is derived from CryptGenRandom which is cryptographically secure and is not known to have any weakness.
The AES keys are encrypted using the users public key in *.pky. In order to decrypt, the users private key is needed, which is encrypted using a public key owned by the ransomware authors.
Command Centers
There are five Tor .onion addresses hardcoded in the malware:
- gx7ekbenv2riucmf.onion
- 57g7spgrzlojinas.onion
- xxlvbrloxvriy2c5.onion
- 76jdd2ir2embyv47.onion
- cwwnhwhlz52maqm7.onion
The malware is not using HTTP to communicate to the C2 servers, but a custom protocol.
Bitcoin addresses
There are three addresses hardcoded into the malware:
- 13AM4VW2dhxYgXeQepoHkHSQuy6NgaEb94
- 12t9YDPgwueZ9NyMgw519p7AA8isjr6SMw
- 115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn
Variants
- 24d004a104d4d54034dbcffc2a4b19a11f39008a575aa614ea04703480b1022c
- 32f24601153be0885f11d62e0a8a2f0280a2034fc981d8184180c5d3b1b9e8cf
- 07c44729e2c570b37db695323249474831f5861d45318bf49ccf5d2f5c8ea1cd
- ed01ebfbc9eb5bbea545af4d01bf5f1071661840480439c6e5babe8e080e41aa
- b9318a66fa7f50f2f3ecaca02a96268ad2c63db7554ea3acbde43bf517328d06
Links
- Microsoft Security Bulletin MS17-010
- Say Hello to ‘WannaCry’
- Customer Guidance for WannaCrypt attacks
- Hackers Hit Dozens of Countries Exploiting Stolen N.S.A. Tool
- How to accidentally stop a global cyber attack
- Public MalwareTech botnet tracker
- Malware sample
- Protecting customers and evaluating risk
- YARA rules and rules
- New variants detected
- The largest ransom-ware infection in History