dll branch
This commit is contained in:
parent
8b49fe0590
commit
0813a4cd30
42
.gitignore
vendored
42
.gitignore
vendored
@ -1 +1,43 @@
|
|||||||
|
# Visual Studio
|
||||||
.vs/
|
.vs/
|
||||||
|
[Dd]ebug/
|
||||||
|
[Rr]elease/
|
||||||
|
x64/
|
||||||
|
x86/
|
||||||
|
[Aa]rm/
|
||||||
|
[Aa]rm64/
|
||||||
|
*.pdb
|
||||||
|
*.obj
|
||||||
|
*.exe
|
||||||
|
*.dll
|
||||||
|
*.iobj
|
||||||
|
*.ipdb
|
||||||
|
*.log
|
||||||
|
*.tlog
|
||||||
|
*.lastbuildstate
|
||||||
|
*.recipe
|
||||||
|
*.idb
|
||||||
|
*.cache
|
||||||
|
*.vsidx
|
||||||
|
*.VC.db
|
||||||
|
|
||||||
|
# CLion / CMake
|
||||||
|
cmake-build-*/
|
||||||
|
CMakeFiles/
|
||||||
|
CMakeCache.txt
|
||||||
|
build/
|
||||||
|
.cmake/
|
||||||
|
|
||||||
|
# Idea
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# NuGet
|
||||||
|
packages/
|
||||||
|
*.nuget.props
|
||||||
|
*.nuget.targets
|
||||||
|
project.assets.json
|
||||||
|
project.nuget.cache
|
||||||
|
|
||||||
|
# Submodules
|
||||||
|
GUI/
|
||||||
|
RLIdentity/RLidentity/
|
||||||
|
|||||||
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[submodule "GUI"]
|
||||||
|
path = GUI
|
||||||
|
url = https://git.rlidentity.me/bits/RLidentity.git
|
||||||
|
branch = GUI
|
||||||
18
CMakeLists.txt
Normal file
18
CMakeLists.txt
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
project(RLIdentityDLL)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
|
|
||||||
|
# Set output directory to x64/Release for consistency with VS project
|
||||||
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
|
|
||||||
|
add_library(RLIdentity SHARED
|
||||||
|
RLIdentity.cpp)
|
||||||
|
|
||||||
|
# Link MinHook
|
||||||
|
target_link_libraries(RLIdentity PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/libMinHook.x64.lib)
|
||||||
|
|
||||||
|
# Add definitions if needed
|
||||||
|
target_compile_definitions(RLIdentity PRIVATE _USRDLL RLIDENTITYDLL_EXPORTS)
|
||||||
196
RLIdentity.cpp
196
RLIdentity.cpp
@ -1,115 +1,155 @@
|
|||||||
#include <Windows.h>
|
// RLIdentity.cpp
|
||||||
|
// 1:1 Proven logic with ALL-SAFE JSON parsing (no dynamic allocations).
|
||||||
|
|
||||||
|
#include <Windows.h>
|
||||||
#include <MinHook.h>
|
#include <MinHook.h>
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#pragma comment(lib, "MinHook.x64.lib")
|
#pragma comment(lib, "libMinHook.x64.lib")
|
||||||
#pragma comment(lib, "shell32.lib")
|
#pragma comment(lib, "shell32.lib")
|
||||||
|
|
||||||
static char g_SpoofedName[256] = "Player";
|
static char g_SpoofedName[256] = "Player";
|
||||||
static char g_ConfigPath[MAX_PATH] = { 0 };
|
static void* g_LocalUserId = nullptr;
|
||||||
|
|
||||||
typedef int(__stdcall* EOS_Func_t)(void*, void*, void**);
|
void ClearLog() {
|
||||||
EOS_Func_t oEOS_UserInfo_CopyUserInfo = nullptr;
|
char path[MAX_PATH];
|
||||||
|
if (SUCCEEDED(SHGetFolderPathA(NULL, CSIDL_APPDATA, NULL, 0, path))) {
|
||||||
void LoadConfig() {
|
char logFile[MAX_PATH];
|
||||||
// Get AppData path
|
sprintf_s(logFile, "%s\\RLidentity\\log.txt", path);
|
||||||
char appDataPath[MAX_PATH];
|
FILE* f = NULL;
|
||||||
SHGetFolderPathA(NULL, CSIDL_APPDATA, NULL, 0, appDataPath);
|
fopen_s(&f, logFile, "w");
|
||||||
|
if (f) {
|
||||||
sprintf_s(g_ConfigPath, "%s\\RLidentity\\config.txt", appDataPath);
|
fprintf(f, "[RLidentity] --- New Session Started ---\n");
|
||||||
|
fclose(f);
|
||||||
FILE* fp = NULL;
|
|
||||||
fopen_s(&fp, g_ConfigPath, "r");
|
|
||||||
if (fp) {
|
|
||||||
char line[256] = { 0 };
|
|
||||||
if (fgets(line, sizeof(line), fp)) {
|
|
||||||
line[strcspn(line, "\r\n")] = 0;
|
|
||||||
|
|
||||||
if (strlen(line) > 0 && strlen(line) < 50) {
|
|
||||||
strcpy_s(g_SpoofedName, sizeof(g_SpoofedName), line);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
fclose(fp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int __stdcall hkEOS_UserInfo_CopyUserInfo(void* p1, void* p2, void** p3) {
|
void LoadConfig() {
|
||||||
int result = oEOS_UserInfo_CopyUserInfo(p1, p2, p3);
|
char path[MAX_PATH];
|
||||||
|
if (SUCCEEDED(SHGetFolderPathA(NULL, CSIDL_APPDATA, NULL, 0, path))) {
|
||||||
|
char jPath[MAX_PATH];
|
||||||
|
sprintf_s(jPath, "%s\\RLidentity\\config.json", path);
|
||||||
|
|
||||||
|
FILE* fp = NULL;
|
||||||
|
fopen_s(&fp, jPath, "r");
|
||||||
|
if (fp) {
|
||||||
|
char buffer[1024] = { 0 };
|
||||||
|
size_t bytes = fread(buffer, 1, sizeof(buffer)-1, fp);
|
||||||
|
fclose(fp);
|
||||||
|
|
||||||
if (result == 0 && p3 && *p3) {
|
if (bytes > 0) {
|
||||||
char** structPtr = (char**)*p3;
|
const char* key = "\"spoofedName\"";
|
||||||
|
char* pos = strstr(buffer, key);
|
||||||
__try {
|
if (pos) {
|
||||||
if (structPtr[3] && !IsBadReadPtr(structPtr[3], 6)) {
|
char* colon = strchr(pos, ':');
|
||||||
if (strstr(structPtr[3], "sfdb.") != nullptr) {
|
if (colon) {
|
||||||
structPtr[3] = g_SpoofedName;
|
char* start = strchr(colon, '\"');
|
||||||
|
if (start) {
|
||||||
|
char* end = strchr(start + 1, '\"');
|
||||||
|
if (end) {
|
||||||
|
size_t len = end - (start + 1);
|
||||||
|
if (len > 0 && len < 255) {
|
||||||
|
memcpy(g_SpoofedName, start + 1, len);
|
||||||
|
g_SpoofedName[len] = '\0';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
__except (EXCEPTION_EXECUTE_HANDLER) {
|
|
||||||
|
char tPath[MAX_PATH];
|
||||||
|
sprintf_s(tPath, "%s\\RLidentity\\config.txt", path);
|
||||||
|
fopen_s(&fp, tPath, "r");
|
||||||
|
if (fp) {
|
||||||
|
char line[256] = { 0 };
|
||||||
|
if (fgets(line, sizeof(line), fp)) {
|
||||||
|
line[strcspn(line, "\r\n")] = 0;
|
||||||
|
if (strlen(line) > 0) strcpy_s(g_SpoofedName, 256, line);
|
||||||
|
}
|
||||||
|
fclose(fp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD WINAPI ConfigReloadThread(LPVOID lpParam) {
|
typedef int(__stdcall* CopyUserInfo_t)(void*, void*, void**);
|
||||||
while (true) {
|
static CopyUserInfo_t oEOS_UserInfo_CopyUserInfo = nullptr;
|
||||||
Sleep(2000);
|
|
||||||
LoadConfig();
|
typedef int(__stdcall* ToString_t)(void*, char*, int32_t*);
|
||||||
|
static ToString_t oEOS_EpicAccountId_ToString = nullptr;
|
||||||
|
|
||||||
|
int __stdcall hkEOS_EpicAccountId_ToString(void* handle, char* buffer, int32_t* length) {
|
||||||
|
if (handle && g_LocalUserId && handle == g_LocalUserId) {
|
||||||
|
size_t spoofLen = strlen(g_SpoofedName);
|
||||||
|
if (buffer && length && *length > (int32_t)spoofLen) {
|
||||||
|
strcpy_s(buffer, *length, g_SpoofedName);
|
||||||
|
*length = (int32_t)spoofLen + 1;
|
||||||
|
return 0; // EOS_Success
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return oEOS_EpicAccountId_ToString(handle, buffer, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL InstallHooks() {
|
int __stdcall hkEOS_UserInfo_CopyUserInfo(void* p1, void* p2, void** p3) {
|
||||||
LoadConfig();
|
if (p2) {
|
||||||
|
void** options = (void**)p2;
|
||||||
if (MH_Initialize() != MH_OK) {
|
g_LocalUserId = options[1]; // Capture LocalUserId handle
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HMODULE hEOSSDK = NULL;
|
int res = oEOS_UserInfo_CopyUserInfo(p1, p2, p3);
|
||||||
for (int i = 0; i < 50; i++) {
|
|
||||||
hEOSSDK = GetModuleHandleA("EOSSDK-Win64-Shipping.dll");
|
if (res == 0 && p2 && p3 && *p3) {
|
||||||
if (hEOSSDK) break;
|
void** options = (void**)p2;
|
||||||
Sleep(100);
|
if (options[1] == options[2]) { // If targeting our own info
|
||||||
|
char** s = (char**)*p3;
|
||||||
|
__try {
|
||||||
|
// Offset 24: DisplayName, Offset 40: Nickname
|
||||||
|
if (s[3]) s[3] = g_SpoofedName;
|
||||||
|
if (s[5]) s[5] = g_SpoofedName;
|
||||||
|
} __except (EXCEPTION_EXECUTE_HANDLER) {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return res;
|
||||||
if (!hEOSSDK) {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
LPVOID pFunc = (LPVOID)GetProcAddress(hEOSSDK, "EOS_UserInfo_CopyUserInfo");
|
|
||||||
if (!pFunc) {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (MH_CreateHook(pFunc, &hkEOS_UserInfo_CopyUserInfo, (LPVOID*)&oEOS_UserInfo_CopyUserInfo) != MH_OK) {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (MH_EnableHook(pFunc) != MH_OK) {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
CreateThread(NULL, 0, ConfigReloadThread, NULL, 0, NULL);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD WINAPI HookThread(LPVOID lpParam) {
|
DWORD WINAPI HookThread(LPVOID lpParam) {
|
||||||
Sleep(3000);
|
ClearLog();
|
||||||
InstallHooks();
|
LoadConfig();
|
||||||
|
|
||||||
|
if (MH_Initialize() == MH_OK) {
|
||||||
|
HMODULE h = NULL;
|
||||||
|
for (int i = 0; i < 100; i++) {
|
||||||
|
h = GetModuleHandleA("EOSSDK-Win64-Shipping.dll");
|
||||||
|
if (h) break;
|
||||||
|
Sleep(100);
|
||||||
|
}
|
||||||
|
if (h) {
|
||||||
|
LPVOID f1 = (LPVOID)GetProcAddress(h, "EOS_UserInfo_CopyUserInfo");
|
||||||
|
if (f1 && MH_CreateHook(f1, (LPVOID)&hkEOS_UserInfo_CopyUserInfo, (LPVOID*)&oEOS_UserInfo_CopyUserInfo) == MH_OK) {
|
||||||
|
MH_EnableHook(f1);
|
||||||
|
}
|
||||||
|
|
||||||
|
LPVOID f2 = (LPVOID)GetProcAddress(h, "EOS_EpicAccountId_ToString");
|
||||||
|
if (f2 && MH_CreateHook(f2, (LPVOID)&hkEOS_EpicAccountId_ToString, (LPVOID*)&oEOS_EpicAccountId_ToString) == MH_OK) {
|
||||||
|
MH_EnableHook(f2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved) {
|
BOOL APIENTRY DllMain(HMODULE h, DWORD r, LPVOID) {
|
||||||
if (dwReason == DLL_PROCESS_ATTACH) {
|
if (r == DLL_PROCESS_ATTACH) {
|
||||||
DisableThreadLibraryCalls(hModule);
|
DisableThreadLibraryCalls(h);
|
||||||
CreateThread(NULL, 0, HookThread, NULL, 0, NULL);
|
CreateThread(NULL, 0, HookThread, NULL, 0, NULL);
|
||||||
}
|
}
|
||||||
else if (dwReason == DLL_PROCESS_DETACH) {
|
else if (r == DLL_PROCESS_DETACH) {
|
||||||
MH_DisableHook(MH_ALL_HOOKS);
|
MH_DisableHook(MH_ALL_HOOKS);
|
||||||
MH_Uninitialize();
|
MH_Uninitialize();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.14.36414.22 d17.14
|
VisualStudioVersion = 17.14.36414.22
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RLIdentity", "RLIdentity.vcxproj", "{71E79F3E-69F5-426D-8FBD-82CD278F585F}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RLIdentity", "RLIdentity.vcxproj", "{71E79F3E-69F5-426D-8FBD-82CD278F585F}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "injector", "injector.vcxproj", "{A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|x64 = Debug|x64
|
Debug|x64 = Debug|x64
|
||||||
@ -21,6 +23,14 @@ Global
|
|||||||
{71E79F3E-69F5-426D-8FBD-82CD278F585F}.Release|x64.Build.0 = Release|x64
|
{71E79F3E-69F5-426D-8FBD-82CD278F585F}.Release|x64.Build.0 = Release|x64
|
||||||
{71E79F3E-69F5-426D-8FBD-82CD278F585F}.Release|x86.ActiveCfg = Release|Win32
|
{71E79F3E-69F5-426D-8FBD-82CD278F585F}.Release|x86.ActiveCfg = Release|Win32
|
||||||
{71E79F3E-69F5-426D-8FBD-82CD278F585F}.Release|x86.Build.0 = Release|Win32
|
{71E79F3E-69F5-426D-8FBD-82CD278F585F}.Release|x86.Build.0 = Release|Win32
|
||||||
|
{A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}.Debug|x64.ActiveCfg = Release|x64
|
||||||
|
{A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}.Debug|x64.Build.0 = Release|x64
|
||||||
|
{A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}.Debug|x86.ActiveCfg = Release|x64
|
||||||
|
{A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}.Debug|x86.Build.0 = Release|x64
|
||||||
|
{A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}.Release|x64.Build.0 = Release|x64
|
||||||
|
{A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}.Release|x86.ActiveCfg = Release|x64
|
||||||
|
{A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}.Release|x86.Build.0 = Release|x64
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project>
|
|
||||||
<ProjectOutputs>
|
|
||||||
<ProjectOutput>
|
|
||||||
<FullPath>E:\projects\Rocket League\RLIdentityDLL\x64\Debug\RLIdentity.dll</FullPath>
|
|
||||||
</ProjectOutput>
|
|
||||||
</ProjectOutputs>
|
|
||||||
<ContentFiles />
|
|
||||||
<SatelliteDlls />
|
|
||||||
<NonRecipeFileRefs />
|
|
||||||
</Project>
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
RLIdentity.cpp
|
|
||||||
LINK : fatal error LNK1104: cannot open file 'MinHook.x64.lib'
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
E:\projects\Rocket League\RLIdentityDLL\RLIdentity.cpp;E:\projects\Rocket League\RLIdentityDLL\RLIdentity\x64\Debug\RLIdentity.obj
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.44.35207:TargetPlatformVersion=10.0.26100.0:VcpkgTriplet=x64-windows:
|
|
||||||
Debug|x64|E:\projects\Rocket League\RLIdentityDLL\|
|
|
||||||
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
^E:\PROJECTS\ROCKET LEAGUE\RLIDENTITYDLL\RLIDENTITY\X64\DEBUG\RLIDENTITY.OBJ
|
|
||||||
E:\projects\Rocket League\RLIdentityDLL\RLIdentity\x64\Debug\RLIdentity.ilk
|
|
||||||
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
E:\projects\Rocket League\RLIdentityDLL\x64\Debug\minhook.x64d.dll
|
|
||||||
E:\projects\Rocket League\RLIdentityDLL\RLIdentity\x64\Debug\RLIdenti.F1359A32.Up2Date
|
|
||||||
Binary file not shown.
Binary file not shown.
@ -1,2 +0,0 @@
|
|||||||
|
|
||||||
E:\projects\Rocket League\RLIdentityDLL\x64\Debug\minhook.x64d.dll
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project>
|
|
||||||
<ProjectOutputs>
|
|
||||||
<ProjectOutput>
|
|
||||||
<FullPath>E:\projects\Rocket League\RLIdentityDLL\x64\Release\RLIdentity.dll</FullPath>
|
|
||||||
</ProjectOutput>
|
|
||||||
</ProjectOutputs>
|
|
||||||
<ContentFiles />
|
|
||||||
<SatelliteDlls />
|
|
||||||
<NonRecipeFileRefs />
|
|
||||||
</Project>
|
|
||||||
Binary file not shown.
Binary file not shown.
@ -1,8 +0,0 @@
|
|||||||
Generating code
|
|
||||||
10 of 11 functions (90.9%) were compiled, the rest were copied from previous compilation.
|
|
||||||
6 functions were new in current compilation
|
|
||||||
0 functions had inline decision re-evaluated but remain unchanged
|
|
||||||
Finished generating code
|
|
||||||
RLIdentity.vcxproj -> E:\projects\Rocket League\RLIdentityDLL\x64\Release\RLIdentity.dll
|
|
||||||
'pwsh.exe' is not recognized as an internal or external command,
|
|
||||||
operable program or batch file.
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
E:\projects\Rocket League\RLIdentityDLL\RLIdentity.cpp;E:\projects\Rocket League\RLIdentityDLL\RLIdentity\x64\Release\RLIdentity.obj
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.44.35207:TargetPlatformVersion=10.0.26100.0:VcpkgTriplet=x64-windows-static:
|
|
||||||
Release|x64|E:\projects\Rocket League\RLIdentityDLL\|
|
|
||||||
Binary file not shown.
Binary file not shown.
@ -1,3 +0,0 @@
|
|||||||
^E:\PROJECTS\ROCKET LEAGUE\RLIDENTITYDLL\RLIDENTITY\X64\RELEASE\RLIDENTITY.OBJ
|
|
||||||
E:\projects\Rocket League\RLIdentityDLL\RLIdentity\x64\Release\RLIdentity.IPDB
|
|
||||||
E:\projects\Rocket League\RLIdentityDLL\RLIdentity\x64\Release\RLIdentity.iobj
|
|
||||||
Binary file not shown.
@ -1,8 +0,0 @@
|
|||||||
RLIdentity.cpp
|
|
||||||
Generating code
|
|
||||||
Previous IPDB not found, fall back to full compilation.
|
|
||||||
All 12 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
|
|
||||||
Finished generating code
|
|
||||||
RLNameSpoofer.vcxproj -> E:\projects\Rocket League\RLIdentityDLL\x64\Release\RLIdentity.dll
|
|
||||||
'pwsh.exe' is not recognized as an internal or external command,
|
|
||||||
operable program or batch file.
|
|
||||||
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
|
|
||||||
14
dllmain.cpp
14
dllmain.cpp
@ -1,14 +0,0 @@
|
|||||||
#include <Windows.h>
|
|
||||||
#include <d3d9.h>
|
|
||||||
|
|
||||||
#pragma comment(lib, "d3d9.lib")
|
|
||||||
|
|
||||||
BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved) {
|
|
||||||
if (dwReason == DLL_PROCESS_ATTACH) {
|
|
||||||
DisableThreadLibraryCalls(hModule);
|
|
||||||
|
|
||||||
// INSTANT visual feedback
|
|
||||||
MessageBoxA(NULL, "RLNameSpoofer.dll loaded successfully!", "DLL Injected", MB_OK | MB_ICONINFORMATION);
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
88
injector.cpp
Normal file
88
injector.cpp
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
// injector.cpp
|
||||||
|
// A simple, standalone DLL injector for Rocket League.
|
||||||
|
// Compile as a x64 Console Application in Visual Studio.
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
#include <tlhelp32.h>
|
||||||
|
#include <iostream>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
// Find the Process ID by name
|
||||||
|
DWORD GetProcessIdByName(const wchar_t* processName) {
|
||||||
|
DWORD pid = 0;
|
||||||
|
HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
|
||||||
|
if (hSnapshot != INVALID_HANDLE_VALUE) {
|
||||||
|
PROCESSENTRY32W pe;
|
||||||
|
pe.dwSize = sizeof(PROCESSENTRY32W);
|
||||||
|
if (Process32FirstW(hSnapshot, &pe)) {
|
||||||
|
do {
|
||||||
|
if (_wcsicmp(pe.szExeFile, processName) == 0) {
|
||||||
|
pid = pe.th32ProcessID;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} while (Process32NextW(hSnapshot, &pe));
|
||||||
|
}
|
||||||
|
CloseHandle(hSnapshot);
|
||||||
|
}
|
||||||
|
return pid;
|
||||||
|
}
|
||||||
|
|
||||||
|
int wmain(int argc, wchar_t* argv[]) {
|
||||||
|
if (argc < 3) {
|
||||||
|
std::wcout << L"Usage: injector.exe <ProcessName> <DllPath>" << std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
const wchar_t* targetProcess = argv[1];
|
||||||
|
const wchar_t* dllPath = argv[2];
|
||||||
|
|
||||||
|
DWORD pid = GetProcessIdByName(targetProcess);
|
||||||
|
if (pid == 0) {
|
||||||
|
std::wcout << L"[-] Failed to find process: " << targetProcess << std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::wcout << L"[+] Found process " << targetProcess << L" (PID: " << pid << L")" << std::endl;
|
||||||
|
|
||||||
|
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
|
||||||
|
if (hProcess == NULL) {
|
||||||
|
std::wcout << L"[-] Failed to open process. Error: " << GetLastError() << std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Allocate memory in target process for the DLL path string
|
||||||
|
size_t pathLen = (wcslen(dllPath) + 1) * sizeof(wchar_t);
|
||||||
|
void* remoteMem = VirtualAllocEx(hProcess, NULL, pathLen, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
|
||||||
|
if (remoteMem == NULL) {
|
||||||
|
std::wcout << L"[-] Failed to allocate memory in target process." << std::endl;
|
||||||
|
CloseHandle(hProcess);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write the DLL path string into the allocated memory
|
||||||
|
if (!WriteProcessMemory(hProcess, remoteMem, dllPath, pathLen, NULL)) {
|
||||||
|
std::wcout << L"[-] Failed to write memory in target process." << std::endl;
|
||||||
|
VirtualFreeEx(hProcess, remoteMem, 0, MEM_RELEASE);
|
||||||
|
CloseHandle(hProcess);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a remote thread that calls LoadLibraryW with the path to our DLL
|
||||||
|
HANDLE hThread = CreateRemoteThread(hProcess, NULL, 0, (LPTHREAD_START_ROUTINE)LoadLibraryW, remoteMem, 0, NULL);
|
||||||
|
if (hThread == NULL) {
|
||||||
|
std::wcout << L"[-] Failed to create remote thread. Error: " << GetLastError() << std::endl;
|
||||||
|
VirtualFreeEx(hProcess, remoteMem, 0, MEM_RELEASE);
|
||||||
|
CloseHandle(hProcess);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::wcout << L"[+] DLL injected successfully!" << std::endl;
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
WaitForSingleObject(hThread, INFINITE);
|
||||||
|
VirtualFreeEx(hProcess, remoteMem, 0, MEM_RELEASE);
|
||||||
|
CloseHandle(hThread);
|
||||||
|
CloseHandle(hProcess);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
61
injector.vcxproj
Normal file
61
injector.vcxproj
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<VCProjectVersion>17.0</VCProjectVersion>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<ProjectGuid>{A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}</ProjectGuid>
|
||||||
|
<RootNamespace>injector</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="Shared">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<OutDir>$(SolutionDir)x64\Release\</OutDir>
|
||||||
|
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="injector.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
4
injector.vcxproj.user
Normal file
4
injector.vcxproj.user
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup />
|
||||||
|
</Project>
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user