One-click install
npx skills add https://github.com/securityfortech/hacking-skills --skill csrf-securityfortech
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: csrf
Source: https://github.com/securityfortech/hacking-skills/tree/main/skills/web/client-side/csrf
Command: npx skills add https://github.com/securityfortech/hacking-skills --skill csrf-securityfortech

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps identify and mitigate Cross-Site Request Forgery (CSRF) vulnerabilities, protecting authenticated users from malicious forged requests.

Core Features & Use Cases

  • Vulnerability Detection: Identifies missing or predictable CSRF tokens, improper cookie attributes, and insecure JSON endpoint configurations.
  • Exploitation Testing: Provides methods to test CSRF vulnerabilities using HTML forms, XHR requests, and CORS-enabled fetch.
  • Use Case: A web application allows users to change their password via a POST request. This Skill can test if that request is protected by a CSRF token, preventing an attacker from tricking a logged-in user into changing their password on a malicious site.

Quick Start

Test the provided web application for Cross-Site Request Forgery vulnerabilities.

Frequently Asked Questions about csrf

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

FAQPage Schema
How do I test for CSRF vulnerabilities in web applications?▼

To test for CSRF vulnerabilities, analyze state-changing requests for missing or predictable CSRF tokens, inadequate SameSite cookie attributes, and insecure JSON endpoint configurations using automated vulnerability testing methods.

What is a CSRF token and how does it prevent Cross-Site Request Forgery attacks?▼

A CSRF token is a unique, unpredictable value required for state-changing requests that prevents Cross-Site Request Forgery attacks by verifying requests originate from the legitimate application rather than a malicious site.

How do I validate CSRF findings using HTML auto-submitting forms and XHR requests?▼

Validate CSRF findings by generating proof-of-concept payloads using HTML auto-submitting forms, XHR requests, and CORS-enabled fetch to confirm insecure endpoints process forged cross-site requests successfully.

Does Burp Suite or OWASP ZAP work for generating CSRF proof-of-concept exploits?▼

Yes, Burp Suite and OWASP ZAP work for generating CSRF proof-of-concept exploits by intercepting state-changing requests and crafting the necessary HTML forms or fetch requests to demonstrate the vulnerability.

Can I use SameSite cookie attributes to prevent CSRF on insecure JSON endpoints?▼

Yes, you can use SameSite cookie attributes to prevent CSRF on insecure JSON endpoints by enforcing strict browser policies, though you must also validate that endpoints reject cross-origin XHR and CORS-enabled fetch requests.