├── Loader
├── Loader.vcxproj.user
├── includes.h
├── Loader.vcxproj.filters
├── Loader.cpp
├── functions.h
└── Loader.vcxproj
├── README.md
├── LICENSE
└── Loader.sln
/Loader/Loader.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Loader/includes.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 |
7 | /*
8 |
9 | Credits:
10 | 1. https://github.com/AMATEURZ1337/load-lib-injector ( Little bit of code used ).
11 | 2. Cyborg Elf: https://www.youtube.com/channel/UC_bMnu_fYu9-2_EY7GUfclQ
12 | 3. Discord: xo1337 https://discord.gg/NwRFmp3J2J
13 |
14 | */
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Undetected-DLL-Injection
2 |
3 | ⚠️**WARNING THIS PROJECT IS STILL UNDER DEVELOPMENT FOR V2. THIS INJECTOR CURRENTLY SUCKS AND IM MAKING V2. V2 WILL BE RELEASED OVER THE NEXT FEW DAYS AND IT WILL BE MUCH BETTER IN BEING UNDETECTED AND WILL USE MANUAL MAPPING** ⚠️
4 |
5 | 📖 Project Overview :
6 |
7 | This is a DLL injector written in C++, it uses the most advanced method to inject DLL (LoadLibrary).
8 |
9 | ____________________________________________________________________________________________________________
10 |
11 | 🚀 Getting Started :
12 |
13 | 1. Open the solution file (.sln).
14 | 2. Build the project in Release (x86) and configure anything you want.
15 |
--------------------------------------------------------------------------------
/Loader/Loader.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {a650511f-bc49-4d7a-a9e9-64cd75b07c8d}
10 |
11 |
12 |
13 |
14 | Source Files
15 |
16 |
17 |
18 |
19 | Headers
20 |
21 |
22 | Headers
23 |
24 |
25 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Heath Howren
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 |
--------------------------------------------------------------------------------
/Loader/Loader.cpp:
--------------------------------------------------------------------------------
1 | #include "includes.h"
2 | #include "functions.h"
3 | #include
4 |
5 | void Cleanup(const std::string message) {
6 | std::cout << message << std::endl;
7 | std::terminate();
8 | }
9 |
10 | int main()
11 | {
12 | SetConsoleTitleA("Injector V2");
13 |
14 | DWORD ProcessId = Functions::GetProcessId("RobloxPlayerBeta.exe");
15 |
16 | if (!ProcessId)
17 | Cleanup("Roblox not Found!");
18 |
19 | HANDLE Game = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ProcessId);
20 | uintptr_t ModuleBase = Functions::GetModuleBaseAddress(ProcessId, "why are you deobfuscating/decompiling this? :/");
21 |
22 | if (Functions::DoesFileExist("cheat.dll")) {
23 |
24 | if (!Functions::Internal::ExecuteBypass(Game)) {
25 | Cleanup("Cannot Bypass...");
26 | }
27 |
28 | if (Functions::LoadLibraryInject(ProcessId, "cheat.dll")) {
29 |
30 | Functions::Internal::Backup(Game);
31 | std::cout << "Injecting..." << std::endl;
32 | Sleep(2000);
33 | Cleanup("Injected!");
34 | }
35 | else
36 | {
37 | Functions::Internal::Backup(Game);
38 | Cleanup("Injection Failed.");
39 | }
40 |
41 | }
42 |
43 |
44 |
45 | return 0;
46 | }
--------------------------------------------------------------------------------
/Loader.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.31025.194
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Loader", "Loader\Loader.vcxproj", "{78E130A9-3802-4026-8650-E63424B15967}"
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 | {78E130A9-3802-4026-8650-E63424B15967}.Debug|x64.ActiveCfg = Debug|x64
17 | {78E130A9-3802-4026-8650-E63424B15967}.Debug|x64.Build.0 = Debug|x64
18 | {78E130A9-3802-4026-8650-E63424B15967}.Debug|x86.ActiveCfg = Debug|Win32
19 | {78E130A9-3802-4026-8650-E63424B15967}.Debug|x86.Build.0 = Debug|Win32
20 | {78E130A9-3802-4026-8650-E63424B15967}.Release|x64.ActiveCfg = Release|x64
21 | {78E130A9-3802-4026-8650-E63424B15967}.Release|x64.Build.0 = Release|x64
22 | {78E130A9-3802-4026-8650-E63424B15967}.Release|x86.ActiveCfg = Release|Win32
23 | {78E130A9-3802-4026-8650-E63424B15967}.Release|x86.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {3CEEBE4E-AA29-434C-97E9-B96694D4A322}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/Loader/functions.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "includes.h"
3 |
4 | namespace Functions
5 | {
6 | bool DoesFileExist(const char* name) {
7 | if (FILE* file = fopen(name, "r")) {
8 | fclose(file);
9 | return true;
10 | }
11 |
12 | return false;
13 | }
14 |
15 | //===========================================================================================
16 |
17 | DWORD GetProcessId(const char* ProcessName)
18 | {
19 | HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
20 |
21 | PROCESSENTRY32 pe32;
22 | pe32.dwSize = sizeof(pe32);
23 |
24 | if (!Process32First(hSnap, &pe32))
25 | return NULL;
26 |
27 | do {
28 |
29 | if (!strcmp(pe32.szExeFile, ProcessName))
30 | {
31 | CloseHandle(hSnap);
32 | return pe32.th32ProcessID;
33 | }
34 |
35 | } while (Process32Next(hSnap, &pe32));
36 |
37 | CloseHandle(hSnap);
38 | return NULL;
39 | }
40 |
41 | uintptr_t GetModuleBaseAddress(DWORD pid, const char* modName) {
42 | HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, pid);
43 | if (hSnap != INVALID_HANDLE_VALUE) {
44 | MODULEENTRY32 modEntry;
45 | modEntry.dwSize = sizeof(modEntry);
46 | if (Module32First(hSnap, &modEntry)) {
47 | do {
48 | if (!strcmp(modEntry.szModule, modName)) {
49 | CloseHandle(hSnap);
50 | return (uintptr_t)modEntry.modBaseAddr;
51 | }
52 | } while (Module32Next(hSnap, &modEntry));
53 | }
54 | }
55 | }
56 |
57 | //===========================================================================================
58 |
59 | bool LoadLibraryInject(DWORD ProcessId, const char* Dll)
60 | {
61 | if (ProcessId == NULL)
62 | return false;
63 |
64 | char CustomDLL[MAX_PATH];
65 | GetFullPathName(Dll, MAX_PATH, CustomDLL, 0);
66 |
67 | HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ProcessId);
68 | LPVOID allocatedMem = VirtualAllocEx(hProcess, NULL, sizeof(CustomDLL), MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
69 |
70 | if (!WriteProcessMemory(hProcess, allocatedMem, CustomDLL, sizeof(CustomDLL), NULL))
71 | return FALSE;
72 |
73 | CreateRemoteThread(hProcess, 0, 0, (LPTHREAD_START_ROUTINE)LoadLibrary, allocatedMem, 0, 0);
74 |
75 | if (hProcess)
76 | CloseHandle(hProcess);
77 |
78 | return TRUE;
79 | }
80 |
81 | //===========================================================================================
82 |
83 | namespace Internal
84 | {
85 | LPVOID NTOpenFile = GetProcAddress(LoadLibraryW(L"ntdll"), "NtOpenFile");
86 |
87 | bool ExecuteBypass(HANDLE hProcess)
88 | {
89 | if (NTOpenFile) {
90 | char originalBytes[5];
91 | memcpy(originalBytes, NTOpenFile, 5);
92 | if (WriteProcessMemory(hProcess, NTOpenFile, originalBytes, 5, NULL)) {
93 | return TRUE;
94 | }
95 |
96 | }
97 |
98 | return FALSE;
99 |
100 | }
101 |
102 | bool Backup(HANDLE hProcess)
103 | {
104 | if (NTOpenFile) {
105 | //So, when I patching first 5 bytes I need to backup them to 0? (I think)
106 | char Orig[5];
107 | memcpy(Orig, NTOpenFile, 5);
108 | WriteProcessMemory(hProcess, NTOpenFile, Orig, 0, 0);
109 | return TRUE;
110 | }
111 |
112 | return FALSE;
113 | }
114 |
115 | }
116 | }
117 |
118 |
--------------------------------------------------------------------------------
/Loader/Loader.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 | Win32Proj
24 | {78e130a9-3802-4026-8650-e63424b15967}
25 | Loader
26 | 10.0
27 | Injector
28 |
29 |
30 |
31 | Application
32 | true
33 | v143
34 | MultiByte
35 |
36 |
37 | Application
38 | false
39 | v143
40 | true
41 | MultiByte
42 |
43 |
44 | Application
45 | true
46 | v143
47 | Unicode
48 |
49 |
50 | Application
51 | false
52 | v143
53 | true
54 | Unicode
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 | true
76 |
77 |
78 | false
79 | Injector
80 |
81 |
82 | true
83 |
84 |
85 | false
86 | Injector
87 |
88 |
89 |
90 | Level3
91 | true
92 | WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
93 | true
94 |
95 |
96 | Console
97 | true
98 |
99 |
100 |
101 |
102 | Level3
103 | true
104 | true
105 | true
106 | WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
107 | true
108 |
109 |
110 | Console
111 | true
112 | true
113 | true
114 |
115 |
116 |
117 |
118 | Level3
119 | true
120 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
121 | true
122 |
123 |
124 | Console
125 | true
126 |
127 |
128 |
129 |
130 | Level3
131 | true
132 | true
133 | true
134 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
135 | true
136 |
137 |
138 | Console
139 | true
140 | true
141 | true
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
--------------------------------------------------------------------------------