Hello and welcome back.
In this video, we're going to take a look at our first example of a female injection, but we're also
going to take a look at how we can set up and deploy vulnerable virtual machines on our tri hack Hackney
platform.
So first thing to make sure is that you have Burset turned on, even though we weren't needed for this
lecture, but it's good practice to get used to using it and having it as a proxy.
Every time you perform some percent penetration testing, then go and log in to your tri hack me account.
And now we want to see how we can actually deploy their virtual machines and test them.
So for this course, we're going to be using overspender vulnerabilities lab, which is free to use
on this platform.
It is located if you go online, then you navigate to Web hacking fundamentals.
And under the Web hacking fundamentals, if we scroll a little bit down, we're going to see our top
10, which is the room that hosts top ten most critical website vulnerabilities and it's also free to
use.
So let's click on it.
This will be the room that we're going to be doing.
And in this specific room, we don't really have an HTML injection.
However, we can use a different task that we have right here to demonstrate HTML injection.
And that different task is going to be this one task number five command injection practical.
Now, just so you don't get confused, we are not yet learning command injection.
We are going to be focusing on command injection later in the course.
For now, we want to do HTML injection and we can also do it on this lab right here.
You need to read any of this for now.
We're going to leave that for later.
For now, we're only interested into starting this machine.
But there is one problem with this.
Once we start the machine, it will be deployed in their own network.
So we must VPN to their network in order to be able to access this machine.
How can we do that?
Well, it's rather simple.
We can do that with the help of open VPN that we have inside of our clinics and they have a good guide
on how we can do that.
So navigate to this icon right here, then navigate to access.
And here we have the page where we can download our configuration file that we will use to access their
VPN server here I have my VPN service selected, which is currently this one.
And if I click on download my configuration file, it will open this file, which will have my username
as well as DOT OVP.
If we save the file, it will be located in our downloads directory and all we have to do afterwards
is open a terminal.
Navigates to your downloads directory.
If I type else, here will be the file that I just downloaded and in order to VPN into their network,
we type pseudo open VPN and then the file name, which in my case is this one.
If I press enter, I enter my password.
In just a few seconds, we will have everything set up and now if we open a third terminal and we type
I have config, you will see this third interface right here where you will get the IP address from
the VPN, which in my case is this one, and this is the IP address, the used to communicate with the
vulnerable virtual machines that we are going to deploy on their network.
So now that we did that, we can refresh this and hopefully if we did everything correctly, this should
update our information.
We're currently connected to their VPN server and this is our clinic's IP address.
OK, now let's go back to the lab.
Now that we did all of this, let's navigate again to Web hacking fundamentals.
Let's go to WASP TOP10.
And as already mentioned before, to demonstrate HTML injection, we're going to start this machine
under task five.
Let's start it by clicking on this button.
And it will say, starting your machine, please wait in a few seconds, we're going to see this tab
right here.
It will say that the machine expires in fifty nine minutes.
So that is how long we have to solve our task, even though we're not really doing the command injection
task.
But this is how long the machine will stay up and the IP address of the machine will be shown in thirty
nine seconds.
So all we have to do for now is to wait for this timer to go to zero in order to be able to see the
IP address of our target machine.
And here it is, I got my I.P. address of my virtual machine.
Now it gives you this option to copy it.
And the first thing that I always like to do with this is I like to try to ping that IP address because
sometimes it might take a couple of minutes for you to be able to communicate with this machine.
You won't be able to communicate with it straight away.
So pinging or visiting the deep web page won't really work.
As we can see right here, I'm still not able to ping it, so let's wait for a couple more seconds and
hopefully in a minute or two, we should be able to visit the Web page of this IP address and also we
should be able to ping it.
OK, a few minutes went by and let's try it again, if I think the IP address.
Now we have established connection and we can communicate with this machine.
Let's control see this, and the next thing that we want to do is visit the Web page on this machine.
Now for the command injection part, if we go to the task that we have, we would be visiting this link
right here.
But we're not really interested in performing command injection right now.
We will do that later.
For now, we want to perform HTML injection.
So what I want you to do is I want you to copy the IP address of your machine and add at the end press
enter and it should load this page that says directory search.
It's a very simple Web page, as we can see.
We do have a user input right here, we can type something in and then we have a button to submit.
So let's type, for example, test click on submit.
And we get an error user test was not found on the system.
Now, what does this tell us if we go back to our theory video of the injection, we remember that if
our input that we specified reflects somewhere on the Web page, we can try and test for optimal injection.
And our test was reflected here.
So what would happen if we, for example, typed in HTML code?
Let's give it a try.
Let me just zoom descent so we can see everything better and I'm going to type A one and then close
header tax and then capital test and then close header tax again.
So we have open header text for the H1 header.
Sighs We have test and close H1 packs.
Let's submit this and here it is.
We get test printed in header of sites one.
So that means this is vulnerable to an injection.
And just in case you're not sure we can do something like this, for example, each one, and then we
can also underline to see whether it will process the underlying text of the email code and if it will
underline our test string.
Don't forget to close both underline Peg and Heather one peg, and before we submit, well, here it
is, we get our test string underlined.
This means this Web page is vulnerable to HTML injection.
And this is the most simple example that we can have.
Nonetheless, we're going to take a look at some other examples and some other possibilities with HTML
injection in the next videos.
But for now, we'll learn how we can deploy our virtual machines inside of our tri hacking account.
And we also learned how we can connect to its VPN.
Remember that you will have to do this every time you start to try hack me.
But once you downloaded this file that we have right here, you can always use the same file.
Just also make sure that you use the same VPN server.
You just run this comment every time you want to use, try hack me and it will connect to their VPN,
which will allow you to access their machines whenever you start them.
OK, awesome.
Now that we got that out of the way, let's see an example of HTML injection on our own.
SBW, a virtual machine see in the next video.