
License protection audit for an AR product
The AR product's license module ran entirely in the user's browser: it decided on its own whether a domain was entitled to use the product, and enforced the verdict itself. We took it apart, showed what someone who bypasses the check gets, and described how to move the access decision to the server.
Technologies
Tags
See how it works
the projectin numbers
-
3
steps that any client-side entitlement check boils down to
-
1
comparison point on the client, which is also the single point of failure
-
4
server-side protection measures that work together
-
13
items in the architect's checklist
What changed
The entitlement check lived entirely in a client-side WASM module. We took it apart, assessed what someone who bypasses the check gets, and described a scheme in which the server makes the decision.
Before
- The check for the right to use the product was performed entirely by a client-side WASM module.
- The module itself computed a value from the domain and key, compared it with a reference and chose whether to launch the product or show a denial.
- The server took no part in the decision, so it couldn't notice a mismatch or refuse service.
- All the trust logic (who is entitled, how to verify it, what to do on denial) lived on the user's device.
After
- The server verifies entitlement, and the client only requests access.
- Everything the product needs to run is issued by the server after the entitlement check: without its response, the product has nothing to execute.
- The server's response is signed and bound to a session and expiry, so it can't be replayed or transferred.
- Instead of "works or doesn't", there are three trust levels, and licenses can be tracked and revoked.
How license protection is built
From a client-side check to a server-side decision: what happens in the module and how we propose to change it.
How the module decided whether to let the user in
The check for the right to use the AR product lived entirely in a client-side WASM module.
01 Computation
The module takes data from the environment: the page domain, the license key, build parameters. From these it derives a value: a hash, a checksum, a decryption result.
02 Comparison
The value is strictly compared with a reference. The reference is hardcoded in the module or comes from the server, but the client does the comparison either way.
03 Branching
Depending on the comparison result, execution follows one of two branches: the product initializes or shows a denial.
What we saw
- The computation was non-trivial, with stripped symbols and heavy optimization.
- The comparison and branching were in the same binary that the browser downloads and runs on the user's machine.
- The server took no part in the decision, so it couldn't notice a mismatch or refuse service.
Code on the user's device is under the user's control
The device and everything running on it belongs to the user: process memory, network, runtime and the module file itself. Because of the word "compiled", WASM is often considered closed, but that's a mistake, and here's why.
The format is open
Standard tools convert a binary module into a text representation. The structure of functions, imports, exports and data sections is recovered unambiguously.
Control flow is structured
WASM has no arbitrary jumps: blocks, loops and conditional branches are explicitly marked. Such code is easier to read than native machine code.
The JavaScript boundary is transparent
The module receives data through imports and returns results through exports. Both sides can be observed and replaced from the browser debugger.
The economics favor the attacker
Protection is paid for once during development, analysis is also done once, and then the result is replicated for free. Obfuscation and anti-debugging lengthen the analysis, but remain the same client-side code.
One comparison point is one point of failure
Whoever controls the jump controls the outcome
The strength of everything before it stops mattering: the computation protects against guessing the input, but not against changing the outcome. So the question isn't "how hard is it to take our check apart" but "what does the person who took it apart get". If the answer is "full access to the product", there is no protection, only a delay.
The server decides: it verifies entitlement and issues only what's allowed
The client makes no access decisions; it only executes what the server has allowed and issued. Four measures work together.
01 Server-side validation of the decision
The server delivers the verdict itself and backs it with a resource: configuration, models and assets, content keys, results of heavy computations, short-lived tokens. For an AR product, this could be server-side delivery of tracking data or scene content for a specific license.
02 Signed responses
The access response is signed with an asymmetric key whose private part never leaves the server. The signature covers the license ID, subject, allowed features, expiry and a one-time nonce. The signature must be verified by a trusted party: your backend, CDN or gateway.
03 Environment attestation
A signal about the environment the client runs in. Mobile apps have platform mechanisms; browsers have no equivalent, so this is a probabilistic signal, not proof. The verdict is also delivered by the server.
04 Graduated access
Instead of a binary "works or doesn't", the server issues different amounts of resources depending on the trust level. The level is determined by the server itself, not by a flag in client code.
What's left for the client
A client-side check is acceptable as a UX layer: quickly show a clear message and avoid an unnecessary request. Obfuscation is acceptable as a way to raise the cost of analysis. Neither should be the only line of defense. The server-side model is complemented by telemetry, per-license limits and revocation: this makes violations observable and reversible.
13 signs of vulnerable licensing logic
Even one of these items already means the logic is vulnerable.
The client makes the decision
- The product works fully without a single request to your server after loading.
- The "let in or not" decision is made in client code: JavaScript, WASM or a native module.
- The server sends a reference, flag or license status, but the client compares and applies it.
- The domain, key or identifier are taken from the client environment and never verified by the server.
- The check runs once at startup rather than on every significant request.
Resources and secrets
- All paid features and resources are already in the client build and merely "switched off" by a condition.
- The build contains secrets: symmetric keys, private keys, API keys with broad permissions.
Server responses
- The server's response is unsigned or not bound to a session, expiry and nonce, so it can be replayed.
- The signature is verified only on the client, and no server component requires it.
Threat model and control
- The threat model relies on obfuscation, anti-debugging or "nobody will bother taking WASM apart".
- Denial is binary: no intermediate trust levels and no restricted mode.
- No license telemetry: the number of domains, devices and requests per key isn't tracked.
- A license can't be revoked without releasing a new client version.
A quick test
Set aside all the client code and ask what would then stop someone from using the product without entitlement. If the answer is nothing, there's no protection.
Challenges and solutions
The difficulties and misconceptions that client-side license protection runs into, and how the server-side scheme resolves each of them.
WASM seems closed
A compiled module looks closed and creates the impression that the license is safe.
We show that the format is open and readable with standard tools, and assess the module by a simple question: what does someone who took it apart get?
A complex computation doesn't protect
The check value is computed cleverly, the code is obfuscated and optimized, and it seems hard to bypass.
We look not at the complexity of the computation but at the place where the result turns into a "let in or not" decision. There's only one, and it's on the client.
The client still does the comparison
The reference comes from the server, but a program on the user's device compares the values. Such protection is no better than a hardcoded reference.
The server delivers the verdict itself and gives the product everything it needs to run only after verifying entitlement.
The signature is verified on the client
The signed server response is verified by the same client code, which is just another comparison with a branch.
The signature is verified by a trusted party: your backend, CDN or a gateway in front of the resources. Tokens are short-lived and bound to the session.
Binary denial helps the attacker
If the response is only "works" or "doesn't work", it's immediately clear whether a bypass succeeded.
The server provides three access levels: full, restricted (demo, watermark, reduced limits) and public part only.
Violations are invisible and irreversible
Without license tracking and revocation, you don't know how many domains and devices use it, and you can't cut off a violator without a new product version.
License telemetry, per-key limits and server-side access revocation without releasing a new client version.
How it works for you
A good fit if
- Your web or AR product is licensed by domain or key.
- The entitlement check is performed by a client-side module.
- Paid features already sit in the client build.
What we need from you
- A description of the licensing and access-granting scheme.
- The client build of the product.
- A team contact for architecture questions.
What you get
- An analysis of client-side modules, including WASM.
- A list of places where the access decision is made on the user's side.
- A plan for moving the trust boundary to the server.
Want to check your productbefore someone else does?
We'll audit your licensing and authorization architecture and propose a plan for moving the trust boundary to the server.


