business-logic-testing
Skill47 starsChanged 5 months agoMITView on GitHub
Use when testing application-specific workflow and business-rule flaws that scanners cannot find — price/quantity/parameter tampering, workflow and state-machine bypass, race conditions and TOCTOU, replay, and abuse of coupons/refunds/limits. Requires understanding what the app is supposed to do.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- briiirussell/cybersecurity-skillstheir own version, first seen Nov 1, 2026
- xAmirHamza77/PenKit51their own version, first seen Jul 6, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- briiirussell/cybersecurity-skills★ 489same name
- xAmirHamza77/PenKit51★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- access-control-testingSkill
- active-pentestSkill
- api-security-testingSkill
- authentication-testingSkill
- client-side-exploitationSkill
- file-upload-and-ssrfSkill
- injection-testingSkill
- pentest-reportingSkill
- recon-and-osintSkill
- secrets-management-auditSkill
- security-code-auditSkill
- security-hardeningSkill
- security-testingSkill
- threat-modelingSkill
- vulnerability-chainingSkill
The file
Files
Business Logic Testing (FIND/EXPLOIT — the pro's bread and butter)
Overview
Find flaws in what the app allows, not how it's coded. These are valid requests that produce invalid outcomes — buying for $0, refunding twice, skipping a required step. No scanner finds them because each is unique to your business rules.
Core principle: The app enforces the intended flow; you test every unintended path that still "works." Think: "what does this feature assume, and what if I break that assumption?"
Applies when / Skip when
- Applies when: the app has multi-step workflows, money/credits/quotas, stateful processes, or business rules that can be abused.
- Skip when: it's a stateless single-action utility with no rules or state → N/A (rare — most apps have some logic; double-check before skipping).
- If N/A: report "business-logic-testing: N/A — no stateful workflow/rules" and stop.
⚠️ Authorization
Your own app/test data. Logic abuse can move money/state — use a non-production environment.
Method
- Understand the intended flow — map the steps, the rules, and the assumptions at each step (order: add → pay → ship; rule: qty ≥ 1; assumption: price comes from the server).
- Challenge each assumption — negative/zero/huge values, skipped steps, reordered steps, client-supplied values the server should own, repeated actions.
- Attack the state machine — reach states out of order or revisit terminal states.
- Attack concurrency — do the "once only" action many times in parallel (race/TOCTOU).
- Attack quantity & money — tamper price, totals, currency, discounts, rounding, limits.
See references/logic-attack-patterns.md for a catalog of concrete patterns.
Quick reference — classic logic flaws
| Pattern | Example |
| Parameter tampering | Change price, total, qty, userId, status in the request the server trusts |
| Negative / overflow | qty=-1 credits you; huge values overflow; 0 bypasses a charge |
| Workflow bypass | Jump straight to "confirm"/"download" without "pay"/"verify" |
| State machine abuse | Cancel an already-shipped order; reopen a closed ticket to gain rights |
| Race condition / TOCTOU | Redeem one gift card / coupon / withdrawal N times in parallel |
| Replay | Resubmit a signed/one-time request (payment callback, OTP, idempotency key) |
| Discount/refund abuse | Stack coupons, refund more than paid, partial-refund loops |
| Limit bypass | Exceed per-user caps via parallel requests or multiple sessions |
The race-condition test (high value, often missed)
Send the "limited" action many times simultaneously (not sequentially) and check if it
succeeds more than once — e.g. 20 parallel redemptions of a single-use coupon. Tools: Burp
Turbo Intruder, or a quick parallel curl/script firing identical requests at once.
Output
Findings describing the intended rule, the request that broke it, and the business impact (money lost, limits bypassed, privilege gained). Severity = real-world impact, often Critical.
Hand-off
Reproduce safely on staging via active-pentest; chain with auth/access-control in
vulnerability-chaining; fix via security-hardening (server-authoritative values,
atomic transactions/locks, idempotency keys, server-side state validation).
Common mistakes
- Looking for code smells — logic bugs are in valid requests; you must know the rules.
- Testing actions sequentially when the bug only appears under concurrency.
- Trusting client-sent prices/totals/limits — re-derive everything server-side and test that it does.
- Ignoring "soft" features: coupons, referrals, loyalty points, trials, refunds — prime abuse targets.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

