Skip to content

About

Turn a vulnerable request into ready-to-use CSRF PoCs — HTML form, JavaScript fetch exploit, and cURL — right in your browser. No dependencies, no backend, works offline.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

CSRF PoC Generator

Educational Use Only: This project is created strictly for educational purposes and authorized security testing on systems you own or have explicit permission to test. Do not use it against targets without prior authorization.

A zero-dependency, single-page web tool that turns a vulnerable request into ready-to-use Cross-Site Request Forgery proof-of-concept artifacts: an auto-submitting HTML form, a fetch()-based JavaScript exploit, and an equivalent cURL command.

Runs entirely in the browser — no backend, no build step, works offline.

Run it

Just open index.html, or serve the folder:

python3 -m http.server 8080
# → http://localhost:8080

Usage

  1. Manual input — choose the protocol (https by default, or http) and set the target URL, method, where parameters live (body vs query string), and content type. Add parameter key/value pairs and custom headers. For multipart/form-data, tick the file box on any parameter to render a file-upload input. Toggle auto-submit on load off to make the PoC wait for a "send" button click instead of firing immediately (applies to both the HTML and JS exploits).
  2. Paste curl / request — drop in a curl command or a raw HTTP request; it is parsed into the form for you (method, URL, headers, -d/--data-raw bodies, -F multipart fields, query strings).

Outputs update live. Each PoC card has copy and download buttons:

Output Notes
HTML form PoC Classic auto-submitting <form>. Recommended for GET and POST with urlencoded/multipart bodies — no CORS preflight, works with SameSite=Lax cookies. Downloaded as a standalone .html.
JavaScript fetch PoC fetch(..., { mode: 'no-cors', credentials: 'include' }). Recommended for JSON bodies, PUT/DELETE/PATCH, and custom headers. Downloadable as an auto-running HTML page.
cURL reference Equivalent command for your own testing.

Each card lists the caveats that apply to that specific request (SameSite requirements, preflight triggers, Origin/Referer checks).

Project structure

index.html        single-page UI
css/style.css     dark hacker theme
js/generators.js  pure functions: request model → HTML / JS / cURL PoCs + caveats
js/parser.js      parses curl commands & raw HTTP requests into the request model
js/app.js         state management, live rendering, copy/download

Notes & limitations

  • The generated PoCs assume the victim is authenticated to the target and lands on the exploit page.
  • mode: 'no-cors' makes JS responses opaque — the exploit fires but cannot read the response (an alert() confirms execution).
  • Nothing is sent anywhere; everything is generated client-side from your input.

About

Turn a vulnerable request into ready-to-use CSRF PoCs — HTML form, JavaScript fetch exploit, and cURL — right in your browser. No dependencies, no backend, works offline.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages