Review Notes
Review Notes
The single quote character ' and look for errors or other anomalies.
Some SQL-specific syntax that evaluates to the base (original) value of the entry
point, and to a different value, and look for systematic differences in the
application responses.
Boolean conditions such as OR 1=1 and OR 1=2, and look for differences in the
application's responses.
Payloads designed to trigger time delays when executed within a SQL query, and
look for differences in the time taken to respond.
Retrieving hidden data, where you can modify a SQL query to return additional
results.
Subverting application logic, where you can change a query to interfere with the
application's logic.
UNION attacks, where you can retrieve data from different database tables.
Blind SQL injection, where the results of a query you control are not returned in
the application's responses.
Repeated execution
A prepared statement can be executed repeatedly. Upon every execution the current
value of the bound variable is evaluated and sent to the server. The statement is not
parsed again. The statement template is not transferred to the server again.
Using the mysqli_result interface offers the additional benefit of flexible client-
side result set navigation.
Bound variables are sent to the server separately from the query and thus
cannot interfere with it.
The API does not include emulation for client-side prepared statement emulation.
separation is sometimes considered the only security feature to prevent SQL
injection, but the same degree of security can be achieved with non-prepared
statements, if all the values are formatted correctly.