Simple SQL injection examples using MySQL
- mysql
- sql-injection
I was describing SQL injection to some trainees today and couldn’t find any simple examples which used a variable to replicate a “slightly” realistic scenario (those quotes can be tricky!). So, here are some basic ones. Uncomment @val
as necessary!
As I’m using a prepared statement here, it’s not possible to end the statement and do other more serious operations like delete from person;
but still enough to do some damange!