Skip to content

Agent2FA v0.1.0 — Out-of-band 2FA for AI Browser Agents

Latest

Choose a tag to compare

@stone16 stone16 released this 29 Nov 08:45

Agent2FA v0.1.0 — Out-of-band 2FA for AI Browser Agents

Out-of-band 2FA (Touch ID & Telegram) before your AI browser agent clicks Pay, Delete, or Send.

Major US banks updated customer guidance clarifying that users bear liability for unauthorized AI agent purchases (reported Nov 2026 by TechRadar & Bloomberg). In-page confirmation popups can be clicked by agents — Agent2FA moves approval out of the web page into an isolated hardware-backed confirmation sheet or directly to your phone.

What's Included in v0.1.0

  • Dual-Layer Chrome MV3 Guard (packages/extension)
    • Network-layer declarativeNetRequest hard-blocking of checkout navigations, fetch() POSTs, form.submit(), and navigator.sendBeacon() (ping).
    • ISOLATED-world document_start capture guard resistant to MAIN-world prototype tampering, covering open Shadow DOM buttons via composedPath(), card-number inputs (Luhn detection + [REDACTED_CARD] scrubbing), and destructive actions (deleting repos, DNS records, cloud resources, irreversible sends).
    • Minimal permissions: no debugger, no declarativeNetRequestFeedback, and <all_urls> strictly opt-in via optional_host_permissions.
  • Zero-Backend Out-of-Band Approvals
    • Native chrome-extension:// WebAuthn (Touch ID, Windows Hello, system password, or iPhone QR Passkey) with local ECDSA P-256 + UP/UV + bound-challenge verification.
    • Optional BYO Telegram Bot inline-button approval ([Approve Once (60s)] / [Block]) with MV3 keepalive port and optional from.id user allowlist for group chats, plus optional Slack/ntfy secondary alerts.
    • Fail-closed 60-second single-use grants strictly bound to host + actionHash, immediately re-locking after one use and rejecting replays.
  • Human Minimal v2 UI + Complete Bilingual i18n (en & zh-CN)
    • Calm consumer hardware-security confirmation sheet (approve.html), toolbar popover (popup.html), and settings/activity console (options.html) with live EN / 中文 switching.
  • Single-File Companion MCP CLI (@agent2fa/mcp-cli · node packages/mcp-cli/dist/index.js mcp)
    • Standard stdio JSON-RPC 2.0 MCP server exposing a cooperative request_approval approval gate for Claude Code, OpenClaw, Cursor, and Browser Use (automatic hard-blocking is enforced by the Chrome extension's DNR + isolated-world layers).
    • Supports BYO Telegram Bot (use a separate Bot Token from the extension if running both simultaneously; set AGENT2FA_TELEGRAM_USER_ID for group chats) and an ephemeral http://localhost:<port> WebAuthn approval server (never 127.0.0.1, with strict same-origin + application/json CSRF protection), minting 60-second single-use HMAC-SHA256 grant tokens (a2fa1_...) and writing redacted 0600 JSONL audit logs to ~/.agent2fa/audit.jsonl.
    • CLI rule evaluator: node packages/mcp-cli/dist/index.js check --url <url> [--action <text>].
  • Shared Deterministic Rule Pack (packages/rules)
    • Declarative default-rules.v1.json covering major payment gateways, cloud billing consoles, domain registrars, and destructive actions with zero-false-positive editorial exclusions (/docs/, /blog/, /en-us/docs/, query-string immunity).

Install v0.1.0

  1. Download agent2fa-v0.1.0-chrome.zip from the release assets below and unzip it.
  2. Open chrome://extensions, enable Developer mode, and click Load unpacked on the extracted folder.
  3. Click Agent2FA in your Chrome toolbar → Settings to enroll Touch ID (or connect your own Telegram Bot).

Honest Threat Model

Agent2FA strongly defends against indirect prompt injection, agent misclicks/hallucinations, silent checkout submissions (fetch / form.submit() / sendBeacon), and fake in-page popups. It does not stop local malware that already possesses unrestricted OS keyboard/mouse control or raw CDP access to disable extensions. See README.md for our empirical Chrome 158 boundary matrix and the One-Shot Agent Browser Hardening Prompt.

Checksums (SHA-256)

50195d6aa6a3f8671f6c4bd4ce4bfe3db414d1e16d673664c988dcd95651d996  agent2fa-v0.1.0-chrome.zip