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
4
votes
1 answer

SetWindowsHookEx functioning returning NULL

I am working on DLL Injection but getting the error as failed to hook process: 87 The parameter is incorrect. The target process as well as the dll are both 64 bit. The Injection code is: BOOL HookInjection(TCHAR target[], TCHAR *dll_name) { //…
xizt
  • 41
  • 3
4
votes
1 answer

C# Dll injector, VB.Net Dll injector

I had made the dll injector easy before, but i had Windows 7, I made it in C# and C++, it worked great! but now when i try the same codes in Windows 8, it seems that it doesn't inject the DLL in the right way! :) as the DLL is not working... (The…
GameHackerPM
  • 97
  • 1
  • 10
4
votes
0 answers

Drawing Overlay inside DX11 Game (CryEngine) with C# and EasyHook

What I want to do: I have a Game based on CrySDK which is DirectX11 and I want to draw an ingame overlay like the steam overlay. -> I write C# since I don't know any C++, so I'm looking for ways to do this in C#. -> I use EasyHook and SharpDX…
radonthetyrant
  • 1,346
  • 1
  • 8
  • 13
4
votes
3 answers

Check which windows api is being called by running process

I want to check which windows api is being called by a running program. For example, if the process calls timeGetTime(), endprocess() or some other API I want to know this information and ideally displayed or stored in real time. It would also…
Mark
  • 8,408
  • 15
  • 57
  • 81
4
votes
1 answer

Firefox pr_write hook. dll injection, windows hooks

The problem was that the DLL which contains PR_Write() is called not npsr4.dll, but nss3.dll and hooks couldn't find GetProcAddress() from non-existing library. I'm trying to create Firefox hook, which collects data from the PR_Write() Firefox…
user2693835
  • 43
  • 1
  • 4
4
votes
2 answers

Draw DirectX/OpenGL Graphics on an existing graphics application

First off, let me just apologize right off the bat in case this is already answered, because I might just be searching it under irregular search terms. I am looking to draw 2D graphics in an application that uses DirectX to draw its own graphics (A…
4
votes
1 answer

Best Practices for DLL Injection?

Suppose I want to inject a DLL into a process that wants to edit the value of address A every 250 ms. I would need to use DllMain, right? The issue is that I'm not allowed to wait inside DllMain. So I would have to create a thread? Or does that not…
4
votes
2 answers

ring0 APC DLL injection crash target process on win7

I am trying to implement a ring0 dll injector driver and implement by APC injection. the code work perfectly on win XP. by on win7, it keeps crashing the target process. here is the code: NTSTATUS InjectDll( IN ULONG ulProcessId, HANDLE hEvent, IN…
eeelin
  • 51
  • 1
  • 3
4
votes
2 answers

How to handle dynamically loaded managed libraries in c#

I wrote an application in C# and added a kind of API for it. With this API you can write plugins as dll´s which underlie some interface rules. I want to make it possible to open the dll file via OpenFileDialog and use its content. My API is a…
LostPhysx
  • 3,573
  • 8
  • 43
  • 73
4
votes
2 answers

Writing data into a Delphi TStringGrid from an external application

I have a legacy application written in Delphi, and need to build a mechanism for reading and writing data from/to a TStringGrid. I don't have the source code of the application, there is no automation interface and it is very unlikely that the…
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
4
votes
3 answers

Winsock recv hooking with Detours

I've got an application, which uses Winsock 2.0 recv function, and I can catch the output by Redox Packet Editor for example, it confirms that version is 2.0. I have this code to hook the function: #define _CRT_SECURE_NO_DEPRECATE #ifndef…
methyl
  • 3,272
  • 2
  • 25
  • 34
3
votes
1 answer

Hooking sendto() causes crash depending on code ordering

I'm using a DLL-injector to inject a dll which goes into the IAT and replaces the system call sendto() with my own. This is the replace method. void replaceFunction(DWORD f, DWORD nf) { // Base address. HMODULE hMod = GetModuleHandle(NULL); // DOS…
André
  • 85
  • 1
  • 5
3
votes
0 answers

Preventing DLL injection in jpackage generated EXE

As the title states, is there a way to prevent DLL injections in jpackage generated binaries? I have created an EXE for a JavaFX application. During security testing of this application, it was noticed that arbitrary DLLs can be loaded during…
Aayush Jain
  • 31
  • 1
  • 3
3
votes
2 answers

An object reference is required for a non-static field, method, or property

using System; using System.Diagnostics; using System.Reflection.Emit; using System.Threading; using EasyExploits; namespace ConsoleApp1 { class Program { EasyExploits.Module module = new EasyExploits.Module(); static void…
WripWrath
  • 51
  • 1
  • 1
  • 7
3
votes
2 answers

C# - Loading DLL Dynamic - System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types

In C#, while loading DLL from folder using the below code getting these below stack trace, when tried to get the types. var assembly = Assembly.LoadFile(assemblyInfo.FullName); // assembly loads perfectly using the absolute path. var types =…
Md. Alim Ul Karim
  • 2,401
  • 2
  • 27
  • 36
1 2
3
31 32