12 hours 9 minutes
Hey, everyone, welcome back to the core. So in the last video, we talked about the differences between the old Las Top 10 list for 2013 and the list for 2017.
In this video, we're gonna talk about different injection vulnerabilities as well as different injection attacks.
So quick pre assessment question here. Janice, working as a penetration tester for alien invaders, incorporated. She's already mapped in new, berating the Target Network. Her focus is now shifted to the company's Web application.
So which of the following tools should she use on a Web application to test input? Validation
all rights. If you guessed. Answer. See, you are correct. And actually following this video, I'll introduce you to a world famous person that's gonna talk a little bit about barbecue sequel
And, of course, and map is for scanning wire. Shark has forced packet sniffing and looking at packets, and then hash cat is a password cracker. So again, you don't need to know what any of those are. But it's one to let you know
so learning objectives for this video, we're gonna talk about the risk rating methodology. We'll also talk about the risk rating for injection. We're gonna talk about the prevalence check for injections, injections, vulnerabilities, Theo and potential impact as well as ways we can. Either mitigator prevent them.
So are always passes. Rick risk raining methodology, and we're gonna cover this on basically every single module. So well, I'll show you the risk rating for that particular item on the old glass. Top 10 Red is the worst. As you can see here, red is at the top there. It's a number three, and it's basically that it's easily exploitable.
It's, you know, very widespread.
It's very easy for an attacker to detect this and use it, and then the technical impacts. You know, it's very severe, like some kind of major issue, like remote code execution or, you know, tuition and data, that sort of stuff. Those we number three.
Then we better average ones that kind of middle ground there. And then we have our ones that Avery, you know, potentially very challenging for an attacker to exploit, or the vory uncommon or it's very difficult to figure out, you know, to find the vulnerability or there's really no effect once it's exploited.
So speaking of all those you'll see injection right here. Now, of course, this is why Injections number one. All the list for the loss. Top 10. Because you'll see most of the categories. Here are what we call the bad, and we will continue calling the bad throughout the course. It's the red there.
Rejection vulnerabilities. Basically, what's happening here is untrusted. Data is being interpreted. Eso We've got several different types of injection attacks sequel injection, which we'll talk about a little bit. And we're going to do all these these three in the in the lab after this,
Not after right after this video, but the video afterwards after I introduce you to the world famous
individual s So we'll talk about sequel injection attacks, command injection and then html injection attack our
22 types, eh? So you've got your basic, your story or you're persistent type and then you're reflected type. So the store type
taking malicious code. Um,
and it's basically storing it on the service side. So that way, every time a user accesses that server, that code is being provisioned out. So every time they visit that compromise when pates are getting infected,
whereas reflected is just that single
infection executed on the on the user's browser. Eso If I closed my browser session or if, like you're in, you get infected and I don't visit the site, then I don't really have a risk or five isn't the site. Maybe you were the only person that got infected because the code is being executed on your end of things.
So different types of sequel injection. So we're gonna focus primarily on let's and sets the most common type of all these injection attacks that we see. We've got union based, air based blind and I'm in a couple of types of blind will talk about and then also stacked queries.
Also, union based issues is the union's statement, which is basically a way we can join together different select statements. So, for example, of select will be like a I want to get this information from the database so you no select, you know, all years, their names from you know, this table or whatever. So
basically select as the name implies is we're trying to get information
back from the database. We're trying to choose certain things from the database.
So what happens here is we? We have Ah, as I mentioned, the unit commanders joining together select quarries. So we're basically building on top of the original select query
and to extend beyond. So let's say that I have a legitimate, select query, and I want, you know, a zay mentioned. Select some information from the database like a name or something, and then what I would do as an attacker's, I would combine several U. S. I would use the union statement to combine several select queries to
instead of just getting like the user name. Now I'm going in and getting so security number, date of birth,
all that good stuff
air base. So the goal here is to get the database to respond with an error that's gonna show us the proper syntax. So then, from there we can build out attack commands and potentially getting from action information back from the database
Blind injection. So, as I mentioned, this one has both bullion or time based civilian is basically like a true or false true yes or no type of thing. So, for example, we may say a true statement like, you know, you know, the I d. equals one and one equals one. And then we may provide a false statement, Right? So, like I d
equals one. And you know,
one equals two or something like that, you know? So we're providing a false statement there,
and then time based relies on the database kind of pausing or sleeping for a period of time and then returning results on based off that that could indicate, you know, whether or not that's equal query actually executed successfully or not. So, again, both these air blind based in
we don't necessarily see exactly their message coming back
from the database. But we do. We are able to garner some information about was the command attack successful
and then start static worries. Basically, this is a termination original query that immediately executes another query. So, you know, for example, in this example here we're selecting all the records from the my sequel users table in the database. And this is just an example of what that way look like.
So prevalent. Is this prevalent? Well, yes. This is probably the most prevalent thing on the wall. Stop 10 sequel injection attacks specifically.
Um, so we see it in a lot of different areas, so injection vulnerabilities cross the border into sequel injection. We see these across the board things like sequel. L dap OS commands in maximal part, sirs.
Uh, queries for no sequel. SMTP headers, etcetera, etcetera. So a lot of different places,
we may see this type of attack.
So how to check? Well, number one is there's no validation, right? So as we're entering data and there's not actually any validation going on, so that easily tells us that this may be vulnerable to some type of injection attack.
*** it. Dynamic worries without content
context. Excuse me. Aware. Escaping. So that just means that they're gonna be used directly an interpreter s. So there's no basically, with that, there's no, uh, parameter eyes calls. So there's no parameters being set
and then structured, you know, hostile data inquiries.
So that way, you know, So the attacker maybe, uh,
using, like, truncated or contaminated
data. So that way, we don't know exactly what they're trying to run or, you know, at least the interpreter doesn't recognize that it's actually malicious. And so it goes ahead and processes that particular coat
impact. So one of the biggest impacts is data loss. Also data corruption, especially in sequel injection attacks. The attacker will try to get access to the database and then from there they can potentially inject code in delete stuff or dis corrupted.
Also, disclosure on unauthorized parties. Again, that kind of goes back to the data loss aspect of it, and then denial of access is well, right. So if I could take over your database and I can potentially lock you out of it, what are you going to do as a company ride? You'll you'll probably pay me whatever I want. Uh, whatever I want to charge you.
So prevention. So you know, source code review could use that. Validating input is probably the biggest thing. They're sanitizing input to make sure there's nothing malicious in it. Using safe AP eyes using things like the limit. Uh uh, command in sequel or so that way, we limit the amount of data that somebody can get back in a single query on many testing.
Why listen on the server side and then you know, of course, setting parameters for the queries.
So quick, Post assessment question here, calm is a security analyst. That is wanting to find a sequel control that will help prevent against mass data loss.
What's the following should she use?
All right, so I kind of get this one away just a little bit ago. The answer here is be the limit is the control that we can use a side of sequel to limit the amount of information that's being removed in a single query.
All right, so in this video, we talked about sequel injection attacks. We talked about OS injection OS Command A CZ. Well, as a team a little bit. We also talked about injection vulnerabilities at a high level. And the next video, we're gonna introduce you to the world famous person I keep talking about, and then we'll have our injection
labs, and then we'll move into the next module, which will be broken authentication.
The OWASP Online test is a premium Cybrary assessment test created by iMocha. It is ...
OWASP Top 10 Intro
The OWASP Top 10 Intro lab provides students a brief tutorial on XSS. Students ...
1 CEU/CPE Hours Available