Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Block DLL injection

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
marius89
How do I cheat?
Reputation: 0

Joined: 13 Jul 2011
Posts: 3

PostPosted: Wed Jul 13, 2011 2:18 pm    Post subject: Block DLL injection Reply with quote

Hi everyone, could you help me out with some answer?
The question is like the thread subject.. how can be blocked the dll injection?
Sorry for my bad english .. i hope u will help me, i saw a tutorial for a dll injection program but i want a dll injection blocker.Thanx in advance.
Back to top
View user's profile Send private message
NoMercy
Master Cheater
Reputation: 1

Joined: 09 Feb 2009
Posts: 289

PostPosted: Wed Jul 13, 2011 3:06 pm    Post subject: Reply with quote

Not sure, but I guess you can hook DllMain().
Back to top
View user's profile Send private message
AhMunRa
Grandmaster Cheater Supreme
Reputation: 27

Joined: 06 Aug 2010
Posts: 1117

PostPosted: Wed Jul 13, 2011 3:29 pm    Post subject: Reply with quote

http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/0323aaaa-b234-4b31-b5b9-2fba7255d1f1/

Suggests that blocking isn't possible.

_________________
<Wiccaan> Bah that was supposed to say 'not saying its dead' lol. Fixing >.>
Back to top
View user's profile Send private message
marius89
How do I cheat?
Reputation: 0

Joined: 13 Jul 2011
Posts: 3

PostPosted: Wed Jul 13, 2011 3:31 pm    Post subject: Reply with quote

NoMercy wrote:
Not sure, but I guess you can hook DllMain().


Thanx, but you're answer is to week, it doesn't help me..


AhMunRa wrote:


Suggests that blocking isn't possible.


Dude, Kaspersky firewall and the firewall from Symatec it is do what i want.. just block the injection winthout messages for example: A game cheat is not load if my firewall is on.Like i say, this metod i want if someone knows.
Anyway, thanx for fast replies.
Back to top
View user's profile Send private message
AhMunRa
Grandmaster Cheater Supreme
Reputation: 27

Joined: 06 Aug 2010
Posts: 1117

PostPosted: Thu Jul 14, 2011 9:26 am    Post subject: Reply with quote

Upon rereading the previous thread I posted from MSDN forums, you could use a Notification Hook to watch for an injected dll then have your application handle it accordingly. Though I doubt this method would distinguish between a good dll and a malicious one.

http://msdn.microsoft.com/en-us/library/z9h1h6ty%28VS.80%29.aspx

http://www.gamer z needz.net/forums/legacy-delphi-other-languages/110502-anti-dll-injection.html *EDIT STUPID AUTO CORRECT remove the spaces link should work.

First post in this thread includes source code, for blocking dll injection, but poster also states you can bypass this by through WriteProcessMemory()

_________________
<Wiccaan> Bah that was supposed to say 'not saying its dead' lol. Fixing >.>


Last edited by AhMunRa on Fri Jul 15, 2011 10:17 am; edited 4 times in total
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Thu Jul 14, 2011 9:57 am    Post subject: Reply with quote

There isn't a way you can block it if the attacker is trying hard enough. A simple thing is to just hook LoadLibrary in your own process. This will prevent generic injectors but is easy to subvert. It really depends what your requirement is.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Thu Jul 14, 2011 10:39 am    Post subject: Reply with quote

Most anti-cheats wont load if your firewall blocks them because they cannot obtain update information. They are designed to not work unless they are able to validate they are running the latest version of the anti-cheat software to prevent users from just blocking updates. (People did this with GameGuard til they caught on.)

Like Slug mentioned, you wont do much in terms of blocking a user from injection as they will get around your blocks. Even more so, doing anything from usermode is easily undone.

If you are going to attempt to block injection in any serious manner you will want to do things from the kernel rather than from usermode.

From usermode you can do some basics such as:
- Block LoadLibrary calls that are not whitelisted.
- Block CreateThread/CreateRemoteThread calls that are not valid for your process.
- Block memory alterations; use hashes/checksums on memory locations to prevent edits.
- Block obtaining a handle to your process.

As said though all of these are easily bypassed if done in usermode since people can just rehook what you hook and skip your checks entirely.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
marius89
How do I cheat?
Reputation: 0

Joined: 13 Jul 2011
Posts: 3

PostPosted: Thu Jul 14, 2011 3:08 pm    Post subject: Reply with quote

Thanx for replies, u all helped me alot ..
Wiccan, most anti -cheats it using CreateThread/CreateRemoteThread calls metod.For me as far this i think will be enought.But i have to learn making this program, some examples if u wanna post not really the exact code, as i know nobody give's the source code for what he want.Just a few examples if u know somewhere to look at it, so i will understand how to make this.Thanx again for answers.I'm glad to be here, nice people u are.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites