Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05-14-2006, 07:02
TmC TmC is offline
VIP
 
Join Date: Aug 2004
Posts: 328
Rept. Given: 1
Rept. Rcvd 15 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 22 Times in 16 Posts
TmC Reputation: 15
Armadilled Programs with Custom Implementation

Hi,
I am cracking for a long now apps protected with dillo. Usually just unpacking and cracking the nags/trials/etc is sufficient, but some developers checks the presence of the envelope via the Environment Variables using SetEnvironmentVariableA and GetEnvironmentVariableA.

Obviously without the armadillo Shell,those variables are not initialised so the program notices it and takes his measures.

My question is: i can force each check to make think the variable is there where there isn't, but the checks can be anywhere and executed very rarely. How can I "dump"(know) the values the EnvVariables have when the program is in the shell?

After that i can inline patch or just add a section before program loading, set variables and then redirect to OEP.

Thanks in advace.

Last edited by TmC; 05-14-2006 at 07:06.
Reply With Quote
  #2  
Old 05-14-2006, 07:57
D-Jester's Avatar
D-Jester D-Jester is offline
VIP
 
Join Date: Nov 2003
Location: Ohio, USA
Posts: 269
Rept. Given: 39
Rept. Rcvd 61 Times in 41 Posts
Thanks Given: 0
Thanks Rcvd at 4 Times in 4 Posts
D-Jester Reputation: 61
I would set a memory BP on SetEnvironmentVariableA and keep track of the variables that are set (Top two on the stack are variable name & value). Unpack as normal

Then I would start the dump and set a memory BP on GetEnvironmentVariableA.
Recording what variable it requests, and patching to continue execution of the program for now.

If the program doesn't break try setting a memory BP on the variables value in memory. It may be accessing it directly rather than using the API.

Then I would use the .adata section as the place for the new EP and my patch.

Your patch should look something like this:
Code:
004DCDB0 > 68 E6CD4D00      PUSH Dumped.004DCDE6                   ; ASCII "D-Jester"
004DCDB5   68 F5CD4D00      PUSH Dumped.004DCDF5                   ; ASCII "AltUserName"
004DCDBA   E8 EA58347C      CALL kernel32.SetEnvironmentVariableA
004DCDBF  ^E9 D6BFFCFF      JMP Dumped.004A8D9A                    ; Jump to OEP
change the programs EP to 000DCDB0 and try to run it

AltUserName is the only variable I have ever needed to set after removing armadillo.

Hope I helped.
__________________
Even as darkness envelops and consumes us, wrapping around our personal worlds like the hand that grips around our necks and suffocates us, we must realize that life really is beautiful and the shadows of despair will scurry away like the fleeting roaches before the light.
Reply With Quote
  #3  
Old 05-14-2006, 08:32
al-kaiser
 
Posts: n/a
A trick is to change ALTUSERNAME to USERNAME after that its fully registered (just works on apps which get called through GetEnvironmentVariableA)
Reply With Quote
  #4  
Old 05-15-2006, 08:58
TmC TmC is offline
VIP
 
Join Date: Aug 2004
Posts: 328
Rept. Given: 1
Rept. Rcvd 15 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 22 Times in 16 Posts
TmC Reputation: 15
Thanks for replies. I was working on a program called [PM to have name]. Once unpacked it shutdowns automatically. It calls several times GetEnvironmentVariableA and the variable that triggers shutdown is a variable set in armadillo. If the variable is found then app is still protected, else no more protected so shutdown.
In this program call is done only once at beginning, so I patched the jump and the program runs like a piece of cake.
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
Uac bypass implementation 0xall0c Source Code 8 03-20-2018 15:45
Setup Factory 7.0.2.0 De-Armadilled Problem TmC General Discussion 3 05-07-2005 23:02
Armadilled apps Annibal General Discussion 12 02-10-2005 23:29


All times are GMT +8. The time now is 18:11.


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