| name | exploiting-ms17-010-eternalblue-vulnerability |
| description | MS17-010 (EternalBlue) is a critical vulnerability in Microsoft's SMBv1 implementation that allows remote code execution. Originally discovered by the NSA and leaked by the Shadow Brokers in 2017, it |
| domain | cybersecurity |
| subdomain | red-teaming |
| tags | ["red-team","adversary-simulation","mitre-attack","exploitation","post-exploitation","eternalblue","smb","remote-code-execution"] |
| version | 1.0 |
| author | mahipal |
| license | Apache-2.0 |
| d3fend_techniques | ["Application Protocol Command Analysis","Network Isolation","Network Traffic Analysis","Client-server Payload Profiling","Platform Monitoring"] |
| nist_csf | ["ID.RA-01","GV.OV-02","DE.AE-07"] |
Exploiting MS17-010 EternalBlue Vulnerability
Overview
MS17-010 (EternalBlue) is a critical vulnerability in Microsoft's SMBv1 implementation that allows remote code execution. Originally discovered by the NSA and leaked by the Shadow Brokers in 2017, it was used in the WannaCry and NotPetya ransomware campaigns. Despite patches being available since March 2017, many organizations still have unpatched systems, making it a viable red team exploitation vector especially in legacy environments.
When to Use
- When performing authorized security testing that involves exploiting ms17 010 eternalblue vulnerability
- When analyzing malware samples or attack artifacts in a controlled environment
- When conducting red team exercises or penetration testing engagements
- When building detection capabilities based on offensive technique understanding
Most Often Missed & How to Confirm
- Firing the exploit before fingerprinting the exact OS build. EternalBlue's kernel grooming is build-sensitive; the wrong target profile blue-screens the host instead of landing a shell. Pin OS + SP/patch level first.
- Skipping the named-pipe check. The classic exploit needs an accessible named pipe (anonymous IPC$). Confirm with the Nmap
smb-vuln-ms17-010 script's pipe detection, not just port 445 open.
- Ignoring x86 vs x64 payload arch, which silently fails the shellcode.
- No crash safety margin. On production/legacy boxes a failed attempt can DoS the host — get explicit sign-off and prefer the
ms17_010_psexec variant (auth'd, more reliable) when creds exist.
- Assuming "port 445 open" means vulnerable without running the MS17-010 check.
- How to confirm a hit: the Nmap NSE / CME check reports
VULNERABLE for MS17-010, and exploitation succeeds when you get an interactive session — Metasploit prints WIN and opens a Meterpreter/getuid returns NT AUTHORITY\SYSTEM. Don't conclude a host is patched until the smb-vuln-ms17-010 script actually completes the vuln check (a filtered/closed 445 is inconclusive, not "safe"), and don't conclude exploitation failed until you've matched payload arch to the confirmed target OS build.
Prerequisites
- Familiarity with red teaming concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities