Invoke-Obfuscation工具小记

Powershell命令和脚本混淆器Invoke-Obfuscation

下载地址:https://github.com/danielbohannon/Invoke-Obfuscation

安装报错解决

在安装该框架的时候碰到了点问题,基本上报的错误是下面这个

Import-Module.\Invoke-Obfuscation.psd1 : 无法将“Import-Module.\Invoke-Obfuscation.psd1”项识别为 cmdlet、函数、脚本文 件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次

解决方法

直接用管理员身份运行Powershell (实测从管理员身份的cmd转powshell没用)

1
2
3
Set-ExecutionPolicy Unrestricted
Import-Module ./Invoke-Obfuscation.psd1
Invoke-Obfuscation

问题解决

image-20211109154703264

使用方法

1、设置要混淆的ps1文件

1
2
3
set scriptpath 路径     //直接加ps1文件路径 例如:E:\...\payload.ps1

set scriptblock "xxx" //xxx为powershell命令

2、加密

encoding选择加密方式

3、输出文件

1
out [路径\文件名]   //例如:E:\\...\1.ps1

*4、选择命令的启动方式

加密后back返回上级

launcher选择命令的启动方式

参考链接

1、https://www.cnblogs.com/mrhonest/p/13425804.html

2、https://zhuanlan.zhihu.com/p/377121742(好文!!!)