Jump to content
Nytro

Code Injection Techniques

Recommended Posts

Posted

[h=1]Code Injection Techniques[/h]ViperEye May 02, 2013

DLL Injection using QueueUserAPC

We begin by creating a process using CreateProcess, which is the where we are trying to inject the code into:

PROCESS_INFORMATION pi;
STARTUPINFOA Startup;
ZeroMemory(&Startup, sizeof(Startup));
ZeroMemory(?, sizeof(pi));
CreateProcessA("C:\\Windows\\notepad.exe" NULL, NULL, NULL, NULL, CREATE_SUSPENDED, NULL, NULL, &Startup, ?);

Once the process is created, OpenProcess is called with the following arguments:

OpenProcess(PROCESS_ALL_ACCESS,FALSE, /*ProcessId*/ 348);

[TABLE]

[TR]

[TD=class: gutter][/TD]

[TD=class: code][/TD]

[/TR]

[/TABLE]

Once the process is opened with all access, memory can be allocated to it using VirtualAllocEx().

ARTICOL COMPLET:

http://resources.infosecinstitute.com/code-injection-techniques/

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...