You ship version 1.0 of a desktop tool on a Monday. By Friday a forum thread links to a "cracked" build, a Discord server is passing around one key, and two customers have asked for refunds after downloading the full installer. None of this means your product failed. It means it became worth copying, which is the point at which every paid application needs a plan for software piracy.
This guide is written for indie developers and small teams. It explains how software actually gets pirated, which defences address which attack, what to avoid because it hurts paying customers more than pirates, and a prioritised checklist you can work through in order. It links to our deeper guides for each technique instead of repeating them.
How to prevent software piracy: the short answer
You prevent most software piracy by moving the decisions and the valuable parts of your product out of reach. In practice that means four things: check licenses on a server rather than in the client, bind each license to a device so a shared key stops working, deliver important data and code only after a successful check, and harden and monitor the client so tampering is slow and leaks can be traced back to a license.
Everything else, obfuscation, anti-debug, process blacklists, AI detection, adds cost for the attacker on top of those foundations. None of it replaces them. A heavily obfuscated application that runs fully offline after one local if (licensed) check is still one patched jump away from being free.
How software actually gets pirated
Before choosing defences, it helps to know what you are defending against. For small commercial tools, the same six patterns account for nearly all lost sales, and they differ a lot in how much skill they need.
| Method | What happens | Skill needed | Main defence |
|---|---|---|---|
| Key sharing | One paid key is posted in a chat or sold on | None | Server-side checks and HWID binding |
| Patched license check | The jump after the check is flipped so the app always runs | Low to medium | Value delivered from the server, integrity checks |
| Cracked builds | A patched or unpacked copy is redistributed ready to run | Medium | Server-side data, anti-tamper, leak tracing |
| Leaked builds | A customer or tester shares their own installer or files | None | Per-license tracing, device limits, key bans |
| Keygens | Someone reverses your key algorithm and generates new keys | Medium | Keys validated on the server, not by formula |
| Refund and chargeback abuse | Buy, extract the files, then reverse the payment | None | Revocable licenses, fraud checks at checkout |
Two things stand out. First, the cheapest attacks need no reverse-engineering skill at all; they exploit licensing that trusts the client or never checks the device. Second, keygens only exist when validity can be computed offline. If the server is the only thing that knows which keys are real, there is no algorithm to reverse.
- 01
One purchase
Or a leaked key
- 02
Find the check
Strings, debugger
- 03
Patch or dump
Skip the check
- 04
Repackage
Ready-to-run build
- 05
Distribute
Forums, Discord
A layered defence against piracy
No single control covers all six patterns, so protection works in layers. Each layer below targets specific attacks, and each one makes the next attacker's job harder. Our software protection stack guide goes deeper into how the runtime layers fit together for C++ and C# products; this section focuses on which piracy problem each layer solves.
1. Server-side licensing
The license decision belongs on a server you control. The client sends a key, the server decides, and the response is encrypted and signed so it cannot be forged or replayed. This alone ends keygens, because validity is a database lookup rather than a formula, and it lets you ban a leaked key everywhere at once. If you are writing this yourself, the C++ licensing guide and the C# guide cover the details.
2. HWID binding
A server check still lets thirty people use one key unless the key is tied to a device. HWID locking binds each license to the hardware fingerprint of the machine that first activates it, and refuses other machines. Paired with self-service resets and a cooldown, it stops casual key sharing without bothering honest buyers.
3. Value delivered from the server
This is the layer that changes the economics most. If configuration, strings, offsets, model files or whole modules are delivered only after a successful license check, a patched client starts up with nothing useful inside it. The attacker now has to emulate your server or capture the data from a licensed session, which is much more work than flipping a jump. Client-side protection vs server-side secrets explains what to move first, and in-memory loading covers keeping protected DLLs off disk entirely.
4. Anti-tamper and anti-debug
Integrity checks notice when your binary has been modified. Anti-debug and anti-VM checks notice when someone is stepping through it in an analysis environment. Neither is unbeatable, but both raise the time it takes to produce a working crack, and the useful ones report back to the server so a tampered session can be refused and its license banned. Run checks at several points during execution, not only at start-up.
5. Obfuscation
Obfuscation makes code harder to read. It matters most for managed languages such as C#, where a decompiler can otherwise produce something close to your original source in seconds. For native C++ it mostly slows down the search for the check. Use a reputable obfuscator for .NET builds, avoid shipping debug symbols, and never treat obfuscation as a substitute for keeping secrets off the client. Hard-coded API keys and passwords are found eventually, however well they are hidden.
6. Runtime tool detection
Process and window blacklists stop the well-known debuggers and memory editors. They miss anything renamed or written in-house, which is why behaviour-based and AI detection exists. The trade-offs are covered in anti-reverse-engineering beyond static blacklists.
7. Leak tracing and monitoring
Some copies will escape. When they do, you want to know which license they came from, so you can ban one key instead of guessing. Per-license build tracking, logged HWID mismatches and unusual activation patterns turn piracy from an invisible loss into a list of specific keys. The leaked builds guide has a step-by-step response plan.
Key sharing
HWID binding, key bans
Keygens
Server-side validation
Patched checks
Server-delivered value
Cracked builds
Anti-tamper, detection
Leaked builds
Tracing and monitoring
Refund abuse
Revocable licenses
Reduce the incentive, not only the opportunity
Technical controls deal with people who will pirate whatever you do. A larger group pirates because buying is awkward: the price is set for one market, the payment method they use is not accepted, the trial is too short to judge the product, or a hardware change locked them out last time. Fixing these costs little and converts some would-be pirates into customers.
- Offer an honest trial. People who can evaluate the real product have less reason to look for a crack. Free trial licenses for desktop software covers how to run one safely.
- Price for the markets you sell into. Regional pricing, a cheaper tier or a subscription can make the legal option affordable where a single global price is not.
- Accept the ways people pay. Card, crypto, bank transfer and gift cards each reach buyers that the others miss.
- Deliver instantly. A key that arrives in seconds after payment beats a link on a forum that arrives in minutes.
- Make resets painless. A customer locked out after a motherboard swap, with no quick reset, is a customer who goes looking for a cracked copy.
- Ship updates people want. A crack freezes a user on one version. Regular, server-backed updates make the old crack steadily less attractive.
What not to do: hostile DRM
Some anti-piracy measures cost more in reputation and support than they save in sales. The test is simple: if a measure hurts the person who paid more than the person who cracked it, drop it.
Hostile DRM
- Kernel drivers for a simple tool
- Bricks the app on a false positive
- No way to reset hardware
- Silently corrupts user data
- Collects more than it needs
Proportionate protection
- Server checks the user never sees
- Logs and reviews before banning
- Self-service resets with a cooldown
- Refuses a session, never damages files
- Hashes hardware IDs on the device
- Don't punish on a single signal. A debugger flag or a VM can have an innocent explanation. Log it, refuse the session if needed, and ban on repeated or high-confidence evidence.
- Don't damage anything. Deleting files, corrupting saves or degrading results on suspected piracy creates legal risk and hurts the occasional legitimate user caught by a false positive.
- Don't require more access than the product needs. Customers notice, and security researchers write about it.
- Don't accuse publicly. If a leak traces back to a customer, talk to them privately first. Their account may have been compromised.
A prioritised anti-piracy checklist
If you can only do a few things, do them in this order. The first three remove most of the losses for a typical indie product; the rest raise the bar further once the basics are in place.
- 01
Move the license check to a server
Validate keys remotely over an encrypted, signed channel. Remove any offline key formula that could be reversed into a keygen.
- 02
Bind licenses to devices
Add HWID binding with self-service resets and a per-key cooldown, so shared keys stop working without creating support tickets.
- 03
Serve your most valuable data after the check
Pick the top three values or files the app cannot run without and deliver them from the server only to authenticated sessions.
- 04
Remove secrets from the binary
Search your build for API keys, passwords and endpoints. Anything sensitive should come from the server, not from a string table.
- 05
Add integrity, anti-debug and anti-VM checks
Spread them through execution, report results to the server and refuse tampered sessions.
- 06
Obfuscate managed code
For C# and other .NET builds, run an obfuscator and strip symbols so a decompiler does not hand over your source.
- 07
Trace and monitor
Track builds per license, watch HWID mismatches and activation spikes, and have a written plan for the day a build leaks.
- 08
Fix the reasons people pirate
Offer a trial, price for your markets, accept common payment methods and deliver keys instantly.
Revisit the list after each major release. Crackers adapt to whatever you ship, and the cheapest response is often a server-side change, a new blacklist entry or a remote setting, rather than a rebuild. Updating protection remotely explains how to keep that loop short.
How PapelShip helps
PapelShip was built for exactly this checklist. qPapel Auth provides license keys, HWID locking with reset cooldowns, encrypted and signed sessions, server-side strings and files released only after a valid check, in-memory loading of DLLs, anti-tamper, anti-debug, anti-VM and process blacklists for C, C++ and C#. Binary Trace helps trace leaked builds back to a license, and qPAnalyzer flags reverse-engineering tools even when they have been renamed. Remote settings let you adjust protection without shipping a new build.
On the selling side, the built-in store delivers keys instantly, accepts cards, crypto, bank transfer and gift cards, and includes coupons, subscriptions and customer blacklists. The Free plan has no monthly fee; see pricing for what each plan includes, or the startup program if your company is just getting going.
Najczęstsze pytania
Raise the cost, keep the customers
Software piracy is a cost to manage, not a problem to solve once. Put license decisions and real value on the server, bind keys to devices, harden the client enough to slow attackers down, and trace the copies that escape. Then make buying easier than pirating. A small team that does those things in order will lose far less to cracks than one that spends months on a single clever check that sits entirely on the customer's machine.
Zespół qPapel ds. bezpieczeństwa
Licencjonowanie i ochrona oprogramowania