├── LICENSE ├── README.md ├── csgoInjector.sln ├── csgoInjector.vcxproj ├── csgoInjector.vcxproj.filters ├── csgoInjector.vcxproj.user ├── ifexist.hpp ├── main.cpp └── memory.hpp /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 v3ctra 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # load-lib injector 2 | This is a load-library injector, that is able to bypass new valve's vac module. 3 | 4 | ## Building 5 | Compile with Microsoft Visual Studio 2019, Release x86. 6 | 7 | ## how-to-use 8 | - Open Counter-Strike 9 | - Change your dll name to cheat.dll 10 | - Run injector (as admin) 11 | If everything is fine you will see "module injected" in console. 12 | 13 | ## status 14 | - Unknown (20.06.2020) 15 | 16 | 17 | ## Credits 18 | - Daniel Krupinski 19 | - online-9 20 | - Hitchance#1337 21 | 22 | Have a nice day :) 23 | -------------------------------------------------------------------------------- /csgoInjector.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30011.22 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "csgoInjector", "csgoInjector.vcxproj", "{8275AC55-0684-4A06-B8BA-03F21C128F5B}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {8275AC55-0684-4A06-B8BA-03F21C128F5B}.Debug|x64.ActiveCfg = Debug|x64 17 | {8275AC55-0684-4A06-B8BA-03F21C128F5B}.Debug|x64.Build.0 = Debug|x64 18 | {8275AC55-0684-4A06-B8BA-03F21C128F5B}.Debug|x86.ActiveCfg = Debug|Win32 19 | {8275AC55-0684-4A06-B8BA-03F21C128F5B}.Debug|x86.Build.0 = Debug|Win32 20 | {8275AC55-0684-4A06-B8BA-03F21C128F5B}.Release|x64.ActiveCfg = Release|x64 21 | {8275AC55-0684-4A06-B8BA-03F21C128F5B}.Release|x64.Build.0 = Release|x64 22 | {8275AC55-0684-4A06-B8BA-03F21C128F5B}.Release|x86.ActiveCfg = Release|Win32 23 | {8275AC55-0684-4A06-B8BA-03F21C128F5B}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {75970440-4901-40C9-B080-4424D52DB60B} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /csgoInjector.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 16.0 23 | {8275AC55-0684-4A06-B8BA-03F21C128F5B} 24 | csgoInjector 25 | 10.0 26 | 27 | 28 | 29 | Application 30 | true 31 | v142 32 | Unicode 33 | 34 | 35 | Application 36 | false 37 | v142 38 | true 39 | MultiByte 40 | 41 | 42 | Application 43 | true 44 | v142 45 | Unicode 46 | 47 | 48 | Application 49 | false 50 | v142 51 | true 52 | Unicode 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | true 74 | 75 | 76 | true 77 | 78 | 79 | false 80 | 81 | 82 | false 83 | 84 | 85 | 86 | Level3 87 | true 88 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 89 | true 90 | 91 | 92 | Console 93 | true 94 | 95 | 96 | 97 | 98 | Level3 99 | true 100 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 101 | true 102 | 103 | 104 | Console 105 | true 106 | 107 | 108 | 109 | 110 | Level3 111 | true 112 | true 113 | true 114 | NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) 115 | true 116 | 117 | 118 | Console 119 | true 120 | true 121 | true 122 | 123 | 124 | 125 | 126 | Level3 127 | true 128 | true 129 | true 130 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 131 | true 132 | 133 | 134 | Console 135 | true 136 | true 137 | true 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /csgoInjector.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;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 | Pliki źródłowe 20 | 21 | 22 | 23 | 24 | Pliki nagłówkowe 25 | 26 | 27 | -------------------------------------------------------------------------------- /csgoInjector.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /ifexist.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //It didn't looked so good to me in main.cpp... 4 | //So, I decided to make another file for it. 5 | 6 | bool DoesFileExist(const char* name) { 7 | if (FILE* file = fopen(name, "r")) { 8 | fclose(file); 9 | return true; 10 | } 11 | else { 12 | return false; 13 | } 14 | } -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "memory.hpp" 5 | #include "ifexist.hpp" 6 | 7 | using namespace std; 8 | 9 | Injector inj; 10 | 11 | DWORD pid; 12 | 13 | //now it's global 14 | LPVOID ntOpenFile = GetProcAddress(LoadLibraryW(L"ntdll"), "NtOpenFile"); 15 | 16 | void bypass() 17 | { 18 | // Restore original NtOpenFile from external process 19 | //credits: Daniel Krupiñski(pozdro dla ciebie byczku <3) 20 | if (ntOpenFile) { 21 | char originalBytes[5]; 22 | memcpy(originalBytes, ntOpenFile, 5); 23 | WriteProcessMemory(inj.process, ntOpenFile, originalBytes, 5, NULL); 24 | } 25 | else 26 | { 27 | cout << "Unable to bypass :(\n"; 28 | Sleep(2000); 29 | exit(-1); 30 | } 31 | } 32 | 33 | void Backup() 34 | { 35 | if (ntOpenFile) { 36 | //So, when I patching first 5 bytes I need to backup them to 0? (I think) 37 | char originalBytes[5]; 38 | memcpy(originalBytes, ntOpenFile, 5); 39 | WriteProcessMemory(inj.process, ntOpenFile, originalBytes, 0, NULL); 40 | } 41 | else 42 | { 43 | cout << "Unable to backup :(\n"; 44 | Sleep(2000); 45 | exit(-1); 46 | } 47 | } 48 | 49 | int main() 50 | { 51 | SetConsoleTitle("totally not pasted injector :)"); 52 | 53 | cout << "Credits:\n Daniel Krupinski\n online-9\n Hitchance\n\n" << endl; 54 | 55 | inj.hwndproc = FindWindowA("Valve001", nullptr); 56 | 57 | 58 | GetWindowThreadProcessId(inj.hwndproc, &pid); 59 | inj.process = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid); 60 | 61 | inj.clientDLL = inj.GetModule(pid, "client.dll"); 62 | 63 | if (DoesFileExist("cheat.dll")) { 64 | bypass(); 65 | 66 | if (inj.inject(pid, "cheat.dll")) { 67 | cout << "module injected!\n\n" << endl; 68 | Backup(); 69 | Sleep(2000); 70 | exit(0); 71 | } 72 | else 73 | { 74 | cout << "Injection failed!\n\n" << endl; 75 | Backup(); 76 | Sleep(2000); 77 | exit(-1); 78 | } 79 | 80 | } 81 | else 82 | { 83 | cout << "cannot find cheat.dll\n\n"; 84 | Sleep(2000); 85 | exit(-1); 86 | } 87 | 88 | return 0; 89 | } 90 | -------------------------------------------------------------------------------- /memory.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | 5 | #include 6 | #include 7 | 8 | 9 | 10 | 11 | 12 | class Injector 13 | { 14 | public: 15 | HANDLE process; 16 | HWND hwndproc; 17 | DWORD clientDLL; 18 | 19 | DWORD GetModule(DWORD pid, const char* name) 20 | { 21 | HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pid); 22 | MODULEENTRY32 mEntry; 23 | mEntry.dwSize = sizeof(MODULEENTRY32); 24 | do 25 | { 26 | if (!strcmp(mEntry.szModule, name)) 27 | { 28 | CloseHandle(snapshot); 29 | return (DWORD)mEntry.modBaseAddr; 30 | } 31 | } while (Module32Next(snapshot, &mEntry)); 32 | } 33 | 34 | bool inject(DWORD pid, const char* dll) 35 | { 36 | if (pid == 0) 37 | { 38 | std::cout << "cannot find processID"; 39 | return FALSE; 40 | } 41 | 42 | char myDLL[MAX_PATH]; 43 | GetFullPathName(dll, MAX_PATH, myDLL, 0); 44 | 45 | HANDLE hProcess = OpenProcess(PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION | PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION, FALSE, pid); 46 | 47 | LPVOID allocatedMem = VirtualAllocEx(hProcess, NULL, sizeof(myDLL), MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); 48 | WriteProcessMemory(hProcess, allocatedMem, myDLL, sizeof(myDLL), NULL); 49 | 50 | CreateRemoteThread(hProcess, 0, 0, (LPTHREAD_START_ROUTINE)LoadLibrary, allocatedMem, 0, 0); 51 | 52 | CloseHandle(hProcess); 53 | 54 | return TRUE; 55 | } 56 | 57 | private: 58 | }; --------------------------------------------------------------------------------