How kadetron/vulnex works
Project type and purpose
• Vulnex is a small command-line security scanning tool.
• Its job is to crawl a given domain (depth = 2), find all “.php” endpoints, append SQL-injection test payloads (' and "), issue HTTP requests, and detect SQL errors in the responses.
File structure
• Top-level:
• LICENSE – license terms
• README.md – usage, features, dependencies
• vulnex – the single executable script (likely a Bash shell script)
• No separate source folders—everything lives in one script.
• External dependencies invoked by the script: curl, grep, sed, awk, uniq.
README for additional insights
• Usage is purely CLI (vulnex [domain]).
• There’s no database or persistent storage—everything is in-memory during a run.
• No external web services beyond HTTP GET requests to the target domain.
1. CLI Frontend
• Parses user args (domain, flags).
2. Crawler (Scraping Engine)
• Uses curl to fetch HTML up to depth 2.
• Uses grep/sed/awk to extract links.
• Filters unique “.php” URLs (uniq).
3. Payload Generator
• Takes each URL, constructs two variants (+ ', + ").
4. Scanner (HTTP Tester)
• Issues HTTP requests for each payload via curl.
5. Response Parser
• Uses grep/sed to scan for SQL error patterns.
6. Result Aggregator & Reporter
• Collects vulnerable URLs and prints to stdout.
7. External Dependencies
• User → CLI Frontend
• CLI Frontend → Crawler
• Crawler → Payload Generator
• Payload Generator → Scanner
• Scanner → Response Parser
• Response Parser → Result Aggregator
• Result Aggregator → User (console output)
c. Architectural patterns & design principles
• Single-process pipeline (modular stages).
• Streaming data flow (URL list → payloads → scan results).
• Unix-style filters: each stage uses small tools specializing in one function.
d. Key technologies/frameworks
• Shell script (bash) glue logic
• curl (HTTP client)
• grep/sed/awk (text processing)
• uniq (deduplication)