dll-injection

How to load dll's during debug in VS2013

大憨熊 提交于 2021-02-18 22:34:06
问题 I have some code var aa = a(); b(aa); While debugging, I set a breakpoint on the b() call. Then going to the immediate window , I'd like to be able to execute code from a DLL that is in my project but is not yet loaded . Say I want a new Boo and call Foo() . The code is in the namespace Baz in dll Spongle.dll . When I type >> new Baz.Boo().Foo(aa) I get the error: The type or namespace name 'Baz' is not valid in this scope. If I change my code such that my Boo is already loaded it works fine.

CreateRemoteThread failing with ERROR_ACCESS_DENIED

你说的曾经没有我的故事 提交于 2021-01-29 05:59:12
问题 I'm trying to learn the basics of dll injection, so I created a really simple hello-world type DLL and an injector based off of code I found online. I wasn't able to find anything that works out of the box, so I had to make a few adjustments. Injection Code, DLL Code I'm running these on 64-bit windows. I'm compiling with Visual Studio 2010. The injector is a win32 console app, and the dll is win32 as well. I'm trying to inject my code into an existing notepad process (also 32-bit). All of

cout and printf Works On Dll Built In Debug Not Release

落爺英雄遲暮 提交于 2021-01-27 05:56:33
问题 I've built a DLL that gets injected into a console application usually via SetWindowHookEx. Its important for the DLL to output information to the console which I have been doing with std::cout. The DLL was nearing completion until I tried building the DLL in release mode which rendered all cout lines useless. I've verified the the DLL is injecting and is executing by doing a simple null dereference that causes the program to crash in the dllmain function. Same story with std::printf. void

DLL Injection with CreateRemoteThread

寵の児 提交于 2020-04-29 06:15:09
问题 If you take a look at the following working code of a simple DLL injection: //Open the target process with read , write and execute priviledges Process = OpenProcess(PROCESS_CREATE_THREAD|PROCESS_QUERY_INFORMATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_VM_OPERATION, FALSE, ID); //Get the address of LoadLibraryA LoadLibrary = (LPVOID)GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA"); // Allocate space in the process for our DLL Memory = (LPVOID)VirtualAllocEx(Process, NULL,

Delphi - Access violation when try to overwrite an instruction with DLL Injection

て烟熏妆下的殇ゞ 提交于 2020-01-25 19:01:27
问题 Good morning. I'm trying to learn about DLL injection, so I've wrote a little software, that just gets a String, compares with StrCmp() and if the input was equal "Winner", the software gives a Good boy message, with the porpouse of learn DLL injection. So I write a DLL that loads a Form when inject, the porpouse is using the DLL injection, to modify the Instruction of comparison( JNZ(74) to JMP(EB)), and make the software, accept any string. My DLL code is: library Project2; uses SysUtils,

elegant method to inject a dll to processes BEFORE they start

两盒软妹~` 提交于 2020-01-23 07:46:38
问题 I am making a 'mod' dll that modifies behaviour of the target process. I succeeded to inject my dll and hook some functions of target. But it requires more work to do when I need to hook some APIs BEFORE main module starts(more clearly, before the entry-point). I need to start the target program manually with CREATE_SUSPENDED attribute, inject, then resume. But some applications start with its own launcher program, some often start from x64 processes... such various environment make it hard

Windows DLL injector in C doesn't inject the DLL

删除回忆录丶 提交于 2020-01-15 09:19:26
问题 I am trying to write a DLL injector to perform a DLL injector on a calculator process. I wrote the DLL injector program in C and the DLL but the injector dosent inject the DLL or any other DLL (I tried to take some random windows DLL that the calculator doesn't use). #include <stdio.h> #include <Windows.h> int main() { LPCSTR dllpath = "C:\\Users\\......\\Dll1.dll"; printf("#### Starting ####\n"); printf("step 1: attaching the target process memory\n"); HANDLE hProcess = OpenProcess( PROCESS

dll injection using C

左心房为你撑大大i 提交于 2020-01-06 08:27:33
问题 hey i m trying to inject a dll into a process i.e lsass.exe to get hashes.Its a bit hacky but cant help its my project. I have a code of dll injection but in visual C++ it gives errors such as.. at TEXT("LoadLibraryA"))))---->>>argument const wchar incompatible with LPCSTR at lpFuncAddr----------->>>argument type "LPVOID" incompatible with parameter type "LPTHREAD_START ROUTINE" CODE: BOOL InjectDLL(DWORD dwProcessId, LPCSTR lpszDLLPath) { HANDLE hProcess, hThread; LPVOID lpBaseAddr,

dll injection: drawing simple game overlay with opengl

喜你入骨 提交于 2020-01-02 12:25:10
问题 I'm trying to draw a custom opengl overlay (steam does that for example) in a 3d desktop game. This overlay should basically be able to show the status of some variables which the user can affect by pressing some keys. Think about it like a game trainer. The goal is in the first place to draw a few primitives at a specific point on the screen. Later I want to have a little nice looking "gui" component in the game window. The game uses the "SwapBuffers" method from the GDI32.dll. Currently I'm