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
-2
votes
2 answers

Manual DLL injection

I am trying to learn some manual dll injection, but cant seem to get the execution of the dlls code to work. I am new to Windows C++ so any tips on improving my code is appreciated. I have also only posted the relevant code. Injector…
Mumphus
  • 303
  • 4
  • 20
-2
votes
1 answer

How to prevent my dll from running when a certain process isn't active

So I want to make my dll only be injectable by my injector and I figured that a good way to do that is by only letting my dll be able to open when the injector is running. But I have no Idea how to do that.
-2
votes
2 answers

Executing code in main thread via dll injection

I need to inject a dll into the main thread of a process (otherwise my process will crash) How would I go about doing this? My dll is in C++ obviously, my injection method though uses C# and CreateRemoteThread. I've tried using std::thread(func) but…
-2
votes
1 answer

DLL injection, c++ , dll doesn't have svchost rights why?

unfortunately I have a problem concerning injecting svchost. The code looks like that: #include "Injection.h" #pragma once #include DLLInjection::DLLInjection() { } void DLLInjection::InjectDLLTosvchost(LPSTR dllPath) { …
-2
votes
1 answer

How can i see contents of buffer and compare with dll file?

I try to write dll injector with nativeApi. For this reason, i wrote this code. NtReadFile function reads something but i cant see anything except for the first value of FileReadBuffer. Also, i dont know anything about how does dll look into buffer.…
Burak Kocaman
  • 81
  • 1
  • 10
-2
votes
2 answers

How to distinguish DLL files

I have a program that gets every module loaded into a process and compares them with a database of forbidden DLL files, which works just fine, but it's too simple to circumvent (just change the name of dll file which you want to inject into the…
Nicolas Cage
  • 33
  • 1
  • 9
-2
votes
1 answer

Hiding the process name to avoid DLL injection. How feasible is it?

The idea is quite simple, i.e try to not follow the standard. For example to inject some thing to Firefox, malware need to know that the name of process is 'firefox.exe' or to inject some thing in internet explorer, malware need to know that process…
amit
  • 337
  • 1
  • 11
-3
votes
1 answer

CreateRemoteThread + LoadLibraryA doesn't do anything despite succeeding

Despite the fact that memory allocation/write, finding LoadLibraryA address and creating a remote thread return valid (not NULL) results, absolutely nothing happens after that (mainly, the DllMain of the loaded DLL doesn't seem to get…
QmlnR2F5
  • 934
  • 10
  • 17
-3
votes
2 answers

Injecting dll before windows executes target TLS callbacks

There's an app that uses TLS callbacks to remap its memory using (NtCreateSection/NtUnmapViewOfSection/NtMapViewOfSection) using the SEC_NO_CHANGE flag. Is there any way to hook NtCreateSection before the target app use it on its TLS callback?
Shahriyar
  • 1,483
  • 4
  • 24
  • 37
-3
votes
1 answer

Injected DLL and calling a function using CreateRemoteThread causes "has stopped working", what happens?

I`m trying to inject a DLL in a process and call a exported function in my DLL. The DLL is injected alright with that code: HANDLE Proc; char buf[50] = { 0 }; LPVOID RemoteString, LoadLibAddy; if (!pID) return false; Proc =…
Acaz Souza
  • 8,311
  • 11
  • 54
  • 97
-3
votes
2 answers

Dll injection failed

I'm trying to work a dll injection, I've tryed 100 of things but none of them works, I'm now on a windows 7 32 bits (to avoid 32/64 conflict). I've used two famous dll injector found on the web (AutoInject and Extreme injector V2) and a handmade…
gfauchart
  • 82
  • 10
-4
votes
1 answer

DLL inject to another

I want to be able, to inject my c++ dll into a game, then ask my c# form if a variable if true, then allow the injection, else self destruct or crash the game, My c# form is a login form with a variable that is true if the person is logged in, but…
-4
votes
1 answer

LoadLibrary vs loading binary dll into process?

I tried using ifstream to get the contents of my dll file to be injected into a remote process. I used a char* buffer to store the contents of the dll and then used WriteProcessMemory to inject the binary of the dll file into the process. I used…
-4
votes
1 answer

Dll injection in x64 process don't work

I have made a dll (32 Bits plattform) and now I want inject in any x64 process. Was found several examples on web of source codes in Delphi that promisses do this, but when was tested, none dll was injected in any x64 process, already when tested…
Davi Reis
  • 39
  • 2
  • 8
-5
votes
2 answers

Understanding C++ syntax in a DLL class

I try to understand somecode, which could be summarized into something like this: class FooClass { public: void Foo(); static void (FooClass::*Foo_Original)(); }; void (FooClass::* FooClass::Foo_Original)() = 0; void…
user3237732
  • 1,976
  • 2
  • 21
  • 28
1 2 3
31
32