--- name: hunt-business-logic description: Hunting skill for business logic vulnerabilities. category: security risk: offensive source: https://github.com/elementalsouls/Claude-BugHunter source_repo: elementalsouls/Claude-BugHunter source_type: community date_added: '2026-09-20' license: MIT license_source: https://github.com/elementalsouls/Claude-BugHunter/blob/main/LICENSE compatibility: Requires explicit written authorization for a target scope plus the relevant testing tools for this technique. Docs-only; helper scripts and commands not bundled. sources: hackerone_public, github report_count: 25 --- > **⚠️ AUTHORIZED USE ONLY** > This skill is for educational purposes or authorized security assessments only. > You must have explicit, written permission from the system owner before using this tool. > Misuse of this tool is illegal and strictly prohibited. > **Mandatory confirmation gate** > Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target: > 1. Ask the user to state the exact target URL, IP, account, or resource. > 2. Ask the user to confirm written authorization and the permitted scope. > 3. Show the exact command(s) and explain their expected effect. > 4. Wait for explicit confirmation in the current conversation. > > Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab. ## Crown Jewel Targets Business logic vulnerabilities can cause serious harm in platforms where financial transactions, identity verification, and access controls intersect with real-world consequences. Relevant authorized application categories include: - **E-commerce & payment platforms** (Valve/Steam, Shopify) — payment flow manipulation, free goods, price tampering - **Marketplace & gig economy apps** (Airbnb, Uber) — identity/verification bypass enabling fraud or unsafe interactions - **SaaS with tiered access** (Mozilla Monitor) — bypassing verification to unlock monitoring features without entitlement - **High-traffic consumer apps** (Snapchat, Yelp) — rate-limit bypass enabling spam, enumeration, or abuse at scale Relevant asset types: checkout flows, subscription endpoints, callback/verification systems, webhook handlers, employee/internal portals exposed to the internet, and any endpoint that trusts client-supplied data to make authorization decisions. --- ## Attack Surface Signals **URL patterns to watch:** - `/checkout`, `/order`, `/subscribe`, `/payment`, `/verify`, `/confirm`, `/callback` - `/internal`, `/employee`, `/summit`, `/staff`, `/admin` — internal pages accidentally public - `/api/v*/payment`, `/api/v*/notify`, `/webhook` — payment provider callbacks - Endpoints accepting `X-Forwarded-For`, `X-Real-IP`, `CF-Connecting-IP` headers **Response/header signals:** - `Set-Cookie` with unvalidated session state tied to cart or order data - Payment provider names in responses: `Smart2Pay`, `Stripe`, `PayPal`, `Braintree` - Redirect chains through third-party payment pages (in-flight data opportunity) - `200 OK` on subscription/verification endpoints with no CAPTCHA or token **JS patterns:** - Hardcoded internal URLs in frontend bundles (`/employee/`, `/staff/`, `/internal/`) - Client-side price calculation before server submission - Verification logic that only checks on the frontend (`if (verified) { ... }`) - `fetch('/api/subscribe', { method: 'POST', body: ... })` with no anti-CSRF token or rate-limit token **Tech stack signals:** - Shopify storefronts with draft/unpublished channel pages - Apps using IP-based rate limiting without session/account binding - Payment webhooks with no HMAC signature validation - SMS/phone callback flows that don't verify ownership before enabling features --- ## Step-by-Step Hunting Methodology 1. **Map all authentication boundaries.** Spider the target. Identify pages/endpoints that serve authenticated content (employee portals, premium features, order pages) and test each unauthenticated. Look for internal pages indexed in JS bundles or linked from robots.txt/sitemap.xml. 2. **Identify every verification flow.** Enumerate: email verification, phone/SMS verification, payment verification, CAPTCHA, age gates. For each, test: what happens if you skip the verification step entirely? What happens if you replay a valid token on a different account? 3. **Test rate-limiting controls on every form.** For every POST endpoint (subscribe, login, OTP, search), use a tiny owner-approved request budget with controlled test accounts and stop on 429/lockout/errors; never infer safety from a fixed request count. In a sandbox, compare trusted proxy handling of `X-Forwarded-For` / `X-Real-IP` headers, change `User-Agent`. Check if the server uses IP from headers rather than connection IP. 4. **Intercept and tamper with payment flows.** Use Burp Suite to intercept every request between your browser, the application, and the payment provider. Identify where price, currency, order ID, or status fields are set. Use a provider sandbox and synthetic products/orders with fulfillment, billing and notifications disabled; compare price/currency/order binding without real financial transactions. Look for POST-back/webhook endpoints that accept payment confirmation — test if they validate HMAC/signature. 5. **Test phone/callback number verification.** Whenever a platform accepts a callback number, test: can you set it to a number you don't own? Does the platform call/text that number and grant trust based solely on submission? Use only two owner-controlled test numbers with prior consent; never cause calls or messages to a victim. 6. **Check for unprotected employee/internal surfaces.** Search Shodan, GitHub, JS bundles, and Wayback Machine for internal subdomain/path references. Test access without authentication. Check if these surfaces allow order placement, data access, or privilege escalation. 7. **Validate business impact.** For each finding, determine: does this result in financial loss, unauthorized access, or data exposure? Document the end-to-end chain. --- ## Payload & Detection Patterns **Controlled rate-limit validation plan:** Create two synthetic test identities and a tiny preapproved cap. Compare baseline requests to a single changed forwarding-header input in a sandbox with known trusted proxy configuration. Confirm the server-derived limiter key; a 200 response alone is not proof of bypass. Never send subscription email/SMS or evade an active block. **Payment tampering — modify in-flight price:** ```http POST /payment/initiate HTTP/1.1 Host: target.example amount=0.01¤cy=USD&order_id=12345&product_id=99 ``` ```bash # Look for unvalidated webhook endpoints curl -X POST https://target.example/payment/callback \ -H "Content-Type: application/json" \ -d '{"status":"success","amount":"0.01","order_id":"12345","transaction_id":"fake-txn"}' ``` **Unauthenticated internal page discovery:** ```bash # Check robots.txt and sitemap for internal paths curl -s https://target.example/robots.txt | grep -iE "(disallow|allow)" curl -s https://target.example/sitemap.xml | grep -iE "(employee|internal|staff|summit|admin)" # Grep JS bundles for internal paths curl -s https://target.example/assets/app.js | grep -oE '"/[a-zA-Z0-9/_-]{3,50}"' | sort -u ``` **Email verification bypass:** ```bash # Skip the verification step: hit the post-verification API endpoint directly # with an unverified session. A 2xx alone is insufficient; verify the controlled account’s forbidden state transition and absence of a later server-side gate. curl -s -X POST https://monitor.target.example/api/monitoring/enable \ -H "Cookie: session=" \ -H "Content-Type: application/json" \ -d '{"email":"controlled-account-b@example.com"}' # Replay verification token on different account curl -X POST https://target.example/verify \ -d 'token=VALID_TOKEN_FROM_ACCOUNT_A&email=account_b@example.com' ``` **Grep patterns for client-side logic issues:** ```bash # Find price calculations in JS grep -iE "(price|amount|total|cost)\s*[=*+]" app.js # Find internal URLs in JS bundles grep -oE '"/(employee|internal|staff|admin|summit)[^"]*"' *.js # Find unvalidated IP header usage in server code grep -iE "x-forwarded-for|x-real-ip|cf-connecting-ip" src/ -r ``` --- ## Common Root Causes 1. **Server trusts client-supplied data for financial decisions.** Developers offload price calculation to the frontend or pass amount fields through forms/URLs without re-validating on the server against a canonical source (the product database). 2. **Verification is enforced only in the UI, not the API.** Frontend hides features behind a verification gate, but the backend API endpoints are fully functional without a verified status — any authenticated request succeeds. 3. **IP-based rate limiting reads from spoofable headers.** Developers implement rate limits using `request.headers['X-Forwarded-For']` instead of the actual connection IP, allowing trivial bypass by header manipulation. 4. **Payment webhooks lack signature validation.** Developers implement "success" webhooks without verifying the HMAC signature provided by the payment provider, allowing anyone to POST a fake success notification. 5. **Internal/employee pages aren't access-controlled.** Internal tools are deployed to production domains without authentication middleware, either because developers assume obscurity (unlisted URL) or forgot to apply auth to a new route. 6. **Phone/callback verification is advisory, not enforced.** Systems accept a phone number and grant trust to whoever submitted it, without confirming the submitter owns or controls that number. 7. **Draft/channel-specific storefronts inherit full order functionality.** Platforms like Shopify allow creating storefronts for specific channels (employee events) that are unlisted but still fully functional for order placement if the URL is known. --- ## Candidate test hypotheses These are not universal bypasses. Trusted proxy boundaries, anti-CSRF alternatives, provider signature algorithms and server-side state must be inspected before drawing a conclusion. Missing visible CAPTCHA/token or a client-side price is not proof of a vulnerability. All payment/webhook fragments are sandbox-only, never live fulfillment. | Defense | Bypass | |---|---| | IP-based rate limiting | Rotate `X-Forwarded-For`, `X-Real-IP`, `True-Client-IP`, `CF-Connecting-IP` headers per request | | CAPTCHA on subscription forms | Use header-based bypass first; if CAPTCHA is only on the web form, call the underlying API endpoint directly | | Email verification gate | Access the post-verification API endpoint directly; replay valid tokens; check if `verified=true` is a client-set cookie/param | | Payment amount server validation | Modify currency to a lower-value currency; test with $0.00 or negative amounts; manipulate order IDs to reference different products | | Webhook HMAC validation | Test with no/empty signature header (is validation enforced at all — a modified payload only "passes" if it isn't); replay an UNMODIFIED captured webhook to test missing idempotency/anti-replay | | Auth on internal pages | Try unauthenticated; try with a low-privilege account; try path traversal variants (`/employee/../employee/`) | | Phone verification (OTP sent) | Submit only a second controlled consenting test number without OTP validation; check if the system grants trust on submission vs. OTP confirmation | --- ## Gate 0 Validation Before writing any report, answer all three: 1. **What can the attacker DO right now?** Be specific: "An unauthenticated user can place an order for physical goods at $0 cost" or "An attacker can bypass email verification and monitor any email address without owning it" or "An attacker can send unlimited subscription emails to any address." Vague impact = reject. 2. **What does the victim LOSE?** Identify a concrete, attributable loss: financial loss (free goods, fraudulent payments), privacy loss (phone number spoofed, unauthorized monitoring), service abuse (spam campaigns via rate-limit bypass), or security degradation (unverified identity trusted for sensitive actions). If the loss is purely theoretical, re-evaluate severity. 3. **Can it be reproduced safely from a documented clean test state?** Create a fresh account (or use no account). Follow your documented steps. Use minimal synthetic evidence without actual loss, shipments, victim monitoring or repeated redemption. State timing/preconditions and any untested impact; a 10-minute cutoff is not a validity criterion. --- ## Real Impact Examples **Scenario 1 — Free Physical Goods via Exposed Internal Storefront (Shopify-style)** An employee summit page was deployed to a public Shopify storefront as a private channel for distributing free books to staff. The URL was discoverable via JS bundle analysis or link sharing. An anonymous user who navigated to the URL could browse and complete a checkout with no authentication required, receiving physical merchandise shipped at the company's expense. Impact: direct financial loss per order, potential for bulk ordering if not caught quickly. **Scenario 2 — Payment Manipulation via In-Flight Tampering (Valve/Steam-style)** A payment flow passed order amount and currency through client-controlled parameters before redirecting to a third-party payment provider (Smart2Pay). By intercepting the redirect with Burp Suite and modifying the amount field, an attacker could complete a real payment for $0.01 while the application's webhook — lacking HMAC validation — accepted the provider's confirmation and credited the full item/service to the account. Impact: critical financial loss; attacker receives full value goods/services for near-zero cost, infinitely repeatable. **Scenario 3 — Email Verification Bypass for Unauthorized Monitoring (Mozilla-style)** A breach-monitoring service required email verification before enabling monitoring alerts for an address. The verification check was enforced in the UI flow but the underlying API accepted monitoring setup requests for any address using a valid session — skipping the verification step entirely. An attacker could set up monitoring for email addresses they don't own, receiving breach notification data (potentially including credential exposure status) for victim accounts. Impact: privacy violation; attacker gains intelligence on whether a target's email was in a breach without the target's knowledge or consent. --- ## Upstream citation leads (not verified case evidence) The upstream text linked the following reports. Their contents, identities, payouts, amounts, payloads and root causes were not established by this static review; do not repeat those details as facts or execute against the named organizations. Read each original disclosure and distinguish author observation from inference before citing: - https://hackerone.com/reports/1849626 - https://hackerone.com/reports/759247 - https://hackerone.com/reports/364843 - https://hackerone.com/reports/1446090 - https://hackerone.com/reports/1328278 The preceding brand-style scenarios are hypothetical illustrations, not independently verified incidents or claims that those companies remain vulnerable. A possible chain does not establish every prerequisite, exploitability or payout. ## Related Skills & Chains - **`hunt-race-condition`** — Every uniqueness/quota check in a logic flow is a race candidate. Chain primitive: Business logic (coupon/credit/promotion) + race condition → coupon redeemed N times in a single TCP packet via Turbo Intruder. - **`hunt-idor`** — Logic flows that trust a client-supplied identifier (order_id, tenant_id, beneficiary_id) overlap directly with IDOR. Chain primitive: business-logic step-skip + IDOR on beneficiary_id → transfer funds from victim account. - **`hunt-api-misconfig`** — Step-skip and verification-bypass often live next to mass-assignment fields. Chain primitive: business-logic email-verify skip + API mass assignment (`verified:true, role:admin`) → ATO without email control. - **`hunt-ato`** — Logic bugs in password reset, email change, and recovery flows are core ATO paths. Chain primitive: business logic (email change accepts without re-auth) + `hunt-ato` Path 2 → silent victim email swap → password reset to attacker mailbox. - **`security-arsenal`** — Load the Business-Logic Probe Checklist (negative quantity, decimal overflow, currency swap, step-skip via direct URL nav, state-machine reverse) and the Always-Rejected list to avoid filing self-inflicted bugs. - **`triage-validation`** — Apply the 7-Question Gate (especially Q4 "Is this exploitable by an outside attacker without unrealistic preconditions?"): logic bugs need a concrete dollar/PII/state impact, not just "the flow looks weird". ## When to Use - You have explicit, written authorization to assess the target in scope, and the task matches this skill's vulnerability class or technique within a bug-bounty or penetration-test engagement. - You need the recon, exploitation, or validation workflow described below — executed strictly inside the approved scope. ## Limitations - Authorized scope only: the confirmation gate above is mandatory before any probing, exploitation, or credential-access command. - Docs-only import: upstream helper scripts, commands, engine, and research assets are not bundled; separately review any official tools and provenance before installation. - Validate every finding (see `triage-validation`) before reporting; report via `report-writing`. Prefer a sandbox, disposable VM, or controlled lab. ### Example ```bash # Read-only first step; confirm scope before anything active. cat scope.txt # target list from the authorized engagement brief ``` > Adapted from [elementalsouls/Claude-BugHunter](https://github.com/elementalsouls/Claude-BugHunter) (MIT); frontmatter, When to Use/Limitations, and safety boundaries added for upstream compliance. Docs-only import: executable helpers, commands, engine, and research assets not bundled. For example, a sandbox order with canonical total 10.00 USD must reject a callback for 0.01 USD or the wrong controlled order even if the provider signature is valid; replay of the same valid event must not credit twice. Verify persisted state with fulfillment disabled, then clean up synthetic fixtures. These are proposed checks, not observed findings.