Offensive Security Tool: FormPoison

by | Oct 10, 2025 | Tools

Join our Patreon Channel and Gain access to 70+ Exclusive Walkthrough Videos.

Patreon

Reading Time: 2 Minutes

FormPoison

FormPoison, developed by csshark, is smart form-focused injection Framework based on experience with data validation issues, XSS and SQL attacks executed so far. The main purpose of the framework is to perform tests that cover the maximum XSS risk for a given application. Do not treat this tool as a replacement for existing offensive security tools, but rather as a support/companion to them (especially since it integrates with them). Cross-Site Scripting is unusual vulnerability and could be found almost randomly with different tools. Before you start, be aware of many false-positives when running attack. Sometimes web application returns ‘200 OK’ by default and doesn’t get injected at all. Run scan, check for CVEs, investigate and then attack.

Warning: High-intensity tool (~7 req/s). May trigger security alerts. Use responsibly.

See Also: So you want to be a hacker?
Offensive Security and Ethical Hacking Course

Installation

git clone https://github.com/csshark/FormPoison.git

cd FormPoison

pip install -r requirements.txt

ensure you have webdriver-manager installed, to use selenium with Chrome

 

Quick Start

Type python3 formposion.py -h for possible usage and scanner integration instruction. Flags and examples of usage:

 
Tip: use some payloads manually even if they are not being executed directly on the page, they could work if they are being sent to database and displayed on different endpoints (stored XSS).

Possible optional flags:

flagfunctiontype & value(s)
-h –helpdisplay help messageNone
-t –threatselect threat typeString: Java, SQL, HTML
–filterfilter payloads by user-defined patternString, example: ‘xss, script, DROP’
–fieldnamespecify a fieldname to target directlyString, example: Second Name
–filemodefilename injection modeNone
-p –payloadsselect path to your custom payloads file if necessaryString: /home/user/payloads-folder/payloads.json
–cookiesspecify user cookie ex. for testing endpoints that require authorizationString, example: ‘key1=value1; key2=value2’
-ua –user-agentSpecify User-Agent or type random for shufflingString, example: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/120.0.0.0 Safari/537.36
-v –verboseenable verbose mode, highly recommended for debuggingNone
–verbose-alladvanced output with response bodyNone
–loginenter login+password mode only testingNone
–mXSSMutation XSS injections onlyNone
–ssl-certuse ssl certificate fileString: /home/user/certs/cert.pem
–ssl-keyuse ssl private keyString: /home/user/certs/key.pem
–ssl-verifyverify ssl certificatebool: None
–proxyspecify proxy for authenticationString, example: http://login:[email protected]:8080/
–methodselect request method to force web app confusionString: GET, POST, PUT, DELETE
-s –secondsdelay between requests to aviod blacklisting0-2147483647 (int range but > 0)
–scandeep scan for .js code and overall web auditNone
–max-urlsspecify max urls to scanint range
–max-depthspecify max scan depthint range
–max-workersspecify number of workers for scanningint range

 

basic argument:

python3 formposion.py yourtargetsite.org

example advanced usage:

python3 formpoison.py --cookie "JSESSIONID=9875643544376543211D32" https://www.hackthissite.org/user/login --user-agent "cssharkwashere" --login -t HTML -s 2 --verbose

Please note that not all flags are compatible with each other (e.g., –login does not accept other method values) and you should familiarize yourself with the tool before using it in actual security tests.

Scan Mode

Scan mode has been extended into JavaScript code scanning and looking for common vectors of code / inproper value injection to bypass some filters. The scanner is separate project integrated into FormPoison by default. It is recommended to run scan to identify attack vectors by yourself first. Scanner works for 10 minutes max. for smaller apps, to keep lightweight form – this is not autonomus DAST replacement. By default scanner runs with 100 3 10 (100 MaxURLs, 3 MaxDepth, 10 Workers) to suit all the environments. However user is allowed to change those values via FormPoison flags.

Output file is named scan_report_[targetURL]_[dateTime].json. Scanner recognizes ~20 patterns in Java web files and also checks for OWASP Top 10 vulnerabilities. Scanner output gives recommendations and points to forms that might be vulnerable (false-positive reduction applied):

 

Payload Sources

 

Expanding payload list/Making your own:

To make payloads.json more powerfull use converter.py to categorize and write payloads in .json format. Create input.txt file and store all additional payloads to convert. Remember to convert same type payloads at once, you are hardcoding category. Example input.txt file format:

<script>alert('XSS')</script>

<samp>XSS</samp>
<a href=javascript:alert('XSS')>Click</a>
...and so goes on

The user can create their own payloads.json file and does not even need to pay attention to the category if the filtering function is available, and without the type flag, FormPoison will go through the entire file anyways.

 

New Functions

  • JavaScript source-code scanner
  • Filename XSS testing mode
  • Mutation XSS (mXSS) testing mode
  • Multithreading to speed up injecting attemps
  • Filtering now supported in Login mode
  • More Burp-like responses in verbose mode

 

Clone the repo from here: GitHub Link

Merch

Recent Tools

Offensive Security & Ethical Hacking Course

Begin the learning curve of hacking now!


Information Security Solutions

Find out how Pentesting Services can help you.


Join our Community

Share This