Archive for March, 2018

A Ransomware called WannaCry


WannaCry is a family of Ransomware which when executed, encrypts certain file types on the system. The user must pay a ransom to the attacker if they want their files to be decrypted.



This ransomware uses the EternalBlue exploit (MS17-010 Echo Response – SMB Vulnerability). The attackers have used the publicly available exploit code and embedded it in the dropper of the ransomware. The malware’s initial vector seems to be spam emails. The malware, on execution, connects to the IPC$ tree and attempts a transaction on FID 0, triggers the vulnerability, and then exploits it. The malware generates a random set of IP addresses for propagation



The Malware is executed using a main dropper and a sub dropper. The main dropper is embedded with the shell code needed for propagation. It also contains the sub dropper which executes the encryption process.


The sub dropper contains multiple components in the form of a password-protected ZIP file in its Resource section. The password is hardcoded “WNcry@2ol7”. The components of the sub dropper perform other functions on the system.


Given below is an example ZIP.




The dropper installs itself as a service called MSSECSVC2.0 with description “Microsoft Security Service (2.0)” as a restart mechanism. Once the service is started, it generated its random list of IP addresses to target.


The dropper uses the command line below to remove any existing shadow volumes and backups:


Cmd /c vssadmin delete shadows /all /quiet & wmic shadowcopy delete & bcdedit /set {default} bootstatuspolicy ignoreallfailures & bcdedit /set {default} recoveryenabled no & wbadmin delete catalog -quiet


The various components dropped to disk are listed below: 


  • exe – Initial cleaner component used before the actual encryption begins. Looks for file in the install dir of the ransomware and RecycleBin and removes any files with extensions “.WNCRYT”
  • exe – Component that attempts to synchronize execution between machines. It waits for a signal and runs scripts concurrently. Use to connect to remove desktops by WTSEnumerateSessionsA, and create process. • b.wnry – Contains the wallpaper that is displayed
  • wnry – BitCoin Wallets, CNC, etc
  • wnry – Ransomware note
  • wnry – RTF containing the decryption instructions
  • wnry – An archive that contains a TOR client, used for payments
  • wnry – An encrypted file that contains the encryption routine used by malware for file encryption
  • wnry / @WannaDecryptor@.exe – Encryptor/Decryptor component of the ransomware. Loads t.wnry and executes it in memory
  • vbs – Used to create a shortcut to the decryptor on the desktop.
  • <Random_filename>.bat: – BAT file that is used to create the .vbs file.
  • Msg Folder – Contains language-specific decryption instructions


Once the system files are encrypted, the ransomware drops this message:



The desktop wallpaper is also changed to this:


The Folder containing the encrypted files also contains a text version of this message demanding a ransom for their decryption.


The main dropper creates a random set of IP addresses which are not limited to the local network. This means that the malware may attack devices sharing the same network, as well as devices across the Internet if they allow NetBIOS packets from outside networks.


This is why the attack has such a wide-spread impact and many affected users are unsure about the initial vector of the infection.


Once a device with an open NetBIOS port is found, the malware will send three NETBIOS session setup packets to it. This communication is followed by the transfer of a sub dropper.


Among the files transferred to the attacked system is a ZIP file containing Tor browser binaries which is used to access the Onion URLs in use by the malware to collect payments.


The Payment is collected through Bitcoin. The following addresses are found in the samples 


  • 115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn
  • 12t9YDPgwueZ9NyMgw519p7AA8isjr6SMw
  • 13AM4VW2dhxYgXeQepoHkHSQuy6NgaEb94


The sub dropper infects files with specific extensions on the local machine, any removable drive connected to it, and any network share mounted locally.


Indicators of Compromise




  • DB349B97C37D22F5EA1D1841E3C89EB4 – Example main dropper
  • 509C41EC97BB81B0567B059AA2F50FE8 – Example Sub dropper
  • 9C514CAB458488A082070560C40D9DAB
  • 4362E287CA45A4862B7FE9ECAF46E985
  • 4FEF5E34143E646DBF9907C4374276F5
  • B27F095F305CF940BA4E85F3CB848819
  • 7BF2B57F2A205768755C07F238FB32CC
  • 7F7CCAA16FB15EB1C7399D422F8363E8
  • 8495400F199AC77853C53B5A3F278F3E
  • 84C82835A5D21BBCF75A61706D8AB549
  • 86721E64FFBD69AA6944B9672BCABB6D
  • 9C7C7149387A1C79679A87DD1BA755BC
  • 4DA1F312A214C07143ABEEAFB695D904
  • D6114BA5F10AD67A4131AB72531F02DA
  • F0D9FFEFA20CDADF5B47B96B7F8D1F60
  • F107A717F76F4F910AE9CB4DC5290594


IP Addresses 


  • 51.134.123 :9001
  • 199.142.236 : 9001
  • 231.221.221:9001
  • 31.0.39:9191
  • 202.160.69:9001
  • 101.166.19:9090
  • 121.65.179:9001
  • 3.69.209:9001
  • 0.32.144:9001
  • 7.161.218:9001



  • Update patch MS17-010 (Microsoft guidance)
  • Network Admins can check the presence of an attempted network infection by looking for two hardcoded IPs in packet requests: (,
  • Ensure that your organization has not blocked access to the following domain:
    • www[dot]iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea[.]com
    • This domain has been sink holed. It was being used by the malware as a kill switch.




If you think you are a victim of a cyber-security attack. Immediately send an email to for a rapid response.

Copyright © Rewterz. All rights reserved.