{"id":196,"date":"2025-06-21T18:42:00","date_gmt":"2025-06-21T18:42:00","guid":{"rendered":"https:\/\/thecyberstaff.com\/?p=196"},"modified":"2025-12-28T19:54:55","modified_gmt":"2025-12-28T19:54:55","slug":"forest-hackthebox-lab","status":"publish","type":"post","link":"https:\/\/thecyberstaff.com\/?p=196","title":{"rendered":"Forest- Hackthebox lab"},"content":{"rendered":"\n<p class=\"has-text-align-center wp-block-paragraph\">icked off the assessment with a thorough Nmap scan to discover open ports and fingerprint the services running on the Forest host.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"449\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250618182832.png\" alt=\"\" class=\"wp-image-521\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250618182832.png 960w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250618182832-300x140.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250618182832-768x359.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">After identifying RPC on 135, I used <code>rpcclient<\/code> to connect anonymously and enumerate every domain user.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"814\" height=\"1024\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621142810-814x1024.png\" alt=\"\" class=\"wp-image-523\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621142810-814x1024.png 814w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621142810-239x300.png 239w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621142810-768x966.png 768w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621142810.png 924w\" sizes=\"auto, (max-width: 814px) 100vw, 814px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">I compiled the discovered usernames into a file and ran <strong>Impacket\u2019s GetNPUsers.py<\/strong> to test which accounts were vulnerable to AS-REP roasting.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"298\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621145111-1024x298.png\" alt=\"\" class=\"wp-image-524\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621145111-1024x298.png 1024w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621145111-300x87.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621145111-768x224.png 768w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621145111-1536x448.png 1536w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621145111-2048x597.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">The AS-REP hash for the <strong>svc-alfresco<\/strong> account was extracted and successfully cracked offline with <strong>Hashcat<\/strong>, revealing its clear-text password.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"511\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621150015-1024x511.png\" alt=\"\" class=\"wp-image-525\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621150015-1024x511.png 1024w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621150015-300x150.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621150015-768x383.png 768w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621150015-1536x767.png 1536w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621150015-2048x1022.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">With valid credentials obtained, I established an <strong>Evil-WinRM<\/strong> session to gain an interactive shell on the target.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"175\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621150832-1024x175.png\" alt=\"\" class=\"wp-image-526\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621150832-1024x175.png 1024w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621150832-300x51.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621150832-768x131.png 768w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621150832-1536x262.png 1536w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621150832-2048x349.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">Once on the box, I browsed to the user\u2019s desktop and captured the first flag\u2014<code>user.txt<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1010\" height=\"458\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621163423.png\" alt=\"\" class=\"wp-image-527\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621163423.png 1010w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621163423-300x136.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621163423-768x348.png 768w\" sizes=\"auto, (max-width: 1010px) 100vw, 1010px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">BloodHound revealed that our compromised account already belongs to the <strong>Account Operators<\/strong> group, giving it elevated control.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"596\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172018-1024x596.png\" alt=\"\" class=\"wp-image-529\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172018-1024x596.png 1024w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172018-300x174.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172018-768x447.png 768w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172018-1536x893.png 1536w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172018-2048x1191.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">Because Account Operators holds <strong>GenericAll<\/strong> rights over the Exchange server object, it also controls the <strong>Exchange Windows Permissions<\/strong> group. Through my Evil-WinRM session, I created a new domain user named <strong>scoobydoo<\/strong> and added it to the <strong>Exchange Windows Permissions<\/strong> group.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"112\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172842-1024x112.png\" alt=\"\" class=\"wp-image-531\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172842-1024x112.png 1024w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172842-300x33.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172842-768x84.png 768w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172842-1536x168.png 1536w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172842.png 1684w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">Next, I leveraged <code>DCSync.py<\/code> to grant <strong>scoobydoo<\/strong> the ability to replicate directory changes (DCSync) from the domain controller.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"303\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172911-1024x303.png\" alt=\"\" class=\"wp-image-532\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172911-1024x303.png 1024w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172911-300x89.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172911-768x228.png 768w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172911-1536x455.png 1536w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621172911-2048x607.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">I then performed a DCSync attack with Impacket\u2019s <code>secretsdump.py<\/code>, dumping the NTLM hashes for all privileged accounts\u2014including the domain administrator.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"258\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175208-1024x258.png\" alt=\"\" class=\"wp-image-533\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175208-1024x258.png 1024w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175208-300x76.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175208-768x194.png 768w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175208-1536x387.png 1536w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175208.png 1864w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">Using the administrator hash, I launched <code>psexec.py<\/code> to obtain a SYSTEM shell on the domain controller.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"785\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175334-1024x785.png\" alt=\"\" class=\"wp-image-534\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175334-1024x785.png 1024w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175334-300x230.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175334-768x589.png 768w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175334-1536x1178.png 1536w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175334.png 1674w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">With full administrative access, I navigated to the Administrator\u2019s desktop and secured the final flag\u2014<code>root.txt<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"258\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175647-1024x258.png\" alt=\"\" class=\"wp-image-535\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175647-1024x258.png 1024w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175647-300x76.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175647-768x194.png 768w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175647-1536x387.png 1536w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175647.png 1936w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"826\" height=\"470\" src=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175756.png\" alt=\"\" class=\"wp-image-536\" srcset=\"https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175756.png 826w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175756-300x171.png 300w, https:\/\/thecyberstaff.com\/wp-content\/uploads\/2025\/06\/Pasted-image-20250621175756-768x437.png 768w\" sizes=\"auto, (max-width: 826px) 100vw, 826px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">Ultimately, the Forest machine fell to a classic Active Directory escalation chain: AS-REP roasting a weak service account, abusing the inherited rights of the Account Operators group to manipulate Exchange permissions, granting DCSync privileges, and dumping NTDS secrets to obtain the Administrator hash for full SYSTEM compromise. This walkthrough underscores how a single weak Kerberos account and legacy group privileges can cascade into complete domain takeover\u2014reminding defenders to enforce strong service-account passwords, restrict privileged groups, and harden Exchange delegation settings.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>icked off the assessment with a thorough Nmap scan to discover open ports and fingerprint the services running on the Forest host. After identifying RPC on 135, I used rpcclient to connect anonymously and enumerate every domain user. I compiled the discovered usernames into a file and ran Impacket\u2019s GetNPUsers.py [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":197,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-196","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cybersecurity","category-pentesting"],"brizy_media":[],"_links":{"self":[{"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=\/wp\/v2\/posts\/196","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=196"}],"version-history":[{"count":2,"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=\/wp\/v2\/posts\/196\/revisions"}],"predecessor-version":[{"id":537,"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=\/wp\/v2\/posts\/196\/revisions\/537"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=\/wp\/v2\/media\/197"}],"wp:attachment":[{"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecyberstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}