business-logic
Skill1 starsChanged 14 days agoMITView on GitHub
Hunt for business logic flaws: checkout/workflow step bypass, price/ discount/coupon manipulation, negative or fractional quantity abuse, and race-condition-driven logic abuse (e.g. redeem a coupon twice). Use on any multi-step workflow with state transitions, pricing, or inventory (checkout, booking, loyalty points, referral programs). Keywords: business logic, workflow bypass, price manipulation, coupon abuse, negative quantity, race condition, step skipping, state machine. Do NOT use for pure technical injection/authz bugs with no business-rule component — those belong in their dedicated skills. This is specifically about abusing the *intended* logic/rules in unintended ways.
- Sends data out
8 other projects use a version of this.
Adopted by
Most recently taken up by
- SubhiSec/claude-ai-cyber-security-skillstheir own version, first seen Oct 25, 2026
- Strategic-Automation/violintheir own version, first seen Sep 22, 2026
- emre-guler/websectheir own version, first seen Aug 27, 2026
- zyphr-labs/bounty-harnesstheir own version, first seen Aug 26, 2026
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
- young1lin/cc-tutorialtheir own version, first seen Jul 9, 2026
Used with
Projects with it also use nosql-injection.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
blacklanternsecuritySkillnosql-injection
Guide NoSQL injection exploitation during authorized penetration testing.
Also in 3 projects that use this
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- Strategic-Automation/violin★ 159same name
- SubhiSec/claude-ai-cyber-security-skills★ 45same name
- 0xGhostCAT/claude-ai-cyber-security-skills★ 41same name
- young1lin/cc-tutorial★ 38same name
- langbyyi/websec-skills★ 4same name
- emre-guler/websec★ 2same name
- zyphr-labs/bounty-harness★ 1same name
- conjure-3301/skills★ 0same 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 repository124 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ai-agent-reconSkill
- ai-supply-chainSkill
- exfiltration-via-aiSkill
- indirect-injectionSkill
- llm-fuzzingSkill
- prompt-injectionSkill
- rag-poisoningSkill
- tool-abuseSkill
- chain-analysisSkill
- chain-auth-to-takeoverSkill
- chain-customSkill
- chain-graph-walkSkill
- chain-idor-to-mass-dataSkill
- chain-info-to-exploitSkill
- chain-multi-appSkill
- chain-ssrf-to-cloudSkill
- chain-web-to-rceSkill
- chain-xss-to-account-takeoverSkill
- email-securitySkill
- engagement-flowSkill
- finding-disciplineSkill
- http-headers-securitySkill
- oob-interactionsSkill
- opsec-disciplineSkill
- research-firstSkill
- scope-disciplineSkill
- scope-importSkill
- session-contextSkill
- 2fa-bypassSkill
- api-abuseSkill
- auth-bypassSkill
- broken-access-controlSkill
- cache-poisoningSkill
- clickjackingSkill
- corsSkill
- credential-testingSkill
- crlf-injectionSkill
- cryptographic-oracleSkill
- csrfSkill
- css-injectionSkill
- data-exfiltration-testSkill
- deserializationSkill
- email-injectionSkill
- file-uploadSkill
- fuzzingSkill
- graphqlSkill
- grpcSkill
- host-headerSkill
- http-smugglingSkill
- idorSkill
- info-disclosureSkill
- jwtSkill
- lateral-movementSkill
- lfi-rfiSkill
- mass-assignmentSkill
- oauthSkill
- open-redirectSkill
- parameter-pollutionSkill
- password-resetSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 78
Repeat/replay a one-time step: If a step is meant to happen once (apply coupon, redeem points, submit application), replay it:
- Distinctive: line 104
Coupon/promo brute-force and logic abuse: Test whether coupon codes follow a predictable pattern, whether expired/single-use coupons are …
- Distinctive: line 123
Referral/loyalty abuse: Check if referring yourself (new account referring the original, or circular referral chains) grants bonuses not …
- Distinctive: line 125
Inventory/stock logic: If stock is decremented at "add to cart" rather than "payment confirmed", test holding items in cart indefinitely …
- Distinctive: line 139
No bounds validation on numeric business fields (quantity, amount) beyond what the UI widget happens to restrict.
- Distinctive: line 154
Never use a real payment instrument or push an actual financial transaction beyond what's explicitly authorized by the engagement scope and …
- Distinctive: line 159
Before declaring this finding complete, probe these escalation paths:
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Signals
- Multi-step checkout/booking/application flow (cart → shipping → payment → confirm).
- Client-side price/total calculation visible in JS, with the server trusting a submitted total.
- Coupon/promo code, referral bonus, or loyalty point redemption features.
- Quantity/amount fields with no visible bounds checking in the UI (can you type a negative number?).
- Any "state machine" status field (
pending → approved → shipped) exposed or inferable via API.
Prerequisites
- A complete legitimate walkthrough of the target workflow captured in Burp, every step logged, to know the exact sequence and parameters of a normal transaction.
- A disposable/test payment method or sandbox payment mode if the engagement scope allows (never use real financial instruments beyond what's explicitly authorized — see "Testing the user's own application" boundaries).
Executing multi-step attacks with engine/workflows.py
Manual curl chains die on mechanical friction: ids that must be carried between
steps (basket id, cart token, order nonce), CSRF headers, step ordering.
Encode the legitimate walkthrough as a declarative flow once — then every
attack is a one-line mutation, and the transcript (full request/response of
every step + invariant verdict) lands in .pentest-state/workflows/ as
evidence automatically:
# 1. baseline: the flow as the app intends it — invariant must HOLD
python3 -m engine.workflows run flow.json --audit-dir .
# 2. attack: mutate one step — invariant VIOLATED = Demonstrated finding
python3 -m engine.workflows run flow.json --audit-dir . \
--set 'set-quantity.json.quantity=-100' # exit 0 = business rule brokenFlow files declare steps (method/url/headers/json + extract rules that
feed response values into later steps as {{vars}}) and invariants
(json_lt/gt/eq, wildcard data.*.totalPrice, contains, status_is) — the
business rule that must never break (negative total, double coupon, skipped
payment). Run baseline first: if the baseline already violates the invariant,
your flow model is wrong, not the app. Proven pattern (Juice Shop "Payback
Time"): login → extract bid → add item → mutate quantity to -100 → checkout
→ data.*.totalPrice < 0 in order history.
Methodology
- Map the full state machine. From the captured normal flow, list every step, every parameter, and every status transition. Identify which step the server considers "final"/authoritative (where payment is actually charged, where stock is actually decremented).
- Workflow step skipping. Try calling a later-step endpoint directly without completing earlier steps:
Also try replaying/reusing a step's response from a different (abandoned or lower-value) cart/session against the final step.# skip straight to order confirmation without ever hitting the payment step curl -s -i -X POST https://target.com/api/checkout/confirm -b "session=$SESSION" \ -d '{"cart_id":"abc123"}' - Repeat/replay a one-time step. If a step is meant to happen once (apply coupon, redeem points, submit application), replay it:
curl -s -i -X POST https://target.com/api/cart/apply-coupon -b "session=$SESSION" -d '{"code":"WELCOME10"}' curl -s -i -X POST https://target.com/api/cart/apply-coupon -b "session=$SESSION" -d '{"code":"WELCOME10"}' # does the discount stack / apply twice? - Price/total tampering. Intercept the request that carries price/total and modify it directly, checking if the server recalculates server-side or trusts the client value:
Also test per-line-item price override if the cart API exposes it:curl -s -i -X POST https://target.com/api/checkout/confirm -b "session=$SESSION" \ -d '{"cart_id":"abc123","total":0.01}'curl -s -i -X POST https://target.com/api/cart/add -b "session=$SESSION" \ -d '{"product_id":55,"quantity":1,"unit_price":0.01}' - Negative/fractional/overflow quantity. Submit unusual numeric values the UI wouldn't normally allow:
A negative quantity combined with a per-unit price can flip a total negative, potentially crediting the attacker's account/balance rather than charging it — check the resulting order total carefully.curl -s -i -X POST https://target.com/api/cart/add -b "session=$SESSION" -d '{"product_id":55,"quantity":-5}' curl -s -i -X POST https://target.com/api/cart/add -b "session=$SESSION" -d '{"product_id":55,"quantity":0.5}' curl -s -i -X POST https://target.com/api/cart/add -b "session=$SESSION" -d '{"product_id":55,"quantity":99999999999}' - Coupon/promo brute-force and logic abuse. Test whether coupon codes follow a predictable pattern, whether expired/single-use coupons are actually invalidated server-side, and whether stacking multiple codes is blocked:
for code in WELCOME10 WELCOME20 SAVE10 SAVE20 NEWUSER FIRST50; do curl -s -o /dev/null -w "$code -> %{http_code}\n" -X POST https://target.com/api/cart/apply-coupon \ -b "session=$SESSION" -d "{\"code\":\"$code\"}" done - Race condition on single-use logic. Fire the one-time action concurrently to see if a time-of-check/time-of-use gap allows it to succeed more than once (classic coupon/gift-card/limited-stock-item double-redemption):
For higher-fidelity race timing, use Burp Suite's Turbo Intruder with a single-packet attack to minimize network jitter between parallel requests.for i in $(seq 1 20); do curl -s -o /tmp/race_$i.json -X POST https://target.com/api/cart/apply-coupon \ -b "session=$SESSION" -d '{"code":"ONETIME50"}' & done wait grep -l '"success":true' /tmp/race_*.json | wc -l # should be 1, not >1 - Referral/loyalty abuse. Check if referring yourself (new account referring the original, or circular referral chains) grants bonuses not intended for self-referral.
- Inventory/stock logic. If stock is decremented at "add to cart" rather than "payment confirmed", test holding items in cart indefinitely across many sessions to deny other users ("inventory denial of service" via logic, not technical exhaustion).
Tooling
- Burp Suite Repeater for step-by-step manual manipulation.
- Burp Turbo Intruder for precise race-condition timing (single-packet attack technique).
curlwith backgrounded (&) parallel requests for simpler race tests when Turbo Intruder isn't available.- A maintained list of common/guessable promo code patterns for the brute-force step.
Root Causes
- Server trusts client-submitted price/total/quantity instead of recalculating from source-of-truth catalog data at the final step.
- One-time actions (coupon redemption, point transfer) implemented as read-then-write without a database-level unique constraint or atomic check-and-set, creating a race window.
- Workflow steps implemented as independent stateless endpoints with no server-side enforcement of step order (each step trusts the client reached it legitimately).
- No bounds validation on numeric business fields (quantity, amount) beyond what the UI widget happens to restrict.
Validation Gate (minimum proof)
- Price/total tampering: request/response showing an order confirmed at a price obviously below the real catalog price, with a follow-up check (order detail / receipt) confirming the manipulated price was actually charged/recorded, not just accepted and silently corrected.
- Step-skip: proof a later step succeeded without the required prior step's data ever being submitted in that session.
- Race condition: numeric proof — N concurrent requests, M successes where M > 1 for an action meant to succeed once — include the raw count and timestamps.
- Coupon/negative-quantity abuse: the resulting order/balance showing the unintended financial outcome.
- Label clearly as Demonstrated only when the manipulated state is confirmed to persist (via an independent read), not just accepted in the mutating response.
Gotchas
- Minimum proof: a 200 response to a tampered price is not enough — orders are frequently re-validated/corrected asynchronously (webhook from payment processor, nightly reconciliation) — confirm the persisted record, ideally via order history/receipt.
- Common N/A: server recalculates total server-side from
product_id+quantityalone, ignoring any client-submitted price/total field entirely — close as N/A after confirming via a tampered-and-then-verified order. - Overclaim trap: demonstrating a race condition theoretically "could" double-redeem without actually getting ≥2 successes in a real concurrent test is Unproven — run the test and report the actual count.
- Never use a real payment instrument or push an actual financial transaction beyond what's explicitly authorized by the engagement scope and the "Testing the user's own application" test-mode boundaries — use sandbox/test payment credentials only.
- Business logic findings often require deep context about the intended rule — confirm with the operator what the correct behavior should be before over- or under-claiming severity.
Chain Anchors
Before declaring this finding complete, probe these escalation paths:
- Financial impact — Does the logic flaw let you underpay, double-claim, or extract value (discount stacking, negative quantities, currency rounding)?
- Workflow step skipping — Can you skip a required step in a multi-step workflow (approval, payment, verification) and still reach the end state?
- State machine abuse — Can you force the resource into an invalid state transition not reachable through the normal UI?
- Scale of abuse — Can the flaw be automated/scripted for repeated abuse, or is it a one-off edge case?
A finding without chain anchor results is INCOMPLETE. Record each anchor as tested/not-applicable/blocked with the reason.
Chains & Compositions
- HTTP Parameter Pollution duplicating
quantity/priceparams to confuse validation vs. processing layers → chain with parameter-pollution. - Mass-assignable
price/discountfields on a cart API → chain with mass-assignment. - Lack of rate limiting enabling the coupon brute-force or race-condition fan-out at scale → chain with rate-limiting.
- Negative quantity flipping a charge into a credit → potential chain into account balance/wallet features if present.
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.

