Skillpedia
الأمان10k · #11975

offensive-business-logic

ما الذي تفعله

هذه المهارة منهجية لإيجاد ثغرات منطق العمل في تطبيقات الويب والجوال وAPI. تغطي تجاوز سير العمل، والتلاعب بالأسعار والخصومات، وإساءة الاسترداد، وحدود الأدوار. وهي موجهة لمختصي الأمن الذين يختبرون تطبيقًا بإذن.

متى تستخدمها

  • ✓عندما تختبر سير الدفع أو الاسترداد أو القسائم في اختبار تطبيق مصرّح به.
  • ✓عندما تريد التحقق هل يستطيع المستخدم تخطي خطوة مطلوبة في عملية متعددة الخطوات.
  • ✓عندما تحتاج إلى قياس الأثر المالي لخطأ منطقي لأجل التقرير.

رابط المهارة

https://github.com/SnailSploit/Claude-Red/blob/main/Skills/web/offensive-business-logic/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/SnailSploit/Claude-Red/blob/main/Skills/web/offensive-business-logic/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“لدينا تصريح لاختبار متجرنا. افحص هل يمكن إساءة استخدام سير القسائم والاسترداد.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

ترسم المهارة كل سير متعدد الخطوات كمجموعة من الحالات والانتقالات. ثم تفحص كل خطوة من حيث من يستطيع تنفيذها، وفي أي حالة، وكم مرة، وتجمع الثغرات في سلاسل حيث تكون الأهمية أكبر.

المحتوى التقني (ملف 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

  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 
الأسئلة الشائعة

لماذا يصعب إيجاد هذه الثغرات بالماسحات؟

تشرح المهارة أنها تعتمد على كيفية المفترض أن يعمل سير التطبيق، وهو ما لا تفهمه الماسحات.

هل تقيس الأثر؟

نعم. تقترح تحديد الأثر المالي لكل نتيجة بالأرقام.

هل هي للاختبارات المصرّح بها فقط؟

نعم. كُتبت للاختبار بإذن كتابي.

التفاصيل

الوصف الأصلي من المؤلف

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
آخر تحديث
12‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة