AI News HubLIVE
站内改写3 分钟阅读

待翻译:AI Pen Testing Chrome Extension

AI 服务暂时不可用,以下为来源摘要,待恢复后补全翻译:Notifications You must be signed in to change notification settings Fork 0 Star 0 BranchesTags Open more actions menu Folders and files NameName Last commit message Last commit date Latest commit History 1 Commit 1 Comm…

来源Hacker News AI作者: brianhama

AI 服务暂时不可用,以下为来源正文,待恢复后补全翻译。

Notifications You must be signed in to change notification settings Fork 0 Star 0 BranchesTags Open more actions menu Folders and files NameName Last commit message Last commit date Latest commit History 1 Commit 1 Commit background background content content devtools devtools docs docs icons icons lib lib popup popup README.md README.md manifest.json manifest.json Repository files navigation A Chrome extension (Manifest V3) that, when enabled for a tab, captures every first-party JavaScript file the site loads and sends it to an OpenAI model with a prompt tuned to surface server-side attack vectors — API endpoints, injectable parameters, SSRF/IDOR/SQLi/auth-bypass surface, leaked secrets — plus concrete routes for further testing. Results render in a dedicated Security Audit panel in Chrome DevTools. I built this tool because it automates the workflow that I usually use to kick off a pentest for a website. It doesn't do anything too fancy, but it saves me a lot of time and I thought others might find it useful as well. Feel free to submit pull requests. What it does Per-tab toggle from the toolbar (and from the panel). Off by default; the content script stays completely idle until you enable a tab. First-party only. Third-party CDNs/analytics are ignored. Scope is configurable: same-origin (default), same-hostname, or same-site (eTLD+1, approx). Server-side focus. The default prompt treats client JS as a map of the backend and hunts for: reconstructed API/GraphQL/RPC endpoints, injection reaching the server (SQLi/NoSQLi/command/SSTI/XXE), SSRF, IDOR & broken access control, mass assignment, auth weaknesses, path traversal, insecure deserialization, business-logic gaps, and secret/config leakage. DevTools panel with per-script cards: overall risk, reconstructed endpoint table, detected secrets, and findings (severity, confidence, CWE, evidence, testing routes, and a fix). Configurable API key, model (picker + custom id), OpenAI-compatible base URL, concurrency, chunk size, temperature, token budget, inline-script analysis, skip patterns, and a custom system prompt. Extras: content-hash result cache (dedupes identical bundles), large-file chunking, a paste-a-snippet analyzer, severity/text filtering, and Markdown/JSON report export. Install (unpacked) Open chrome://extensions, enable Developer mode. Load unpacked → select this folder. Configure Open DevTools (⌥⌘I / F12) Security Audit tab gear icon → set your OpenAI API key and model Save. Audit Website Open a site you're authorized to test. Click the toolbar icon → Audit this tab. Open DevTools (⌥⌘I / F12) Security Audit tab How capture works A document_start content script (all frames) watches for elements and resource performance entries, fetches first-party script bodies (same-origin fetch, so no CORS issues), hashes them, and forwards them to the background service worker. The worker runs a bounded-concurrency queue of OpenAI calls, caches by content hash, and streams results to the panel over a long-lived port. Because the DevTools panel occupies the tab's debugging channel, capture deliberately avoids chrome.debugger and relies on content-script fetches instead. Permissions Permission Why storage Settings + result cache (local); per-tab runtime state (session). tabs Resolve the active tab / its origin; message content scripts. scripting Inject the content script into a tab that was loaded before enabling. activeTab Grants host access to the current tab on the toolbar click, so enabling a pre-existing tab can inject and start immediately. webNavigation Distinguish real document commits from SPA history/hash changes, so in-app navigation doesn't wipe results. host_permissions: api.openai.com Call the OpenAI API from the background/panel. optional_host_permissions Requested on demand: the page origin when you enable, a custom base-URL host, and broad host access when you pick a non-origin scope. content scripts on http(s)://* Observe scripts on the site under test (idle unless enabled; only the top frame and same-origin subframes ever capture). Privacy & safety notes Your API key is stored in chrome.storage.local on your machine and sent only to the endpoint you configure (default api.openai.com). First-party script source code is sent to that endpoint for analysis. Don't enable this on sites whose code you may not submit to a third party. Script bodies are fetched with credentials: 'omit', so the authenticated / per-user variant of a dynamic script endpoint (which can embed session tokens or PII) is never pulled and forwarded. Only the top frame and same-origin subframes capture — scripts inside cross-origin third-party iframes are never read or sent. File layout manifest.json background/service-worker.js coordination, queue, badge, streaming content/content-script.js first-party JS capture (idle until enabled) popup/ toolbar enable/disable + quick stats devtools/ panel registration + full audit UI lib/ constants, storage, prompt, OpenAI client icons/ icons Development No build step: ES modules load directly (background is a module worker; popup and panel pages use ; the content script is a standalone classic script). Syntax check: node --check on each .js, or run the checks in tools/ (see below). Disclaimer This tool is for legit security testing and research and we are not responsible for any misuse for illegal or unauthorized purposes! Activity Stars 0 stars Watchers 0 watching Forks 0 forks Report repository