The Wayback Machine - https://web.archive.org/web/20240909191820/https://www.geeksforgeeks.org/xspear-powerfull-xss-scanning-and-parameter-analysis-tool/
Open In App

XSpear – Powerful XSS Scanning And Parameter Analysis Tool

Last Updated : 02 Jun, 2024
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Cross-Site Scripting or XSS is the Vulnerability or Security Flaw which is listed in the OWASP Top 10 Vulnerability list. XSS flaw mainly deals with the arbitrary JavaScript code which can compromise the internal architecture of the application. Attacker or Hacker passes the malicious code snippet which consists of intention to stole or destroy the system architecture. This malicious string or code is passed to the server through various means like input fields, parameters, or even passed as a file. In this flaw, the web application generates the output based on the user input, which can be risky if user input is something dangerous.

XSS Example

Consider a web application that takes name string from the user via the name parameter provided on the query string.

http://geeksforgeeks.org/aform.html?name=Gaurav

The website server wants to show the name-value which is provided by the user on the HTML page. In this case, PHP is used to pull the value from the URL and generate the result HTML

<?php echo ‘You Searched: ‘ . $_GET[“name”]; ?>

A malicious script thus can be formed such that if a victim clicks on the URL, a malicious script would then be executed by the victim’s browser and send the session values to the attacker.

http://geeksforgeeks.org/aform.html?name=<script>alert(‘XSS by Gaurav on GeeksforGeeks’);</script>

What is XSpear Tool?

Cross-Site Scripting or XSS is the most common vulnerability detected on websites; malicious JavaScript payload is inserted into the data carrier parameters or input fields. There are various techniques for XSS detection on the target domain, like Burp Suite, ZAP, etc. But we can perform automated testing using the tool named XSpear. XSpear tool is an automated tool designed and developed in the Ruby language. XSpear tool checks various types of XSS vulnerabilities like Reflected, Blind, etc. We can provide the custom payload while testing the domain. The tool also extracts some Recon information like Server, Action, etc. XSpear tool is open-source and free to use.

Note: As XSpear is a Ruby language-based tool, so you need to have a Ruby environment on your system. So check this link to Install Ruby in your system. – Installation of Ruby in Linux 

Key features

  • XSpear tool supports Pattern Matching.
  • XSpear tool supports Reflected Parameter, Filtered test event handlers, etc.
  • XSpear tool can work with Raw files generated through Burp Suite and ZAP.
  • XSpear tool supports results saving in the JSON format.
  • XSpear tool runs on the Ruby Code.
  • XSpear tool can perform deep analysis on Security Headers.
  • XSpear tool supports Dynamic and Static Analysis.

Installation of XSpear Tool on Kali Linux

Step 1: Check the Ruby Environment Version using the following command.

gem -v

Step 2: Install the required package 1 using the following command.

sudo gem install colorize

Step 3: Install the required package 2 using the following command.

sudo gem install selenium-webdriver

Step 4: Install the required package 3 using the following command.

sudo gem install terminal-table

Step 5: Install the required package 4 using the following command.

sudo gem install progress_bar

Step 6: Now Install the XSpear tool Package using the following command.

gem install XSpear

Step 7: Check the help page of the tool for better understanding.

XSpear -h

Dependency gems

1. Colorize

gem install colorize

2. Selenium-Webdriver

gem install selenium-webdriver

3. Terminal-Table

gem install terminal-table

4. Progress_bar

gem install progress_bar

Working with XSpear Tool on Kali Linux

Example 1: Verbose Mode

 XSpear -u “http://testphp.vulnweb.com/listproducts.php?cat=123” -v 2

In this example, we will be performing a scan on our target domain in verbose mode. -v tag is used for verbose mode.

Example 2: Scanning XSS

XSpear -u “http://testphp.vulnweb.com/search.php?test=query” -d “searchFor=yy”

In this example, We will be scanning the target domain from XSS Vulnerability.

Example 3: Only JSON output

XSpear -u “http://testphp.vulnweb.com/search.php?test=query” -d “searchFor=yy” -o json

1. In this example, we will be saving the results of the scan in JSON format. -o tag is used to save the output.

2. In the below Screenshot, We have got the results of our scan in JSON format.

3. In the below Screenshot, We have displayed the JSON format results from the output file.

Example 4: Set scanning thread

XSpear -u “http://testphp.vulnweb.com/search.php?test=query” -t 30

In this example, we are changing the default thread value. -t tag is used to change the default value.

Example 5: Testing at selected parameters

XSpear -u “http://testphp.vulnweb.com/search.php?test=query&cat=123&ppl=demo” -p cat,test

1. In this example, we will be testing only the selected parameters. -p tag is used to select the parameters for the scan.

2. In the below Screenshot, We have got the results of our above scan.

Example52min-(2)-copy-2

Example 6: Testing Only parameter analysis (aka no-xss mode)

XSpear -u “http://testphp.vulnweb.com/search.php?test=query&cat=123&ppl=demo” –no-xss

1. In this example, we are only testing the parameters without XSS testing. –no-xss tag is used.

2. In the below Screenshot, We have got the results of our scan.

Example 7: Testing blind XSS(all params)

XSpear -u “http://testphp.vulnweb.com/search.php?test=query” -b “https://hahwul.xss.ht” -a

1. In this example, we are testing the target domain for Blind XSS Vulnerability. We have passed the payload collection link.

2. In the below Screenshot, We have got the results of our scan.

Example72min-copy-2

Example 8: Quite mode

XSpear -u http://testphp.vulnweb.com/listproducts.php?cat=123 -a -v2

In this example, we are implementing Quite Mode. We have used -v2 tag for Quite Mode

1min-copy-2

Example 9: Scanning log

XSpear -u http://testphp.vulnweb.com/listproducts.php?cat=123 -a -v3

1. In this example, we are displaying the live logs of the scan. We have used -v3 tag for live logs.

2. In the below Screenshot, We are getting the live log details of the scan.



Similar Reads

DalFox - Parameter Analysis and XSS Scanning tool
Dalfox tool is a fast, parameter analysis and Cross-site Scripting (XSS) scanner tool based on a DOM(Document Object Model) parser. The XSS Dalfox has some additional features that test for SQL injection(SQLi), Server-Side Template Injection(SSTI), and open-redirects. Dalfox is a Golang language-based tool. Dalfox is also capable of finding reflect
2 min read
XSSCon - Simple and Powerful XSS Scanner tool
XSSCon tool is a Python-based tool that features a powerful XSS (Cross-Site Scripting) Scanner. XSS is the most common vulnerability, which is identified on almost every web-based application; you only have to find an input field where you can inject your malicious payload. Automation can reduce your manual work if there is enormous scope in your t
3 min read
SSLyze - Fast and powerful SSL/TLS scanning tool
Most of the domain uses the SSL(Secure Socket Layer) for saving themselves from various cyber-attacks, but there can be some vulnerabilities raised due to outdated certificates and many more. SSLyze tool is an automated cyber security tool that is used to scan the target domain for SSL/TLS vulnerabilities like Heartbleed, OpenSSL, and many more. Th
2 min read
XSS-Loader - XSS Scanner and Payload Generator
Cross-Site Scripting or XSS vulnerability is the flaw included in the OWASP Top 10 Vulnerabilities. In this Security Flaw, the Attacker generates a malicious JavaScript Payload code that has the intention to steal the cookies of the victim or to perform an account takeover. Sometimes this Flaw can create a severe problem on the back end of the web
3 min read
XSS-Freak - XSS Scanner Fully Written in Kali Linux
XSS or Cross-Site Scripting is the most emerging security flaw in Web Applications. When the arbitrary or malicious JavaScript is executed by the web application then it is said to be an XSS Vulnerable Website. There are various XSS Scanners through which we can detect the XSS on the target domain. XSS-Freak is an XSS Scanner developed in the Pytho
3 min read
FinDOM-XSS - Fast DOM Based XSS Vulnerability Scanner
DOM XSS stands for Document Object Model-based Cross-site Scripting. DOM-based vulnerabilities occur within the content processing stage performed on the client, typically in client-side JavaScript. In a DOM-based XSS attack, the malicious string is not parsed by the victim’s browser until the website’s authentic JavaScript is executed. To perform
2 min read
PwnXSS - Automated XSS Vulnerability Scanner Tool in Kali Linux
PwnXSS is a free and open-source tool available on Github. This tool is specially designed to find cross-site scripting. This tool is written in python. You must have python 3.7 installed in your Kali Linux. There are lots of websites on the internet which are vulnerable to cross-site scripting(XSS). This tool makes finding cross-site scripting eas
3 min read
Damn Small XSS Scanner tool in Kali Linux
DSXS or Damn Small XSS Scanner is a free and open-source tool available on GitHub. Cross-site scripting or XSS is a vulnerability that can be used to hack websites. This tool helps to find such vulnerabilities easily. DSXS makes finding cross-site scripting easy. DSXS works like a scanner. The Internet has millions of websites and web apps a questi
2 min read
XanXSS - Simple XSS Finding Tool in Kali Linux
XSS Vulnerability is the most easier Security Flaw which is detected on the target domains, only a route is to be selected from which the malicious payload will be traveled to the server. We can perform this scanning of XSS through automated tools. XanXSS tool is an automated script developed in the Python language which searches for Reflected XSS
2 min read
Bxss - Blind XSS Injector Tool
Bxss tool is an automated tool that aims to test the target domain for XSS Security Flaw. Bxss tool is developed in the Python language and available on the GitHub platform. XSS is the most common vulnerability, which is identified on almost every web-based application; we only have to find an input field where you can inject your malicious JavaScr
2 min read
Xcapy - Tool For XSS Detection Suite for CTFs games
Xcapy is a free and open-source tool available on GitHub that was developed to find cross-site scripting (XSS Vulnerabilities) on web applications and websites. Cross-site scripting is a vulnerability found in the javascript code of web applications and websites. This tool is written in python language so you must have python 3.7 installed in your
2 min read
Kxss - Tool to to Identify XSS Vulnerable Parameters / Patterns
Cross-site scripting is a common vulnerability and bug, which is the trending vulnerability identified in most web-based applications. The attacker injects some malicious popup javascript code in input parameters or sometimes through file uploads. So periodically, website designers or developers validate the input fields by encoding and validating
4 min read
Red Hawk - Information Gathering and Vulnerability Scanning Tool in Kali Linux
Red Hawk is a free and open-source tool available on GitHub. Red Hawk is used to scanning websites for information gathering and finding vulnerabilities. Red Hawk is written in PHP. It uses PHP script to do reconnaissance. Red Hawk is so powerful that it can detect content management system while scanning, it can detect IP address, it can detect we
4 min read
Brutespray - Port Scanning and Automated Brute Force Tool
Brute-Forcing is the technique of matching the credentials like Usernames, Passwords, OTPs for unauthenticated access to the target domain. The list of words are been tested against the target to get the exact credentials. All this process is done through automated tools. Brutespray is an automated tool that is used to perform brute-forcing for eve
3 min read
Zeebsploit - Information gathering, Scanning, and Exploitation tool
Zeebsploit tool is an automated tool that helps the tester or bug bounty hunter in the phases of Information Gathering Scanning and also in Exploitation. Zeebsploit tool can gather information like CMS Info, WHOIS record, IP geolocation, and many more. The scanning module can scan the target domain for vulnerabilities like XSS, SQLi, File Upload, a
2 min read
DEDMAP - Cross-platform port scanning and network automation tool
DEDMAP is a free and open-source tool available on GitHub. DEDMAP works as a scanner that scans domains and websites. DEDMAP is a powerful, cross-platform scanning tool. DEDMAP is very similar to nmap which is a port scanning tool. DEDMAP is written in bash language. You must have bash language installed in your kali Linux operating system in order
1 min read
Nuubi – Tool for Information Gathering, Scanning And Recon
The information gathered or collected in the Reconnaissance phase serves as the milestone for upcoming stages like Scanning, Exploitation, etc. So managing the relevant and sensitive data is always challenging work for every penetration tester. NUBBI is one tool that is used for penetration testing. NUBBI is a Python-language based tool that perfor
4 min read
Auto Scanning to SSL Vulnerability - A2SV Tool in Kali Linux
A2SV is a free and open-source tool available on GitHub which is used as an information-gathering tool for SSL vulnerability. A2SV is used to scan websites for information gathering and finding SSL vulnerabilities in websites and webapps. A2SV is one of the easiest and useful tools for performing reconnaissance on websites and web apps for SSL Vuln
2 min read
Bopscrk - Tool To Generate Smart And Powerful Wordlists
Bopscrk is also known as Before Outset Password Cracking is the automated tool that aims to generate smart and powerful word lists for performing Brute-force attacks on the target domains. Bopscrk tool supports interactive mode, in which rather than specifying commands all the time the tool asks some questions and the user needs to answer those que
3 min read
Traxss – Automated XSS Vulnerability Scanner
XSS Vulnerability is one of the emerging and most detected vulnerabilities in web applications. Automated testing is performed mostly to detect XSS on the target domain. Traxss is an automated XSS Vulnerability Scanner developed in the Python Language. Traxss tool is a free and open-source tool available on GitHub. Traxss tool has a list of malicio
2 min read
XIRA - XSS Vulnerablity Scanner
XIRA is a clever XSS detection tool that looks for reflected cross-site scripting (XSS) vulnerabilities using human methodologies. This tool based on python3 is a Python-based automated cyber-security program that can search for queries, and identify XSS vulnerabilities. XIRA Tool, You can use the GitHub platform for free, and it's an open-source t
2 min read
Netnoob - Network tools, information gathering tools and scanning tools
Netnoob is an automated tool that is developed for Network Recon, Scanning, and Network Auditing. Netnoob tool has the features to Get information about your computer and network, Get information about another computer or a network, Network Settings, and Shared Drives. This tool allows us to change the IP address and MAC Address of our system and a
2 min read
FazScan - Vulnerability Scanning and Pentesting
A FazScan tool is an automated tool developed in the Perl Language which is used in the phases of Vulnerability Scanning and Information Gathering. This tool has various features like Common SQLi Vulnerability Scanner, Advanced SQLi Vulnerability Scanner, Common Web Vulnerability Scanner, Automated CMS Detector, and many more. A fazScan tool is an
2 min read
Vulmap - Web Vulnerability Scanning And Verification Tools
Vulnerability Scanning is the process of testing the target domain for various vulnerabilities in Web containers, Web servers, Web middleware, and CMS, and other Web programs, and has vulnerability exploitation functions. Testing each CVE against the target domain manually is not possible as manual testing takes a lot of time. So automated testing
2 min read
RustScan - Faster Nmap Scanning with Rust
Port Scanning is the process of detection of active ports on the Web Server. In some cases, if there is an unfamiliar port running on the server, this can lead to breaches. We can perform use various automated tools like Nmap, Masscan, etc for port detection. RustScan is the tool that assures the fastest result retrieving tool as compares to Nmap.
2 min read
What is Vulnerability Scanning in Kali Linux?
To understand, first, it is important to know what is a vulnerability. So, in the field of Cyber Security, the vulnerability can be defined as the weakness of the computer system which can be exploited by attacking the system to perform unauthorized actions and for gaining unauthorized access to a system. The attacker can be do almost anything with
4 min read
Golismero - Scan Website, Vulnerability Scanning, WEB Server in Kali Linux
Golismero is a free and open-source tool available on GitHub. Golismero is an Open Source Intelligence and Information Gathering Tool based on (OSINT). Golismero is capable of doing everything almost you need for reconnaissance as per your need it can perform reconnaissance easily. Golismero works as an open-source tool intelligence tool. It integr
2 min read
Vulscan - Vulnerability Scanning with Nmap in Kali Linux
Vulscan is a free and open-source tool available on GitHub. Vulscan uses nmap as the main scanner to scan the IP addresses and domains, the easiest and useful tool for reconnaissance of network. Vulscan interface is very similar to Metasploit 1 and Metasploit 2 which makes it easy to use. This tool provides a command-line interface that you can run
2 min read
Nbtscan - Scanning IP Networks for NetBIOS Name Information
Nbtscan is an automated cyber-security tool for scanning IP networks for NetBIOS name information. Nbtscan tool sends Net‐BIOS status query to each address in supplied range and lists received data in human-readable form. For each responded host it lists IP address, NetBIOS computer name, logged-in user name, and MAC address (such as Ethernet). Nbt
2 min read
Port Scanning Techniques By Using Nmap
Nmap is a security auditing tool used in the security field to actively enumerate a target system/network. It is one of the most extensively used tools by network administrators and conversely attackers for reconnaissance (enumeration), the first step in the 5 phases of hacking. Nmap is used to actively probe the target network for active hosts(hos
5 min read