I’ve got one easy question: say there is a site with a query like:
SELECT id, name, message FROM messages WHERE id = $_GET['q'].
Is there any way to get something updated/deleted in the database (MySQL)? Until now I’ve never seen an injection that was able to delete/update using a SELECT query, so, is it even possible?
If you say you use
mysql_querythat doesn’t support multiple queries, you cannot directly addDELETE/UPDATE/INSERT, but it’s possible to modify data under some circumstances. For example, let’s say you have the following functionNow you can call this function in
SELECT:SELECT id, name, message FROM messages WHERE id = NULL OR testP()(
id = NULL– always NULL(FALSE), so testP() always gets executed.