EternalRomance
- Type
- Shellcode
- Capabilities
- Privilege escalationLateral movement
- Platforms
- Windows
EternalRomance is a remote code execution exploit targeting vulnerabilities in Microsoft Windows SMBv1, rather than a standalone malware family. Associated with the NSA and Equation Group toolset, it was publicly released by the Shadow Brokers in April 2017. Microsoft addressed the affected SMB vulnerabilities in security update MS17-010, released in March 2017.
The exploit abuses SMB transaction handling and memory corruption to obtain arbitrary read and write access to kernel memory. Implementations can manipulate SMB session security structures to obtain administrative or SYSTEM-level access, enabling remote service execution or installation of a separate payload such as DoublePulsar. Reliable exploitation depends on knowledge or control of the target's memory layout. Later public implementations broadened support across 32-bit and 64-bit Windows desktop and server versions and were incorporated into the Metasploit Framework.
EternalRomance has been used for lateral movement and network propagation by NotPetya and Bad Rabbit, with different implementations exploiting the same underlying weakness. NotPetya's campaign was publicly attributed by the U.S. Government to the Russian military. EternalRomance has also been incorporated into propagation toolsets used by EternalRocks and Lucifer. Its role is to compromise vulnerable Windows hosts; encryption, cryptocurrency mining, and other subsequent actions are performed by the malware using it.
Associated vulnerabilities
3 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
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
Windows executable versions of publically available EternalBlue/EternalRomance exploit scripts.
Techniques & procedures
10 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
1 technique
Initial Access
"Instead of going for shellcode execution, it overwrites the SMB connection session structures to gain Admin/SYSTEM session," Dillon says.
Execution
1 technique
Execution
SMBv1の脆弱性による横展開については、EternalBlueまたはEternalRomance(いずれもMS17-010の更新プログラム適用で修正される)で脆弱性を突き、DoublePulsarを設置、DoublePulsarを介してlsass.exeにインメモリでDLLインジェクションを行います。
Persistence
1 technique
Persistence
"Instead of going for shellcode execution, it overwrites the SMB connection session structures to gain Admin/SYSTEM session," Dillon says.
Privilege Escalation
3 techniques
Privilege Escalation
MS17-010 exploit for Windows 2000 and later... If we can overwrite Token to NULL and UsePsImpersonateClient to true, a running thread will use primary token (SYSTEM) to do all SMB operations.
"Instead of going for shellcode execution, it overwrites the SMB connection session structures to gain Admin/SYSTEM session," Dillon says.
If we can overwrite Token to NULL and UsePsImpersonateClient to true, a running thread will use primary token (SYSTEM) to do all SMB operations... for Windows 2003 and earlier, the exploit modify token user and groups in PCtxtHandle to get SYSTEM
Stealth
3 techniques
Stealth
The threat actor responsible for the attack has purposefully included evidence to frustrate analysts and lead researchers to false attribution flags.
"Instead of going for shellcode execution, it overwrites the SMB connection session structures to gain Admin/SYSTEM session," Dillon says.
If we can overwrite Token to NULL and UsePsImpersonateClient to true, a running thread will use primary token (SYSTEM) to do all SMB operations... for Windows 2003 and earlier, the exploit modify token user and groups in PCtxtHandle to get SYSTEM
Defense Impairment
1 technique
Defense Impairment
write_data(conn, info, info['session']+info['SESSION_ISNULL_OFFSET'], '\x00\x01')
Lateral Movement
3 techniques
Lateral Movement
It uses two tools (ETERNALBLUE and ETERNALROMANCE) from the ShadowBrokers dump in April that exploit vulnerabilities in SMBv1... The ransomware can also perform lateral movement by using two exploits... called ETERNALBLUE and ETERNALROMANCE.
The ransomware can also perform lateral movement by using two exploits that came with the ShadowBrokers dump in April, called ETERNALBLUE and ETERNALROMANCE. These tools exploit vulnerabilities in SMBv1 (CVE-2017-0144 and CVE-2017-0145).
The most famous being EternalBlue, the exploit used in the WannaCry, NotPetya, and Bad Rabbit ransomware outbreaks... Besides EternalBlue, the NotPetya and Bad Rabbit ransomware outbreaks also utilized the EternalRomance exploit.
Collection
1 technique
Collection
Now, read_data() and write_data() can be used for arbitrary read and write... read session struct to get SecurityContext address
Recent activity
12 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.