Questions tagged [dll-injection]

DLL injection is a technique used to run code within the address space of another process by forcing it to load a dynamic-link library(DLL).

DLL injection is often used by external programs to influence the behaviour of another program in a way its authors did not anticipate or intend. For example, the injected code could hook system function calls, or read the contents of password text-boxes, which cannot be done the usual way. A program used to inject arbitrary code into arbitrary processes is called a DLL injector.

468 questions
-1
votes
1 answer

manual mapping dll never execute my MessageBoxA function

I am basically manual mapping my dll into "notepad.exe" am resolving imports, fixing relocations and executing my shellcode in target process which is ("notepad.exe") which should call my dll entry point. The problem is I tried debugging it for…
zeroaceee
  • 79
  • 6
-1
votes
1 answer

C++ DllInjection / Run dll in sandobxed enviroment (Hooking system/WinAPI calls)

So I have a native Windows dll witch is heavily obfuscated, so disassembling is not an option. If I call a specific function in the dll, the dll does some stuff in my registry, reads a few files and finally returns something. I want to hook up the…
Hexception
  • 722
  • 10
  • 25
-1
votes
2 answers

Can't unload an injected dll with loadlibrary (C++)

Today I got an LoadLibraryA injector that works perfectly but it doesn't let delete the dll after injection (loadlibrary things) and I tried doing FreeLibraryAndExitThread but it didnt work. The code I tried: FreeLibraryAndExitThread(hThread,…
Daniel TG
  • 29
  • 1
  • 3
-1
votes
1 answer

How to use run-time dll injecting to write into a Running and Temp notepad/txt file

Basically I created a simple Dll injection code with a basic Dll that shows a message box and my question is how can I now use the Dll file to make it write text into the Notepad while its running and it hasn't been saved/is temporary? Is there a…
-1
votes
2 answers

Passing Arguments to Dll entry Point

I want to pass a structure to my dll's main thats in my injector so basically I want to do this: struct structure{ char text[1024]; }; int DllMain(structure arg1,uintptr_t arg2,uintptr_t arg3); Yet I want to know how I can make my injector pass…
-1
votes
1 answer

DLL Injection with C++

#include HANDLE h = OpenProcess(PROCESS_CREATE_THREAD, FALSE, 34808); //Creating a remote thread int main() { LPVOID path = "MessageBoxDLL.dll"; CreateRemoteThread(h, NULL, 0, (LPTHREAD_START_ROUTINE)LoadLibraryA, path, 0,…
Jimmy Hankey
  • 25
  • 1
  • 6
-1
votes
1 answer

MessageBox not being called from DllMain after Injection

Goal I am trying to inject an x64 DLL into the w3wp.exe process (IIS worker process) in order to debug my DLL with Visual Studio. What I have done I am using Extreme Injector V3 to do this. After selecting the debug build of my DLL and the w3wp.exe…
random9453
  • 19
  • 2
-1
votes
1 answer

Obtain file name from SetClipboardData hook

I used EasyHook to hook into the SetClipboardData() function. HANDLE mySetClipBoardData (UINT uFormat, HANDLE hMem){ return SetClipboardData(uFormat, hMem); //return NULL; } I can either pass the data to the original function or return…
Nocturnal
  • 33
  • 5
-1
votes
1 answer

How to correctly use VirtualFreeEx when trying to inject a dll

I'm trying to make a DLL injector but there are parameter errors in the functions. I've tried changing the variable to char*, I've confirmed that the process ID is correct, I can't compile it in x64 or x86 because I'm using code blocks but the…
R Smith
  • 1
  • 3
-1
votes
1 answer

Passing struct argument to CreateThread() and not receiving char* variable

I'm reflectively injecting a dll into another processes's memory, and I need to call CreateThread() obviously. I'm passing certain parameters to the dll that I'm injecting using my loader_data struct. I have certain variables I need to pass such as…
pangea
  • 3
  • 1
  • 4
-1
votes
1 answer

Other alternatives to bypass WH_CALLWNDPROC global hook + Dll injection (Ring 3)?

I want know what are the possible solutions to bypass a dll injection made by a rootkit everytime that any process is executed (where is used a global hook on WH_CALLWNDPROC message to detect this)? Based in my case and also in this answer, i…
user10560917
-1
votes
1 answer

Injecting a DLL from LoadImageNotifyRoutine, hangs on ZwMapViewOfSection

So I'm making a crackme and one of the parts is to hook a certain function and wait for a certain combination a params to happen, then the challenge is done. For that, I'm creating a driver to inject a DLL into processes that have a specific DLL and…
Denis Rozimovschii
  • 428
  • 1
  • 6
  • 19
-1
votes
1 answer

Mapping a 32 bit image to a 32 bit process from a 64 bit application

I'm trying to figure out a way to map (either through loadlibrary or preferably manually) a 32bit image (dll) into a 32bit process from a 64bit running application. Any ideas? Currently, injection/mapping everything looks like it's working, but when…
user10214211
-1
votes
1 answer

C++ - *(int**) address? What happens here?

I browsed through some code, which basically is a hook (dll injection). In the code I discovered the following: int Address = 0x12345678; //Address of a memory location of target process int *Pointer = *(int**) Address; //What happens here? So it…
Haxx0r
  • 9
  • 3
-1
votes
1 answer

Dll missing entry point timeGetTime

Trying to compile this DLL in MingGWx64, using the following command gcc -shared -o evil.dll evil.cpp -DWIN32_LEAN_AND_MEAN Through trial and error I moved the "int fireMyLaser ()" below the declaration, from the bottom of the code sample I found.…
Morgan
  • 14
  • 3