From the course: CompTIA Security+ (SY0-701) Cert Prep

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

SQL injection

SQL injection

(gentle music) - SQL injection is a very common and popular form of attack. SQL is the structured query language. In this section, we're going to look at the SQL injection attack and how it operates from a high level. So the first thing to talk about is how SQL injection works overall or how SQL itself works. And so what SQL injection is, or what a SQL injection attack does is it injects a little piece of logic into a standard SQL query, such as the one seen in red now. Where this query says Select star from the table called users where ID equals 2968. So this is a standard SQL query, but with SQL, what it's going to do is it's going to go to the table users. It's going to grab all of the records where the condition ID equals 2968. It's going to choose that row, that record, and return that result, or any results where that clause is true. In this case, there's probably only going to be one row that has an ID 2968. And so that's what's going to be returned. Oftentimes with web…

Contents