From the course: Security in ASP.NET Core
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
SQL injection with ADO.NET - ASP.NET Tutorial
From the course: Security in ASP.NET Core
SQL injection with ADO.NET
- [Instructor] If you remember the OWASP Top 10 list we covered earlier, in the history of that list, SQL Injection has been in the top spot for many, many years. Situation is getting a little bit better now, but it's still a dangerous attack. But to be honest, hard to pull off with ASP.NET Core. Essentially there are two main options. One is to use ADO.NET that was part of .NET framework back then, but can also be used in new .NET, so also in ASP.NET Core applications. And essentially you have an SQL command and then you run this command. And if you're reading out data, you do execute reader, but there are other options as well. And for many decades, the SQL then looked something like this. It was created using string concatenation, which is not such a good idea when id say would be something like 42 semicolon drop table articles. That's not a command we'd like to send to our database. So, bad idea. In SQL, we have commands and data in the same string. So if we're doing string…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
OWASP Top Ten2m 45s
-
(Locked)
Cross-site scripting (XSS): The attack4m 33s
-
(Locked)
Cross-site scripting (XSS): The defense3m 25s
-
(Locked)
Cross-site scripting (XSS) in JavaScript4m 40s
-
(Locked)
Cross-site scripting (XSS) in single-page applications3m 30s
-
(Locked)
Same-origin policy and CORS4m 26s
-
(Locked)
Enabling CORS in ASP.NET Core web API6m 23s
-
(Locked)
SQL injection with ADO.NET2m 25s
-
(Locked)
SQL injection with Entity Framework Core2m 34s
-
(Locked)
Fixing SQL injection5m 23s
-
(Locked)
Cross-Site Request Forgery (CSRF): The attack5m 25s
-
(Locked)
Cross-Site Request Forgery (CSRF): The defense7m 11s
-
-
-
-
-