Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25
  1. #16
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by Gordon` View Post
    @Void: you can read with ReadProcessMemory the whole DOS + PE-Header of every exe/dll. In the PE-Header are all informations you need - IAT/EAT, Relocations, etc..
    But can't you simply circumvent that by destroy the PE header file of your injected module as soon as it's in the memory stream?

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  2. #17
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,033
    Reputation
    340
    Thanks
    2,792
    My Mood
    Sad
    Quote Originally Posted by Gordon` View Post
    As far as I remember CreateRemoteThread calls CreateThread in the remote process.

    Also a system-wide hook on Nt/Zw APIs requires to be on ring0, the kernel mode. You would need to write a driver for all common operating systems (XP, XP x64, Vista, Vista x64, 7, 7 x64). Also on x64 operating systems you need a signed driver (which can be bypassed, but I wanted to mention it).

    Every little mistake on kernel mode/ring0 gives you a bluescreen and can destroy your system. Be careful if you want to write a driver. WDK/DDK helps you.

    @Void: you can read with ReadProcessMemory the whole DOS + PE-Header of every exe/dll. In the PE-Header are all informations you need - IAT/EAT, Relocations, etc..
    With the 64-bit unsigned driver thing, there are two quite simple solutions.

    First is to run a command through the command line in admin mode, and it's done. (bceddit if I remember correctly)

    Second is to self sign the driver. Again, you'll be able to install this driver without problems.
    Last edited by freedompeace; 09-14-2010 at 06:38 AM. Reason: mobile spelling fail

  3. #18
    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
    Quote Originally Posted by Void View Post
    Thanks Deezy, I'm definitely going to read over this later on in this project, anti DLL injection is going to come after anti debugging.

    @Wes, how would I know if CreateRemoteThread is being used to inject DLLs? I mean, if I check if it's creating a thread at the LoadLibrary function, an extremely easy way to bypass this would be to write a jump or call somewhere in allocated memory space and start the thread there. |:
    You can safely assume 90% of the people that try to inject a dll are scriptkiddies/end users of public hacks, therefor using whatever is publicly available to inject dlls, most of them using CreateRemoteThread.
    Ah we-a blaze the fyah, make it bun dem!

  4. #19
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by Hell_Demon View Post
    You can safely assume 90% of the people that try to inject a dll are scriptkiddies/end users of public hacks, therefor using whatever is publicly available to inject dlls, most of them using CreateRemoteThread.
    Yeah I agree, from what I could gather, most of the public hacks for "Combat Arms" at least are just using a CreateRemoteThread method without destroying headers or basically running any anti-detection method. Pretty sure if Nexon weren't such a bunch of lazy asses they could have easily just checked known modules with all modules in the process at the time. Would you even need to catch the "CreateRemoteThread" with something like that? Or could you just do a scan at any point of all loaded modules and check them against a list of "safe" modules?

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  5. #20
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    Quote Originally Posted by J-Deezy View Post


    Yeah I agree, from what I could gather, most of the public hacks for "Combat Arms" at least are just using a CreateRemoteThread method without destroying headers or basically running any anti-detection method. Pretty sure if Nexon weren't such a bunch of lazy asses they could have easily just checked known modules with all modules in the process at the time. Would you even need to catch the "CreateRemoteThread" with something like that? Or could you just do a scan at any point of all loaded modules and check them against a list of "safe" modules?
    they are not the ones checking for "hacks" (the game).. Hackshield is.. And they didn't code it.. Of course they could try to to some themselves.. but they are delevoping a game, not an anti hack. And if they paid for hackshield, they are going to use it. ;o

    And almost every online game that get's hacked uses CreateRemoteThread because one guy creates a basic pub hack using it, and everyone copies it.. Just like Wes (HD) said.

    Edit: I remember a few weeks ago i saw few others methods on injection with SetWindowsHookEx somewhere... But it's all about "blocking" the API. And also without API's.
    Last edited by 'Bruno; 09-14-2010 at 09:57 AM.
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

  6. #21
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by Brinuz View Post
    they are not the ones checking for "hacks" (the game).. Hackshield is.. And they didn't code it.. Of course they could try to to some themselves.. but they are delevoping a game, not an anti hack. And if they paid for hackshield, they are going to use it. ;o

    And almost every online game that get's hacked uses CreateRemoteThread because one guy creates a basic pub hack using it, and everyone copies it.. Just like Wes (HD) said.
    Yes, but it should also be possible for them to implement a simple thing like what I said into your own game that just randomly checks the loaded modules. I guess that could provide more ways to exploit it if it had to be given access to all the modules... I dunno much about the internal cog-work that goes on in memory streams and such and permissions and stuff. I know literally nothing about ASM or how memory works etc so I'm probably not the best person to be discussing such in-depth stuff with, but I find it interesting.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  7. #22
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    About the CreateRemoteThread method. There is probably a reason that anti-cheat company's don't put simple DLLInjection detection techniques in their protection, and I would pinpoint it at packers such as Themida, which destroy import tables. Themida therefore prbly loads each DLL independently instead of letting the windows loader do it. Therefore unless the packer could be given a list of every DLL used in the game it is prbly best to get rid of that protection mechanism entirely, but this is just a theory.

    I don't know enough about Themida or Anti-cheats to know this. So don't take what I said too seriously.

    Also: https://www.bluenotch.com/files/Shewm...-Injection.pdf - A good document on DLL Injection defense techniques.
    Last edited by why06; 09-14-2010 at 10:59 AM.

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  8. The Following User Says Thank You to why06 For This Useful Post:

    Void (09-14-2010)

  9. #23
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,033
    Reputation
    340
    Thanks
    2,792
    My Mood
    Sad
    Quote Originally Posted by J-Deezy View Post


    Yeah I agree, from what I could gather, most of the public hacks for "Combat Arms" at least are just using a CreateRemoteThread method without destroying headers or basically running any anti-detection method. Pretty sure if Nexon weren't such a bunch of lazy asses they could have easily just checked known modules with all modules in the process at the time. Would you even need to catch the "CreateRemoteThread" with something like that? Or could you just do a scan at any point of all loaded modules and check them against a list of "safe" modules?
    It's the loader (aka. injector) that uses CreateRemoteThread. Once a library has been loaded into its target process, it no longer needs to use CreateRemoteThread, because it is already in the address space it wants to create the thread in. CreateThread will work just fine. And if you were to hook CreateThread, well, there's a whole heap of sorting out you now need to do.

    And if we inject with CreateRemoteThread before a completed anti-hacking system has loaded (which would take a few seconds), it won't have detected us!

    Quote Originally Posted by why06 View Post
    About the CreateRemoteThread method. There is probably a reason that anti-cheat company's don't put simple DLLInjection detection techniques in their protection, and I would pinpoint it at packers such as Themida, which destroy import tables. Themida therefore prbly loads each DLL independently instead of letting the windows loader do it. Therefore unless the packer could be given a list of every DLL used in the game it is prbly best to get rid of that protection mechanism entirely, but this is just a theory.

    I don't know enough about Themida or Anti-cheats to know this. So don't take what I said too seriously.

    Also: https://www.bluenotch.com/files/Shewm...-Injection.pdf - A good document on DLL Injection defense techniques.
    Thing is, both Nexon don't want to completely blocked DLL Injection. Nexon wants to allow legitimate tools to run, such as video recorders (like fraps), special interfaces (like Xfire) and other legitimate stuff (like benchmarking tools).

    You may also want to leave that possible for your end customers... (It's all about user experience)

  10. #24
    Auxilium's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,518
    Reputation
    445
    Thanks
    609
    My Mood
    Happy
    Quote Originally Posted by freedompeace View Post
    I can understand it just fine...

    It's also already clearly explained...

    --"
    learn to detect trolls please

  11. #25
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    Holy snap, crap load of replies, thanks guys.

    But I'm still focusing on anti debugging at the moment. /yea

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [SOURCE] Anti Leak
    By GameTrainerMaker in forum C++/C Programming
    Replies: 4
    Last Post: 08-24-2010, 08:40 AM
  2. [Request] Anti-kick Source
    By AeroMan in forum WarRock Discussions
    Replies: 5
    Last Post: 11-15-2009, 03:12 AM
  3. CS Source Clan/Server
    By Dave84311 in forum General
    Replies: 20
    Last Post: 10-04-2006, 12:21 PM
  4. Counter Strike: Source
    By Flawless in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 15
    Last Post: 06-03-2006, 08:28 PM
  5. HW Man's anti-vehicle mines
    By poiu123 in forum WarRock - International Hacks
    Replies: 1
    Last Post: 01-05-2006, 07:42 AM