Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05-24-2005, 11:14
jonwil jonwil is offline
VIP
 
Join Date: Feb 2004
Posts: 399
Rept. Given: 2
Rept. Rcvd 21 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 67 Times in 35 Posts
jonwil Reputation: 21
Help with cracking Trymedia Activemark app

Target is protected with Trymedia Activemark 5.41.1210
Steps taken so far crack:
1.Start the target and go to the "enter the code" page.
2.Open latest PE_Tools
3.Select target and do full dump
4.Do "Get OEP". Note down those OEPs.
5.Disassemble dumped target in IDA. Check noted OEPs.
Found what looks like correct OEP at B5D024
Start imprec, select the target.
Punch in B5D024 (our possible OEP) and press "IAT autosearch".
imprec says "cant find good imports"
Next, put address and size of .idata segment into ImpRec.
It finds valid IAT entries plus bad thunks.
Delete bad thunks (IDA says no parts of the code call these "bad thunks" so they must not be valid parts of the IAT).
Then do "fix dump" on the dumped exe file.
Resulting dump wont run.
hxxp://users.tpgi.com.au/adsloptd/target.zip is the origonal packed target
hxxp://users.tpgi.com.au/adsloptd/rct3d_.rar is my current dump

Can anyone tell me what I am doing wrong or how to get this target to actually run?

I also tried an OEP of 0129064F (which is what PeID said the OEP is) but that didnt make it run either.

Hopefully someone can tell me how to get this target running

I also managed to get IceExt running at last.
If I run with SoftIce not loaded at all, target works and displays "enter key" screen.
If I run with SoftIce loaded and protection off, I get "anti-debugger" message.
If I run with SoftIce loaded and protection on, program loads and silently terminates.

So I have no way (at least that I can see) to use SoftIce on this target (e.g. to be sure what the OEP really is)
The target detected OlyDbg too.

Last edited by jonwil; 05-24-2005 at 13:18. Reason: More info
Reply With Quote
  #2  
Old 05-24-2005, 18:57
TmC TmC is offline
VIP
 
Join Date: Aug 2004
Posts: 330
Rept. Given: 1
Rept. Rcvd 15 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 23 Times in 17 Posts
TmC Reputation: 15
I don't know anything about the target app and trymedia system but i can guess that IF you did the right job it might have a sdk where developer checks for presence of the envelope and if not it crashes the program but it is only a supposition.
Reply With Quote
  #3  
Old 05-24-2005, 19:38
Nacho_dj's Avatar
Nacho_dj Nacho_dj is offline
Lo*eXeTools*rd
 
Join Date: Mar 2005
Posts: 211
Rept. Given: 16
Rept. Rcvd 179 Times in 34 Posts
Thanks Given: 44
Thanks Rcvd at 137 Times in 41 Posts
Nacho_dj Reputation: 100-199 Nacho_dj Reputation: 100-199
Hi jonwil:

First, take a look at the following thread: ActiveM***, in
http://www.exetools.com/forum/showthread.php?t=7013

maybe there you will get a clue.


Could you tell us which is the program you are dealing with?

I have totally rebuilded and working "Chuzzle Puzzle", that has the same AM version 5.41.1210.

I am hard testing an already developed generic unpacker but not yet published, because sometimes the program rebuilded, even working well, ask for the CD.
And another times, rebuilded program says things like: "You need Shockwave Player 8.5 installed in your PC".

I want a totally free of errors unpacker, giving always a working program, before publishing it.

The OEP, as I said in a post in the above thread, when edited in an hex editor, is below the string '_com_err': is the first value you find in that column that is bigger than the position of the first section and smaller than the position of first section plus the size of first section.

In your rebuilded program, you still need to fix all the call's and mov than uses redirections to AM functions. AM picks fetch to functions of some DLL and rewrite them to call to AM functions, that are controlling the trial time, the registration of the program, and so on.
All of them all always preceeded by a nop.

Good luck in your research!


Cheers from Spain!

Nacho_dj
Reply With Quote
  #4  
Old 05-25-2005, 02:21
codeX codeX is offline
{RES} Cracker
 
Join Date: Dec 2004
Location: C:\WINDOWS\SYSTEM32
Posts: 162
Rept. Given: 1
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 3
Thanks Rcvd at 1 Time in 1 Post
codeX Reputation: 0
Hi,

The older versions of Intervideo DVD copy is protected with this TryMedia crap. Maybe the latest trials too.

Here is InterVideo DVD Copy 3 Gold/Platinum

Quote:
h**p://a1394.g.akamai.net/7/1394/3235/v002/webdownload2.intervideo.com/intervideodvdcopy3/release2/Enu//IVIDVDCopy3.exe
__________________
{RES}
Reply With Quote
  #5  
Old 05-25-2005, 02:26
dyn!o's Avatar
dyn!o dyn!o is offline
Friend
 
Join Date: Nov 2003
Location: Own mind
Posts: 214
Rept. Given: 1
Rept. Rcvd 1 Time in 1 Post
Thanks Given: 8
Thanks Rcvd at 0 Times in 0 Posts
dyn!o Reputation: 1
ActiveMark is a weak protection. It detects most of the tools with a very primitive methods.

You cannot run SICE because AM searches for the following devices (and drivers) NTICE, SICE, SIWVID, FROGSICE, SUPERBPM. It was good but few years ago.
Quote:
If I run with SoftIce loaded and protection on, program loads and silently terminates
Let me guess. You had SICE / FileMon / RegMon / LordPe or ImpRec running at the same time. Try to run it without any additional tools and it will work (with IceExt protection turned on).

Also think about breakpoints. AM detects them and will refuse to run if you set any (CC). Use hardware breakpoints since AM does not operate on debug registers.

Hope that helped. Good luck.
Reply With Quote
  #6  
Old 05-25-2005, 07:14
jonwil jonwil is offline
VIP
 
Join Date: Feb 2004
Posts: 399
Rept. Given: 2
Rept. Rcvd 21 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 67 Times in 35 Posts
jonwil Reputation: 21
no, I has just SoftIce with IceExt running.
What I did notice is that if I turned off IceExt int3 protection, it went back to giving me the "dont use a debugger" message.
Reply With Quote
  #7  
Old 05-25-2005, 08:24
jonwil jonwil is offline
VIP
 
Join Date: Feb 2004
Posts: 399
Rept. Given: 2
Rept. Rcvd 21 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 67 Times in 35 Posts
jonwil Reputation: 21
ok, I found the OEP, actually 2 OEPs.
One is E9064F, same as PeID, the other one is 75D022 which matches with what I found before.
Which one is the correct OEP and how can I tell? (i.e. which one do I set the OEP in the PE file to?)

Going to locate and remove all these "trymedia" calls.
What about IAT, is ImpRec the correct way (someone on another board said using ImpRec is NOT the correct way but I am not 100% sure since it seemed to give what look like valid IAT entries)

As for the target, it is a beta version of a game (I wont say which one) which uses Trymedia to verify that u are tester with correct key (I am not interested in cracking this to play the game, I am interested in cracking this so I can reverse engineer the new data formats in the new version (I already know some of data formats from other games with similar formats, this one has new formats that I want to investigate)

Last edited by jonwil; 05-25-2005 at 09:16. Reason: wrong OEP + more info
Reply With Quote
  #8  
Old 05-25-2005, 10:06
N0P's Avatar
N0P N0P is online now
Friend
 
Join Date: Aug 2003
Location: [CPU]
Posts: 100
Rept. Given: 19
Rept. Rcvd 13 Times in 12 Posts
Thanks Given: 16
Thanks Rcvd at 58 Times in 23 Posts
N0P Reputation: 13
Try search button before you ask >> http://exetools.com/forum/showthread.php?t=7013
Reply With Quote
  #9  
Old 05-25-2005, 12:03
jonwil jonwil is offline
VIP
 
Join Date: Feb 2004
Posts: 399
Rept. Given: 2
Rept. Rcvd 21 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 67 Times in 35 Posts
jonwil Reputation: 21
I already read that thread.
If I use "2nd layer EP" (in .bss segment) for EP, it crashes somewhere before calling the OEP (I can see code that calls OEP in there but it doesnt reach it)
If I use "Origonal EP" (in .text segment) for EP, it crashes on "nop call sub_11CA1B7"

I cant see anything in that thread (or elsewhere) showing how to deal with the crash I get if I use 2nd layer EP (or anything indicating that using Origonal EP and doing manual fixups for all the "nop call" type API things is what I should be doing instead)

Nacho_DJ, if you have a generic unpacker for ActiveMark, it might be that my target is one that works in your packer.
Can you send me the packer (or alternatively unpack the target and send me the unpacked target)? My target doesnt need a CD and only has "enter code" mode (not "trial" mode).

hmmm, mabie because the code hasnt been entered properly, thats why the crashes are happening when I use the "2nd layer EP" of ActiveMedia (the one PeID gave me)

Last edited by jonwil; 05-25-2005 at 12:29. Reason: a request
Reply With Quote
  #10  
Old 05-25-2005, 14:49
codeX codeX is offline
{RES} Cracker
 
Join Date: Dec 2004
Location: C:\WINDOWS\SYSTEM32
Posts: 162
Rept. Given: 1
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 3
Thanks Rcvd at 1 Time in 1 Post
codeX Reputation: 0
Hi jonwil,
Have you tried the tut at hxxp://xoomer.virgilio.it/pinc0pall/crktute/2/ActiveMark.txt mentioned in the Exetools thread pointed by NOP. Is this method works on new versions of Activemark...?
__________________
{RES}
Reply With Quote
  #11  
Old 05-25-2005, 15:18
imagin
 
Posts: n/a
Unpack AM is not problem - find the first and second layer and dump is easy - problem is replace the FAKE NOP CALL - you must be find and by hand repair - it is every time otherwise
Reply With Quote
  #12  
Old 05-25-2005, 15:39
jonwil jonwil is offline
VIP
 
Join Date: Feb 2004
Posts: 399
Rept. Given: 2
Rept. Rcvd 21 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 67 Times in 35 Posts
jonwil Reputation: 21
I tried that tutorial but it requires using tools that only run on windows 9x (plus its not usefull for latest AM) so it doesnt help.

Could my problems be caused because the Trymedia crap does a check to see if the exe file on disk matches with what it expects?
If so, how do I convince it to read the packed exe instead of the unpacked one?

Last edited by jonwil; 05-25-2005 at 21:16. Reason: More info
Reply With Quote
  #13  
Old 05-25-2005, 22:03
Nacho_dj's Avatar
Nacho_dj Nacho_dj is offline
Lo*eXeTools*rd
 
Join Date: Mar 2005
Posts: 211
Rept. Given: 16
Rept. Rcvd 179 Times in 34 Posts
Thanks Given: 44
Thanks Rcvd at 137 Times in 41 Posts
Nacho_dj Reputation: 100-199 Nacho_dj Reputation: 100-199
Clearing some points...

You are right imagin, unpacking is not the main problem, but the nop + call rebuilding.

Ok, as far as I know, till 5.31.1140 AM release, you can find the "nop + call" equivalence to the good call in the AM equivalences table, as I call it.

¿Where? When you have unpacked the AM protected program, opening an hex editor, search for one of these strings:
'PEStub', 'machine.', 'reason='.

If one of then is followed by some ceros, then you can find behind the equivalences table, as I have mentioned in ActiveM*** Thread.

This table has elements that consist of two fields.

If you are lucky you will find this:
- First field: a word, that is a pointer to a name of function of DLL; for instance: ExitProcess.
- Second field: a word, that is the value that the call invoques, this that is preceeded by a nop; for instance, value = 537562, that would be then 'nop call 00537562'.

This is cyclic till all the equivalences pointer-value are covered. Behind last couple of values, you can find pointers to the dll names.

But sometimes, you only find the first field, and the second is cero, during all the equivalences table. No values for calls here.


You need only a program for every release with the equivalences complete (first and second field not equal to cero) to build a generic AM unpacker/rebuilder.

What procedure do you have to follow? This simple one:
Take the second field of one element in the table (f.i. : 537562), subtract to it the image (f.i.: 400000), then subtract to it the offset of the AM section, i.e., the section where the information of the AM release is located (f.i.: B0000).
Then, in the example I have chosen, you'll get the following value: 537562 - 400000 - B0000 = 87562 = AM equivalence for ExitProcess

Take this value, and put it in a table. Every time you are rebuilding a new program in that AM release (it has to be the same release exactly), do the same but inversely:

Am equivalence + Image + Offset AM section = value that is invoqued in a 'nop call value', then replace this nop + call for a call to the ExitProcess.

The same for all the values found in AM redirections (nop + call).

And that's all, you have recovered the original call's of the program.


This I have done in my rebuilder and is working for every program that belongs to the same release.


Of course, you need to rebuild the import table too, because it is affected for several changes leaving it in bad state, another AM change. This you can do with an import rebuilder, but ImpRec is not working well in several situations where ordinals and no functions names are used, so I have built a procedure in my 'still in developping status' program that correct this.


OEP is not a problem, is a field always n x 16 positions behind the '_com_err' string, with 'n' a little integer value.


I do not know how the AM packer works, but how to rebuild the AM calls.


Tell me if this is working for you...


Cheers!


Nacho_dj
Reply With Quote
  #14  
Old 05-26-2005, 02:04
N0P's Avatar
N0P N0P is online now
Friend
 
Join Date: Aug 2003
Location: [CPU]
Posts: 100
Rept. Given: 19
Rept. Rcvd 13 Times in 12 Posts
Thanks Given: 16
Thanks Rcvd at 58 Times in 23 Posts
N0P Reputation: 13
IMHO better way is dumping after unpacking, before showig the NAG screen (i think that AM uses somethink like UPX) a then patching reg.rutine(nag) it works for me well ... (i patched 2 progs which have encrypted data files and decrypting cca 20filez is too much work)
Reply With Quote
  #15  
Old 05-26-2005, 06:16
jonwil jonwil is offline
VIP
 
Join Date: Feb 2004
Posts: 399
Rept. Given: 2
Rept. Rcvd 21 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 67 Times in 35 Posts
jonwil Reputation: 21
So, is there some way I can fix my dump so that when I start at the "2nd layer EP" I dont crash and instead get working code?
Or do I need to start at origonal EP and fixup the "nop call" and "encrypted data files" myself?

I found the table with the functions in it but unfortunatly, the "calls" are 0.
So it looks like (unless someone else has a binary with usable values in it) fixing up all the calls for version 5.41.1210 of ActiveMark has to be done by hand. Ditto the decrpytion of encrypted files

Either that or some solution has to be found where you can use the 2nd layer EP and then modify the code between the 2nd layer EP and the OEP of the program somehow so that the "nop call" instructions and the encrypted data files are correctly setup/read/decoded but without any crashes or errors.

I have tried everything to get this to work but it seems no-one knows anything about 5.41.1210 of ActiveMark (or what steps to take to sucessfully crack it).

With the info out there, I am surprised no-one has made a "generic" ActiveMark unpacker that can unpack AM directly I see several people saying "I am working on it but it doesnt unpack everything yet so I dont want to release it" (even if it doesnt unpack everything, mabie it might unpack to working some targets, mabie even mine

I also have the .lcn file from someone who has the target (in "C:\documents and settings\All Users\Application Data\Trymedia\licenses") but the target wont recognize as "unlocked".

Is it because there is more data that goes with the licence somewhere? Or is it because the .lcn file is locked to a particular machine? Is there some way to get the target to use this licence file (I cant just type the "unlock code" into the trymedia window because it talks to the internet to check if its valid)

Last edited by jonwil; 05-26-2005 at 16:00. Reason: more info
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
Does Trymedia Activemark do encrypted data files? jonwil General Discussion 3 05-26-2005 19:13
Trymedia's ActiveMark Protection?!?! Seventh General Discussion 7 10-25-2004 14:36


All times are GMT +8. The time now is 01:08.


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