Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 11-03-2009, 17:13
redbull redbull is offline
Friend
 
Join Date: Mar 2004
Posts: 160
Rept. Given: 17
Rept. Rcvd 5 Times in 4 Posts
Thanks Given: 3
Thanks Rcvd at 6 Times in 6 Posts
redbull Reputation: 5
Reserving with Resource DLLs

Hi GUys,

I am reversing the latest MobSync 2.0.3. An application which allows you to syncronize a windows mobile phone with files on windows computer. IT has lots of options and a really good tool.

http://doosoft.seesaa.net/

The program is written in Borland C++ 6 (BCB6) and IDA and DEDE seem to do quite well on the target. No packing or protection.

The protection consists of an ID and a password.

It uses Localization software to help you build other languages.

The native EXE is built in the Japanese language and when you run the program it tries to load the language for your region. Eg mobsync.enu (english) mobsync.de (german) etc.

These other files are basically resource DLLs (mobsync.enu).

I have located the Japanese resource strings for "Registered" "Unregistered" etc. And marked them in IDA at the right position.

Problem is the PE file has all its strings in the ".rsrc" section and not ".data" so IDA 5.1 does not link the string to any of its references. So i have no xref's for these strings. I tried various options when analysing the file in IDA with no luck.

I have found the MessageBoxA calls and calls to determine where the serial is read.

But the target is quite tricky because it writes a serial file. <username>.ser2
So I want to make sure I find all the places and patch the target correctly. (Actually I want to keygen it)

My question is really how to get IDA to recognize these strings or how to find the "link" between the strings and their references.

I am not expecting people to do my work for me but I need a push in the right direction.

There is a large table, which I will post the real code later, which could be a clue

Something like:

a425530: db offset_421334 [text, dd_213324]
a425534: db offset_421316 [text, dd_213324]
a425538: db offset_42133A [text, dd_213324] etc

And I and guessing this is where the major work is done.

I want to ideally write an IDA script to map these resources and rename them to their reference strings.
Reply With Quote
  #2  
Old 11-04-2009, 02:22
redbull redbull is offline
Friend
 
Join Date: Mar 2004
Posts: 160
Rept. Given: 17
Rept. Rcvd 5 Times in 4 Posts
Thanks Given: 3
Thanks Rcvd at 6 Times in 6 Posts
redbull Reputation: 5
Done!! 6 byte patch

Screw the resources, Olly never lies.
Reply With Quote
  #3  
Old 11-04-2009, 03:18
Git's Avatar
Git Git is offline
Old Git
 
Join Date: Mar 2002
Location: Torino
Posts: 1,115
Rept. Given: 220
Rept. Rcvd 265 Times in 157 Posts
Thanks Given: 108
Thanks Rcvd at 216 Times in 124 Posts
Git Reputation: 200-299 Git Reputation: 200-299 Git Reputation: 200-299
You are assuming he wants to patch it. I thought he wanted to reverse engineer it

Git
Reply With Quote
  #4  
Old 11-04-2009, 04:50
ahmadmansoor's Avatar
ahmadmansoor ahmadmansoor is offline
Coder
 
Join Date: Feb 2006
Location: Syria
Posts: 1,045
Rept. Given: 509
Rept. Rcvd 373 Times in 142 Posts
Thanks Given: 336
Thanks Rcvd at 407 Times in 119 Posts
ahmadmansoor Reputation: 300-399 ahmadmansoor Reputation: 300-399 ahmadmansoor Reputation: 300-399 ahmadmansoor Reputation: 300-399
it is good if u make a flash movie on what it happen with u .
so every one here will learn something .
maybe tut at least .
Thanks
__________________
Ur Best Friend Ahmadmansoor
Always My Best Friend: Aaron & JMI & ZeNiX
Reply With Quote
  #5  
Old 11-04-2009, 15:07
redbull redbull is offline
Friend
 
Join Date: Mar 2004
Posts: 160
Rept. Given: 17
Rept. Rcvd 5 Times in 4 Posts
Thanks Given: 3
Thanks Rcvd at 6 Times in 6 Posts
redbull Reputation: 5
Hi Git and Ahmadmansoor,

Yeah I did want to reverse it but I can't come right with the resource strings. I have found the serial generation routine, but I could patch the result of the function in 6 bytes.

The serial number routine was very simple but the serial number file "username.ser2" is the one that's giving me trouble.

I have the C++ code reversed from the serial number routine but it looks too complicated for me to care. Going to have to think if I still want to keygen this target.

Thanks anyway

Redbull
Reply With Quote
  #6  
Old 11-04-2009, 21:38
Git's Avatar
Git Git is offline
Old Git
 
Join Date: Mar 2002
Location: Torino
Posts: 1,115
Rept. Given: 220
Rept. Rcvd 265 Times in 157 Posts
Thanks Given: 108
Thanks Rcvd at 216 Times in 124 Posts
Git Reputation: 200-299 Git Reputation: 200-299 Git Reputation: 200-299
I have seen an IDC script that adds the string as a comment to each resource reference, like WD32Asm does.

Git
Reply With Quote
  #7  
Old 11-11-2009, 17:52
redbull redbull is offline
Friend
 
Join Date: Mar 2004
Posts: 160
Rept. Given: 17
Rept. Rcvd 5 Times in 4 Posts
Thanks Given: 3
Thanks Rcvd at 6 Times in 6 Posts
redbull Reputation: 5
Hi Git,

The script is have is "parsersc.idc" by XDA Developer itsme.

I dunno if you have another. I run this script and I get an error right away. I am not sure if I need to select bytes before running the script. Does not look like it in the script source.

I am putting together a video on my experience with this crack as Ahmadmansoor requested.

Do i host the crack on YouTube or tuts4you ??
Reply With Quote
  #8  
Old 11-11-2009, 21:07
Git's Avatar
Git Git is offline
Old Git
 
Join Date: Mar 2002
Location: Torino
Posts: 1,115
Rept. Given: 220
Rept. Rcvd 265 Times in 157 Posts
Thanks Given: 108
Thanks Rcvd at 216 Times in 124 Posts
Git Reputation: 200-299 Git Reputation: 200-299 Git Reputation: 200-299
Can we have a look at the script please, may be able to find the problem. If it is the one I remember, you have to set a variable to tell it which kind of resource to search for (String, Dialog, etc) .

Later... ius it this one? :
http://nah6.com/~itsme/cvs-xdadevtools/ida/idcscripts/parsersc.idc

Git
Reply With Quote
  #9  
Old 11-11-2009, 21:41
Git's Avatar
Git Git is offline
Old Git
 
Join Date: Mar 2002
Location: Torino
Posts: 1,115
Rept. Given: 220
Rept. Rcvd 265 Times in 157 Posts
Thanks Given: 108
Thanks Rcvd at 216 Times in 124 Posts
Git Reputation: 200-299 Git Reputation: 200-299 Git Reputation: 200-299
Sorry to reply to myself but the Edit button still disappears a few minutes after posting.

That script above is not finished, it does not even have a main(). However, this looks like the one you want :

http://nah6.com/~itsme/cvs-xdadevtools/ida/idcscripts/addstrcmt.idc

Git
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
different DLLs have same udd name in OllyDbg BlackWhite General Discussion 8 07-31-2014 03:04
How to patch .NET DLLs? Newbie_Cracker General Discussion 28 09-26-2005 04:52
Unpacking DLLs thomasantony General Discussion 22 08-18-2005 05:34
DLLs armmad8 General Discussion 2 06-09-2005 22:13


All times are GMT +8. The time now is 03:53.


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