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 medium, I want to show you what the website
looks like.
So if we just right click in here on the hello and go to inspect element.
I'm 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 being injected exactly the same way that we, we write it in the text box, which is why it's
been executed on the web page.
So we can see script alert access 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 tag 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 says that's why the code is not being executed because it's not placed
inside the script tags.
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 Austin, 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 the exact same exploit right here.
Instead, we're just going to do what we used to do with the SQL injection and just capitalize some
of the letters.
So we're going to have script, we're 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 in the page.
And as you can see now, this works, which allowed us 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 input from the text that you input.
And in a future video, we'll see how we bypass that.
That's also included in the cheat sheet.
I'm going to add in the description in 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 A tag.
You can inject stuff as as an event, as a 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 URL 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 code will work here.
Now, all of this is included in the cheat sheet 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.