Chuyển đến nội dung
Skillpedia
Bảo mật10k · #11975

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.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/SnailSploit/Claude-Red/blob/main/Skills/web/offensive-business-logic/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

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

  1. Map every multi-step flow as a state machine (states + allowed transitions + side effects)
  2. For each transition, ask: who can call it, in what state, with what inputs, how many times
  3. Probe each axis (state, identity, input, frequency) for assumptions
  4. Combine flaws — single-axis flaws are usually low severity; chains are critical
  5. 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 → shipped without paid)
  • 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

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự