【笔记】Invoke-Obfuscation学习笔记

前言

Invoke-Obfuscation is a PowerShell v2.0+ compatible PowerShell command and script obfuscator.(Github

下载项目

1
2
git clone https://github.com/danielbohannon/Invoke-Obfuscation.git
cd Invoke-Obfuscation

加载模块

1
Import-Module ./Invoke-Obfuscation.psd1

运行程序

1
Invoke-Obfuscation

设置需要混淆的PowerShell脚本

1
Invoke-Obfuscation> set scriptpath <file>.ps1

设置需要混淆的代码范围(可选)

  • 如果不指定,则表示混淆当前PowerShell脚本的所有代码

<code>:需要混淆的代码

1
Invoke-Obfuscation> set scriptblock '<code>'

设置混淆方式

1
Invoke-Obfuscation> encoding

<num>:混淆方式编号

1
Invoke-Obfuscation\Encoding> <num>

输出混淆欧的脚本文件

1
Invoke-Obfuscation\Encoding> out <file_out>.ps1

完成