hunt-csrf
यह क्या करती है
यह स्किल जाँचती है कि खाते में बदलाव करने वाली कार्रवाइयाँ cross-site request forgery से सुरक्षित हैं या नहीं। यह लॉगिन सेशन, प्रोफ़ाइल बदलावों और दूसरी खाता कार्रवाइयों के अधिकृत परीक्षण के लिए है।
कब इस्तेमाल करें
- ✓जब कोई फ़ॉर्म खाता सेटिंग्स बदलता है और आप पक्का करना चाहते हैं कि उसे वैध टोकन चाहिए।
- ✓जब कोई साइट सुरक्षा के लिए केवल Origin या Referer हेडर पर निर्भर है।
- ✓जब कोई GraphQL या API endpoint GET अनुरोधों से बदलाव स्वीकार कर सकता है।
Skill का लिंक
https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-csrf/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप हमारे अधिकृत परीक्षण में जाँच सकते हैं कि हमारा प्रोफ़ाइल अपडेट फ़ॉर्म किसी दूसरी साइट से बिना वैध टोकन के सबमिट हो सकता है या नहीं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट वही कार्रवाई बदले हुए origin हेडर, गायब टोकन या एक टेस्ट पेज से भेजता है, और जाँचता है कि बदलाव फिर भी होता है या नहीं। वह उन कार्रवाइयों की रिपोर्ट देता है जो उचित सुरक्षा के बिना सफल होती हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Shortcut: a raw HTTP client beats a real cross-origin page for header-check CSRF
A raw HTTP client (curl, Burp Repeater, any scripting client) is not a browser: it will send
whatever Origin/Referer header VALUE you set, from any path, on the same connection as your
authenticated cookie. Many apps that claim to defend against CSRF only do a naive string check
on the incoming Origin/Referer header (does it contain/equal some expected value?) rather than
real same-origin enforcement — you can satisfy that check directly by setting the header, with no
actual cross-site delivery (hosting an HTML page, a headless browser) required. This is faster and
more reliable than building a real attacker page for this exact pattern:
POST /profile HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Origin: https://a-domain-the-app-treats-as-trusted-or-attacker-controlled.example
Cookie: <authenticated session>
username=csrf_poc
If some text names a SPECIFIC origin/domain as the "expected" attacker page, that literal value is
often exactly what the server's check is looking for — try it verbatim in Origin (fall back to
Referer if Origin alone doesn't flip it). Only build a real cross-origin page (actual browser
delivery) when the target does genuine SameSite/fetch-based origin enforcement that a spoofed header
can't satisfy.
Autonomous Testing Priority
CSRF only matters on state-changing actions that a browser could be tricked into making cross-site.
Testing flow:
- GET the form endpoint to establish a baseline and check what fields exist (look for hidden
csrf_token,authenticity_token,_token,csrfmiddlewaretokenfields). - POST the state-changing action without any CSRF token field. Send only the functional parameters (email, amount, etc.).
- Use a "simple-request" Content-Type —
application/x-www-form-urlencoded,multipart/form-data, ORtext/plainare the three CORS "simple" content-types a cross-origin form can send with no preflight. A JSON endpoint is CSRF-resistant only if the server rejects those — if it also accepts atext/plainbody (common), craft atext/plainpayload that parses as valid JSON (see the JSON-CSRF-via-text/plain section). Don't skip a JSON endpoint on the assumption thatapplication/jsonalone is protective. - If the action succeeds (2xx, no "invalid token" error) → CSRF is confirmed.
High-value targets (in order of impact):
- Email/password change → account takeover
- Money transfer or payment → financial fraud
- Admin actions (role assignment, user deletion)
- OAuth social-account linking → persistent ATO
Token bypass techniques when a token IS present:
- Omit the token field entirely — some frameworks only validate if the field exists, not if it's absent
- Send an empty value (
_token=) — some validate format, not presence - Copy a token from another session — some tokens aren't tied to the session
Scope: Don't test CSRF on login forms (no existing session to exploit), logout (no real impact), or read-only GET endpoints.
Crown Jewel Targets
CSRF becomes high-value when it touches state-changing actions with account-level or financial consequences. The highest-paying targets are:
- Account takeover vectors: OAuth/SSO flows (RelayState manipulation), social account linking/unlinking (Oculus-Facebook, SocialClub), import-friends features that expose OAuth tokens
- Authentication infrastructure: Login CSRF, session fixation via CSRF, forced account association
- API endpoints accepting cross-origin POST: JSON APIs, heartbeat/activity APIs, anything that skips Content-Type enforcement
- Third-party integrations: Grafana, monitoring dashboards, embedded analytics — often lag on CSRF protections
- Social platforms: Twitter/X collections, friend imports, social graph mutations — high-volume, authenticated actions with real user impact
Asset types that pay most: Core product auth flows > API gateways > third-party integrations running on subdomains > admin panels.
Attack Surface Signals
URL Patterns
/oauth/authorize?RelayState=
/accounts/link
/import/friends
/api/v*/heartbeat
/api/v*/collect
/monitoring/* (Grafana, Prow, Prometheus)
/auth/saml/callback
/connect/* (social integrations)
Response Header Signals
# Missing or weak SameSite cookie attributes
Set-Cookie: session=abc123; HttpOnly # no SameSite = vulnerable
Set-Cookie: sess
अक्सर पूछे जाने वाले सवाल
CSRF क्या है?
जब कोई साइट लॉगिन किए ब्राउज़र को ऐसा अनुरोध भेजने पर मजबूर करती है जो यूज़र ने नहीं चाहा था।
क्या परीक्षण के लिए असली हमलावर वेबसाइट चाहिए?
हमेशा नहीं। स्किल कहती है कि जब सर्वर केवल हेडर का पाठ जाँचता है, तो सेट किया गया हेडर वाला सादा अनुरोध काफ़ी हो सकता है।
कौन-से हेडर परखे जाते हैं?
स्किल पहले Origin हेडर परखती है, और ज़रूरत हो तो Referer पर जाती है।
जानकारी
लेखक का मूल विवरण
Hunting skill for csrf vulnerabilities. Built from 15 public bug bounty reports including modern variants — SameSite=Lax sibling-subdomain bypass (Argo CD CVE-2024-22424), GraphQL mutations-via-GET (GitLab $3,370), framework-wide CSRF middleware disabled (Stripe Dashboard $5,000), path-traversal CSRF-token bypass (GitHub Enterprise CVE-2022-23732 $10k), Origin-omission bypass (TikTok $2,500), OAuth-state null-byte (Streamlabs), WebSocket CSRF / CSWSH (Coda), default-SameSite email-change → ATO (YoYo Games $400), social-account-link CSRF (HackerOne), JSON-CSRF via text/plain on email-change (Ti
लोकप्रियता
- GitHub स्टार
- 5.4k
- रैंकिंग में स्थान
- #14903
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
apk-redteam-pipeline
5.4kयह आपके एजेंट को Android ऐप में सुरक्षा कमज़ोरियाँ परखने देती है: APK फ़ाइल ढूँढने और उसे decompile करने से लेकर उजागर secrets जाँचने तक।
bugcrowd-reporting
5.4kयह आपके एजेंट को Bugcrowd पर बेहतर कमज़ोरी रिपोर्ट लिखने देती है, सही श्रेणी चुनते हुए और दायरे से बाहर वाली आपत्तियों का जवाब देते हुए।
cloud-iam-deep
5.4kयह आपके एजेंट को अधिकृत सुरक्षा परीक्षण में जाँचने देती है कि मिली क्लाउड credential AWS, Azure या Google Cloud पर क्या-क्या एक्सेस कर सकती है।
enterprise-vpn-attack
5.4kयह आपके एजेंट को अधिकृत परीक्षण में Cisco, Fortinet, Citrix और अन्य VPN उपकरणों की ज्ञात कमज़ोरियाँ जाँचने देती है।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।