ASProtect and PureBasic?

Everything else that doesn't fall into one of the other PB categories.
storck
User
User
Posts: 83
Joined: Sat Oct 18, 2003 4:56 pm
Location: Sweden

ASProtect and PureBasic?

Post by storck »

Hi all!

I know some people have used asprotect and purebasic with various degrees of success. Has anyone tried using encrypted sections? I guess it shouldn't be possible since it is designed for use with delph, vb and vc++, but some times you people to things I thought not possible...

regards,

Storck
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

There should be little difference in PureBasic and executables from other languages. ASProtect should work fine (I've used it before without a problem)..
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

For what it's worth, I've seen cracks and keygens for apps that have been
protected by ASProtect (the .nfo file mentions ASProtect as the protection
type), so I don't know how good it is as a protection... is ASProtect free?
If not, then I'd seriously ask myself whether it's worth my money...
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

TE-lock is a good free one.!
free for commercial use too. but i dont know if there is any general cracks
for it somewhere. I have never found one, allthough i looked for it. [i found some for the old versions wich did not work.]

grap it here: http://www.softpedia.com/progDownload/T ... ad-23.html

what they say about it:
tElock is a PE-File Encryptor/-Compressor which is designed to process most .exe, .dll and .ocx files. It compresses and encrypts those file types while leaving them executable and protects against patching and disassembling. Since tElock is freeware and locked files only contain the -free- decompression routines of aPlib, you can legally use tElock even for commercial software. ...
Notice that even commercial software mostly gets an unlocker.. Take armadillo. Many general cracks are for it. Im very sure that there is one for Asprotect somewhere..

for more free/not free tools check here:
http://protools.cjb.net/
Programmers tools, a nice place to look for such stuff..
Updated this year, so its not just old stuff.
(freeware protectors are in an subsection of Compressors section!)

another nice place:
http://exetools.com/
Exetools. But its long time since last update, but good place to
find the NAMES of the tools, for further search on the internet..

And before sayin "There is an unlocker for that protection", check the version of the protection it unlocks ;)


Thanks for readin' my little preach about exe protectors :P
Greetz to all!
storck
User
User
Posts: 83
Joined: Sat Oct 18, 2003 4:56 pm
Location: Sweden

Post by storck »

Thank you all.

I already do have a ASProtect license. Recent versions have a rather good arsenal for protection. Polymorp code. Entry point hiding. Encrypted sections. CRC blocks and so on. Of course the application can still be cracked, but as we know all good enough apps get cracked sooner or later.

The way I see it, a good protection just might let your app stay uncracked until it finds it way into the hands of some of the major cracking crews. It will prevent people like my grandma from giving it to her friends. Grandma and friends don't use keygens or patches much either.

I will go on experimenting. I haven't devleoped any commercial app in PB yet so my needs are not urgent.

Regards,

Storck
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> TE-lock is a good free one

It's getting old though... the last release ( v0.98 ) was on Oct-25-2001.
I wonder how safe/secure it is? Still, any protection is better than none.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

yeah. its getting old :(

but anyway, kEncrypt from LockLess was pretty good. [they are coming online soon at lockless.com]

btw i found and changed a small piece of Anti Tracking code to pb:

Code: Select all

PUSH    AX
POP     AX
DEC     SP
DEC     SP
POP     BX              ;BX should point to the pushed AX.
CMP     AX,BX
JNE     l_ctrack
JMP     l_notrack
                
ctrack:
MessageRequester("","IM TRACKED!")
End
                
                
notrack:
MessageRequester("","No tracking...")
(works with pb's own debugger too :D and should work with others)
of course a cracker can disable the code, but anyway its a nice little trick..
storck
User
User
Posts: 83
Joined: Sat Oct 18, 2003 4:56 pm
Location: Sweden

Post by storck »

I have been experimenting some more. I can use encrypted sections. I just had to insert:
! _Label db <and some hex values from the asprotect.h> to mark the beginning of the section and some other values to mark the end.

Note I am not trying to promote asprotect or anything. Just in case some other people do happen to already have it.

Best Regards,

Don't forget to spend some time with your families!
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Asprotect is maybe one of the best protectors out there, and its sold for a reasonable price. It seems to get updated now and then. So its definently a good choice!

You have tried to use encrypted sections? I mean, have you programmed an algo to decrypt them at runtime?
Is this even possible to do in purebasic? (not make other apps have it, but make your own app have a decryption routine.?)
storck
User
User
Posts: 83
Joined: Sat Oct 18, 2003 4:56 pm
Location: Sweden

Post by storck »

You have tried to use encrypted sections? I mean, have you programmed an algo to decrypt them at runtime?
Is this even possible to do in purebasic? (not make other apps have it, but make your own app have a decryption routine.?)
No, sorry - I have managed to use asprotect encrypted sections with purebasic. In a c++ app any section of code could be marked for encryption by asprotect using:
REG_CRYPT_BEGIN
<Code block to be encrypted>
REG_CRYPT_END

This will keep the section encrypted unless there is a valid license code.

To make your own app decrypt sections at runtime I guess you would
a) have to write a encryption decryption routine
b) mark sections to be encrypted using for example inline assembler db with some specific hex values
c) Let another program have a go at your compiled executable searching for the sections and encrypt them
d) have the decryption key sent to the user encrypted with his own user name. In that way the correct key is not in the software. Only a users name will decrypt the users key and thus produce the valid key used to decrypt the sections at runtime. Or something like it. It still will not prevent someone to leak a username and key, but at least they will have to pay for the first one, and you will of cource check for that one in the next release.

Then again this is a war with no end and to a lot of people not worth fighting. But some people find it fun to reverse engineer, some find it fun to protect and I guess some enjoy it both ways.

And a good night to you all,

storck
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

storck wrote: No, sorry - I have managed to use asprotect encrypted sections with purebasic. In a c++ app any section of code could be marked for encryption by asprotect using:
REG_CRYPT_BEGIN
<Code block to be encrypted>
REG_CRYPT_END
ah ok.

To make your own app decrypt sections at runtime I guess you would
a) have to write a encryption decryption routine
b) mark sections to be encrypted using for example inline assembler db with some specific hex values
c) Let another program have a go at your compiled executable searching for the sections and encrypt them
d) have the decryption key sent to the user encrypted with his own user name. In that way the correct key is not in the software. Only a users name will decrypt the users key and thus produce the valid key used to decrypt the sections at runtime. Or something like it. It still will not prevent someone to leak a username and key, but at least they will have to pay for the first one, and you will of cource check for that one in the next release.
Yeah seams like a way to do it.
I just wonder if its possible to let the program decrypt a section of itself. I think it wouldnt be too hard to make a part of a program encrypted, (a whole procedure, for example), but i dont know how to unincrypt at runtime. Anyone have any ideas of how to do that?

And a good night to you all,
good night.


edit:
I looked through a nice self modifying example of a program in pb.
It works ok, but it does this:
First the procedure is NOT encrypted
Then the program encrypts it
And unencrypts it.

Problem is that it needs to be ENCRYPTED at start.
Well how do i encrypt a special part of an exe? [or how do i find the place..]
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

any ideas of how i can put a mark in my source code, so i can find the procedure start and end?
sec
Enthusiast
Enthusiast
Posts: 792
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Post by sec »

From view of Crackers or REs: "Code can run , can to be break/crack"
is not me and is not waste of time & money for these thing:D
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

true, but you can make it harder.
Btu the reason i want to know about how to mark the beginning and end of a place in the EXE to encrypt, is that im trying to make a crackme and also playing with different types of exe protection. So still if anyone knows about my question, answer at will :P
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> any ideas of how i can put a mark in my source code, so i can find the
> procedure start and end?

I don't know how the compiler works, but what if you put a specific dummy
string before and after the procedure -- a string that never gets used? Eg:

Code: Select all

a$="START_OF_PROCEDURE"
Procedure RegoRoutine()
  ; Blah
EndProcedure
a$="END_OF_PROCEDURE"
Then if you look at your exe with a hex editor, you can see the start/end of
the procedure block? I don't know; I'm just theorizing... and obviously you
wouldn't use variables with such names because it would give it away. ;)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Post Reply