1
00:00:00,960 --> 00:00:02,580
Hello and welcome back.

2
00:00:03,150 --> 00:00:09,180
In this video, we're going to take a look at our first example of a female injection, but we're also

3
00:00:09,180 --> 00:00:15,250
going to take a look at how we can set up and deploy vulnerable virtual machines on our tri hack Hackney

4
00:00:15,270 --> 00:00:15,750
platform.

5
00:00:16,810 --> 00:00:21,370
So first thing to make sure is that you have Burset turned on, even though we weren't needed for this

6
00:00:21,370 --> 00:00:26,440
lecture, but it's good practice to get used to using it and having it as a proxy.

7
00:00:26,440 --> 00:00:33,400
Every time you perform some percent penetration testing, then go and log in to your tri hack me account.

8
00:00:33,850 --> 00:00:39,590
And now we want to see how we can actually deploy their virtual machines and test them.

9
00:00:40,420 --> 00:00:46,150
So for this course, we're going to be using overspender vulnerabilities lab, which is free to use

10
00:00:46,150 --> 00:00:47,320
on this platform.

11
00:00:47,350 --> 00:00:52,660
It is located if you go online, then you navigate to Web hacking fundamentals.

12
00:00:53,730 --> 00:00:59,370
And under the Web hacking fundamentals, if we scroll a little bit down, we're going to see our top

13
00:00:59,370 --> 00:01:07,980
10, which is the room that hosts top ten most critical website vulnerabilities and it's also free to

14
00:01:07,980 --> 00:01:08,250
use.

15
00:01:08,550 --> 00:01:09,560
So let's click on it.

16
00:01:10,050 --> 00:01:12,090
This will be the room that we're going to be doing.

17
00:01:12,300 --> 00:01:16,990
And in this specific room, we don't really have an HTML injection.

18
00:01:17,010 --> 00:01:23,190
However, we can use a different task that we have right here to demonstrate HTML injection.

19
00:01:23,310 --> 00:01:28,960
And that different task is going to be this one task number five command injection practical.

20
00:01:29,460 --> 00:01:33,710
Now, just so you don't get confused, we are not yet learning command injection.

21
00:01:33,720 --> 00:01:36,630
We are going to be focusing on command injection later in the course.

22
00:01:37,020 --> 00:01:43,100
For now, we want to do HTML injection and we can also do it on this lab right here.

23
00:01:43,680 --> 00:01:45,750
You need to read any of this for now.

24
00:01:46,050 --> 00:01:47,870
We're going to leave that for later.

25
00:01:48,120 --> 00:01:51,750
For now, we're only interested into starting this machine.

26
00:01:52,020 --> 00:01:53,930
But there is one problem with this.

27
00:01:54,480 --> 00:01:58,710
Once we start the machine, it will be deployed in their own network.

28
00:01:59,460 --> 00:02:03,800
So we must VPN to their network in order to be able to access this machine.

29
00:02:04,290 --> 00:02:05,190
How can we do that?

30
00:02:05,700 --> 00:02:07,080
Well, it's rather simple.

31
00:02:07,380 --> 00:02:14,070
We can do that with the help of open VPN that we have inside of our clinics and they have a good guide

32
00:02:14,070 --> 00:02:15,020
on how we can do that.

33
00:02:15,030 --> 00:02:19,260
So navigate to this icon right here, then navigate to access.

34
00:02:20,960 --> 00:02:26,840
And here we have the page where we can download our configuration file that we will use to access their

35
00:02:26,840 --> 00:02:31,780
VPN server here I have my VPN service selected, which is currently this one.

36
00:02:31,910 --> 00:02:38,660
And if I click on download my configuration file, it will open this file, which will have my username

37
00:02:38,810 --> 00:02:40,280
as well as DOT OVP.

38
00:02:41,180 --> 00:02:47,450
If we save the file, it will be located in our downloads directory and all we have to do afterwards

39
00:02:47,450 --> 00:02:48,650
is open a terminal.

40
00:02:50,060 --> 00:02:52,220
Navigates to your downloads directory.

41
00:02:54,290 --> 00:03:01,190
If I type else, here will be the file that I just downloaded and in order to VPN into their network,

42
00:03:01,190 --> 00:03:07,670
we type pseudo open VPN and then the file name, which in my case is this one.

43
00:03:08,090 --> 00:03:11,750
If I press enter, I enter my password.

44
00:03:12,980 --> 00:03:18,590
In just a few seconds, we will have everything set up and now if we open a third terminal and we type

45
00:03:18,830 --> 00:03:25,730
I have config, you will see this third interface right here where you will get the IP address from

46
00:03:25,730 --> 00:03:32,060
the VPN, which in my case is this one, and this is the IP address, the used to communicate with the

47
00:03:32,060 --> 00:03:35,420
vulnerable virtual machines that we are going to deploy on their network.

48
00:03:36,310 --> 00:03:42,070
So now that we did that, we can refresh this and hopefully if we did everything correctly, this should

49
00:03:42,070 --> 00:03:43,390
update our information.

50
00:03:43,660 --> 00:03:48,070
We're currently connected to their VPN server and this is our clinic's IP address.

51
00:03:48,460 --> 00:03:50,680
OK, now let's go back to the lab.

52
00:03:52,300 --> 00:03:57,880
Now that we did all of this, let's navigate again to Web hacking fundamentals.

53
00:04:01,340 --> 00:04:03,380
Let's go to WASP TOP10.

54
00:04:04,750 --> 00:04:10,660
And as already mentioned before, to demonstrate HTML injection, we're going to start this machine

55
00:04:10,660 --> 00:04:12,190
under task five.

56
00:04:13,030 --> 00:04:15,550
Let's start it by clicking on this button.

57
00:04:16,550 --> 00:04:22,820
And it will say, starting your machine, please wait in a few seconds, we're going to see this tab

58
00:04:22,820 --> 00:04:23,510
right here.

59
00:04:24,050 --> 00:04:27,490
It will say that the machine expires in fifty nine minutes.

60
00:04:27,500 --> 00:04:32,960
So that is how long we have to solve our task, even though we're not really doing the command injection

61
00:04:32,960 --> 00:04:33,260
task.

62
00:04:33,260 --> 00:04:39,650
But this is how long the machine will stay up and the IP address of the machine will be shown in thirty

63
00:04:39,650 --> 00:04:40,460
nine seconds.

64
00:04:40,610 --> 00:04:47,120
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

65
00:04:47,120 --> 00:04:48,940
IP address of our target machine.

66
00:04:49,930 --> 00:04:53,930
And here it is, I got my I.P. address of my virtual machine.

67
00:04:54,580 --> 00:04:56,710
Now it gives you this option to copy it.

68
00:04:57,460 --> 00:05:04,180
And the first thing that I always like to do with this is I like to try to ping that IP address because

69
00:05:04,180 --> 00:05:10,050
sometimes it might take a couple of minutes for you to be able to communicate with this machine.

70
00:05:10,240 --> 00:05:12,580
You won't be able to communicate with it straight away.

71
00:05:12,590 --> 00:05:17,220
So pinging or visiting the deep web page won't really work.

72
00:05:18,160 --> 00:05:23,890
As we can see right here, I'm still not able to ping it, so let's wait for a couple more seconds and

73
00:05:23,890 --> 00:05:32,170
hopefully in a minute or two, we should be able to visit the Web page of this IP address and also we

74
00:05:32,170 --> 00:05:33,340
should be able to ping it.

75
00:05:34,690 --> 00:05:40,090
OK, a few minutes went by and let's try it again, if I think the IP address.

76
00:05:40,120 --> 00:05:44,320
Now we have established connection and we can communicate with this machine.

77
00:05:46,000 --> 00:05:52,140
Let's control see this, and the next thing that we want to do is visit the Web page on this machine.

78
00:05:52,760 --> 00:05:59,630
Now for the command injection part, if we go to the task that we have, we would be visiting this link

79
00:05:59,630 --> 00:06:00,140
right here.

80
00:06:00,440 --> 00:06:03,580
But we're not really interested in performing command injection right now.

81
00:06:03,620 --> 00:06:04,830
We will do that later.

82
00:06:04,850 --> 00:06:07,690
For now, we want to perform HTML injection.

83
00:06:07,700 --> 00:06:15,680
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

84
00:06:15,680 --> 00:06:20,780
enter and it should load this page that says directory search.

85
00:06:22,290 --> 00:06:24,570
It's a very simple Web page, as we can see.

86
00:06:24,600 --> 00:06:30,630
We do have a user input right here, we can type something in and then we have a button to submit.

87
00:06:31,200 --> 00:06:35,550
So let's type, for example, test click on submit.

88
00:06:36,480 --> 00:06:40,710
And we get an error user test was not found on the system.

89
00:06:41,600 --> 00:06:50,270
Now, what does this tell us if we go back to our theory video of the injection, we remember that if

90
00:06:50,270 --> 00:06:57,140
our input that we specified reflects somewhere on the Web page, we can try and test for optimal injection.

91
00:06:57,140 --> 00:06:59,540
And our test was reflected here.

92
00:07:00,230 --> 00:07:03,530
So what would happen if we, for example, typed in HTML code?

93
00:07:04,040 --> 00:07:05,010
Let's give it a try.

94
00:07:05,180 --> 00:07:12,980
Let me just zoom descent so we can see everything better and I'm going to type A one and then close

95
00:07:12,990 --> 00:07:18,080
header tax and then capital test and then close header tax again.

96
00:07:19,020 --> 00:07:21,720
So we have open header text for the H1 header.

97
00:07:21,750 --> 00:07:25,260
Sighs We have test and close H1 packs.

98
00:07:25,530 --> 00:07:28,530
Let's submit this and here it is.

99
00:07:28,950 --> 00:07:32,610
We get test printed in header of sites one.

100
00:07:33,390 --> 00:07:36,030
So that means this is vulnerable to an injection.

101
00:07:36,870 --> 00:07:42,300
And just in case you're not sure we can do something like this, for example, each one, and then we

102
00:07:42,300 --> 00:07:49,110
can also underline to see whether it will process the underlying text of the email code and if it will

103
00:07:49,110 --> 00:07:51,810
underline our test string.

104
00:07:52,780 --> 00:08:00,190
Don't forget to close both underline Peg and Heather one peg, and before we submit, well, here it

105
00:08:00,190 --> 00:08:03,120
is, we get our test string underlined.

106
00:08:03,520 --> 00:08:07,750
This means this Web page is vulnerable to HTML injection.

107
00:08:08,200 --> 00:08:11,420
And this is the most simple example that we can have.

108
00:08:12,220 --> 00:08:17,290
Nonetheless, we're going to take a look at some other examples and some other possibilities with HTML

109
00:08:17,290 --> 00:08:18,680
injection in the next videos.

110
00:08:18,790 --> 00:08:24,120
But for now, we'll learn how we can deploy our virtual machines inside of our tri hacking account.

111
00:08:24,460 --> 00:08:27,550
And we also learned how we can connect to its VPN.

112
00:08:27,730 --> 00:08:31,810
Remember that you will have to do this every time you start to try hack me.

113
00:08:32,049 --> 00:08:36,850
But once you downloaded this file that we have right here, you can always use the same file.

114
00:08:37,210 --> 00:08:39,789
Just also make sure that you use the same VPN server.

115
00:08:40,780 --> 00:08:46,540
You just run this comment every time you want to use, try hack me and it will connect to their VPN,

116
00:08:46,840 --> 00:08:50,200
which will allow you to access their machines whenever you start them.

117
00:08:50,710 --> 00:08:51,470
OK, awesome.

118
00:08:51,790 --> 00:08:56,730
Now that we got that out of the way, let's see an example of HTML injection on our own.

119
00:08:56,790 --> 00:09:00,520
SBW, a virtual machine see in the next video.

