XSSYA is a Cross Site Scripting Scanner/Confirmation tool which aims to find XSS
vulnerability written in Python. It allows a penetration tester to scan a website without using the browser and confirm whether the website is vulnerable to XSS - Cross site scripting vulnerability or not by injecting and executing around 28 encoded payload on the specified URL. Now in general when we scan a website it often gives false positive result/vulnerabilities and that may be because of other scanners scanning the website/execute payload at same time. Now if it return a status - 200 then the tool confirms the site is vulnerable and shows/report result but however the defect found may not be actually a defect in real and so in such case, the penetration tester has to test and confirm manually.
What is False Positive ?
False positive is something when you think a specific vulnerability exist in the code, it may be the result that many security scanner returns after test execution. False positive may occur because of weak static checks that security scanner detect. Sometime a security scanner for detecting a vulnerability it may use the algorithm to find one or more predefined signature pattern (i.e. CHECK LOGIC) within an HTTP response and that might go wrong due to which the scanner will deduce that and show the vulnerability exists (which actually doesn't exist in real) and then report it accordingly.
XSSYA - How it Works ?
Written in Python, XSSYA works by executing it library of encoded payload to bypass WAF
(WEB APPLICATION FIREWALLS). This is basically the METHOD 1 which confirm whether the site is vulnerable or not. If the HTTP response returns status - 200 then the tool attempts to execute METHOD 2 which actually then search for the payload decoded in the web page HTML code and if it confirmed then it gets to the last step and execute document.cookie to get the cookie.
XSSYA Features :
- Support both Windows & Linux ENV
- Support HTTP & HTTPS
- Identifies 3 types of WAF (mod_security, WebKnight & F5 BIG IP)
- XSSYA Continue Library of Encoded Payloads To Bypass WAF (Web Application Firewall) Support Saving The Web HTML Code Before Executing the Payload Viewing the Web HTML Code into the Screen or Terminal
- After Confirmation (execute payload to get cookies)\
Prerequisite:
The only module which need to be download and used is colorama-0.2.7 - https://pypi.python.org/pypi/colorama
OR
Try to directly install through Run prompt using easy_install colorama if python 2.5 or upper version is available/installed in your machine.
Download & Installation Procedure:
- You can download XSSYA HERE . Click on the Download ZIP button to download as shown in the screenshot below:
- Once the file is download, extract all the files to any local drive in your machine. See screenshot below.
Now we are all set to run and execute test using XSSYA.
Test Execution:
- For executing test, open run prompt and redirect to the directory where you have
extracted the ZIP files (Mostly look for the directory which contains xssya.py file). See
screenshot below.
- Now to initiate your test enter python xssya.py and hit enter.
- Enter a Vulnerable Website link and hit enter. (For Demonstration purpose, i am using the following website link which is vulnerable to XSS which i had found from the training video added below - " http://demo.testfire.net/search.aspx?txtsearch= " ).
Note: Make sure to choose a vulnerable link which ends with [ / or = or ? ]
- As mentioned above, in the next step we need to choice 1 or 2 i.e. we need to select Method 1 or Method 2.
Method 1 - It is used to check the link is vulnerable or not.
Method 2 - If Method 1 returns success i.e. if it confirms the link is vulnerable then it start executing the encoded payload (injecting at the end of specified URL) and search for the same payload in web HTML code to get the cookies information.
- At the end of the test execution, this tool also allow you to save the web page html
code and print them. See screenshot below.
My Learning Material / References:
Website Address:
http://www.secure-edf.com/xssya.html
https://github.com/yehia-mamdouh/XSSYA
Video Tutorial:
Happy Hunting !! :)