Does someone know of a good example of a SQL Injection vulnerability that isn't in a web application? What is the user input for this attack? I am looking for a real vulnerability, not speculation. The following picture is an example of a speculated attack.
sql injection is available wherever sql queries are generated from input without any escaping of sensitive chars (eg '
). therefore if you have a desktop app that takes a text input field and generates a sql query string using it, you could potentially have an injection attack vector.
it's got nothing to do with being in a web context.
SQL Injection is more visible in web applications because they're public, but it has nothing to do with them in particular. Any time you don't parameterize your SQL queries, you're at risk for an injection attack.
If your console or WinForms application takes a username and selects from a database to see if the user exists, and it's done by concatenating strings to make a SQL query, you have the same risk. Always parameterize or properly escape your SQL queries!