شعار 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 يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها asdfgh1445 على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Strix•CSRF 测试 في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/asdfgh1445/ctf-super-hub/tree/main/strix-csrf
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
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

فعّل Strix•CSRF 测试 في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Strix•CSRF 测试 تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Strix•CSRF 测试 بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف 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 测试؟

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

لماذا تستخدم Strix•CSRF 测试 على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Strix•CSRF 测试 عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Strix•CSRF 测试 في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/asdfgh1445/ctf-super-hub/tree/main/strix-csrf. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Strix•CSRF 测试؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Strix•CSRF 测试؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Strix•CSRF 测试 معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Strix•CSRF 测试 مجانية؟

نشرها asdfgh1445 على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇