An injection point is any part of your application where user input is accepted and used in a database query. If the input is not properly sanitized or validated, it can be exploited to inject malicious SQL code.
Here are the most common areas where injection points can be found:
This step is the same for both Union-based and Error-based SQL Injection. You need to locate areas in the application where user input is processed and interacts with the database. Common injection points include:
?id=1
).User-Agent
, Referer
).These are parameters passed in the URL, often used in dynamic web applications.
Example:
<http://example.com/products?id=1>
The id=1
part is a parameter that might be used in a SQL query like:
SELECT * FROM products WHERE id = 1;
If the input is not sanitized, an attacker could inject malicious SQL:
<http://example.com/products?id=1>' UNION SELECT 1, 'test', NULL --