WannaCry
- Type
- Ransomware
- Capabilities
- Initial accessLateral movementExtortion
- Delivery
- Drive by
- Platforms
- Windows
WannaCry, also known as WannaCrypt, WanaCrypt0r, and WCry, is ransomware targeting Microsoft Windows workstations and servers that combines file encryption with autonomous worm-like propagation. It exploits vulnerable SMB services using EternalBlue, enabling it to spread between unpatched computers without requiring user interaction. EternalBlue was publicly released by the Shadow Brokers, and security updates addressing the exploited vulnerabilities were available before the outbreak. WannaCry encrypts victims’ data and demands ransom payments in Bitcoin.
The major WannaCry outbreak began on May 12, 2017, infecting more than 200,000 computers across over 150 countries. Affected environments included hospitals, schools, businesses, and homes. Its impact on the United Kingdom’s National Health Service caused substantial operational disruption, including patient diversions and delays in care. Its broad reach reflected self-propagating exploitation rather than a restriction to a particular industry.
WannaCry is associated with the Lazarus Group and North Korean state-sponsored cyber activity. In December 2017, the United States, United Kingdom, Australia, Canada, and New Zealand publicly attributed the WannaCry 2.0 attack to North Korea.
Associated vulnerabilities
6 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Associated threat actors
5 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
(Citation: FireEye APT38 Oct 2018)(Citation: LogRhythm WannaCry)(Citation: FireEye WannaCry 2017)(Citation: SecureWorks WannaCry Analysis)
The WannaCry attack was a massive ransomware cyberattack that hit institutions across the globe ... on May 12, 2017.
Five years ago, the WannaCry ransomware cryptoworm targeted computers running Microsoft Windows, encrypting data at organizations around the world.
WannaCry paralysed computers running mostly older versions of Microsoft Windows by encrypting users' computer files and displaying a message demanding anywhere from $US300 to $US600 to release them; failure to pay would leave the data mangled and likely beyond repair.
The exploit chains in play included EternalBlue, DoublePulsar, and WannaCry, all tools that have been publicly known and patchable for years.
Techniques & procedures
81 distinct techniques documented for this family, organized by ATT&CK tactic.
Reconnaissance
1 technique
Reconnaissance
“set up a listener on common attack ports such as 22 (SSH), 23 (Telnet), 80 (HTTP), 445 (SMB), and 3389 (RDP), you’d likely see hundreds of thousands of automated hacking attempts per day.”
Resource Development
1 technique
Resource Development
If you go back about a decade , there were some fairly high-profile incidents -- cases like NotPetya and WannaCry -- where various companies from different parts of the world were impacted by these propagating events.
Initial Access
9 techniques
Initial Access
To maximize impact on the target organization, malware designed for encrypting data may have worm-like features to propagate across a network by leveraging other attack techniques like Valid Accounts, OS Credential Dumping, and SMB/Windows Admin Shares.
The vulnerability could lead to new self-propagating malware that bears a striking resemblance to the infamous WannaCry...
The hackers used the NSA’s backdoor, DoublePulsar, to create a persistent backdoor that was used to deliver the WannaCry ransomware.
Since WannaCry is a single executable file, it can also be spread through other regular exploit vectors, such as spear phishing, drive-by-download attack, and malicious torrent files download, warned Hickey.
there are two entry points through which a municipality can be attacked: social engineering and a breach in un-updated software.
According to the semiconductor manufacturer, its computer systems were not direct attacked by any hacker, but instead, were exposed to the malware "when a supplier installed tainted software without a virus scan" to TSMC's network.
Threats like WannaCrypt ... usually leverage social engineering or email as primary attack vector, relying on users downloading and executing a malicious payload.
そうしたことからも、スクリプト添付等のメールで配布される等、従来通りの攻撃方法についても変わらずに注意が必要です。
...one hospital had already had to pay £700,000, about $900,000, to repair a breach that began after an employee clicked on a web link in an unsafe email.
Execution
8 techniques
Execution
[WannaCry](https://attack.mitre.org/software/S0366) utilizes <code>wmic</code> to delete shadow copies.(Citation: LogRhythm WannaCry)(Citation: FireEye WannaCry 2017)(Citation: SecureWorks WannaCry Analysis)
The advisory notes DPRK cyber actors develop and deploy a wide range of malware tools around the world to enable these activities and have grown increasingly sophisticated.
It may create a randomly named service that has the following associated ImagePath: “cmd.exe /c “<malware working directory>\tasksche.exe””
It also drops batch and VBS script files... echo SET ow = WScript.CreateObject("WScript.Shell")> m.vbs
Update 15.05.2017 : On Friday May 12th, the WannaCry ransomware was distributed using a worm leveraging the EternalBlue SMB exploit.
そうしたことからも、スクリプト添付等のメールで配布される等、従来通りの攻撃方法についても変わらずに注意が必要です。
Warn users not to open attachments/enable macros on suspicious emails. This may be the entry vector so diligence is warranted
ドロッパー①は実行されると、自身のリソースセクションから「tasksche.exe」(以降、ドロッパー②とします)をドロップし、サービスとして登録します。
Persistence
6 techniques
Persistence
To maximize impact on the target organization, malware designed for encrypting data may have worm-like features to propagate across a network by leveraging other attack techniques like Valid Accounts, OS Credential Dumping, and SMB/Windows Admin Shares.
その後、ドロッパー②は以下のレジストリを作成します。 そのため、以下のレジストリの有無でも感染の有無を確認することができます。
The hackers used the NSA’s backdoor, DoublePulsar, to create a persistent backdoor that was used to deliver the WannaCry ransomware.
実行された「mssecsvc.exe」は自身をサービスとして登録し、開始します。
[WannaCry](https://attack.mitre.org/software/S0366) creates the service "mssecsvc2.0" with the display name "Microsoft Security Center (2.0) Service."(Citation: LogRhythm WannaCry)(Citation: FireEye WannaCry 2017)
When run, WannaCrypt creates the following registry keys: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\\<random string> = “<malware working directory>\tasksche.exe”
Privilege Escalation
8 techniques
Privilege Escalation
WannaCry攻撃キャンペーンで使用されたドロッパー①では、「lsass.exe」を指定してインジェクションを行います。
ターゲット端末では受信した「launcher.dll」をファイル化することなく、メモリ上で処理し「lsass.exe」にインジェクション(注入)します。
Hackers exploited vulnerabilities in outdated systems to encrypt critical data.
To maximize impact on the target organization, malware designed for encrypting data may have worm-like features to propagate across a network by leveraging other attack techniques like Valid Accounts, OS Credential Dumping, and SMB/Windows Admin Shares.
実行された「mssecsvc.exe」は自身をサービスとして登録し、開始します。
[WannaCry](https://attack.mitre.org/software/S0366) creates the service "mssecsvc2.0" with the display name "Microsoft Security Center (2.0) Service."(Citation: LogRhythm WannaCry)(Citation: FireEye WannaCry 2017)
When run, WannaCrypt creates the following registry keys: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\\<random string> = “<malware working directory>\tasksche.exe”
ユーザー権限で動作した場合は、その権限で暗号化できる範囲のファイルを暗号化した上、UACを表示させボリュームシャドーコピーの削除を試み
Stealth
17 techniques
Stealth
攻撃者は事前に作成した秘密鍵(Key)を使用してマルウェアを暗号化しておきます。... 対象が標的の場合、マルウェアを復号して攻撃を行います。
Based on these clues, we can identify that something is embedded in this image file. It is possible that the threat actor used Steghide or another steganography utility in their operation.
Dynamically call Windows APIs for encryption
The implementation of encryption to obfuscate strings allows adversaries to hide strings that reveal the objective of the actions that the malware will perform. This technique is registered with MITRE ATT&CK as Obfuscated Files or Information: Encrypted/Encoded File [T1027.013].
既知のマルウェアを害のないアプリケーションに偽装することで、アンチマルウェアやサンドボックス等による検知を回避できる
WannaCry攻撃キャンペーンで使用されたドロッパー①では、「lsass.exe」を指定してインジェクションを行います。
ターゲット端末では受信した「launcher.dll」をファイル化することなく、メモリ上で処理し「lsass.exe」にインジェクション(注入)します。
Once the theft is complete, they will try to destroy all evidence by deploying crimeware ransomware or wipers.
ユーザー権限で動作した場合は、その権限で暗号化できる範囲のファイルを暗号化した上、UACを表示させボリュームシャドーコピーの削除を試み
The ATT&CK matrix related to Lazarus clearly shows... Timestomp
To maximize impact on the target organization, malware designed for encrypting data may have worm-like features to propagate across a network by leveraging other attack techniques like Valid Accounts, OS Credential Dumping, and SMB/Windows Admin Shares.
Decrypt t.wnry and call the export function TaskStart()... To analyze t.wnry, it needs to be decrypted... x32dbg confirmed that the address of decrypted DLL in memory is 0x00989BE8
As mentioned in the previous article , WannaCry creates a mutex to ensure only a single instance is running. It also prevents multiple instances caused by re-infection.
Hutchins registered that domain for research purposes, unaware at the time that doing so would activate a hardcoded kill switch the attackers had built into WannaCry, likely intended as an anti-analysis or sandbox-evasion mechanism rather than a safety valve.
ドロッパー①は、PeekNamedPipeリクエストの応答情報におけるSMB Headerのnt_statusの値が「0xC0000205」であるかどうかを確認することで、更新プログラムの適応有無を判断する挙動があります。
Once started it immediately spawns several processes to change file permissions and communicate with tor hidden c2 servers: attrib +h .
[WannaCry](https://attack.mitre.org/software/S0366) uses <code>[attrib](https://attack.mitre.org/software/S1176) +h</code> to make some of its files hidden.(Citation: LogRhythm WannaCry)(Citation: Checkpoint WannaCry 2017)
Defense Impairment
4 techniques
Defense Impairment
その後、ドロッパー②は以下のレジストリを作成します。 そのため、以下のレジストリの有無でも感染の有無を確認することができます。
また、以下のコマンドにより、全てのユーザーにNTFSアクセス権のフルコントロールを与えます。
[WannaCry](https://attack.mitre.org/software/S0366) uses <code>attrib +h</code> and <code>icacls . /grant Everyone:F /T /C /Q</code> to make some of its files hidden and grant all users full access controls.(Citation: LogRhythm WannaCry)
NHS organisations could have prevented WannaCry, even without patching their systems, had they taken action to manage their firewalls.
Credential Access
4 techniques
Credential Access
This software allows to recover the prime numbers of the RSA private key that are used by Wanacry. It does so by searching for them in the wcry.exe process.
If you are lucky (that is the associated memory hasn't been reallocated and erased), these prime numbers might still be in memory. That's what this software tries to achieve.
Just a few weeks before the outbreak, an almost identical ransomware executable was spread via SMB brute-forcing, but it had minimal impact and therefore stayed under the radar.
The worms exploited a vulnerability in an old version of Microsoft’s Server Message Block (SMB) protocol and continuous credential theft and reuse to spread.
Discovery
8 techniques
Discovery
[WannaCry](https://attack.mitre.org/software/S0366) will attempt to determine the local network segment it is a part of.(Citation: SecureWorks WannaCry Analysis)
[WannaCry](https://attack.mitre.org/software/S0366) scans its local network segment for remote systems to try to exploit and copy itself to.(Citation: SecureWorks WannaCry Analysis)
At the same time, it also executes massive scanning on Internet IP addresses to find and infect other vulnerable computers.
[WannaCry](https://attack.mitre.org/software/S0366) searches for variety of user files by file extension before encrypting them using RSA and AES, including Office, PDF, image, audio, video, source code, archive/compression format, and key and certificate files.(Citation: LogRhythm WannaCry)(Citation: FireEye WannaCry 2017)
[WannaCry](https://attack.mitre.org/software/S0366) contains a thread that will attempt to scan for new attached drives every few seconds. If one is identified, it will encrypt the files on the attached device.(Citation: FireEye WannaCry 2017)
There are a few other computers on the same network... this folder happened to be shared, discoverable, writable
Hutchins registered that domain for research purposes, unaware at the time that doing so would activate a hardcoded kill switch the attackers had built into WannaCry, likely intended as an anti-analysis or sandbox-evasion mechanism rather than a safety valve.
ドロッパー①は、PeekNamedPipeリクエストの応答情報におけるSMB Headerのnt_statusの値が「0xC0000205」であるかどうかを確認することで、更新プログラムの適応有無を判断する挙動があります。
Lateral Movement
8 techniques
Lateral Movement
DoublePulsar:SMBまたはRDPプロトコルを用いて通信を行うバックドア
“I servizi RDP accessibili pubblicamente sono frequentemente presi di mira da attacchi brute-force, campagne ransomware e attività di compromissione mirata.”
EternalBlue required zero user interaction and zero authentication, allowing it to spread laterally across networks at machine speed. The article also recommends restricting internal SMB traffic to limit the blast radius of lateral movement.
Microsoft released patches for BlueKeep on May 14, and described it as a "wormable" vulnerability that could self-propagate in a similar manner how the EternalBlue helped propagate the WannaCry ransomware outbreak.
The vulnerability could lead to new self-propagating malware that bears a striking resemblance to the infamous WannaCry...
[WannaCry](https://attack.mitre.org/software/S0366) uses an exploit in SMBv1 to spread itself to other remote systems on a network.(Citation: LogRhythm WannaCry)(Citation: FireEye WannaCry 2017)(Citation: US-CERT WannaCry 2017)
[WannaCry](https://attack.mitre.org/software/S0366) enumerates current remote desktop sessions and tries to execute the malware on each session.(Citation: LogRhythm WannaCry)
[WannaCry](https://attack.mitre.org/software/S0366) attempts to copy itself to remote computers after gaining access via an SMB exploit.(Citation: LogRhythm WannaCry)
Collection
2 techniques
Collection
"There is already, before we even get to the machine-learning era, an automated component. And it’s that automation that gives it scale."
ドロッパー②のリソースセクションにはパスワード圧縮されたZIPファイルが埋め込まれています。なお、弊社の解析により、解凍パスワードは「WNcry@2ol7」であることが判明しています。
Command and Control
9 techniques
Command and Control
なお、攻撃元から攻撃先への送信パケットに含まれるlauncher.dllは、XORで暗号化されています。
One method is communicating directly with IP addresses instead of domains, making it harder for security tools to collect information about a connection.
WannaCry uses the InternetOpenUrl function when requesting the kill switch domain. This leaves off the User-Agent HTTP request header
WannaCry uses Tor for command and control traffic and routes a custom cryptographic protocol over the Tor circuit. Tor encapsulates traffic in multiple layers of encryption, using TLS by default.
[WannaCry](https://attack.mitre.org/software/S0366) uses [Tor](https://attack.mitre.org/software/S0183) for command and control traffic.(Citation: SecureWorks WannaCry Analysis)
The outbreak proved that a single neglected update can allow malware to spread rapidly across connected networks.
Probably one of the most interesting parts of WannaCry is the kill switch... the construction of the domain jumped out at us. It literally looked like someone smashed a few keys on the upper rows of the keyboard to arrive at it.
The purpose of the TOR client appears to send the infected machine's encryption key to the threat actor controlling the ransomware.
[WannaCry](https://attack.mitre.org/software/S0366) uses [Tor](https://attack.mitre.org/software/S0183) for command and control traffic and routes a custom cryptographic protocol over the [Tor](https://attack.mitre.org/software/S0183) circuit.(Citation: SecureWorks WannaCry Analysis)
Exfiltration
1 technique
Exfiltration
Unrecognized IP addresses, outbound data transfers, and sudden bandwidth spikes can be early signs of cyber infiltration.
Impact
8 techniques
Impact
In wiper attacks, the malware destroys data and renders it irretrievable.
This triggers both ENCRYPTS_FILES and T1486 ( Data Encrypted for Impact ).
[WannaCry](https://attack.mitre.org/software/S0366) attempts to kill processes associated with Exchange, Microsoft SQL Server, and MySQL to make it possible to encrypt their data stores.(Citation: FireEye WannaCry 2017)(Citation: SecureWorks WannaCry Analysis)
[WannaCry](https://attack.mitre.org/software/S0366) uses <code>vssadmin</code>, <code>wbadmin</code>, <code>bcdedit</code>, and <code>wmic</code> to delete and disable operating system recovery features.(Citation: LogRhythm WannaCry)(Citation: FireEye WannaCry 2017)(Citation: SecureWorks WannaCry Analysis)
It changes the wallpaper to a ransom message by modifying the following registry key
Patient records, appointment schedules, internal phone lines and emails were rendered inaccessible and connections between computers and medical equipment were brought down.
you had a situation where these companies were on the hook for hundreds of millions of dollars, where they couldn't function for a certain amount of time.
These three addresses have received 8.2 bitcoins to date, which is about $14,000 dollars... The ransomer hasn’t withdrawn any of the funds yet...
Observables
64 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
200 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.