Recent

Author Topic: How to protect my App in Trial Mode 1days 3days 1 week?No Onguard  (Read 1387 times)

lestroso

  • Full Member
  • ***
  • Posts: 107
    • FaSasoftware
How to protect my App in Trial Mode 1days 3days 1 week?No Onguard...

Hi, it's there a free or open source solution to protect my app made with Lazarus, with trial mode easy and fast? i need a little code to add to my app...
I don't want use Onguard, because it's old and not cross platform...i need a simple solution for Macintosh Macosx and windows10 at least....

I thank you a lot in advance. Best Regards,
Lestroso :) :) :)

eljo

  • Sr. Member
  • ****
  • Posts: 358
Re: How to protect my App in Trial Mode 1days 3days 1 week?No Onguard
« Reply #1 on: May 20, 2020, 03:07:59 pm »
there is an open source component suit named onguard byt turbo power that was ported to lazarus and fpc. It has that build in.

rvk

  • Hero Member
  • *****
  • Posts: 4033
Re: How to protect my App in Trial Mode 1days 3days 1 week?No Onguard
« Reply #2 on: May 20, 2020, 03:09:55 pm »
there is an open source component suit named onguard byt turbo power that was ported to lazarus and fpc. It has that build in.
Didn't you read the question??

I don't want use Onguard, because it's old and not cross platform...i need a simple solution for Macintosh Macosx and windows10 at least....

AL

  • Full Member
  • ***
  • Posts: 149
Re: How to protect my App in Trial Mode 1days 3days 1 week?No Onguard
« Reply #3 on: May 20, 2020, 03:26:16 pm »
OnGuard is cross platform.  I have use it on Windows and MacOS.
A little complicated to get going,  you need to read the Doc twice.
Laz 2.1.0, fpc 3.3.1, Win10
Laz 2.1.0, fpc3.3.1, Mac OS Mojave running on VMWare

Warfley

  • Full Member
  • ***
  • Posts: 124
Re: How to protect my App in Trial Mode 1days 3days 1 week?No Onguard
« Reply #4 on: May 20, 2020, 03:30:59 pm »
There is no reliable way to enforce this. Every mechanism, even the most sophisticated one, can be cracked within a few hours if someone really wants to.

So if there is no reliable way to do so, just do it the simple way, create a file somewhere during installation, and write the current date in there. On startup check the current date against the date written in there. You can also timestamp this file every opening so you can check if the pc clock was changed (i.e. if the current date is earlier than the last timestamp).

Sure this is really easy to circumvent, but every approach is to some degree (and it only needs one person to crack a program and share his crack online and everyone has it). This is at least easy to implement and maintain.

lestroso

  • Full Member
  • ***
  • Posts: 107
    • FaSasoftware
Re: How to protect my App in Trial Mode 1days 3days 1 week?No Onguard
« Reply #5 on: May 20, 2020, 03:56:08 pm »
I thank you a lot for the answers..... thank Warfley for that idea...but if you can ...i need a little code for example...to build it...
I know that my software can be hacked...but not for normal people..who use the computer as a User..Bye Lestroso

AL

  • Full Member
  • ***
  • Posts: 149
Re: How to protect my App in Trial Mode 1days 3days 1 week?No Onguard
« Reply #6 on: May 21, 2020, 12:04:23 am »
So if there is no reliable way to do so, just do it the simple way, create a file somewhere during installation, and write the current date in there. On startup check the current date against the date written in there. You can also timestamp this file every opening so you can check if the pc clock was changed (i.e. if the current date is earlier than the last timestamp).
This is exactly what OnGuard is doing except that the date is encrypted, so difficult to change.
Laz 2.1.0, fpc 3.3.1, Win10
Laz 2.1.0, fpc3.3.1, Mac OS Mojave running on VMWare

PaulRowntree

  • Full Member
  • ***
  • Posts: 127
    • Paul Rowntree
Re: How to protect my App in Trial Mode 1days 3days 1 week?No Onguard
« Reply #7 on: May 21, 2020, 05:53:52 am »
I have buried a code in the Registry under a non-obvious key.  Most people do not have a clue what information lurks in the registry.  Encrypt it with a hash code for another layer.  Unless found, it will also persist between re-installations of the codes.
Paul Rowntree
- coding for instrument control, data acquisition & analysis, CNC systems

rvk

  • Hero Member
  • *****
  • Posts: 4033
Re: How to protect my App in Trial Mode 1days 3days 1 week?No Onguard
« Reply #8 on: May 21, 2020, 07:27:26 am »
I have buried a code in the Registry under a non-obvious key.
Which in turn makes it NON cross-platform as requested 😉

But it's a good option for Windows-only.

Thaddy

  • Hero Member
  • *****
  • Posts: 10124
Re: How to protect my App in Trial Mode 1days 3days 1 week?No Onguard
« Reply #9 on: May 21, 2020, 09:24:07 am »
Security by obscurity is the worse you can do. It does not exist.
Read and shiver: https://en.wikipedia.org/wiki/Security_through_obscurity
« Last Edit: May 21, 2020, 09:25:52 am by Thaddy »
I am more like donkey than shrek

cpalx

  • Hero Member
  • *****
  • Posts: 634
Re: How to protect my App in Trial Mode 1days 3days 1 week?No Onguard
« Reply #10 on: May 23, 2020, 03:50:54 pm »
1. Take the hard disk serial number
2. Send to your server, and save the serial number and date
3. Every time that opens the program, call to your server and check the time you need.

i think its best secure.

Warfley

  • Full Member
  • ***
  • Posts: 124
Re: How to protect my App in Trial Mode 1days 3days 1 week?No Onguard
« Reply #11 on: May 23, 2020, 05:31:00 pm »
1. Take the hard disk serial number
2. Send to your server, and save the serial number and date
3. Every time that opens the program, call to your server and check the time you need.

i think its best secure.
nah, since any serial number of any hardware component can be spoofed easily this is not more secure than having a file somewhere with your installation date. It's just much more development effort without any gain (as you now need to implement and maintain server and client functionality).

Sure, as soon as someone finds the file you lost, but it's the same with any mechanism, as soon as you find out how it works, you can spoof it (it's simply how computers work, on your own device you are the king and can do anything with it). And it will still be enough of a hurdle for most average users, and those who really want to crack your program will break it no matter what. If you need to search a file, or spoof a serial number, both is about as much effort.

The only reliably secure option is to outsource some core functionality to a server, which your application contacts for doing it's job. Without a valid verification there is no way your program could work, no matter what you do locally.
That said, this a massive engineering overhead and besides requiring a lot of work, only is feasable if a stable network connection is ensured.

Anything other as that is simply not secure. Because even if you make the spoofing as hard as possible, use as many layers of obscurity as possible (like encryption, etc.) the last resort, patching out the check in the executable, will always be feasable.
If you can't implement a secure mechanism, at least build something simple, so you don't waste any development time on it.

rvk

  • Hero Member
  • *****
  • Posts: 4033
Re: How to protect my App in Trial Mode 1days 3days 1 week?No Onguard
« Reply #12 on: May 23, 2020, 05:49:28 pm »
Cloning a harddrive serial number is harder then finding and removing a local file.
Changing/patching executable code is harder then cloning a harddrive serial.
Etc. Etc.
It's all about levels.

The question wasn't about security but about fast and simple. A normal computer user can't do the things mentioned above and if your program is obscure and cheap enough, hacking it won't be worth the trouble. But without any 'security' people might be tempted (and will) to copy it. You can see that as a good thing (more widespread publicity) but if your program just caters to a small niche market that might not be such a good thing.

Just saying "don't secure it at all" might not always be a good idea if you can add a few lines to stop the majority of unskilled computer users from copying.

Just my opinion.

Warfley

  • Full Member
  • ***
  • Posts: 124
Re: How to protect my App in Trial Mode 1days 3days 1 week?No Onguard
« Reply #13 on: May 23, 2020, 05:54:42 pm »
Cloning a harddrive serial number is harder then finding and removing a local file.
But it's about a trail version, i.e. you don't need to clone a specific serial number, you just need a different one (so your pc is recognized as a new testing candidate).

And you are forgetting one basic thing about this all, the internet. Once anyone has cracked your program, everyone has. So even if you have a highly obfuscated mechanism that takes weeks to crack, once one team has cracked it, everyone has access to it.

Honestly, there is absolutely no point in putting in any effort to copy-secure your program. If it's a niche program only very few people use, you will have a solid customer base who are willing to spend money, if it's a wide spread program, cracks will be posted all over the internet (simply look at video games, they are usually cracked within weeks after their release and these cracks are reposted over thousands of websites).
In any case, every manhour wasted on building some sophisticated mechanism is simply wasted time.
« Last Edit: May 23, 2020, 06:01:05 pm by Warfley »

rvk

  • Hero Member
  • *****
  • Posts: 4033
Re: How to protect my App in Trial Mode 1days 3days 1 week?No Onguard
« Reply #14 on: May 23, 2020, 06:28:11 pm »
I can guarantee it does (or can) pay off. I have a copy protection on my program (in a niche market). It's not (yet) hacked (but of course could be). It has prevented users from copying it for their own use (multiple users and/or multiple administrations). So for me, it was definitely worth it.

Even if you have a small market, there are people trying to copy it. Even if you have a solid customer base. And when a customer doesn't want to continue (or says so) with your program, there needs to be something to stop them from using it. Okay, that goes beyond a trail version, but for me it was necessary and has generated extra income for me. My program works on a year-license and without it, I would have at least some percentage of users who wouldn't pay.

 

TinyPortal © 2005-2018