{"id":193,"date":"2025-06-14T18:38:00","date_gmt":"2025-06-14T18:38:00","guid":{"rendered":"https:\/\/thecyberstaff.com\/?p=193"},"modified":"2026-10-13T21:21:10","modified_gmt":"2026-10-14T02:21:10","slug":"active-hackthebox-lab","status":"publish","type":"post","link":"https:\/\/thecyberstaff.com\/?p=193","title":{"rendered":"Active- Hackthebox lab"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I began this engagement by conducting an Nmap scan to identify open ports on the target. The results revealed several ports in use, including ports 88 (Kerberos), 135 (RPC), 389 (LDAP), and 445 (SMB), which strongly suggested the target was a&nbsp;<strong>Windows Domain Controller<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"529\" height=\"438\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614112753.png\" alt=\"\" class=\"wp-image-538\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614112753.png 529w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614112753-300x248.png 300w\" sizes=\"auto, (max-width: 529px) 100vw, 529px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Focusing on port 445, I started enumerating available SMB shares. Using tools like&nbsp;<code>smbclient<\/code>&nbsp;and&nbsp;<code>enum4linux<\/code>, I discovered that the&nbsp;<strong>Replication<\/strong>&nbsp;share was accessible with anonymous read permissions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"613\" height=\"212\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614112831.png\" alt=\"\" class=\"wp-image-539\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614112831.png 613w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614112831-300x104.png 300w\" sizes=\"auto, (max-width: 613px) 100vw, 613px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Browsing through the contents of this share, I came across files that resembled the structure used in the&nbsp;<strong>Group Policy Preferences (GPP)<\/strong>&nbsp;vulnerability\u2014specifically, the presence of&nbsp;<code>Groups.xml<\/code>, which is known to sometimes contain an encrypted password stored in the&nbsp;<code>cpassword<\/code>&nbsp;field.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"675\" height=\"298\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614113208.png\" alt=\"\" class=\"wp-image-540\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614113208.png 675w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614113208-300x132.png 300w\" sizes=\"auto, (max-width: 675px) 100vw, 675px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To automate the discovery, I leveraged&nbsp;<strong>Metasploit\u2019s smb_enum_gpp module<\/strong>, which scanned SMB shares for vulnerable GPP configuration files.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"321\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614113354-1024x321.png\" alt=\"\" class=\"wp-image-541\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614113354-1024x321.png 1024w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614113354-300x94.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614113354-768x241.png 768w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614113354.png 1290w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The&nbsp;<code>Groups.xml<\/code>&nbsp;file was found, and I downloaded it to my local Kali machine.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"90\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614113910-1024x90.png\" alt=\"\" class=\"wp-image-542\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614113910-1024x90.png 1024w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614113910-300x26.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614113910-768x68.png 768w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614113910.png 1406w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Kali Linux includes a built-in utility called&nbsp;<code>gpp-decrypt<\/code>, which is capable of decrypting GPP cpasswords. This works because&nbsp;<strong>Microsoft inadvertently published the AES decryption key on MSDN back in 2012<\/strong>, making it possible to easily recover plaintext passwords from these configuration files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I used&nbsp;<code>gpp-decrypt<\/code>&nbsp;to extract the cleartext password, which granted access to SMB using the&nbsp;<strong>SVC_TGT<\/strong>&nbsp;service account.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"837\" height=\"189\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614113946.png\" alt=\"\" class=\"wp-image-543\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614113946.png 837w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614113946-300x68.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614113946-768x173.png 768w\" sizes=\"auto, (max-width: 837px) 100vw, 837px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Logging in with these credentials, I was able to navigate to the user\u2019s home directory and retrieve the first flag:&nbsp;<strong><code>user.txt<\/code><\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"870\" height=\"767\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614114313.png\" alt=\"\" class=\"wp-image-544\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614114313.png 870w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614114313-300x264.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614114313-768x677.png 768w\" sizes=\"auto, (max-width: 870px) 100vw, 870px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">With a valid domain user account in hand, I initiated a&nbsp;<strong>Kerberoasting attack<\/strong>. This technique involves requesting service tickets for accounts with SPNs (Service Principal Names) and capturing their encrypted credentials.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using&nbsp;<strong>Impacket\u2019s&nbsp;<code>GetUserSPNs.py<\/code><\/strong>, I extracted a&nbsp;<strong>Kerberos TGS hash<\/strong>&nbsp;for the&nbsp;<strong>Administrator<\/strong>&nbsp;account.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"267\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614115043-1024x267.png\" alt=\"\" class=\"wp-image-546\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614115043-1024x267.png 1024w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614115043-300x78.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614115043-768x200.png 768w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614115043.png 1296w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I then used&nbsp;<strong>Hashcat<\/strong>&nbsp;to crack the hash offline, successfully recovering the Administrator\u2019s plaintext password.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"866\" height=\"412\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614115011.png\" alt=\"\" class=\"wp-image-545\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614115011.png 866w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614115011-300x143.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614115011-768x365.png 768w\" sizes=\"auto, (max-width: 866px) 100vw, 866px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Armed with domain admin credentials, I connected to the host over SMB once more\u2014this time as&nbsp;<strong>Administrator<\/strong>\u2014and accessed the second flag:&nbsp;<strong><code>root.txt<\/code><\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"645\" height=\"538\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614115240.png\" alt=\"\" class=\"wp-image-547\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614115240.png 645w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250614115240-300x250.png 300w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This completes the&nbsp;<strong>\u201cActive\u201d<\/strong>&nbsp;machine on HackTheBox. The box highlights the risks of outdated configurations such as Group Policy Preferences passwords and reinforces how improper share permissions and Kerberos misconfigurations can lead to full domain compromise. A strong reminder of why legacy features must be audited and retired in secure environments.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I began this engagement by conducting an Nmap scan to identify open ports on the target. The results revealed several ports in use, including ports 88 (Kerberos), 135 (RPC), 389 (LDAP), and 445 (SMB), which strongly suggested the target was a&nbsp;Windows Domain Controller. Focusing on port 445, I started enumerating [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":194,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[12,10],"class_list":["post-193","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cybersecurity","category-pentesting","tag-active-directory","tag-hackthebox"],"brizy_media":[],"_links":{"self":[{"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=\/wp\/v2\/posts\/193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=193"}],"version-history":[{"count":2,"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=\/wp\/v2\/posts\/193\/revisions"}],"predecessor-version":[{"id":548,"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=\/wp\/v2\/posts\/193\/revisions\/548"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=\/wp\/v2\/media\/194"}],"wp:attachment":[{"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}