Now, let's have a look on the medium security level and see if we can inject our code and run JavaScript
code on the target website.
So this is the the exploit that we're using or the payload that we're using.
So I just want to before I change the security level to media, I want to show you what the website
looked like.
So if we just.
Right.
Click in here on the yellow and go to inspect Element.
Going to make this a little bit bigger.
So this will actually show us the source code for this specific part of the Web page.
So if we look at it, you'll see that we have hello, which is being written automatically by the program
and the hello is followed by this script that we injected.
So it's been injected exactly the same way that we we write it in the text box, which is why it's being
executed on the webpage so we can see script alert exercise and then the script tag is closed, which
is causing the script to be executed on the page.
Now let's go ahead and increase the security level.
And we're going to set it to medium.
Now we're going to go back to the excess reflected.
And I'm going to paste the same exploit that we're using hit submit, and you'll see that it's not going
to work.
Also notice in the low security level, we only seen hello and everything here was blank.
We didn't see anything.
Now we see alert access.
So it's not the pop up is not showing up.
And if we look at the code, you'll see that the start of the attack and the end of the tag are not
being injected in here.
So it's being filtered somehow because all we see here is just hello.
And then we can see the alert exercise.
That's why the code is not being executed, because it's not placed inside the script.
Tug's.
This tells us that they probably are using some sort of a filter, removing the script from here.
Now, there is so many ways that you can bypass filters and other type of protection from access, the
best resource is a cheat sheet made by Ostende, which can be located on the following link.
Now, I'm going to add this link in the resources of this video.
For now, I'm actually not going to use anything that's mentioned in the link.
We're just going to do something that's really simple, because I think all they're doing is they're
just looking for this word and they're removing it from the input so we can use the exact same exploit
right here.
Instead, we're just going to do what we used to do with the ESKIL injection and just capitalize some
of the letters.
So we're going to have script just going to capitalize it like this and then I'll capitalize this one
as well.
I'll probably just add an R in here.
And then I'm going to inject this and the page.
And as you can see now, this works, which allowed that allowed us to bypass the filter used on that
website.
Now, this is a really, really simple way of exploiting it.
Now, some websites actually check for quotes and enable magic quotes, which basically remove the quotes
from the string that you import from the text that you put, and in a future video, we'll see how we
bypass that.
That's also included in the sheet.
I'm going to add in the description and the resources.
Also, there is a number of nice exploits or payloads that's included in the cheat sheet as well.
For example, you can inject stuff as an attack.
You can inject stuff as as an event of a jar, as a JavaScript event.
So when the mouse goes over that particular product, the code will be executed.
And you can also injected you can give an image and give a wrong source code and get the script to run
when there is an error.
Since you're giving a wrong source code or source Yahel for the image, the code will work anyway.
Let's have a look on this one.
So, again, we're just going to paste it in here.
And as you can see, the Cold War here and all of this is included in the ticket, and you can go ahead
and there I'm going to add it in the video resources.
You can have a look on them and try them all.