offensive-business-logic
できること
このスキルは、ウェブ、モバイル、APIのアプリでビジネスロジックの欠陥を見つける方法論です。ワークフローの回避、価格や割引の操作、返金の誤用、役割の境界を扱います。書面による許可を得てアプリをテストするセキュリティの専門家向けです。
使う場面
- ✓許可を得たアプリのテストで、チェックアウト、返金、クーポンの流れを確認しているとき。
- ✓多段階の処理で、利用者が必須の手順を飛ばせるかを確認したいとき。
- ✓報告書のために、ロジックの欠陥の金銭的な影響を測りたいとき。
スキルのリンク
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/web/offensive-business-logic/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私たちのショップをテストする許可があります。クーポンと返金の流れが悪用されうるかを確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、複数の手順からなる各流れを、状態と遷移の集合として地図にします。そして各手順を、誰が、どの状態で、どのくらいの頻度で実行できるかについて確認し、重要な箇所では欠陥を連鎖させます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Business Logic — Offensive Testing Methodology
Business logic flaws are the highest-paying class of vulnerability for bug bounty and the hardest for scanners to detect. They live in the gap between what the developer specified and what an attacker can convince the system to accept.
Quick Workflow
- Map every multi-step flow as a state machine (states + allowed transitions + side effects)
- For each transition, ask: who can call it, in what state, with what inputs, how many times
- Probe each axis (state, identity, input, frequency) for assumptions
- Combine flaws — single-axis flaws are usually low severity; chains are critical
- Quantify financial impact per finding (loss-per-attack × scale)
Reconnaissance — Mapping the Logic
Build the State Machine
For each user flow, draw:
- States: cart, pending payment, paid, shipped, refunded, cancelled
- Transitions: which API/UI action, which role, which preconditions
- Side effects: balance change, inventory change, email, webhook
Look for transitions that:
- Skip intermediate states (
cart→shippedwithoutpaid) - Are reversible when they shouldn't be (
shipped→cart) - Trigger side effects more than once
- Allow cross-role invocation
Hidden / Internal Endpoints
# Compare authenticated and unauthenticated JS bundles for buried admin routes
diff <(curl https://app/main.js) <(curl -H "Cookie: ..." https://app/main.js)
# Look for flag/feature toggles that change UI but not server-side enforcement
grep -E '(isAdmin|isInternal|featureFlag|debug)' bundle.js
# API spec (OpenAPI/Swagger) often lists endpoints the UI never calls
curl https://app/api/openapi.json | jq '.paths | keys'
Workflow / State-Machine Bypass
Skip a Required Step
# Normal flow: /verify-email → /set-password → /enable-2fa → /dashboard
# Try jumping directly:
GET /dashboard
GET /api/account/details
POST /api/payout-settings
# Checkout flow: /cart → /address → /shipping → /payment → /confirm
# Skip /payment by replaying /confirm with a previous order's payment-token reference:
POST /api/order/confirm
{ "cartId": "current", "paymentRef": "<old-paid-order-payment-ref>" }
Replay a One-Time Action
# Refund endpoint without idempotency
POST /api/orders/123/refund # First call: $50 refunded, order marked refunded
POST /api/orders/123/refund # Second call: server checks "is order refunded?" — race the check (see TOCTOU)
State Downgrade
Move a finalized object back to an editable state where mutations have effect:
PUT /api/order/123
{ "status": "draft" } # If accepted, you can now edit the price field
PUT /api/order/123
{ "items": [{ "id": "tv", "price": 1 }] }
Direct Endpoint Invocation
Many admin/backend transitions are reachable from any authenticated user if route-level RBAC is missing while the UI hides them.
# Enumerate verbs on every discovered path
for path in $(cat paths.txt); do
for v in GET POST PUT PATCH DELETE OPTIONS; do
code=$(curl -s -o /dev/null -w "%{http_code}" -X $v -H "Authorization: Bearer $T" https://app$path)
echo "$v $path $code"
done
done | grep -v -E ' (401|403|404) '
Price / Quantity / Currency Manipulation
Negative / Zero / Float Quantities
POST /api/cart/add
{ "sku": "tv", "qty": -1 } # Refund issued for adding negative items?
{ "sku": "tv", "qty": 0.0001 } # Float rounding: $0 line item, full product shipped?
{ "sku": "tv", "qty": 9e99 } # Overflow → wraps to small number, $0 cost?
Hidden Price Fields
POST /api/checkout
{ "items": [{"sku":"tv","qty":1,"price":1}], "total": 1, "tax": 0, "shipping": 0 }
If the server trusts client-supplied price, you set the price. Test every numeric field — price, total, discount, tax, shipping, subtotal, currency.
Currency Confusion
POST /api/checkout
{ "amount": 100, "currency": "JPY" } # Pay 100 JPY (~$0.65) for $100 USD product?
{ "amount": 100, "currency": "VND" } # Even better
{ "amount": 100, "currency": "BTC" } # Or worse: pay in BTC at $1 BTC = $1?
Look for: missing currency normalization, sloppy FX rate caching, currency lookup by user input.
Coupon / Discount Logic
# Apply same coupon multiple times
POST /api/cart/coupon { "code": "SAVE50" }
POST /api/cart/coupon { "code": "SAVE50" } # Stacks?
POST /api/cart/coupon { "code": "save50" } # Case sensitivity
よくある質問
なぜこれらの欠陥はスキャナーで見つけにくいのですか?
スキャナーが理解しないアプリのワークフローの本来の動きに依存するためだと、このスキルは説明しています。
影響を測りますか?
はい。各所見の金銭的な影響を数値化することを提案します。
許可を得たテストだけのためのものですか?
はい。書面による許可のもとでのテストのために書かれています。
詳細
作者による元の説明
Business logic vulnerability testing for web/mobile/API engagements. Covers workflow bypass, state machine violations, multi-step process abuse, price/quantity/discount manipulation, currency confusion, coupon stacking, refund/chargeback abuse, race conditions on logic boundaries, parameter tampering for hidden flows, role/tenant boundary violations, time-of-check vs use, anti-automation defeat, fraud-detection evasion, and subscription/quota abuse. Use when scoping an application after surface-level OWASP Top 10 has been covered, or when the asset is a transactional/marketplace/fintech/e-comm
repo: SnailSploit/Claude-Red
人気
- GitHubのスター
- 10k
- ランキング
- #11975
- ライセンス
- MIT
- 更新日
- 2026/10/12
コメント
- …
このリポジトリの他のスキル
offensive-active-directory
10kエージェントが、ネットワークの地図作成から Domain Adminへの攻撃経路の発見まで、許可を得た Active Directoryのセキュリティテストを計画できるよう支援します。
offensive-netexec
10kエージェントが、許可を得たネットワークのテストで、NetExec(nxc)ツールを使えるよう支援します。プロトコル、認証、認証情報の確認を扱います。
offensive-api-abuse
10kエージェントが、ビジネスロジックの悪用、GraphQLのリスク、競合状態を探す、許可を得たAPIのセキュリティテストを計画できるよう支援します。
offensive-api-security
10kエージェントが、OWASP API Top 10に基づき、REST、gRPC、WebSocketのAPIに対して許可を得たセキュリティテストを行えるよう支援します。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。