Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Preventing theft

This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
Preventing theft
blargmob
Member #8,356
February 2007
avatar

Howdy,

Just a quick question. What are some methods of preventing product software theft? Things such as registration/product keys/etc..

Here's the scenario:
- A user buys a product from a website through PayPal.
- A .zip file is downloaded to the users computer after buying it.
- ??? (prevent user from copying and pasting .zip file to other computers)

How would one go about with step 3? Something...simple. That handles itself.

Thanks for any help.

---
"No amount of prayer would have produced the computers you use to spread your nonsense." Arthur Kalliokoski

bamccaig
Member #7,536
July 2006
avatar

Before you dive into proprietary software, restrictive license agreements, and DRM I think you should take a look at the open source philosophy. :)

SiegeLord
Member #7,827
October 2006
avatar

Quote:

Before you dive into proprietary software, restrictive license agreements, and DRM I think you should take a look at the open source philosophy. :)

I second that suggestion. The only reason I buy games now is for their pretty boxes/CD's/manuals/author signed special content - the tangible things for which step 3 is impossible.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

ImLeftFooted
Member #3,935
October 2003
avatar

Whats there to take a look at? "Open Source" just about sums it up.

Here is a strategy I've been thinking about for a while.

Have the user download a downloader + installer. The installer gets the CPU id, turns it into a checksum (use some salt for added security), and sends it to the server as part of the download request. Have the server place this checksum into the program at a convenient location (like say the very end of your main executable)*.

When your program starts up read the CPU id and turn it into a checksum (with the same salt used the first time) and compare it against the checksum in your main executable.

Here is some code to read the last 4 bytes.

#include <iostream>

int main(int argc, char *argv[])
{
    std::ifstream exe(argv[0]);

    exe.seekg(4, std::ios::end);

    uint32_t storedChecksum = 0;

    for(int i = 0; i < 4; i++)
        storedChecksum &= exe.get() << i;
}

Edited.

Here is some code to get the cpu id from allegro.

#include <sstream>

...

check_cpu();

std::ostringstream cpuID;

cpuID << cpu_vendor;
cpuID << cpu_family;
cpuID << cpu_model;
cpuID << cpu_capabilities;

cpuID.str() <- Turn this into a checksum

* Be careful to write the checksum in an endian-safe manner if you still care about that

BAF
Member #2,981
December 2002
avatar

You can't do it. If your program is popular enough, it will be cracked.

ImLeftFooted
Member #3,935
October 2003
avatar

The idea I'm after isn't to make it perfect. Mostly its so Jane at home who finally learned to send emails doesn't become my favorite redistributor.

This gets the job done cleanly, efficiently and without disrupting the customer's experience (ie. a CD key is highly annoying)

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

What are some methods of preventing product software theft?

Create something that nobody wants. Shouldn't be that hard.

bamccaig
Member #7,536
July 2006
avatar

blargmob
Member #8,356
February 2007
avatar

Quote:

Create something that nobody wants. Shouldn't be that hard.

Everything I make is like that. ;D

---
"No amount of prayer would have produced the computers you use to spread your nonsense." Arthur Kalliokoski

SiegeLord
Member #7,827
October 2006
avatar

To expand on DDustin's idea, the key generation part could be randomized for every executable/installer pair via some preprocessor magic or otherwise. This will make a generalized crack much harder to create, since, if done correctly, this will require each executable to be cracked separately.

That would only work for a closed source program though... I am not too sure if it is possible to copy-prevent an OSS program. Personally, if I absolutely had to get money from my software, I'd keep it closed source for the first year or two, and then release it for free under GPL, like Id. (yay Id, my favourite company).

EDIT: A note however. If the user changes his CPU, DDustin's method will fail rather miserably, so it needs to be supplemented by something else, perhaps an installation key that identifies each purchase. It could be a 1000 digit code (sent via email) so that you would be unlikely to guess it, but at the same time it would serve as a good fall-back identifier.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Thomas Fjellstrom
Member #476
June 2000
avatar

Heres my thoughts,

Create something someone wants, for a price they are willing to pay, and the people you want to buy it, will buy it.

People will still pirate it, but they aren't the people you are selling to, so fsck em.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Kibiz0r
Member #6,203
September 2005
avatar

What Thomas said.

Paul whoknows
Member #5,081
September 2004
avatar

Hardware dongles are effective if used wisely. Even when cracked, the software usually won't work perfectly.

____

"The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner.

Onewing
Member #6,152
August 2005
avatar

Wow, a lot of people not actually answering the question.

Of course, completely preventing theft is unfortunately impossible, not attempting at all isn't really a good alternative. I say add what security you can, but don't waste too much time on the subject. The people who are good enough to hack it and/or take a hacked copy aren't really a part of the target audience. And, if people are willing to hack it and/or take a hacked copy, it means your product is worth their time. Then you have word-of-mouth advertising.

That being said, I'm no where qualified to offer any secure measures to helping prevent theft.

------------
Solo-Games.org | My Tech Blog: The Digital Helm

Timorg
Member #2,028
March 2002

Implement as much as the software on a server as possible, then make people own an account to use the software.

Along those lines have things like

+Online score table
+level editor that automatically uploads your levels onto your online account
+chat
+simultaneous gameplay, it doesn't need to be multiplayer, just allow people to see
their friends current score, or see ghosts of other players*
+forum where registered people get marked and have a quick turn around on questions and help and the like.
+keep the game updated with level packs

This is all aimed at casual games though. The people are buying a service more than just a game.

*this makes me think of super mario brothers, imagine seeing other ghost marios in the background of all the people in your friends list

____________________________________________________________________________________________
"c is much better than c++ if you don't need OOP simply because it's smaller and requires less load time." - alethiophile
OMG my sides are hurting from laughing so hard... :D

Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

not attempting at all isn't really a good alternative.

And all of the current alternatives only make it harder or more inconvenient for paying customers. None of them challenge the pirates, its largely a waste of time and effort for most software.

But Timorg does have a point, probably one of the most secure ways is to implement the important stuff server side, so to play say the multiplayer part, you need a valid account.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

jhuuskon
Member #302
April 2000
avatar

Quote:

Hardware dongles are effective if used wisely. Even when cracked, the software usually won't work perfectly.

They are effective in making the lives of legitimate customers' life difficult, and unfortunately the cracked versions (for example the H2O syncrosoft emulation driver that is packaged with pirated versions of Cubase) function so much better (stability and performance) than the hardware that even legitimate clients opt for the cracked product (or in this case, circumventing the dongle).

The most effective piracy countermeasure is matching the product's quality and price so that the legitimate customers won't feel tempted to opt for shady means of acquisition.

You don't deserve my sig.

Godai2k
Member #10,073
August 2008
avatar

I just make the registration key from the users name + valid email.
That way they can spread the software, but they'll know that I can extract the email from the key of a pirated program. No point in making it hard for people to use.
If you really want to, use something like MoleBox with a hardware key generated from the users machine. But the user will have problems installing on a different machine.

At the end of the day, every scheme can be easily cracked with a good debugger. Even encrypted executables, needs to be unpacked in memory before being fed to the CPU and that way both the encryption scheme as well as the hardware key check can be found and worked around.

Alternative ideas from the past: Include huge book which you must look up for important game text (mostly for RPGs), include great physical content (maps, books etc) or as mentioned make a large part of the game online.

ixilom
Member #7,167
April 2006
avatar

Rewrite a Windows/Linux/OSX compatible OS that doesn't allow moving/copying zip archives.
Even then, it's not impossible, just tougher ;)

___________________________________________
Democracy in Sweden? Not since 2008-Jun-18.
<someone> The lesbians next door bought me a rolex for my birthday.
<someone> I think they misunderstood when I said I wanna watch...

Thomas Harte
Member #33
April 2000
avatar

I'm not sure that modifying an executable file is a particularly sound way forwards. I'll wager that at least one of the realtime anti-virus programs will have something to say about it. And you need to do it before the executable reaches its destination, since a significant-enough-to-be-worth-mentioning number of people store those in read-only places and having a .exe modified while it is running is likely to trip even more antivirus programs.

I'd say that if you want basic copy protection then some sort of license key that incorporates some machine information and is stored in a proper preferences file (i.e. one stored wherever your OS says they should go, not DOS-style with the .exe - which doesn't even work on Vista) is probably all you can do. It'll mean that program files and license keys can't be redistributed. Someone will be able to crack it, but someone will be able to crack anything you do and this way isn't liable to trip antivirus software or do any of the really stupid Sony BMG-type things that have pretty much killed attempts at DRM on music CDs.

Bob Keane
Member #7,342
June 2006

Quote:

Create something that nobody wants. Shouldn't be that hard.

When is the next version of IE coming out?

By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul.
"Love thy neighbor as much as you love yourself means be nice to the people next door. Everyone else can go to hell. Missy Cooper.
The advantage to learning something on your own is that there is no one there to tell you something can't be done.

gnolam
Member #2,030
March 2002
avatar

Quote:

Just a quick question. What are some methods of preventing product software theft?

A decent door, secured windows, a burglar alarm and possibly a safe. Copyright infringement != theft. :P

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

Neil Walker
Member #210
April 2000
avatar

lenslok is the future (http://en.wikipedia.org/wiki/Lenslok).

Neil.
MAME Cabinet Blog / AXL LIBRARY (a games framework) / AXL Documentation and Tutorial

wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie

Paul whoknows
Member #5,081
September 2004
avatar

Quote:

...unfortunately the cracked versions (for example the H2O syncrosoft emulation driver that is packaged with pirated versions of Cubase) function so much better (stability and performance) than the hardware that even legitimate clients opt for the cracked product (or in this case, circumventing the dongle).

I know well that A friend of mine told me that H20's cracks are far from being perfect, the cracked software usually doesn't work at 100% and you have to re-install it and re-crack it after every use.

In my opinion, hardware dongles are invasive but because of this they are perhaps the most effective anti-copy system.

____

"The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner.

SiegeLord
Member #7,827
October 2006
avatar

Hah, our you could release a demo of your game, and then post a monetary bounty to be fullfilled via donations before you release the full game/episode. (Wonder if that would actually work.)

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

 1   2   3 


Go to: