Metasploit-Payload修复Unicode支持
Metasploit-Payload修复Unicode支持 前言
目前状况

client.sys.process.execute传递的参数,并没有异常。

git clone https://github.com/cn-kali-team/metasploit-payloads
git submodule init && git submodule update
ext_server_stdapi这个工程项目中的process.c文件。
TLV_TYPE_PROCESS_PATH就可以找到了。wchar_t *utf8_to_wchar(const char *in);
char *wchar_to_utf8(const wchar_t *in);
met_api->string.wchar_to_utf8(name);
met_api->string.wchar_to_utf8(path);

CreateProcessW和commandLine_w修复Unicode支持。
ext_server_stdapi.x86.dll文件复制替换掉你原来的文件,例如我的ruby开发环境下的模块路径为:.rbenv\versions\2.7.2\lib\ruby\gems\2.7.0\gems\metasploit-payloads-2.0.23\data\meterpreter\ext_server_stdapi.x86.dll 修复后


# define DEBUGTRACE 1调试标志为真,在你想调试输出的地方加上dprintf([format string]),你想打印的信息。