Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Software-protection with IMEI in sourcecode


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-09-2010, 05:21 PM
schimanski's Avatar
Senior Member
 
Join Date: Oct 2007
Location: Germany
Posts: 146
Default Software-protection with IMEI in sourcecode

Hello together!

My software is only for a small category of personens, so I protect my application while I check the IMEIs or the Windows-ID in the source-code. I think, it is a very safe copyprotecion. The disadvantage is, that I have to compile the code and use the setup-builder every time, when I contain a new IMEI. Is there anyone who knows, if there is an easier way to contain the IMEIs? I thought about a encrypt database, but I think it is not save as the souce-code variety.

Thanks for help....
__________________
schimanski
--------------------------------------
Device: Qtek S200, Eten Glofiish X600
Desktop: Asus Eee PC
Reply With Quote
  #2 (permalink)  
Old 01-09-2010, 06:34 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 3,358
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by schimanski View Post
I think it is not save as the souce-code variety.
If you are optimised compiling then I don't think compiling it into the source is safe unless you are also using an obfuscator that can obfuscate literal strings and numbers as well as code. It is relatively easy to run an exe through ILDASM to get IL code or Reflector to get C# code (I've done both!), modify the strings and then reassemble or recompile to get a new app. With the source available you may as well just hack out the IMEI checking anyway so it would run anywhere.

I would think that having a small file containing the IMEI encrypted is just as secure (or insecure) as what you are now doing. In one case the IMEI itself is compiled into the source, in the other it is the encryption key compiled into the source.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #3 (permalink)  
Old 01-10-2010, 12:55 PM
schimanski's Avatar
Senior Member
 
Join Date: Oct 2007
Location: Germany
Posts: 146
Default

Thanks for the infos! I doesn't know, how easy it is to hack the strings in a compiled code. I think, I set the IMEIs in a separat database, which is 128bit-encrypt....It's easier to handle..
__________________
schimanski
--------------------------------------
Device: Qtek S200, Eten Glofiish X600
Desktop: Asus Eee PC
Reply With Quote
  #4 (permalink)  
Old 01-10-2010, 01:55 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 3,358
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

You still have the problem of securing the encryption key if you want to decrypt in your code. If you don't need to re-encrypt in your application and only decrypt once when you start the application then asymmetric encryption using CryptoEX library can be secure.

You could make up a string including the IMEI number and sign it with a private key then verify the signing in your application with the public key. With only you knowing the private key the string can be in clear text because if anyone tries to alter the IMEI number the signing check will fail. However someone with the technical capability could still reverse engineer your application and change your checking logic to always succeed.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #5 (permalink)  
Old 01-11-2010, 05:38 PM
schimanski's Avatar
Senior Member
 
Join Date: Oct 2007
Location: Germany
Posts: 146
Default

Thanks, agraham!

I dont' know, what happens with the code after compiling, but is it not possible to set the encryption key as buffer of bytes in my code?

And in this context, what about the comments? I hope, they will disappear after compiling.

Thanks.....and greetings from germany

schimanski
__________________
schimanski
--------------------------------------
Device: Qtek S200, Eten Glofiish X600
Desktop: Asus Eee PC
Reply With Quote
  #6 (permalink)  
Old 01-11-2010, 06:03 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 3,358
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Compiled .NET programs can be decompiled, just as any computer program can but it's a bit easier in .NET than in X86 Assembler. For example the next version of my Debug library will be able to debug programs in the IDE as well as optimised compiled. This is primarily for use on the device where there is no real debugger available. Erel will add the necessary "hooks" into the next version of Basic4ppc but for testing I decompiled the device version of Basic4ppc with a Reflector plug-in, added the necessary hooks and recompiled it so I now have complete source code for a customised version of Basic4ppc for the device that I have used to develop the IDE capable version of my Debug library . Erel does of course know this and has had a copy of it.

Taking your optimised compiled program apart would be similarly easy to see what you have done with the key . There are programs called "obfuscators" that attempt to scramble the code after compiling by making names meaningless and doing other tricks to change the code, but the fact remains that if a processor CPU has to execute the code it can always, perhaps with a lot of effort, be dismantled to see what it does.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Device IDE lacks Run protection agraham Bug Reports 0 08-29-2009 10:22 AM
How to get imei number ? gjoisa Questions & Help Needed 9 06-26-2008 06:59 AM
IMEI Protection Raytracer Additional Libraries 21 06-02-2008 02:21 PM
Imei Elrick Questions & Help Needed 3 02-16-2008 06:48 PM
Code protection in compiled EXE WZSun Basic4ppc Wishlist 3 05-10-2007 01:59 PM


All times are GMT. The time now is 09:48 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0