How faiyazahmad07/xss_vibes works
Project type and purpose
• This is a command-line security tool (XSS_VIBES) for scanning URLs or lists of URLs for XSS vulnerabilities.
• It integrates payload management (adder.py), WAF detection/bypass (Waf.py), optional crawling (via Katana), and concurrent HTTP requests.
File structure
• Top-level scripts:
• main.py: orchestrator, argument parsing, orchestration.
• adder.py: handles payload ingestion and sanitization.
• Header.py: builds and applies custom HTTP headers.
• Waf.py: detects web application firewalls and selects bypass payloads.
• XSS payloads and WAF rules in payloads.json and waf_list.txt.
• Third-party integration: Katana (external crawler).
• Requirements file lists Python dependencies.
README for additional insights
• Features: multi-threading, custom headers, single‐URL vs file input, optional crawling, WAF detection & bypass.
• Usage patterns hint at distinct logical modules: input ingestion, crawler, payload manager, HTTP engine, analysis, output.
Main components
a. Input Layer
• CLI Argument Parser (main.py)
• Flags: -f (file), -u (single URL), --pipe, -t (threads), -H (headers), --crawl, -w (manual WAF)
• Input Sources
• FileReader (urls.txt or stdin pipe)
• Single URL parameter
b. Pre-Processing
• Payload Manager (adder.py + payloads.json)
• Sanitize/detect dangerous characters
• Extend or override with custom payload file
• Header Manager (Header.py + user headers)
c. Crawler (optional)
• Katana process (spawned by main.py when --crawl)
• Output links to scan
d. Scanner Core
• Thread Pool Manager (built-in threading)
• Distribute URLs + payloads to worker threads
• HTTP Request Engine
• Attach headers
• Iterate through payloads
e. WAF Detection & Bypass (Waf.py + waf_list.txt)
• Initial responses
• Select specialized payload subsets
f. Response Analyzer
• Detect XSS reflections or triggers in responses
• Classify endpoints as vulnerable
g. Output Module
• Write results to output file
• Log summary to console
Relationships and interactions
• Directional flows:
Input → Argument Parser → (Payload Manager, Header Manager)
→ [if --crawl] → Crawler → URLs
→ Thread Pool → HTTP Engine → WAF Detector → Response Analyzer → Output
• Data artifacts:
• payloads.json feeds Payload Manager
• waf_list.txt feeds WAF Detector
• external Katana feeds Crawler
Architectural patterns and design principles
• Modular CLI architecture: each concern in its own Python module
• Producer-Consumer for threading: main thread enqueues tasks, worker threads consume
• Pluggable extensions: custom payloads & headers, manual WAF override
• External process integration: treating Katana as a black boxed service