Results 1 to 3 of 3
  1. #1
    schim's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    My chair
    Posts
    367
    Reputation
    10
    Thanks
    115
    My Mood
    Twisted

    [QUESTION] Code injection

    A while back I made a dll injector
    Yesterday I opened this project again to see if I could improve it with things I have learnt the past 6 months

    Looking at my code (and testing it) 2 questions came up:

    1. Can I use commands other than: LoadLibrary and FreeLibrary ?
    If I can, can someone provide me with an working example, I have not been able to call any other functions than the before mentioned (I tried some api's from user32.dll to, but those didn't work either)

    I have seen a few examples of people that have been able to do it
    The only problem is that the code was written in: C, and since FARPROC is defined differently in C++ I can't reproduce/test the code to learn from it
    (also I can't find the page where the code is anymore, the only thing I know is that it came from: governmentsecurity.org)

    2. Why can't I start a remote process in notepad??
    While I was testing my improved injector I wasn't able to load a DLL inside notepad.exe, CreateRemoteThread returned 5 (access denied)
    I was running in administrator mode so how can my access be denied?

    -SCHiM
    Last edited by schim; 07-05-2010 at 10:13 PM.

  2. #2
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    the format of functions you can call with CreateRemoteThread have to be 'int (_stdcall *)(int)' I believe.

    Starting a remote thread in notepad works fine for me :S

    If you want to get really advanced, have a look at 'Manual Mapping', it's a method of loading Dll's without calling LoadLibrary(thus bypassing some basic anticheats).
    It's done by writing the entire Dll into the target aplication, then fixing up the RVA and starting it.
    Ah we-a blaze the fyah, make it bun dem!

  3. The Following 2 Users Say Thank You to Hell_Demon For This Useful Post:

    'Bruno (07-06-2010),schim (07-06-2010)

  4. #3
    schim's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    My chair
    Posts
    367
    Reputation
    10
    Thanks
    115
    My Mood
    Twisted
    Quote Originally Posted by Hell_Demon View Post
    the format of functions you can call with CreateRemoteThread have to be 'int (_stdcall *)(int)' I believe.

    Starting a remote thread in notepad works fine for me :S

    If you want to get really advanced, have a look at 'Manual Mapping', it's a method of loading Dll's without calling LoadLibrary(thus bypassing some basic anticheats).
    It's done by writing the entire Dll into the target aplication, then fixing up the RVA and starting it.
    Thank you, finnaly got an answer...

    EDIT:
    Do you have any links to tutorials about Manual Mapping, I can't seem to find any tutorials on google...
    Last edited by schim; 07-06-2010 at 01:30 AM.

Similar Threads

  1. [Source Code] C# & VB.net Code Injection Source only
    By Pingo in forum Call of Duty Black Ops Coding, Programming & Source Code
    Replies: 3
    Last Post: 07-31-2011, 03:33 AM
  2. Simple question about injecting DTX.file.
    By noobdododo in forum Combat Arms Help
    Replies: 4
    Last Post: 06-22-2010, 08:55 PM
  3. [SOLVED]question| codes for console
    By xloyer in forum Call of Duty Modern Warfare 2 Help
    Replies: 6
    Last Post: 06-12-2010, 06:20 AM
  4. [Question] Code for Downloading
    By deocute in forum Visual Basic Programming
    Replies: 10
    Last Post: 11-05-2009, 08:38 AM
  5. [Source Code] C++ Code Injection
    By Matrix_NEO006 in forum C++/C Programming
    Replies: 2
    Last Post: 10-22-2009, 10:31 PM