شعار Web Logic Auditor

Web Logic Auditor

المجتمع
ptn1411
web-logic-auditor

اختبار مصرح به لثغرات التحكم في الوصول ومنطق الأعمال التي لا تستطيع الماسحات القائمة على الأنماط اكتشافها، مثل IDOR/BOLA، وتعطّل التفويض على مستوى الوظائف، والإسناد الجماعي، وإساءة استخدام منطق الأعمال، وظروف السباق. تعتمد المنهجية على الاستدلال (مصفوفات Subject×Object×Action، ونمذجة آلة الحالات، وتحليل الثوابت)، وتضم أداتي مساعدة: authz_diff.py (لمقارنة استجابات هويتين) وrace_probe.py (لاختبار التزامن).

Add to TypingMind

نظرة عامة

الناشرptn1411
المستودعskill
اسم المهارةweb-logic-auditor
النجوم
275
التفريعات
133
الملفات المرفقة
2
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 2

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها ptn1411 على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Web Logic Auditor في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/ptn1411/skill/tree/main/web-logic-auditor
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ptn1411/skill.git /tmp/skill
mkdir -p .claude/skills
cp -r /tmp/skill/web-logic-auditor .claude/skills/web-logic-auditor
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Web Logic Auditor في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Web Logic Auditor تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Web Logic Auditor بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

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

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Web Logic Auditor

Access-control and business-logic testing for authorized web apps/APIs. These classes require reasoning about intent — who may do what, and which invariants must hold — not regex signatures. Use alongside web-app-scanner, which covers the automatable injection/misconfig classes.

Language rule: All skill instructions use English. Final summary presented to the user must be in Vietnamese.


0. Authorization & Routing

Operates under MASTER_POLICY.md §1–§2. Test only apps you own or are explicitly authorized to assess. Every technique here sends real requests as real users; several are state-changing (mass assignment, race conditions) — use disposable/staging accounts and the --allow-write gate. If scope is unclear, ask one concise question first.

You need at least two test accounts for most of this: an owner (A) and a non-owner (B), plus an admin where roles exist, and an anonymous baseline.

Sibling skillWhen
web-app-scannerAutomatable classes: XSS, SQLi, SSRF, SSTI, redirects, exposed files
network-interceptorCapture the app's real API calls to map hidden endpoints/flows
pentest-script-generatorTurn a confirmed finding into a PoC/verify script

Why reasoning, not regex

A scanner cannot know that "a discount and a referral credit are mutually exclusive", that "refund must follow capture", or that "order 1001 belongs to user A, not user B". These flaws live in the intended behavior of the app. The method is: model the domain, then look for states/transitions/accesses the model forbids but the app allows.


Step 1 — Map the surface and the model

  1. Drive the app (or read network-interceptor captures) to enumerate endpoints, parameters, and object identifiers. Note every id, uuid, order, account, file, tenant reference.
  2. Build a Subject × Object × Action matrix: rows = principals (anon, user A, user B, premium, admin), columns = actions on resources. Fill in what should be allowed.
  3. For stateful flows (checkout, signup→trial→paid, approval), draw the state machine: states, valid transitions, preconditions, and invariants ("balance never increases without a payment", "coupon usable once per user").

Step 2 — IDOR / BOLA (object-level authorization)

Discover object IDs from list/search/export endpoints, pagination cursors, JS bundles, emails, webhooks. Then replay A's request as B (and anonymously) and compare responses.

powershell
python web-logic-auditor\scripts\authz_diff.py --url "https://app/api/orders/1001" `
    --auth-a "Cookie: session=OWNER" --auth-b "Cookie: session=OTHER" --baseline-unauth --authorized

authz_diff.py reports an IDOR/BOLA candidate when B (or anon) gets a 2xx whose body closely matches A's (--threshold, default 0.85). Confirm manually.

Extra vectors:

  • Batch/array endpoints — authorization often checked only on the first element; inject a cross-tenant ID mid-array.
  • PATCH partial updates — silent unauthorized field writes.
  • Gateway header trust — try X-User-Id / X-Organization-Id overrides.
  • Second transport — the same object via REST and GraphQL; authorization may differ.

Step 3 — Broken function-level authorization (BFLA)

Call privileged endpoints as a low-privileged user: admin routes (/admin/*, /api/internal/*), management verbs (DELETE, role changes), and functions hidden only in the UI. Use authz_diff.py with A = admin token, B = normal user; a 2xx for B on an admin action is a finding. Also test stale capabilities: downgrade a premium account and confirm premium features are actually revoked.


Step 4 — Mass assignment / parameter tampering

Add fields the client never sends and see if the server honors them (state-changing — --allow-write):

  • Privilege: "role":"admin", "is_admin":true, "verified":true, "plan":"enterprise".
  • Ownership: "user_id":<other>, "tenant_id":<other>, "account":<other>.
  • Economics: negative/oversized quantities, "price":0, extra "balance"/"credits" fields.

Send the tampered body, then read the object back and check whether the injected field stuck. The bug is confirmed by persisted state, not by the write's status code.


Step 5 — Business-logic abuse

Work the state machine from Step 1:

  • Skip / reorder / replay steps (reach payment-confirmation without payment; re-POST a one-time step).
  • Value tampering across a trusted boundary — change price/total after approval but before capture; trust line items where the server only re-checks the total.
  • Discount/coupon — stack mutually-exclusive offers; reuse a per-user coupon across accounts; apply after tax.
  • Quotas/inventory — reservation leaks, off-by-one on limits, time-window reset abuse.
  • Multi-tenant — actions whose DB WHERE clause omits the tenant key.

Each candidate is confirmed by an invariant violation you can state in one sentence ("the ledger balance rose without a payment").


Step 6 — Race conditions / idempotency

For "should happen once" actions (redeem, withdraw, apply, vote), fire many concurrent identical requests and check whether more than one succeeds:

powershell
python web-logic-auditor\scripts\race_probe.py --url "https://app/api/redeem" --method POST `
    --data "code=SAVE10" --header "Cookie: session=YOU" -n 20 --authorized --allow-write

race_probe.py reports the 2xx distribution; >1 success suggests a race window or an idempotency key scoped to the path instead of the principal. Confirm by reading server-side state (balance, coupon uses, inventory) afterwards.


Step 7 — Validate & report

For every finding record: the endpoint, the two principals used, the exact request/response pair (owner vs non-owner), and the invariant that was violated. Reproduce cross-transport where possible. Redact real data (MASTER_POLICY §3).

False-positive guards:

  • Public-by-design resources (marketing pages, shared links) are not IDOR.
  • Similar bodies that are generic error/empty templates are not access — check authz_diff.py's denied-heuristic and read the body.
  • A single 2xx in race_probe.py is normal; only multiple successes indicate a race.

Defensive fixes to recommend:

  • IDOR/BOLA → enforce per-object ownership server-side on every read/write; never trust client-supplied IDs.
  • BFLA → centralized function-level authorization; deny-by-default on privileged routes.
  • Mass assignment → allow-list bindable fields (DTOs / attr_accessible); never bind request bodies straight to models.
  • Business logic → re-validate invariants in every service/queue/job, not just the entry point.
  • Race conditions → atomic operations, DB constraints/locks, and idempotency keys scoped to the principal.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Web Logic Auditor؟

اختبار مصرح به لثغرات التحكم في الوصول ومنطق الأعمال التي لا تستطيع الماسحات القائمة على الأنماط اكتشافها، مثل IDOR/BOLA، وتعطّل التفويض على مستوى الوظائف، والإسناد الجماعي، وإساءة استخدام منطق الأعمال، وظروف السباق. تعتمد المنهجية على الاستدلال (مصفوفات Subject×Object×Action، ونمذجة آلة الحالات، وتحليل الثوابت)، وتضم أداتي مساعدة: authz_diff.py (لمقارنة استجابات هويتين) وrace_probe.py (لاختبار التزامن).

لماذا تستخدم Web Logic Auditor على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Web Logic Auditor عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Web Logic Auditor في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/ptn1411/skill/tree/main/web-logic-auditor. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Web Logic Auditor؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Web Logic Auditor؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Web Logic Auditor معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Web Logic Auditor مجانية؟

نشرها ptn1411 على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇