Reversing Browser Extensionsのロゴ

Reversing Browser Extensions

コミュニティ
trilwu
reversing-browser-extensions

Chrome/Firefoxブラウザー拡張機能をリバースエンジニアリングし、セキュリティレビューを行います。CRX/XPIの展開、過剰な権限がないかを確認するmanifestの読み取り、ページ、content script、background service worker、native messaging host間の信頼境界の追跡を行います。不審な拡張機能や過剰な権限を持つ拡張機能を分析するとき、自社の拡張機能の権限モデルを監査するとき、またはcontent scriptが特権APIをWebページに公開する仕組みを調査するときに使用します。

Add to TypingMind

概要

公開者trilwu
リポジトリsecskills
スキル名reversing-browser-extensions
スター
144
フォーク
15
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/trilwu/secskills.git /tmp/secskills
mkdir -p .claude/skills
cp -r /tmp/secskills/secskills-core/skills/reversing-browser-extensions .claude/skills/reversing-browser-extensions
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

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

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

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

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

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

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

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Reversing Browser Extensions

A browser extension is a small privileged program wedged next to every page the user visits. Its security is almost entirely about a boundary: the content script runs beside untrusted web content but can talk to a background context that holds real permissions — cookies, tabs, the network, sometimes a native process. Reversing an extension is reading that boundary and finding where the privileged side trusts the unprivileged one.

When to Use

  • Analyzing a suspicious, over-permissioned, or unknown extension's behaviour
  • Auditing an extension's manifest and message-passing for privilege leaks
  • Investigating how a content script exposes background/native capabilities to a page
  • Recovering what an extension actually does versus what its store listing claims

When NOT to Use

  • Deobfuscating the extension's bundled JavaScript as a code-reading problem — use reversing-obfuscated-javascript for the bundle, then return here for the privilege model.
  • Detonating and extracting IOCs from a malicious extension as part of an incident — use analyzing-malware.
  • Testing the web application the extension interacts with — testing-web-applications.
  • A desktop app that happens to embed a browser — testing-thick-clients.

Get the Code and Read the Manifest

An extension ships as a CRX (Chrome) or XPI (Firefox) — both are ZIP archives; unzip and read. You can pull a published extension from the store's CRX endpoint, or straight from the browser profile's Extensions directory.

The manifest is the map. Read it before any code:

  • manifest_version — MV2 (background page, webRequest blocking) vs MV3 (background service worker, declarativeNetRequest, remote code forbidden). The version changes where the privileged logic lives and how it persists.
  • permissions and host_permissions — <all_urls>, tabs, cookies, webRequest, debugger, nativeMessaging, scripting. Judge each against what the extension claims to do; <all_urls> + cookies on a "dark theme" extension is the tell.
  • content_scripts — which pages the extension injects into, and therefore which pages' content it is exposed to.
  • externally_connectable — which web origins may send it messages directly; a permissive value is an attack surface.
  • web_accessible_resources — extension files a page can load, which can leak the extension's presence or expose an injectable resource.
  • content_security_policy — a loosened CSP (unsafe-eval, remote script) is a code-injection surface.

The Trust Boundary

Extensions are isolated by design; the bugs are in the seams between contexts:

  • Page ↔ content script. The content script runs in an isolated world — it shares the DOM with the page but not JS variables. The leak is through the DOM and window.postMessage: a content script that acts on postMessage data without checking event.origin/event.source lets any page in its injection scope drive it.
  • Content script → background/service worker. The content script relays messages to the background context to do privileged work (chrome.runtime messaging). If the background handler does not validate the sender and the message shape, a compromised or malicious page (via the content script) reaches privileged APIs. This is the central extension bug: privileged operations gated only by a message the page can influence.
  • onMessageExternal / externally_connectable. A web page listed here talks to the background directly — same validation question, one hop shorter.
  • Native messaging. nativeMessaging connects the extension to a local native host binary. A weakly validated message path here is browser-to-native code execution; trace what the native host does with what it receives.

For each privileged capability, answer: what input reaches it, and from how far out (background only, content script, or an arbitrary page)?

What to Flag

  • Over-broad permissions disproportionate to function.
  • Unvalidated message senders on runtime.onMessage / onMessageExternal — the privilege-escalation path from page to extension.
  • postMessage handling without origin checks in content scripts.
  • Remote code / eval or a CSP that permits it (also an MV3 policy violation).
  • Data exfiltration — traffic to endpoints unrelated to the stated purpose; reading page content, form fields, or cookies and sending them out.
  • Native messaging to a host that acts on unvalidated input.
  • Update/supply-chain risk — an extension that loads remote config or code, or one whose ownership recently changed.

Deobfuscate When Needed

Store extensions are frequently minified or bundled, and malicious ones obfuscated. When the code is unreadable, hand the bundle to reversing-obfuscated-javascript — unbundle and deobfuscate there, then read the recovered logic against the trust boundary above. Debug the live extension in the browser's extension DevTools to watch the message passing at runtime.

Rationalizations to Reject

  • "The store reviewed it, so it's fine." Store review is shallow and bypassed regularly; an ownership change can turn a clean extension malicious in one update. Read the code it actually ships.
  • "Content scripts are sandboxed, so page compromise can't reach the extension." The isolated world separates JS, not the DOM or postMessage. An unchecked message handler is the bridge.
  • "The background just relays a message." If it relays a page-influenced message into a privileged API without validating the sender, that relay is the vulnerability.
  • "It only asks for the permissions it needs." Verify against behaviour. <all_urls>, cookies, debugger, and nativeMessaging are the ones that turn a small bug into a large one.
  • "It's minified, so I can't review it." Minification is reversible; unbundle and deobfuscate first, then review.

References

  • reversing-obfuscated-javascript — unbundling and deobfuscating the extension's JS
  • analyzing-malware — detonation and IOCs for a confirmed-malicious extension
  • testing-web-applications — the sites and APIs the extension talks to
  • auditing-supply-chain — ownership-change and remote-code update risk

よくある質問

AIスキル「Reversing Browser Extensions」では何ができますか?

Chrome/Firefoxブラウザー拡張機能をリバースエンジニアリングし、セキュリティレビューを行います。CRX/XPIの展開、過剰な権限がないかを確認するmanifestの読み取り、ページ、content script、background service worker、native messaging host間の信頼境界の追跡を行います。不審な拡張機能や過剰な権限を持つ拡張機能を分析するとき、自社の拡張機能の権限モデルを監査するとき、またはcontent scriptが特権APIをWebページに公開する仕組みを調査するときに使用します。

TypingMindでReversing Browser Extensionsを使うメリットは何ですか?

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

TypingMindにReversing Browser Extensionsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/trilwu/secskills/tree/main/secskills-core/skills/reversing-browser-extensionsを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Reversing Browser Extensionsを使えるAIモデルはどれですか?

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

Reversing Browser Extensionsで使えるAIモデルの数に制限はありますか?

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

AIスキル「Reversing Browser Extensions」は無料ですか?

はい。trilwuがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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