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 


Detecting a debugger in VB.Net

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Jorg hi
I post too much
Reputation: 7

Joined: 24 Dec 2007
Posts: 2276
Location: Minnesota

PostPosted: Tue Apr 21, 2009 7:35 pm    Post subject: Detecting a debugger in VB.Net Reply with quote

I am making a program but I want to have some sort of guard to block programs from debugging it, also if possible from reading memory. How would I do this?
_________________
CEF will always stay alive.
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Tue Apr 21, 2009 7:42 pm    Post subject: Re: Detecting a debugger in VB.Net Reply with quote

Cheat Engine wrote:
I am making a program but I want to have some sort of guard to block programs from debugging it, also if possible from reading memory. How would I do this?


Write your self a driver that hooks NtReadVirtualMemory, NtWriteVirtualMemory, NtSetContextThread, NtGetContextThread, NtOpenProcess, NtOpenThread, KeAttachProcess, KeStackAttachProcess.

Now get over to usermode and do debugger checks: http://www.codeproject.com/KB/security/AntiReverseEngineering.aspx

Thats a good guide. Now if you want, you can enum the processes and check for debug strings.
Back to top
View user's profile Send private message
slippppppppp
Grandmaster Cheater
Reputation: 0

Joined: 08 Aug 2006
Posts: 929

PostPosted: Tue Apr 21, 2009 10:44 pm    Post subject: Reply with quote

Code:
IsDebuggerPresent
Back to top
View user's profile Send private message AIM Address MSN Messenger
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Wed Apr 22, 2009 5:11 pm    Post subject: Reply with quote

slippppppppp wrote:
Code:
IsDebuggerPresent


That really is dumb. Look at ANY disassembler, you see the IsDebuggerPresent hook.
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Wed Apr 22, 2009 7:14 pm    Post subject: Reply with quote

dnsi0 wrote:
slippppppppp wrote:
Code:
IsDebuggerPresent


That really is dumb. Look at ANY disassembler, you see the IsDebuggerPresent hook.


What? .NET doesn't compile IsDebuggerPresent checks in it, only MSVC++ does.
Back to top
View user's profile Send private message
Jorg hi
I post too much
Reputation: 7

Joined: 24 Dec 2007
Posts: 2276
Location: Minnesota

PostPosted: Wed Apr 22, 2009 7:19 pm    Post subject: Reply with quote

I tried the "IsDebuggerPresent" & bypassed it in 4 minutes... I'll try the way you said dnsi0.

Edit:
I don't know C++ only VB.

_________________
CEF will always stay alive.
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Wed Apr 22, 2009 7:29 pm    Post subject: Reply with quote

Cheat Engine wrote:
I tried the "IsDebuggerPresent" & bypassed it in 4 minutes... I'll try the way you said dnsi0.

Edit:
I don't know C++ only VB.


Ok... If you don't know C++ or C then scratch the part about writing a kernel driver.
Back to top
View user's profile Send private message
Jorg hi
I post too much
Reputation: 7

Joined: 24 Dec 2007
Posts: 2276
Location: Minnesota

PostPosted: Wed Apr 22, 2009 7:34 pm    Post subject: Reply with quote

First I'm going to make a process & .dll Scanner like the ones Game Guards use first.
_________________
CEF will always stay alive.
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Wed Apr 22, 2009 7:57 pm    Post subject: Reply with quote

dnsi0 wrote:
Cheat Engine wrote:
I tried the "IsDebuggerPresent" & bypassed it in 4 minutes... I'll try the way you said dnsi0.

Edit:
I don't know C++ only VB.


Ok... If you don't know C++ or C then scratch the part about writing a kernel driver.

What? You don't even need have to write a driver to have anti-debug <_<
Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Thu Apr 23, 2009 5:29 am    Post subject: Reply with quote

dnsi0 wrote:
Cheat Engine wrote:
I tried the "IsDebuggerPresent" & bypassed it in 4 minutes... I'll try the way you said dnsi0.

Edit:
I don't know C++ only VB.


Ok... If you don't know C++ or C then scratch the part about writing a kernel driver.

Is it hard?

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
haha01haha01
Grandmaster Cheater Supreme
Reputation: 0

Joined: 15 Jun 2007
Posts: 1233
Location: http://www.SaviourFagFails.com/

PostPosted: Thu Apr 23, 2009 12:25 pm    Post subject: Reply with quote

wallantia wrote:
dnsi0 wrote:
Cheat Engine wrote:
I tried the "IsDebuggerPresent" & bypassed it in 4 minutes... I'll try the way you said dnsi0.

Edit:
I don't know C++ only VB.


Ok... If you don't know C++ or C then scratch the part about writing a kernel driver.

Is it hard?
writing a kernel driver? very. and u get bsod'ed on every small mistake.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Thu Apr 23, 2009 3:22 pm    Post subject: Reply with quote

You get BSOD'd if unhandled exceptions are thrown.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Thu Apr 23, 2009 3:58 pm    Post subject: Reply with quote

haha01haha01 wrote:
wallantia wrote:
dnsi0 wrote:
Cheat Engine wrote:
I tried the "IsDebuggerPresent" & bypassed it in 4 minutes... I'll try the way you said dnsi0.

Edit:
I don't know C++ only VB.


Ok... If you don't know C++ or C then scratch the part about writing a kernel driver.

Is it hard?
writing a kernel driver? very. and u get bsod'ed on every small mistake.


Of course you'll get BSOD. It's like playing around with your computers heart, so to speak, so even the smallest mistakes will cause failure.

Just make sure to __try/__except/__finally During procedures that may throw exceptions, and make sure to have plenty of error checks.

As long as you know what your doing (which you should if you plan on making a driver) you should be fine.

_________________
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