Enumeration
Using PowerUpSQL
Look for SPN's related to mssql
Import-Module PowerUpSQL.ps1powershell Get-SQLInstanceDomain
ComputerName : sql-2.dev.cyberbotic.io
Instance : sql-2.dev.cyberbotic.io,1433
DomainAccountSid : 1500000521000672332383313895871914512914091400
DomainAccount : mssql_svc
DomainAccountCn : MS SQL Service
Service : MSSQLSvc
Spn : MSSQLSvc/sql-2.dev.cyberbotic.io:1433
LastLogon : 8/15/2022 7:55 PM
Description :setspn -T corp1 -Q MSSQLSvc/*.\GetUserSPNs.ps1Check if we can connect to database
Gather more information about the instance
Check which roles we have
Finding a user (or group) that does have access can be challenging
Query against MS SQL
Non AD linked servers
Tooling
Last updated