Questions tagged [createremotethread]

45 questions
7
votes
6 answers

CreateRemoteThread returning ERROR_ACCESS_DENIED - Windows 7 DLL Injection

I'm trying to write a program that uses CreateRemoteThread to inject a dll. The problem is that CreateRemoteThread is refusing to work. GetLastError() is returning 5 which is ERROR_ACCESS_DENIED. I cant figure why! I am working from this video…
4
votes
2 answers

0xC0000022 before RtlUserThreadStart

I'm injecting some code to hook apis in processes but I have some issues in some applications like chrome.exe My test app launches a suspended process, do injection and api hooking and then resumes it. CreateProcessW is hooked in order to be able to…
Mauro H. Leggieri
  • 1,084
  • 11
  • 25
3
votes
2 answers

Would ASLR cause friction for the address with DLL injection?

I was reading about the DLL injection technique, and I had this question in mind. Let us assume we want to inject a DLL into a destination process in Windows 7 which has ASLR enabled for kernel32.dll So any piece of the injected code can't use any…
CnativeFreak
  • 712
  • 12
  • 27
3
votes
1 answer

Dll injection. Execute CreateRemoteThread with parameter

I wrote dll injection program that works just fine. It loads dll into remote process and calls some function. Now i want to pass argument to that function. CreateRemoteThread has lpParameter for that, but how to get that passed argument inside dll…
clumpter
  • 1,898
  • 6
  • 27
  • 38
3
votes
1 answer

C++ CreateRemoteThread access violation

I got a problem with the function CreateRemoteThread. I just built up a little console window asking for a specific number to exit (so that it just remains opened as long as I want it). Inside this program there is a function which memory address I…
Trickzter
  • 471
  • 3
  • 14
3
votes
1 answer

GetModuleHandle(), for a DLL in another process

The title explains this all really, I have a process tapping into another process. I need to be able to GetModuleHandle, on this program for a certain DLL which isn't Windows standard, and I don't have the source code to the main program. I need to…
user1591117
  • 287
  • 2
  • 5
  • 13
3
votes
2 answers

Passing multiple parameters using CreateRemoteThread in C#

My goal is to call a function in a remote process using P/Invoke in C# (CreateRemoteThread). The problem is that the function takes more than one parameter. Is there a way to pass multiple parameters to the function?
osos95
  • 169
  • 1
  • 10
3
votes
2 answers

Dll injection not working in suspended process

I'm using CreateRemoteThread api to inject a dll into a process. This works when the process is running state. But If I launch a process in suspended state using CreateProcess api and try to inject a dll into it, then dll injection is not working.…
K07
  • 75
  • 12
3
votes
1 answer

Injecting a managed dll into a native process

I'm trying to inject a managed c# dll into a native executable. I'm injecting the following code into the executable in order to load the CLR. I know the injection works, because when I inject the code into cmd.exe it outputs correctly. I know that…
user3000212
  • 31
  • 1
  • 3
3
votes
1 answer

CreateRemoteThread: Memory Management

I'm wondering about the LPVOID lpParameter parameter of the CreateRemoteThread function. Because processes don't share memory, the remote thread can't access a struct in our process. So, does the function copy the parameter and manages it by it own…
Sebastian Hoffmann
  • 11,127
  • 7
  • 49
  • 77
2
votes
2 answers

Is the first thread that gets to run inside a Win32 process the "primary thread"? Need to understand the semantics

I create a process using CreateProcess() with the CREATE_SUSPENDED and then go ahead to create a little patch of code inside the remote process to load a DLL and call a function (exported by that DLL), using VirtualAllocEx() (with ..., MEM_RESERVE |…
2
votes
2 answers

Call function inside another process which is not written in .NET

I want to call a function inside another process and send more then 1 argument through createremotethread. Now, I could do that by sending inline asm but I don't know enough assembly in order to do it that way. Also I don't have any access to the…
basd bfnsa
  • 81
  • 1
  • 10
2
votes
0 answers

Why does CreateRemoteThread work here?

I'm trying to inject a thread to another process, which let the process load an external dll. Here's the code I found on the internet, and it works. HANDLE hThread = CreateRemoteThread (hProcess, NULL, 0, (LPTHREAD_START_ROUTINE)…
daisy
  • 22,498
  • 29
  • 129
  • 265
2
votes
2 answers

accessing the memory of a foreign process

ive been reading around the website and googling to try and find a conclusive answer to what im trying to do, but i didnt find one that answers all my questions. i have two processes. one has an integer variable which i want to change by a second…
ziggyyoyo
  • 81
  • 1
  • 1
  • 6
2
votes
1 answer

internet explorer, google chrome injection

I wrote code that injects a function in Internet Explorer/Chrome but it doesn't work with these processes. Basically, it fills one big structure with all the APIs my function needs, strings, and other data, then it opens a process to get a handle,…
1
2 3