Invoke-Obfuscation混淆ps文件绕过Windows_Defender

前提

powershell只能针对win7之后的系统,之前的win操作系统默认没有安装powershell。
所在目录:C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

混淆

  • 1.Cobaltstrike制作ps1后门文件
  • 2.进入Invoke-Obfuscation
Import-Module ./Invoke-Obfuscation.psd1
Invoke-Obfuscation

Invoke-Obfuscation混淆ps文件绕过Windows_Defender_第1张图片

可能会报错?!
win10 x64系统 Import-Module 无法加载文件,提示此系统上禁止运行脚本。
Invoke-Obfuscation混淆ps文件绕过Windows_Defender_第2张图片

解决
管理员权限下运行:Set-ExecutionPolicy Unrestricted
Invoke-Obfuscation混淆ps文件绕过Windows_Defender_第3张图片

  • 3.设置ps1文件进行混淆
set scriptpath E:\...\Invoke-Obfuscation_PowerShell\payload.ps1
encoding
1

Invoke-Obfuscation混淆ps文件绕过Windows_Defender_第4张图片

  • 4.输出文件
    out 1.ps1
    Invoke-Obfuscation混淆ps文件绕过Windows_Defender_第5张图片

然后运行 powershell 1.ps1./1.ps1,接收端就上线了。

上线

Invoke-Obfuscation混淆ps文件绕过Windows_Defender_第6张图片

powershell是一款很强大的工具,且很多原生不经过任何处理的ps后门文件都能轻松绕过杀软。如不使用,对于安全意识较弱的同学可以删除系统 powershell.exe 程序。

你可能感兴趣的:(Invoke-Obfuscation混淆ps文件绕过Windows_Defender)