This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
sql_injection [2019/10/05 16:43] acm |
sql_injection [2019/10/05 18:51] (current) acm |
||
---|---|---|---|
Line 22: | Line 22: | ||
Since 1 = 1 is always true, and any OR statement with a clause that is always true will also always be true, this statement will return every password in the database. | Since 1 = 1 is always true, and any OR statement with a clause that is always true will also always be true, this statement will return every password in the database. | ||
=== Batched SQL Statements === | === Batched SQL Statements === | ||
- | Another more powerful form of SQL Injection is using Batched SQL Statements. This allows us to write full SQL statements that are then executed by the server, rather than being limited to just modifying an existing statement. This works by closing out all open and exepected | + | Another more powerful form of SQL Injection is using Batched SQL Statements. This allows us to write full SQL statements that are then executed by the server, rather than being limited to just modifying an existing statement. This works by closing out all open and expected |
- | {{: | + | {{ : |
+ | The SQL statement on the school' | ||
+ | < | ||
+ | “INSERT INTO Students VALUES (‘“ + firstName “‘, | ||
+ | </ | ||
+ | Thanks to the specific nature of little Bobby' | ||
+ | < | ||
+ | INSERT INTO Students VALUES(‘Robert’); | ||
+ | </ | ||
+ | This causes the software to delete the entire student table after inserting Robert into the table. This works as putting a semicolon into a SQL statement allows us to execute more than one statement per line. | ||
+ | |||
+ | === References === | ||
+ | https:// | ||
+ | https:// | ||
+ | https:// | ||
+ | https:// |