Skip to content

Instantly share code, notes, and snippets.

@atifaziz
Created March 31, 2017 06:25
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save atifaziz/10cb04301383972a634d0199e451b096 to your computer and use it in GitHub Desktop.
Save atifaziz/10cb04301383972a634d0199e451b096 to your computer and use it in GitHub Desktop.
Decrypting DPAPI-protected Base64 data from PowerShell
Add-Type -AssemblyName System.Security;
[Text.Encoding]::ASCII.GetString([Security.Cryptography.ProtectedData]::Unprotect([Convert]::FromBase64String((type -raw (Join-Path $env:USERPROFILE foobar))), $null, 'CurrentUser'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment