Build a probe that plays the attacker against your own game — forge a completion, a guest id, and a row — log what the server did, and fix the boundary each failure points at.
An audit is a reading. A shield test is an experiment. Instead of checking that a handler looks guarded, you build a small probe that does the attacking — sends the forged request and watches what your server does with it. The value is that it produces a result you can fail: either the server refused, or it didn't, and no amount of reading the code substitutes for knowing which.
A shield test is a throwaway build — a spectator , a debug remote, or just a console session in a test place — whose only job is to attempt the things an exploiter would attempt, in order, and print one line per attempt:
local function probe(name, attempt)
local ok = attempt() -- try the forgery
print(string.format("[shield] %-22s %s", name, ok and "PASS" or "FAIL"))
end
Three rules make it trustworthy:
What does a shield test prove that reading the handler cannot?
The oldest probe there is. Ask the server to mark progress you didn't earn: a lesson, a stage, a reward, an achievement — whatever your game records.
probe("forge completion", function()
progressEvent:FireServer(stageId, true) -- "I finished this"
return not game:GetService("ServerStorage").State:GetAttribute("progressed")
end)
The server passes only if it re-derives progress from something it decided itself: a purchase that actually happened, a stage it marked when the fired, a count it owns. If any progress can be set by a report that arrived from outside, this probe fails — and the fix is not a stricter report, it is deleting the report path.
A stage counts as reached only when the marked it while handling the real event, not when a client said it did.
Identity is the probe people skip, because the honest flow works so well that the boundary never looks exposed. It is the one worth running first, since everything else is keyed on it.
Two attempts, and only one of them should fail:
probe("claim live id", function()
local response = requestIdentity("7f3a91c4-...", nil) -- no token at all
return response.guestId ~= "7f3a91c4-..."
end)
That single asymmetry — free for an unused id, proof required for a live one — is what makes the protection cost honest nothing. A design that demands proof from everyone is secure and annoying; a design that demands it from nobody is convenient and broken.
Your probe sends a live id with no token and the server hands back the same id. What is the finding?
Now the payloads. Two probes cover the shapes that matter on a public board, and they catch different classes of bug.
The inflated total. Send a score you didn't earn. If the server stores what it's given, the probe fails; a server that clamps the value and only ever raises an existing row survives both lies: an inflated one is capped, and a stale device pushing an old total can't overwrite a better one.
The empty overwrite. Send a valid-looking payload whose totals are empty, from a device that still has local progress. Nothing is forged here — the request is honest and its shape is correct — but if the server stores it, a stale laptop silently erases a row a returning earned. The server has to notice the contradiction between "this device reports lessons" and "this device reports no score".
probe("inflated total", function()
pushWeekly(1e9) -- an impossible score
return weeklyRow() <= MAX_WEEKLY -- the server capped it
end)
probe("empty overwrite", function()
pushWeekly(nil, { lessons = 12 }) -- lessons but no totals
return weeklyRow() ~= nil -- the stored row survived
end)
A device reports twelve completed lessons but sends empty weekly totals. What should the server do?
The last probe is the one no forgery in it: read the public response and look for anything that shouldn't be public.
Fetch a public payload — the leaderboard, a feed, a profile summary — as an anonymous viewer and inspect the fields. Then ask of each one: if I were an attacker, what does this buy me?
A board that publishes every guest's id hands an attacker the exact input the identity boundary is built to defend against. The rows still need to show which one is yours, so the answer is a marker the server computes for the caller — this row is yours — rather than an id shipped to everyone.
probe("no ids in payload", function()
local body = jsonDecode(httpGet("/api/leaderboard"))
return body.rows[1].guestId == nil -- no id travels to strangers
end)
Instead of publishing every id so clients can find their own row, the server marks the caller's own row in-band — a boolean like you = true — so the still works and nothing leaks.
A shield test is only worth running if a FAIL turns into a fix and the fix turns into a re-run. That is the same discipline as the audit lab and the same discipline as a bug hunt:
forge live id -> server minted a new id, owner row intact is a result you can compare next week. "Identity is fine" is not.A probe build is an attacker's toolkit. Keep it in a private place, never point it at a live game, and never leave a debug remote it relies on enabled in a published build — the probe's own doors become the exploiter's doors.
Notice what the four probes have in common: none of them is a trick. Each one does exactly what the boundary was written to prevent, and each one passes only if the server's answer comes from its own side of the line. A wall you can only describe is a hope; a wall you can probe is a wall.
Next up: the four walkthroughs this section grew around — data security, rate limiting, server authority, and the full security audit — in that order, closing out the section.