?
Solved

Need help for protecting my application of cracking

Posted on 2003-02-21
19
Medium Priority
?
278 Views
Last Modified: 2010-04-04
hi experts:
I read some articles about protecting your application against cracking at this question
 http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20517202.html
In  
 http://www.scalabium.com/articles/protection.pdf

describe that :
<if you trial software must be available in 30 days only , then don’t try to use a system  date-time.
Better to use a date-time of some system files (system.dat or DAO , BOOTLOG.txt, autoexec.bat etc).
Also don’t forget that additionally you can create the some own hidden file during installation and use a date-time of this file.>

But my question :
Which one (system.dat ,DAO, bootlog.txt , autoexec.bat  ) has a better feature for uncracking?
How can work with these issues(system.dat,DAO,bootlog.txt,autoexec.bat)?



Thanks a lot.
Hamid reza
0
Comment
Question by:123456
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
19 Comments
 
LVL 2

Expert Comment

by:DeNavigator
ID: 7992539
Why don't you go here: http://sourceforge.net/projects/tponguard

and download these tools! These are the TurboPower-tools which have come into OpenSource! :)
I think it is easier to use this then to invent the wheel again!
0
 
LVL 2

Author Comment

by:123456
ID: 7992556
i want to familliar with this issue .
0
 
LVL 1

Expert Comment

by:Wax0r
ID: 7993317
What that 'tutorial' meant to say was that when you are using a trial protection in your software such as only let the user use it for 30 days you are obviously going to have to match the date with something to see if it has been 30 days.

What you -dont- want to do is match the date with the current system time as that's the easiest and most common trick to by-pass trial protection, all a user has to do is change the time/date of his windows installation and he's sorted.

Instead what it suggests you do is get the date/time of a few system files like those mentioned which are most likely to have the actual date/time since they aren't likely to be tampered with.

Another site I suggest is:
http://www.inner-smile.com/nocrack.phtml

Goodluck
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:Wax0r
ID: 7993329
As an addition which I forgot to say was that all of those files -can- be tampered with and none of them have any 'uncracking features' or what have you.

A good idea might be to check the date/time of all of them and compare them to check if there's any major differences to see if someone is in fact trying to fool you.
0
 
LVL 2

Author Comment

by:123456
ID: 7993689
How can work with these issues(system.dat,DAO,bootlog.txt,autoexec.bat)?



0
 
LVL 1

Expert Comment

by:Wax0r
ID: 7994590
You will have to explain better what you are wanting information about.

Do you want to know how to get the time/date from those files?

Do you want to know how to check if it's been 30 days since the user installed your program?

Etc.
0
 
LVL 2

Author Comment

by:123456
ID: 7997607
yes,that s what i need it.
1-how to get the time/date from those files?
2-how to check if it's been 30 days since the user installed your program?

and everything should know about this issue.


thanks a lot.
hamid reza



0
 
LVL 2

Author Comment

by:123456
ID: 7997609
yes,that s what i need it.
1-how to get the time/date from those files?
2-how to check if it's been 30 days since the user installed your program?

and everything should know about this issue.


thanks a lot.
hamid reza



0
 
LVL 1

Expert Comment

by:Wax0r
ID: 7998684
To get the files time/date you can do this:

Var
  Res : integer;
  Dat : TDateTime;
begin
  Res := FileAge('c:\whateverfile');
  Dat := FileDateToDateTime(Res);
  ShowMessage(DateToStr(Dat));
end;

//^^
Don't forget that file locations are not the same on NT/2k (\WINNT\) as they are on 98/ME/XP (\Windows\) but a simple check which OS ver is running will help you out. (Or just use GetSystemDir api if there's any files in the %win%\system32 dir that you need).

How to check if it's been 30 days, simply store the date of the first time you're running your program somewhere and match it with the files dates everytime your program is being ran.
0
 
LVL 20

Expert Comment

by:Mark Brady
ID: 8000395
Hi

I used a slightly different method in one of my trial programs.  It adds a key to the registry on installation, then increments a number in the key each time the app is run.  After 30 uses, the program won't run anymore and the main exe file is deleted.  The key remains in the registry and don't use the name of your program for the key.  Use something else or your name spelt backwards or something.

I know this is not exactly what you are asking but it is another way of limiting your program until they buy the full version.
Hope this helps

Mark
0
 
LVL 2

Author Comment

by:123456
ID: 8007130

hi mark,
in my idea if you create a file in a windows/system or somewhere else(these files more than one file and name id differ with previous names)  is better.
because everyone can go to regedit and delete it .( I do this work  for a acehtml5 pro ).
But I want to know , do anyone know a coding that  inform of copying files to own computer when installing application?

0
 
LVL 1

Expert Comment

by:Wax0r
ID: 8008014
Slightly annoyed now.

You need to make up your mind and then formulate a question that you want answering, and if it gets answered, reward points for it.

You had nothing about file copying etc. in your original question.

75 Points is not worth it to continually help you with whatever you seem to encounter or like some information about.

If you want information on god knows what, post a new question on it.
0
 
LVL 2

Author Comment

by:123456
ID: 8008141
this is my question ,
i shared my questions with others, you dont say this to me.
0
 
LVL 1

Expert Comment

by:Wax0r
ID: 8010812
I don't say this you?
Scroll up a bit and read again.. looks like I just did.

Also, rephrase your last question about 'coding that inform of copying files to own computer when installing application' to something that ressembles english so that I can help you.

Do you want to.. monitor a hard drive to see if there's files being copied?

Do you want to make an installation program of your own that let's people download something and it copies your application's file to their HD?

Etc.

0
 
LVL 2

Author Comment

by:123456
ID: 8012104
hi,
sorry,I don’t say my purpose correctly.
crackers can  make a monitor that inform of copying files to HD, you say in one comment:
<< simply store the date of the first time you're running your program somewhere and match it with the files dates everytime your program is being ran.>>
when you run the file at first time , files was copied  was highlighted (with this monitor).
I want to desable this monitor.
For it I want to know any coding does exist that inform of copying files to HD?

Thanks a lot.
Hamid reza.
0
 
LVL 1

Accepted Solution

by:
Wax0r earned 400 total points
ID: 8015232
Hi Hamid,

Ah I understand it now;

In short; You can't disable such monitors because you don't know what they are etc. You'd have to take a wild guess at a progress and attempt to kill it and such.

What I suggest as a work around is storing the date of first time run in your own application, probably somewhere at the end of your executable. (Encrypted obviously or they might find it anyways).

A way of doing this is when you're installer has finished installing the files to write the current date at the end of the install executable. If you do not write the installer yourself you can still do it but it'd be a bit more of a hassle;

Write a small executable that does this (Adding date to end of program, encrypted) and include it into your main executable as a resource. Then first time it's being ran extract the resource (executable) and run it. It will then add the date to the executable and execute the main exe again and kill itself.

Here is code that you can use to read and write the date at the end of the executable. (Mind you you need the seperate executable to write it to the exe as obviously the EXE cannot append it to itself while it's running):

------
//structured record for end of file storage of info
type  TProtRec = packed record    
     Tag     : array[0..2] of Char;
     firstRunDate: array[0..29] of Char;
end;
------

procedure ReadDate;
var
 Rec : TProtRec;
 fProt: TFileStream;
 begin
  fProt:=TFileStream.Create('C:\blah.exe', fmOpenRead);  
try
    fProt.position:=fProt.size-33;    
    fProt.Read(Rec,SizeOf(Rec));  
finally
    fProt.free;
    end;
 if Rec.Tag <> 'BLA' then begin
end else begin
showmessage(IntToStr(Rec.firstRunDate));
end;
end;

-------------

procedure saveDate;
var
  fProt: file of Byte;
  Rec : TProtRec;
try
    AssignFile(fProt, 'C:\blah.exe');  
  Reset(fProt);  
  try
      Seek(fProt, FileSize(fProt));
      Rec.Tag := 'BLA';
      Rec.firstRunDate := '12/03/2003';
      BlockWrite(fProt, Rec, SizeOf(Rec));
   finally  
 finally
    CloseFile(fProt);  
end;
end;

---------------------
No delphi compiler where I'm working at the moment but I hope you get the idea.

Encryption routines can be found allover the web, have a look for 'delphi text encryption' on google or some sort for that.

If you need additional information about any of this, or a sample project I will mock one up when I come home tonight (8 hours from now)..

Kind regards,
 W.
0
 
LVL 1

Expert Comment

by:Wax0r
ID: 8015245
PS: Obviously the array of char for date doesn't have to be 30 chars. Just have a look at what kind of format you'll be storing your date in and make it the amount of chars that takes.

The tag can be longer/shorter as well ofcourse and you might want to make it weird chars so it somewhat blends in with the application rather than some indication of a seperator.
0
 
LVL 1

Expert Comment

by:Wax0r
ID: 8015254
Ugh 3rd post, I should check my posts more closely;

"In short; You can't disable such monitors because you don't know what they are etc. You'd have to take a wild guess at a progress and attempt to kill it and such."

What I meant to say was that although you might know that specific file monitor, there are multiple ones out there, and that's excluding the ones that people (Crackers) coded themselves and aren't available to the public. Hence, you don't have any information on those programs, let alone their executable names, window titles or any other sort of information on them.
0
 
LVL 2

Author Comment

by:123456
ID: 8036533
thanks for your assisting,
if you have any other idea, append to this question.
 
best regards
hamid reza
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question