Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 01-05-2004, 03:56
Pompeyfan
 
Posts: n/a
1tox latest version

I found some Olly tuts on the net for this one, but the latest version 2.63 seems harder to crack, it wont let me run it in Olly, even if I try to hide it with the Olly "is debugger present" pluggin, checking with Peid, it shows that the protection is Armadillo 1.xx-2.xx & Silicon Realms Toolworks.
What would be the next step to follow from here, I'm keen to try something a little harder now.
Reply With Quote
  #2  
Old 01-05-2004, 04:01
Rhodium
 
Posts: n/a
bpx on IsDebuggerPresent. then force it to return 0.

Might work.
Reply With Quote
  #3  
Old 01-05-2004, 04:17
Pompeyfan
 
Posts: n/a
Thanks, how do I force it to return 0 exactly.
Reply With Quote
  #4  
Old 01-05-2004, 04:50
Pompeyfan
 
Posts: n/a
I thought that was what the Olly pluggin did actually.
Reply With Quote
  #5  
Old 01-05-2004, 07:40
Squidge's Avatar
Squidge Squidge is offline
Drunken Squirrel
 
Join Date: Oct 2002
Posts: 412
Rept. Given: 4
Rept. Rcvd 9 Times in 4 Posts
Thanks Given: 0
Thanks Rcvd at 6 Times in 6 Posts
Squidge Reputation: 9
the ollydbg plugin does more than that, it actually writes directly into the process information block, so the original IsDebuggerPresent routine is still run.
Reply With Quote
  #6  
Old 01-06-2004, 03:46
Pompeyfan
 
Posts: n/a
I see, well the pluggin doesn't work in this case, I've tried fiddling with reversing the conditional jumps around the "isdebuggerpresent" part of the program, and it does run for longer, but then comes up with access errors.
Anyone got any other ideas?

Last edited by Pompeyfan; 01-06-2004 at 17:57.
Reply With Quote
  #7  
Old 01-06-2004, 10:20
Rhodium
 
Posts: n/a
You could try to patch Kernel32.DLL:

hxxp://www.addict3d.org/index.php?page=viewarticle&type=security&ID=442

Last edited by Rhodium; 01-06-2004 at 10:23.
Reply With Quote
  #8  
Old 01-06-2004, 19:11
Pompeyfan
 
Posts: n/a
Very interesting, I have posted a reply there, as my XP pro KERNEL32.DLL has these lines following this method:

77E72740 64A118000000 mov eax, dword ptr fs:[00000018]
77E72746 8B4030 mov eax, dword ptr [eax+30]
77E72749 0FB640002 movzx eax, byte ptr [eax+02]
77E7274D C3 ret

So I'm interested to see if anyone can suggest a workaround for this, it is beyond my knowledge at this stage unfortunately.

Thanks for posting anyway, I find this very interesting.
Reply With Quote
  #9  
Old 01-06-2004, 19:36
Peter[Pan]
 
Posts: n/a
77E72740 64A118000000 mov eax, dword ptr fs:[00000018]
77E72746 8B4030 mov eax, dword ptr [eax+30]
77E72749 0FB640002 movzx eax, byte ptr [eax+02]
77E7274D C3 ret

change the movzx eax, byte ptr [eax+02]
to

XOR EAX, EAX

then fill the rest with nops


i did this on my xp, and made the changes perminent.

So its always active, if u dont make it perminent, u will need to do it everytime u start the debugger up

-Peter
Reply With Quote
  #10  
Old 01-06-2004, 19:55
Pompeyfan
 
Posts: n/a
So, could you tell me what changes this involves in Hiew?, if that isn't asking to much
Reply With Quote
  #11  
Old 01-06-2004, 21:22
Squidge's Avatar
Squidge Squidge is offline
Drunken Squirrel
 
Join Date: Oct 2002
Posts: 412
Rept. Given: 4
Rept. Rcvd 9 Times in 4 Posts
Thanks Given: 0
Thanks Rcvd at 6 Times in 6 Posts
Squidge Reputation: 9
The below will not work with everything though, as the byte used in the PIB will still signify that a debugger is present, and so protectors such as Armadillo will still throw up errors as they compare the result of IsDebuggerPresent with this byte. Best thing to do really is to make IsDebuggerPresent overwrite this value with a zero and THEN return 0. Still not perfect however, as some protectors don't even call IsDebuggerPresent and just check the PIB directly, as it can easily be accessed by ofsetting from the FS register.

There are times you want IsDebuggerPresent to return a non-zero value anyway, so I find it easier to just modify the PIB (which indirectly modifies IsDebuggerPresent, as it depends on this value also) whenever I debug a program that checks this.

Quote:
Originally posted by Peter[Pan]
77E72740 64A118000000 mov eax, dword ptr fs:[00000018]
77E72746 8B4030 mov eax, dword ptr [eax+30]
77E72749 0FB640002 movzx eax, byte ptr [eax+02]
77E7274D C3 ret

change the movzx eax, byte ptr [eax+02]
to

XOR EAX, EAX

then fill the rest with nops
Reply With Quote
  #12  
Old 01-07-2004, 04:06
Pompeyfan
 
Posts: n/a
Quote:
There are times you want IsDebuggerPresent to return a non-zero value anyway, so I find it easier to just modify the PIB (which indirectly modifies IsDebuggerPresent, as it depends on this value also) whenever I debug a program that checks this.
So, how do I go about this exactly?
Reply With Quote
  #13  
Old 01-07-2004, 04:46
Rhodium
 
Posts: n/a
Will the PIB method always work?

I would also like to know how.

Thanks Squidge.
Reply With Quote
  #14  
Old 01-07-2004, 05:56
mtw mtw is offline
Friend
 
Join Date: Feb 2003
Posts: 73
Rept. Given: 0
Rept. Rcvd 2 Times in 1 Post
Thanks Given: 0
Thanks Rcvd at 0 Times in 0 Posts
mtw Reputation: 2
Pompey make sure you are not
running another debugger.
Hide debugger plugin worked fine on it.

I should say that if you are the client app
is catching the other debugger.
Reply With Quote
  #15  
Old 01-07-2004, 05:56
LOUZEW's Avatar
LOUZEW LOUZEW is offline
Friend
 
Join Date: Feb 2002
Location: Britanny
Posts: 101
Rept. Given: 1
Rept. Rcvd 2 Times in 1 Post
Thanks Given: 5
Thanks Rcvd at 7 Times in 7 Posts
LOUZEW Reputation: 2
IsDebuggerPresent

77E72740 64A118000000 mov eax, dword ptr fs:[00000018]
77E72746 8B4030 mov eax, dword ptr [eax+30]
77E72749 0FB640002 movzx eax, byte ptr [eax+02]
77E7274D C3 ret

In the memory dump window, edit (eax+2] , it's ADD 7FFDF002 and change his value from 1 to 0 !
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT +8. The time now is 09:27.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )