hunt-csrf

Detect exploitable CSRF weaknesses in authenticated web applications.

2|Updated Apr 11, 2025
One-click install
npx skills add https://github.com/Carlos-Reyes-UTP/Desarrollo-de-Sistema-de-Ventas-Empresas-de-Moda --skill hunt-csrf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hunt-csrf
Source: https://github.com/Carlos-Reyes-UTP/Desarrollo-de-Sistema-de-Ventas-Empresas-de-Moda/tree/main/.agent/skills/hunt-csrf
Command: npx skills add https://github.com/Carlos-Reyes-UTP/Desarrollo-de-Sistema-de-Ventas-Empresas-de-Moda --skill hunt-csrf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps security teams identify Cross-Site Request Forgery (CSRF) flaws that let an attacker perform state-changing actions on behalf of a victim, potentially leading to account takeover, financial impact, or persistent account linking.

Core Features & Use Cases

  • CSRF target prioritization: Focuses on high-value flows like account linking/unlinking, OAuth/SAML callback handling, authentication infrastructure, and cross-origin POST JSON APIs.
  • Attack surface discovery signals: Pinpoints risky patterns such as missing/weak SameSite cookie attributes, weak Origin/Referer/CORS posture, token staticness or omission, and JSON endpoints that accept cross-origin “simple” requests.
  • Reproducible hunting workflow: Provides a step-by-step methodology to validate exploitability quickly and build impact-driven proof-of-concept evidence.

Quick Start

Use the hunt-csrf skill to systematically test an authenticated web application for exploitable CSRF by validating cookie SameSite behavior, CSRF token correctness, and OAuth/SAML or JSON endpoint state changes.

Frequently Asked Questions about hunt-csrf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find CSRF weaknesses that enable account takeover?

To find CSRF weaknesses enabling account takeover, systematically test authenticated web applications for missing SameSite cookie attributes, static or omitted CSRF tokens, and insufficient Origin/Referer validation on state-changing endpoints. Prioritize high-value flows like account linking and OAuth callback handling.

What is a CSRF token validation weakness in OAuth and SAML flows?

A CSRF token validation weakness in OAuth and SAML flows occurs when RelayState or callback handlers accept cross-origin state-changing requests without verifying dynamic tokens, allowing attackers to hijack authenticated sessions. This often happens when tokens are static, omitted, or substitutable across requests.

How do I test SameSite cookie attributes for cross-origin request forgery risks?

Test SameSite cookie attributes for CSRF risks by mapping authenticated endpoints and checking if cookies lack SameSite restrictions, allowing cross-origin POST requests to succeed. Validate by reproducing state-changing requests from a different origin under the victim’s session.

Does SameSite cookie protection stop CSRF on JSON endpoints?

SameSite cookie protection may not stop CSRF on JSON endpoints if those endpoints accept cross-origin simple requests without additional token checks. Endpoints relying solely on cookies without SameSite enforcement or dynamic CSRF tokens remain vulnerable to state-changing attacks.

What's the best way to prioritize CSRF testing targets in a web application?

The best way to prioritize CSRF testing targets is focusing on high-value flows like account linking/unlinking, authentication infrastructure, OAuth/SAML callback handling, and cross-origin JSON APIs. These state-changing endpoints often yield account takeover if CSRF validation is insufficient.

Why does my CSRF token validation fail to prevent account takeover?

CSRF token validation fails to prevent account takeover when tokens are static across sessions, omitted entirely, or substitutable with attacker-controlled values. Exploitable weaknesses in social account linking or OAuth flows let attackers force state changes under a victim’s authenticated session.