SQL Injection Tutorial: Inline Comment Multi-Parameter Bypass
Crafting a multi-parameter SQL injection across form inputs using inline SQL comments `/* ... */` to construct a UNION SELECT query.
Phase 1: HTTP Request Analysis & Form Inspection
The target application provides a student directory search form that sends a `POST` request with multiple query filter parameters: `id`, `fname`, `lname`, `class`, `grade`, and `order_by`.
Phase 2: Breaking the Query with Inline Comment Wrapping
Each form field is interpolated into a pre-defined backend query. By opening an inline comment `/*` in one field and closing it `*/` in the next field, we can comment out intermediate SQL clauses and insert arbitrary SQL keywords:
Phase 3: Final UNION SELECT Execution & Data Extraction
When the inline comments are evaluated by the SQL engine, the query resolves into a clean UNION SELECT that dumps credentials directly from the `users` table: Submitting this payload returns the user password column containing the flag.