Strix•CSRF 测试 标志

Strix•CSRF 测试

社区
asdfgh1445
Strix•CSRF 测试

Strix CSRF 测试手册,覆盖 token 绕过、SameSite、CORS 误配与状态变更滥用;触发名:strix-csrf

概览

发布者asdfgh1445
代码仓库ctf-super-hub
技能名称Strix•CSRF 测试
星标数
836
复刻数
105
附带文件
仅含指令
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 asdfgh1445 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Strix•CSRF 测试 AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/asdfgh1445/ctf-super-hub/tree/main/strix-csrf
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/asdfgh1445/ctf-super-hub.git /tmp/ctf-super-hub
mkdir -p .claude/skills
cp -r /tmp/ctf-super-hub/strix-csrf .claude/skills/asdfgh1445-strix-csrf
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Strix•CSRF 测试,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Strix•CSRF 测试。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Strix•CSRF 测试 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

CSRF

Cross-site request forgery abuses ambient authority (cookies, HTTP auth) across origins. Do not rely on CORS alone; enforce non-replayable tokens and strict origin checks for every state change.

Attack Surface

Session Types

  • Web apps with cookie-based sessions and HTTP auth
  • JSON/REST, GraphQL (GET/persisted queries), file upload endpoints

Authentication Flows

  • Login/logout, password/email change, MFA toggles

OAuth/OIDC

  • Authorize, token, logout, disconnect/connect endpoints

High-Value Targets

  • Credentials and profile changes (email/password/phone)
  • Payment and money movement, subscription/plan changes
  • API key/secret generation, PAT rotation, SSH keys
  • 2FA/TOTP enable/disable; backup codes; device trust
  • OAuth connect/disconnect; logout; account deletion
  • Admin/staff actions and impersonation flows
  • File uploads/deletes; access control changes

Reconnaissance

Session and Cookies

  • Inspect cookies: HttpOnly, Secure, SameSite (Strict/Lax/None)
  • Lax allows cookies on top-level cross-site GET; None requires Secure
  • Determine if Authorization headers or bearer tokens are used (generally not CSRF-prone) versus cookies (CSRF-prone)

Token and Header Checks

  • Locate anti-CSRF tokens (hidden inputs, meta tags, custom headers)
  • Test removal, reuse across requests, reuse across sessions, binding to method/path
  • Verify server checks Origin and/or Referer on state changes
  • Test null/missing and cross-origin values

Method and Content-Types

  • Confirm whether GET, HEAD, or OPTIONS perform state changes
  • Try simple content-types to avoid preflight: application/x-www-form-urlencoded, multipart/form-data, text/plain
  • Probe parsers that auto-coerce text/plain or form-encoded bodies into JSON

CORS Profile

  • Identify Access-Control-Allow-Origin and -Credentials
  • Overly permissive CORS is not a CSRF fix and can turn CSRF into data exfiltration
  • Test per-endpoint CORS differences; preflight vs simple request behavior can diverge

Key Vulnerabilities

Navigation CSRF

  • Auto-submitting form to target origin; works when cookies are sent and no token/origin checks are enforced
  • Top-level GET navigation can trigger state if server misuses GET or links actions to GET callbacks

Simple Content-Type CSRF

  • application/x-www-form-urlencoded and multipart/form-data POSTs do not require preflight
  • text/plain form bodies can slip through validators and be parsed server-side

JSON CSRF

  • If server parses JSON from text/plain or form-encoded bodies, craft parameters to reconstruct JSON
  • Some frameworks accept JSON keys via form fields (e.g., data[foo]=bar) or treat duplicate keys leniently

Login/Logout CSRF

  • Force logout to clear CSRF tokens, then chain login CSRF to bind victim to attacker's account
  • Login CSRF: submit attacker credentials to victim's browser; later actions occur under attacker's account

OAuth/OIDC Flows

  • Abuse authorize/logout endpoints reachable via GET or form POST without origin checks
  • Exploit relaxed SameSite on top-level navigations
  • Open redirects or loose redirect_uri validation can chain with CSRF to force unintended authorizations

File and Action Endpoints

  • File upload/delete often lack token checks; forge multipart requests to modify storage
  • Admin actions exposed as simple POST links are frequently CSRFable

GraphQL CSRF

  • If queries/mutations are allowed via GET or persisted queries, exploit top-level navigation with encoded payloads
  • Batched operations may hide mutations within a nominally safe request

WebSocket CSRF

  • Browsers send cookies on WebSocket handshake
  • Enforce Origin checks server-side; without them, cross-site pages can open authenticated sockets and issue actions

Bypass Techniques

SameSite Nuance

  • Lax-by-default cookies are sent on top-level cross-site GET but not POST
  • Exploit GET state changes and GET-based confirmation steps
  • Legacy or nonstandard clients may ignore SameSite; validate across browsers/devices

Origin/Referer Obfuscation

  • Sandbox/iframes can produce null Origin; some frameworks incorrectly accept null
  • about:blank/data: URLs alter Referer
  • Ensure server requires explicit Origin/Referer match

Method Override

  • Backends honoring _method or X-HTTP-Method-Override may allow destructive actions through a simple POST

Token Weaknesses

  • Accepting missing/empty tokens
  • Tokens not tied to session, user, or path
  • Tokens reused indefinitely; tokens in GET
  • Double-submit cookie without Secure/HttpOnly, or with predictable token sources

Content-Type Switching

  • Switch between form, multipart, and text/plain to reach different code paths
  • Use duplicate keys and array shapes to confuse parsers

Header Manipulation

  • Strip Referer via meta refresh or navigate from about:blank
  • Test null Origin acceptance
  • Leverage misconfigured CORS to add custom headers that servers mistakenly treat as CSRF tokens

Special Contexts

Mobile/SPA

  • Deep links and embedded WebViews may auto-send cookies; trigger actions via crafted intents/links
  • SPAs that rely solely on bearer tokens are less CSRF-prone, but hybrid apps mixing cookies and APIs can still be vulnerable

Integrations

  • Webhooks and back-office tools sometimes expose state-changing GETs intended for staff
  • Confirm CSRF defenses there too

Chaining Attacks

  • CSRF + IDOR: force actions on other users' resources once references are known
  • CSRF + Clickjacking: guide user interactions to bypass UI confirmations
  • CSRF + OAuth mix-up: bind victim sessions to unintended clients

Testing Methodology

  1. Inventory endpoints - All state-changing endpoints including admin/staff
  2. Note request details - Method, content-type, whether reachable via simple requests
  3. Assess session model - Cookies with SameSite attrs, custom headers, tokens
  4. Check defenses - Anti-CSRF tokens and Origin/Referer enforcement
  5. Attempt preflightless delivery - Form POST, text/plain, multipart/form-data
  6. Test navigation - Top-level GET navigation
  7. Cross-browser validation - Behavior differs by SameSite and navigation context

Validation

  1. Demonstrate a cross-origin page that triggers a state change without user interaction beyond visiting
  2. Show that removing the anti-CSRF control (token/header) is accepted, or that Origin/Referer are not verified
  3. Prove behavior across at least two browsers or contexts (top-level nav vs XHR/fetch)
  4. Provide before/after state evidence for the same account
  5. If defenses exist, show the exact condition under which they are bypassed (content-type, method override, null Origin)

False Positives

  • Token verification present and required; Origin/Referer enforced consistently
  • No cookies sent on cross-site requests (SameSite=Strict, no HTTP auth) and no state change via simple requests
  • Only idempotent, non-sensitive operations affected

Impact

  • Account state changes (email/password/MFA), session hijacking via login CSRF
  • Financial operations, administrative actions
  • Durable authorization changes (role/permission flips, key rotations) and data loss

Pro Tips

  1. Prefer preflightless vectors (form-encoded, multipart, text/plain) and top-level GET if available
  2. Test login/logout, OAuth connect/disconnect, and account linking first
  3. Validate Origin/Referer behavior explicitly; do not assume frameworks enforce them
  4. Toggle SameSite and observe differences across navigation vs XHR
  5. For GraphQL, attempt GET queries or persisted queries that carry mutations
  6. Always try method overrides and parser differentials
  7. Combine with clickjacking when visual confirmations block CSRF

Summary

CSRF is eliminated only when state changes require a secret the attacker cannot supply and the server verifies the caller's origin. Tokens and Origin checks must hold across methods, content-types, and transports.

常见问题

Strix•CSRF 测试 AI 技能有什么作用?

Strix CSRF 测试手册,覆盖 token 绕过、SameSite、CORS 误配与状态变更滥用;触发名:strix-csrf

为什么在 TypingMind 中使用 Strix•CSRF 测试?

因为您只需安装一次,就能搭配任何模型使用。Strix•CSRF 测试 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Strix•CSRF 测试?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/asdfgh1445/ctf-super-hub/tree/main/strix-csrf。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Strix•CSRF 测试?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Strix•CSRF 测试 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Strix•CSRF 测试 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Strix•CSRF 测试 AI 技能免费吗?

asdfgh1445 已在 GitHub 上发布了该技能。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇