Web Logic Auditorのロゴ

Web Logic Auditor

コミュニティ
ptn1411
web-logic-auditor

パターンベースのスキャナーでは見つけられない、アクセス制御やビジネスロジックの不備を許可を得てテストします。対象はIDOR/BOLA、関数レベルの認可不備、マスアサインメント、ビジネスロジックの悪用、競合状態です。推論に基づく手法(Subject×Object×Actionマトリクス、ステートマシンモデリング、不変条件の分析)に加え、補助ツールとしてauthz_diff.py(2つのIDのレスポンスを比較)とrace_probe.py(並行処理を調査)を利用します。

Add to TypingMind

概要

公開者ptn1411
リポジトリskill
スキル名web-logic-auditor
スター
275
フォーク
133
同梱ファイル
2
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 2個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    ptn1411がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Web Logic Auditor」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/ptn1411/skill/tree/main/web-logic-auditor
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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で使用

TypingMindのチャットでWeb Logic Auditorを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にWeb Logic Auditorを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Web Logic Auditorは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じ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.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Web Logic Auditor」では何ができますか?

パターンベースのスキャナーでは見つけられない、アクセス制御やビジネスロジックの不備を許可を得てテストします。対象はIDOR/BOLA、関数レベルの認可不備、マスアサインメント、ビジネスロジックの悪用、競合状態です。推論に基づく手法(Subject×Object×Actionマトリクス、ステートマシンモデリング、不変条件の分析)に加え、補助ツールとしてauthz_diff.py(2つのIDのレスポンスを比較)とrace_probe.py(並行処理を調査)を利用します。

TypingMindでWeb Logic Auditorを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Web Logic Auditorはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにWeb Logic Auditorをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/ptn1411/skill/tree/main/web-logic-auditorを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Web Logic Auditorを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Web Logic Auditorで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもWeb Logic Auditorを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Web Logic Auditor」は無料ですか?

ptn1411がGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇