WannaCry Ransomware Using SMB Vulnerability
This content has been archived
This article no longer conforms to NHS Digital's standards for cyber alerts, and may contain outdated or inaccurate information. Use of this information contained in this page is at your own risk
Summary
Affected platforms
The following platforms are known to be affected:
Threat details
This attack was not specifically targeted at the NHS and is affecting many organisations around the world from a range of sectors.
The ransomware is called WannaCry, Wanna Decryptor, Wanna Cryptor, WanaCrypt0r or WCry version 2.0 and spread quickly around the world after it was first detected on 12th May.
The malware encrypts files and provides the user with a prompt which includes a ransom demand, a countdown timer and Bitcoin wallet to pay the ransom into. It uses strong encryption and targets specific often-used files such as documents, videos and pictures. At the time of publication there is no known decryption method.
WannaCry ransomware is propagated using the SMB EternalBlue and DoublePulsar attack methodology (CC-1353) which exploits the SMB vulnerabilities patched in Microsoft Security Bulletin MS17-010. SMB is a legacy protocol used to share files and printers across local networks
This attack methodology leverages unpatched hosts with vulnerable SMB file sharing services to propagate malware through local and remote networks (such as the internet, N3/Transition Network, HSCN & PSN) spreading similar to a worm.
The spread of the malware is dependent on NetBIOS and SMB communication ports being left open on hosts and at perimeter firewalls.
Once a system is infected, the malware first checks whether a specific internet domain, Connectivity to these kills switch domains needs to be maintained to limit the spread of the malware:
- www[.]iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea[.]com (WannaCry Ransomware)
- www[.]ifferfsodp9ifjaposdfjhgosurijfaewrwergwea[.] com (Uiwix Ransomware)
- www[.][iuqssfsodp9ifjaposdfjhgosurijfaewrwergwea[.]com
The malware is not proxy aware: when the malware connects to a kill switch domain via a proxy server, and a successful connection response is identifiable as the proxy server instead of the kill switch domain the malware will execute its payload.
If the malware can connect to a kill switch domain the malware stops running:
- We believe the malware looks for the killswitch domain to be active once per day, and if it is present then the malware ceases to deploy the malicious elements, i.e. the machine will not cryptolock and the malware will not spread.
- At this stage of infection, Anti-Virus software with the latest malware signatures installed should be able to detect and remove the virus before further damage can be caused.
If the malware cannot connect to the kill switch domain:
- The payload is executed and the encryption and self-propagation process begins.
- At this stage of infection infected machines will need to be quarantined and rebuilt to remove the malware.
The malware randomly generates internal and external IP addresses and attempts to initiate communications. If a host is found with open NetBIOS ports, three NetBIOS session setup packets are sent.
The malware sends SMB packets containing the exploit shell code and an encrypted payload.
During these communications the malware utilises two hardcoded IP addresses (192.168.56.20, 172.16.99.5) to communicate.
Note: General information about this ransomware outbreak is available on the National Cyber Security Centre website:
https://www.ncsc.gov.uk/guidance/ransomware-latest-ncsc-guidance
Update
New ransomware has been observed that calls itself 'WannaCryV2.' At the time of publication there is no evidence of a link between this ransomware and WannaCry.
Threat updates
| Date | Update |
|---|---|
| 7 Aug 2018 |
New ransomware has been observed that calls itself 'WannaCryV2.' At the time of publication there is no evidence of a link between this ransomware and WannaCry. |
Remediation steps
| Type | Step |
|---|---|
|
Ensure that the two kill switch domains are not blocked by firewalls because they stop some variants of the malware from running:
Organisations who have disconnected from the internet or who maintain a proxy server are recommended to implement a local webserver which resolves via local DNS servers (or via configuration of local host files) to the kill switch domains. This will limit the spread of WannaCry and Uiwix Ransomware. Ensure all systems are protected with the latest AV definitions
SMB Vulnerability RemediationNote: Remediating the vulnerability does not remove an existing infection - any infected system may require quarantining, rebuilding to patched standard and redeploying.
Advice to NHS staffNHS Staff are advised to ensure their home computers have Windows automatic updates enabled and AV software installed which is automatically updated with the latest definitions. This will help protect their personal computers and the wider internet community at large. Securing RDPIf RDP is not used then ensure:
If RDP is used:
Ransomware RemediationFor full ransomware remediation please see the Best Practice Guide Ransomware - Controls to avoid infection. It is not recommended to pay any ransom; there is no guarantee that paying a ransom will unlock the encrypted files or that the integrity of the files will be maintained. It could additionally increase the likelihood of your organisation being targeted in future campaigns.
Responding to an OutbreakThis section is designed to help organisations respond to an outbreak and consists of two section (1) Containment and Eradication and (2) Recovery. 1) Containment and EradicationBecause the malware is able to self-propagate to vulnerable local and remote computers the following containment and Eradication activities should be performed. These actions can be broken down into a number of work streams which can be performed across different teams: Stream 1 - Identify and quarantine all systems infected with the malware.
By using Windows File Server Resource Manager FSRM (or the equivalent for your file storage servers or SAN's operating system) you can identify IOC files as they’re written and capture the name of the logged in user and computer the IOC file was written by. Immediately quarantine all newly identified infected computers
Stream 2 – Patch the vulnerability that enables malware to propagate throughout a network.
Stream 3 – Ensure all systems are updated with the latest AV (Anti-Virus) definitions
Stream 4 - Implement additional technical controls to prevent the malware from propagating
2) RecoveryCleaning quarantined machines Scenario 1 - For machines where the initial infection is present but are not cryptolocked (i.e. where the malware has successfully connected to a kill switch domain and now remains in a dormant state). Anti-Virus software with the latest malware signatures installed may be able to detect and remove the virus before further damage can be caused.
Scenario 2 - For cryptolocked machines Fully reimage/rebuild to patch standard (including MS17-010) , protect with the latest AV definitions and redeploy.
Further information see the Best Practice Guide: Ransomware - Preparing for an Outbreak |
Last edited: 17 February 2020 11:41 am