Welcome to 0xmad.me, where we continuously strive to bring you the latest and most effective tools for web security. Today, we are excited to introduce our new tool: the CORS & XSS Vulnerability Scanner. This powerful Python-based tool is designed to help ethical hackers and security professionals identify and mitigate critical vulnerabilities in their web applications.
Github:https://github.com/mrTr1cky/pr5
What is the CORS & XSS Vulnerability Scanner?
The CORS & XSS Vulnerability Scanner is a comprehensive tool that performs thorough security checks on web applications. It focuses on two of the most common and dangerous web vulnerabilities: Cross-Origin Resource Sharing (CORS) misconfigurations and Cross-Site Scripting (XSS) attacks. Additionally, the tool also resolves domain IP addresses, checks for CNAME records, and verifies if the domain is protected by Cloudflare.
Key Features
1. CORS Vulnerability Detection
The tool sends requests with different Origin
headers to test if the server improperly allows cross-origin requests. If the server responds with an Access-Control-Allow-Origin
header that matches the test origin or is set to *
, the tool flags the domain as vulnerable.
2. XSS Vulnerability Detection
It tests for XSS vulnerabilities by injecting common XSS payloads in the User-Agent
header and checking if these payloads are reflected in the server’s response. If any payloads are detected in the response, the tool marks the domain as XSS vulnerable.
3. Domain Information
- IP and CNAME Lookup: The tool resolves the IP address and CNAME records of the domain, providing valuable information for further analysis.
- Cloudflare Protection Check: It verifies if the domain is protected by Cloudflare by checking the IP address range.
How to Use the Tool
Prerequisites
- Python 3.x installed on your system
- Requests library: Install it using
pip install requests
- Colorama library: Install it using
pip install colorama
- DnsPython library: Install it using
pip install dnspython
Step-by-Step Guide
- Download and Set UpDownload the script from our GitHub repository and save it to your local machine.
- Run the ScriptOpen your terminal or command prompt and navigate to the directory where the script is saved. Run the script using the following command:shCopy code
python cors_xss_scanner.py
- Input the Target FileThe script will prompt you to enter the target file containing the list of domains you want to scan. Make sure your file is in plain text format with one domain per line.
- View the ResultsThe script will generate a detailed report saved as
scan_results_<date>.txt
in the same directory. This report will contain information about CORS and XSS vulnerabilities, IP addresses, CNAME records, and Cloudflare protection status.
Example Output
plaintextCopy codeURL: http://example.com
CORS Vulnerable with origin: http://evil.com
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials is set, which can be risky.
URL: http://example.com
XSS Vulnerable with payload: <script>alert(1)</script>
URL: http://example.com
IP address: 93.184.216.34
CNAME record: www.example.com.
URL: http://example.com
Cloudflare protection status: Not protected by Cloudflare
Why You Need This Tool
Security is a critical aspect of web development and maintenance. CORS misconfigurations and XSS vulnerabilities can lead to severe data breaches, unauthorized access, and significant damage to your reputation. By using the CORS & XSS Vulnerability Scanner, you can proactively identify and fix these issues, ensuring your web application is secure against potential attacks.
About the Author
This tool is developed by madtiger, a passionate ethical hacker dedicated to improving web security. You can reach out to madtiger on Telegram: @devidluice for any queries or collaborations.
Stay secure, and happy hacking!
Feel free to download the script and share your feedback. Your contributions and suggestions are always welcome. Visit 0xmad.me for more tools and resources on web security.