Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 10-05-2003, 23:49
SvensK
 
Posts: n/a
Olly thread patching... help

I'm debugging a program in Olly and found that I wanna change some code in the exe to remove a nasty check.

But the code I wanna change is in a thread and can't be found in the exe when using hexedit.

The program is pure c++ code and isn't packed.

The CPU window reports: thread 00000FF4
And it displays no module anymore.
It got to the code with a: :00425F3B FF15A4384900 call dword ptr [004938A4]

The code I wanna patch looks like this:
003E6913 75 3F JNE SHORT 003E6954

How do I find that code in the exe or is that located outside the exe?

Thanks
-SvensK

Last edited by SvensK; 10-06-2003 at 00:15.
Reply With Quote
  #2  
Old 10-06-2003, 03:17
SvensK
 
Posts: n/a
Nevermind, I solved it.
Reply With Quote
  #3  
Old 10-06-2003, 03:43
JMI JMI is offline
Leader
 
Join Date: Jan 2002
Posts: 1,627
Rept. Given: 5
Rept. Rcvd 199 Times in 99 Posts
Thanks Given: 0
Thanks Rcvd at 96 Times in 94 Posts
JMI Reputation: 100-199 JMI Reputation: 100-199
Perhaps it would help others if you describe how you solved your own problem.

Regards.
__________________
JMI
Reply With Quote
  #4  
Old 10-06-2003, 04:17
yaa
 
Posts: n/a
Yes SvensK, please let us know how you solved it.

Regards,
yaa
Reply With Quote
  #5  
Old 10-06-2003, 05:28
SvensK
 
Posts: n/a
Well, I followed the call outside the code with Olly and copied the code to NotePad. Then I reinserted the code slightly modified somewhere in the exe where there was free space (bunch of zeros). And at last I re-routed the call to the new place in the exe.

Worked like a charm
Reply With Quote
  #6  
Old 10-11-2003, 11:52
Lunar_Dust
 
Posts: n/a
Good solution!

However, I'd like to mention that code for a "thread" is still going to be in the EXE, so unless its encrypted, you should be able to find it. A thread is just code like any other piece of code, it just runs in its own context. It's still code in the code section of the EXE somewhere (although C++ will make it tougher to track it down)


Nice job on the solution, thinking out of the box ! Well done

-Lunar
Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Thread 19765 disappeared ? LaDidi General Discussion 2 01-19-2021 14:56
Using Thread Local Storage (tls) in Olly JuneMouse General Discussion 24 06-04-2005 19:32
Debugging a thread Numega Softice General Discussion 1 07-02-2004 19:28


All times are GMT +8. The time now is 19:02.


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