
Rust-आधारित XSS स्कैनर जिसमें संदर्भ-जागरूक पेलोड चयन, WAF पहचान और बायपास, क्रॉलिंग, ब्लाइंड XSS कॉलबैक, और स्टैटिक DOM सिंक विश्लेषण शामिल है।
Rust में लिखा गया उन्नत XSS डिटेक्शन टूल, जो context-aware payload intelligence को injection breadth के साथ जोड़ता है।
यह टूल XSStrike और XSSER से प्रेरित था। Payload विभिन्न स्रोतों से एकत्र किए गए थे:
धन्यवाद दोस्तों, आप शानदार हैं ❤️
चेतावनी: केवल उन सिस्टम के विरुद्ध उपयोग करें जिनका आप स्वामी हैं या जिनका परीक्षण करने के लिए आपके पास स्पष्ट लिखित प्राधिकरण है।
<title>, <textarea>, आदि) और उस context के लिए सबसे उपयुक्त payloads चुनता है, बजाय इसके कि सब कुछ अंधाधुंध दाग दिया जाएReferer, User-Agent, X-Forwarded-For, X-Real-IP, और अन्य headers, तथा cookie values का परीक्षण करता हैinnerHTML, eval, document.write, location.href, jQuery .html(), और अन्य खतरनाक sinks का source detection के साथ static निरीक्षणgit clone https://github.com/fabian-affolter/xssearch
cd xssearch
nix-shell --run "cargo build --release"
# binary: target/release/xssearch
LTO और stripped symbols के साथ release build:
nix-shell --argstr release true --run "$BUILD"
Rust 1.75+ आवश्यक है।
cargo build --release
Nix या NixOS उपयोगकर्ताओं के लिए एक package उपलब्ध है। ध्यान रखें कि नवीनतम releases केवल
unstable channel में मौजूद हो सकते हैं।
nix-env -iA nixos.xssearch
xssearch [OPTIONS] <--url <URL> | --file <URLS_FILE>>
| Flag | विवरण |
|---|---|
-u, --url <URL> | लक्ष्य URL। कस्टम injection point चिह्नित करने के लिए FUZZ का उपयोग करें |
-f, --file <FILE> | प्रति पंक्ति एक URL वाली फ़ाइल |
-d, --data <DATA> | POST body। injection point चिह्नित करने के लिए FUZZ का उपयोग करें |
-H, --header <H> | अतिरिक्त request header, दोहराने योग्य |
--cookie <COOKIE> | Cookie string |
--proxy <URL> | HTTP/HTTPS proxy |
--timeout <N> | Request timeout सेकंड में (डिफ़ॉल्ट: 10) |
--user-agent <UA> | कस्टम User-Agent |
--follow-redirects | HTTP redirects का अनुसरण करें |
--threads <N> | समवर्ती requests (डिफ़ॉल्ट: 2) |
--delay <MS> | Requests के बीच विलंब मिलीसेकंड में |
--crawl | links और forms के लिए लक्ष्य को spider करें |
--crawl-depth <N> | Crawl depth (डिफ़ॉल्ट: 3) |
--headers-inject | सामान्य HTTP headers को injection points के रूप में परीक्षण करें |
--cookie-inject | Cookie values को injection points के रूप में परीक्षण करें |
--blind <URL> | Blind XSS callback URL |
--dom | Static DOM XSS sink analysis |
--fuzz | Reflection context की परवाह किए बिना सभी payloads दागें |
--payload-set <SET> | all | html | js | attr | poly | dom | mxss | waf (डिफ़ॉल्ट: all) |
--payloads-file <FILE> | कस्टम payload फ़ाइल, प्रति पंक्ति एक |
--encode <LIST> | अल्पविराम से अलग encodings: url,html,unicode,double,base64 |
--prefix <STR> | प्रत्येक payload से पहले string जोड़ें |
--suffix <STR> | प्रत्येक payload के बाद string जोड़ें |
--waf-detect | Scanning से पहले WAF की पहचान करें |
--waf-bypass | Payloads पर WAF bypass transforms लागू करें |
--output-json <FILE> | Findings को JSON फ़ाइल में लिखें |
--output-md <FILE> | Findings को Markdown फ़ाइल में लिखें |
-v, --verbose | Verbose output (context, सभी probes दिखाएँ) |
-V, --version | संस्करण प्रिंट करें और बाहर निकलें |
xssearch -u "https://example.com/search?q=test"
xssearch -u "https://example.com/login" -d "user=admin&pass=FUZZ"
xssearch -u "https://example.com/" --crawl --waf-detect --headers-inject -v
xssearch -u "https://example.com/?q=FUZZ" --waf-detect --waf-bypass --encode url,html
xssearch -u "https://example.com/contact" -d "msg=FUZZ" \
--blind "https://abc123.oast.fun/xssearch"
xssearch -u "https://example.com/app" --dom --no-banner
xssearch -u "https://example.com/?q=test" --output-json results.json
xssearch -u "https://example.com/?q=test" --output-md report.md
xssearch -f targets.txt --crawl --waf-detect --output-json results.json --output-md report.md
xssearch -u "https://example.com/?q=test" --proxy http://127.0.0.1:8080 -v
टूल को सत्यापित करने का सबसे तेज़ तरीका है स्थानीय रूप से जानबूझकर कमजोर Python सर्वर शुरू करना:
python3 - <<'EOF'
import http.server, urllib.parse
class H(http.server.BaseHTTPRequestHandler):
def log_message(self, *a): pass
def do_GET(self):
p = urllib.parse.urlparse(self.path)
q = urllib.parse.parse_qs(p.query)
val = q.get('q', [''])[0]
body = f'<html><body><p>Search: {val}</p></body></html>'.encode()
self.send_response(200)
self.send_header('Content-Type', 'text/html')
self.end_headers()
self.wfile.write(body)
http.server.HTTPServer(('127.0.0.1', 9999), H).serve_forever()
EOF
फिर इसे scan करें:
xssearch -u "http://127.0.0.1:9999/?q=test" -v
अपेक्षित output: HTML-context payload के साथ [Vuln] XSS in 'q'।
ये images सुरक्षा टूल परीक्षण के लिए विशेष रूप से बनाई गई हैं और इनमें कोई वास्तविक उपयोगकर्ता डेटा नहीं है।
docker run -d -p 8080:80 vulnerables/web-dvwa
# Set security level to Low in the UI first
xssearch -u "http://localhost:8080/vulnerabilities/xss_r/?name=test" \
--cookie "PHPSESSID=<your-session>; security=low"
docker run -d -p 8081:8080 webgoat/goat-and-wolf
xssearch -u "http://localhost:8081/WebGoat/" --crawl --crawl-depth 2 -v
docker run -d -p 3000:3000 bkimminich/juice-shop
xssearch -u "http://localhost:3000/" --crawl --dom -v
docker run -d -p 8082:80 raesene/bwapp
# Activate bWAPP at http://localhost:8082/install.php first
xssearch -u "http://localhost:8082/xss_get.php?firstname=test&lastname=test" \
--cookie "PHPSESSID=<your-session>; security_level=0"