WEBVTT

1
00:00:00.420 --> 00:00:00.840
All right.

2
00:00:00.870 --> 00:00:03.090
Let's look at our end map scan here.

3
00:00:03.120 --> 00:00:04.950
We've got three ports that return back.

4
00:00:04.950 --> 00:00:07.340
We've got a GDP on port 80.

5
00:00:07.530 --> 00:00:15.160
We've got HP port Port 88 0 8 and then we've got S&amp;P on Port forty five.

6
00:00:15.190 --> 00:00:17.650
Now we see Microsoft I ask which is telling this.

7
00:00:17.670 --> 00:00:23.620
This is a Windows machine and we see the S&amp;P enumeration here which says Windows 10 enterprise that

8
00:00:23.630 --> 00:00:24.630
we scroll down a little bit.

9
00:00:24.630 --> 00:00:28.980
It also says hey Windows 10 enterprise six point three we've got 17 134.

10
00:00:29.120 --> 00:00:31.580
So got a little bit of US information right here.

11
00:00:31.590 --> 00:00:34.580
We're looking for any sort of exploit related to that.

12
00:00:34.680 --> 00:00:40.760
We also see the computer name is SEC notes and we've got the workgroup of H G B for hack the box.

13
00:00:40.920 --> 00:00:47.130
So the thing that we should probably do is go out and try to explore these web pages and then we'll

14
00:00:47.130 --> 00:00:53.370
leave 445 for a later time though what we can do with four or forty five if we want to do some basic

15
00:00:53.370 --> 00:00:59.270
enumeration is we can come out here and I'm sort of closed out of my tabs and we're going to say we

16
00:00:59.280 --> 00:01:07.470
need to say S&amp;P client we'll do a quick dash L for a list and then all this give it a 10 10 10 ninety

17
00:01:07.470 --> 00:01:07.990
seven.

18
00:01:08.010 --> 00:01:09.330
See if we can list this out.

19
00:01:09.330 --> 00:01:12.300
Hit enter and we get access denied.

20
00:01:12.300 --> 00:01:15.250
So that's why we're not going to enumerate S&amp;P first.

21
00:01:15.270 --> 00:01:21.270
Now let's go to port 80 because it does look like it has a log in page here where Port 88 0 8 just has

22
00:01:21.270 --> 00:01:24.160
a basic I guess windows titled page.

23
00:01:24.470 --> 00:01:33.130
So let's first explore port 80 so if we go to 10 that 10 that 10 that 97 we could see we are given a

24
00:01:33.190 --> 00:01:40.450
log in page and it says hey give us your logging credentials and go ahead and log in.

25
00:01:40.460 --> 00:01:42.560
Well if you don't have an account try to sign up.

26
00:01:42.760 --> 00:01:45.540
So let's just sign up for an account and see what's going on inside.

27
00:01:45.550 --> 00:01:46.840
We'll say TCM.

28
00:01:46.840 --> 00:01:56.010
I'll give it a password or TCM twice and password must be six characters length all TCM 1 2 THREE OK

29
00:01:56.040 --> 00:01:57.620
let's try logging with that

30
00:02:00.890 --> 00:02:08.360
and we can see that we're viewing secure notes for TCM it looks like we can create some notes maybe

31
00:02:08.420 --> 00:02:11.320
chest and then put a test note in here and save it.

32
00:02:11.990 --> 00:02:17.690
OK so we've got our test no we can change our password we can sign out and then there's a contact us

33
00:02:18.170 --> 00:02:23.090
where we can send a message to this Tyler at SEC notes that HDTV.

34
00:02:23.180 --> 00:02:27.440
So this looks like we have a user name enumeration here we can say hey at least we know the user's name

35
00:02:27.440 --> 00:02:29.050
is Tyler.

36
00:02:29.050 --> 00:02:34.040
So it might help us a little bit later on when I see a log in page.

37
00:02:34.340 --> 00:02:39.650
I'm immediately thinking some sort of sequel injection exists here.

38
00:02:39.890 --> 00:02:46.790
So I'm gonna go try that first and I might just try something first on the log in page like a quick

39
00:02:46.820 --> 00:02:54.530
one or one equals one and then something like this and see if that works and just use that ball fields

40
00:02:55.070 --> 00:02:57.740
no account found with that username and we could even try.

41
00:02:57.740 --> 00:03:03.170
Just like a just to generate an error here and it's saying no account found that user name.

42
00:03:03.200 --> 00:03:03.640
OK.

43
00:03:03.640 --> 00:03:08.180
So maybe we don't have sequence injection here or maybe we just run this through something like burp

44
00:03:08.180 --> 00:03:12.570
intruder and try to see if we can get some sort of different response to come through.

45
00:03:12.740 --> 00:03:18.560
But just for the sake of time for the sake of this class we don't have secret injection on this page

46
00:03:18.680 --> 00:03:24.890
itself where the sequel injection actually exists is on the sign up page which would be the next place

47
00:03:24.890 --> 00:03:25.610
to try.

48
00:03:26.030 --> 00:03:31.340
So when we're doing any kind of web app testing and this is real world experience here if we're doing

49
00:03:31.340 --> 00:03:36.950
any kind of web app testing I want to see what kind of malicious items I can dump into these pages and

50
00:03:36.950 --> 00:03:38.400
get something back.

51
00:03:38.450 --> 00:03:46.480
So I'm looking at if I can maybe create even like a script alert one for example if I'm testing a Web

52
00:03:46.480 --> 00:03:51.770
site if I'm allowed to make a username like that and then I log in and there's cross-eyed scripting

53
00:03:51.770 --> 00:03:52.420
that pops up.

54
00:03:52.430 --> 00:03:54.050
That's not good.

55
00:03:54.050 --> 00:03:56.090
Same thing goes for sequel injection.

56
00:03:56.090 --> 00:04:02.280
What if I did something like one or one like this which is just a common payload.

57
00:04:02.280 --> 00:04:06.050
And you again can run through the different payloads and see what works.

58
00:04:06.050 --> 00:04:12.110
So you can take something like burp intruder and we can open it up and do an example here where we say

59
00:04:13.070 --> 00:04:15.320
hey I want to create something and I'm just going to hit.

60
00:04:15.320 --> 00:04:16.250
OK.

61
00:04:16.250 --> 00:04:20.090
And you should be familiar with Bursley by this point so I'm not going to give you the full walkthrough

62
00:04:20.480 --> 00:04:26.800
but we can start brb sweep and we can go ahead and just use something like Foxy proxy to turn on our

63
00:04:26.800 --> 00:04:28.020
proxy.

64
00:04:28.060 --> 00:04:32.690
All this is doing if you've never seen Foxy proxy before is going and doing our settings for us.

65
00:04:32.690 --> 00:04:40.280
So like our preferences typically for burp sweet we would have to manually intercept 1 2 7 0.01 on 80

66
00:04:40.280 --> 00:04:46.520
80 now Foxy proxy just allows us to go in here and say hey that's exactly what I want to do with this

67
00:04:46.520 --> 00:04:47.610
burp sweet.

68
00:04:47.720 --> 00:04:53.330
I just want to 1 2 7 0 0 0 not 1 on poor 80 80 and it will just set it for us.

69
00:04:53.390 --> 00:04:58.640
So here's a quick flip of a switch instead of having to go to preferences dig in etc. so we can come

70
00:04:58.640 --> 00:05:05.510
in here and we can say OK I want to do this and I'm going to do a password and confirm of the same.

71
00:05:05.510 --> 00:05:13.520
And I'll just go ahead and intercept this request you'll see it goes into burp sweet and we can decide

72
00:05:13.520 --> 00:05:16.010
to forward this or do whatever we want with it.

73
00:05:16.010 --> 00:05:24.460
So I can send this to intruder and I could say something like just as an example I can give it different

74
00:05:24.460 --> 00:05:35.770
parameters so I can clear all of these and we can say hey I want to do one two three here just for the

75
00:05:35.770 --> 00:05:43.410
confirm and we'll say OK for the payloads what I want to set all the payloads to is this equal injection

76
00:05:43.420 --> 00:05:53.760
so maybe I do or 1 or 1 or we do like the one we just saw where one or one equals one dash dash dash.

77
00:05:53.800 --> 00:06:00.640
And with this sniper attack what it's gonna do is it's going to go ahead and just try to create a user

78
00:06:00.660 --> 00:06:02.020
name in all these fields.

79
00:06:02.020 --> 00:06:07.390
So it's gonna put this one payload that we set for all the fields that are set here.

80
00:06:07.390 --> 00:06:12.220
If we wanted to do other attacks you could do like a pitchfork where we'd have three different payloads

81
00:06:12.220 --> 00:06:17.530
for example and we'd say Hey payload one or position one we're gonna put here and then we're going to

82
00:06:17.530 --> 00:06:21.970
go say for bailout two we'll put something else but for this I just want them all to be the same so

83
00:06:21.970 --> 00:06:26.690
I'm going to go ahead and do a sniper attack and then I'm just gonna start the attack and it's gonna

84
00:06:26.710 --> 00:06:33.460
say Hey brb sweet takes its sweet time for this and that is what it is you know because it's we're on

85
00:06:33.460 --> 00:06:37.470
the community edition so we could look at the response and see what happens.

86
00:06:37.630 --> 00:06:39.430
The user name is already taken.

87
00:06:39.460 --> 00:06:39.970
That's OK.

88
00:06:39.970 --> 00:06:42.670
Somebody is probably already been on this box.

89
00:06:42.670 --> 00:06:44.580
No worries about that part.

90
00:06:44.590 --> 00:06:45.730
Same thing with this one.

91
00:06:45.730 --> 00:06:47.070
Looks like people were trying this.

92
00:06:47.080 --> 00:06:49.090
That's OK if you're getting the usernames already taken.

93
00:06:49.090 --> 00:06:51.510
Don't worry about it on this.

94
00:06:51.520 --> 00:06:56.290
Eighteen fifty four you could see the payload changed slightly but it says the usernames already taken

95
00:06:56.290 --> 00:06:56.850
as well.

96
00:06:57.250 --> 00:06:59.660
So we're just going to do the manual method.

97
00:06:59.890 --> 00:07:02.070
I'm going to go ahead and just turn the intercept off.

98
00:07:02.080 --> 00:07:05.040
It's going to say that this username is already taken as well.

99
00:07:05.100 --> 00:07:10.270
I'm going to go ahead and just go back to the home page and we're gonna try to log in with this injected

100
00:07:10.390 --> 00:07:19.590
account and you can see now it says revering secure notes 4 or 1 or and.

101
00:07:19.640 --> 00:07:19.970
Right.

102
00:07:20.230 --> 00:07:26.110
So we're ending something here we're saying or 1 or and then we're starting something which just completely

103
00:07:26.110 --> 00:07:30.480
removes everything else and we're getting the information for everybody.

104
00:07:30.480 --> 00:07:35.380
You can see the test note that I made here for nineteen twenty twenty.

105
00:07:35.380 --> 00:07:38.530
We could see the many sticky buns ingredients.

106
00:07:38.530 --> 00:07:41.920
We're getting all the database draft out for us.

107
00:07:41.920 --> 00:07:50.220
And here we can see that there is a sec notes that HDTV backslash new dash site looks like a SMB folder.

108
00:07:50.230 --> 00:07:52.870
We've got Tyler and then it looks like credentials here.

109
00:07:53.230 --> 00:07:54.360
So that's good.

110
00:07:54.370 --> 00:08:00.370
And so we've just basically done sequel injection and gone into this Web site dump these credentials

111
00:08:00.370 --> 00:08:06.680
out and now we can utilize them to try to get a shell on this machine so what I've gone ahead and done

112
00:08:07.220 --> 00:08:14.080
is I'm going to go ahead and try P.S. exact for example just in case you want to know here's a P.S.

113
00:08:14.090 --> 00:08:18.790
exact pie from the impact impact tool kit.

114
00:08:18.950 --> 00:08:20.660
Yes exact pie.

115
00:08:20.720 --> 00:08:25.720
And we're just going to say hey I want to connect let's do a dash dash help.

116
00:08:25.880 --> 00:08:30.860
And this is just to prove a point here you don't have to follow along and we're going to say OK we need

117
00:08:30.890 --> 00:08:34.280
a username and password and then IP address.

118
00:08:34.280 --> 00:08:40.850
So I'm going to supply Tyler and then I'm going to supply the password which is on this page

119
00:08:43.200 --> 00:08:50.070
and I'm going to put that in quotes and then I'm going to supply the IP address of 10 that turned out

120
00:08:50.080 --> 00:08:51.350
10 got ninety seven.

121
00:08:51.780 --> 00:08:54.730
I will try to run this area see OK.

122
00:08:54.770 --> 00:08:55.510
Adnan's not right.

123
00:08:55.510 --> 00:08:57.110
Well he's not in Amman.

124
00:08:57.110 --> 00:08:58.060
C is not right.

125
00:08:58.070 --> 00:09:04.570
L found a rateable share uploading a file and it's not able to open it up.

126
00:09:04.610 --> 00:09:05.220
It's trying.

127
00:09:05.240 --> 00:09:07.610
It's not able open up sometimes a series out.

128
00:09:07.610 --> 00:09:08.960
I'll give it a second go.

129
00:09:08.960 --> 00:09:11.060
But for me this wasn't working.

130
00:09:11.060 --> 00:09:12.350
So this is like a quick win.

131
00:09:12.350 --> 00:09:15.730
I'm just thinking hey maybe P.S. exact I can upload some sort of malware.

132
00:09:15.740 --> 00:09:17.550
Get on the machine and go.

133
00:09:17.570 --> 00:09:22.220
Maybe there's antivirus or something blocking this or I like Windows Defender or something along those

134
00:09:22.220 --> 00:09:24.820
lines is saying nope you can't do this sort of attack.

135
00:09:24.830 --> 00:09:26.900
I'm going to go ahead and block this attack.

136
00:09:26.900 --> 00:09:29.020
So we're not getting in here.

137
00:09:29.240 --> 00:09:33.350
Other route that we can take is we can go explore the new site and see what's there.

138
00:09:33.350 --> 00:09:39.620
So let's go ahead and just try that we'll say S&amp;P client and we'll go ahead and just do something along

139
00:09:39.620 --> 00:09:45.500
these lines 10 dot 10 that ten point ninety seven and we'll see a new site and then we'll just provide

140
00:09:45.500 --> 00:09:49.140
a user name of Tyler just like that.

141
00:09:49.190 --> 00:09:55.950
Going to ask for Tyler's password which is right here I'm going to copy that again and paste it here.

142
00:09:57.140 --> 00:09:57.510
OK.

143
00:09:57.510 --> 00:09:58.150
And we got it.

144
00:09:58.150 --> 00:10:01.970
Now let's just do a quick Les now.

145
00:10:01.990 --> 00:10:02.590
We've got this.

146
00:10:02.620 --> 00:10:10.840
I start in this I guess that PMG which reminds me of a default home page similar to Devil from beginning

147
00:10:10.840 --> 00:10:11.520
of the course.

148
00:10:11.520 --> 00:10:19.430
Right well where did we kind of maybe see that already if we go back to our map scan you could see that

149
00:10:19.430 --> 00:10:25.400
we saw possibly a default I page overrun 88 0 8.

150
00:10:25.400 --> 00:10:29.580
So if we go look at 88 0 8 we can maybe confirm that.

151
00:10:29.600 --> 00:10:33.790
So let's go ahead just do 88 0 8 here and see what's going on.

152
00:10:34.190 --> 00:10:41.300
So we do have a default page now to skip a step the wheel spinning in your mind you're probably thinking

153
00:10:41.300 --> 00:10:48.500
well maybe I could just do a medicinal payload try to run that get to go with it aspects and I tried

154
00:10:48.500 --> 00:10:49.350
that as well.

155
00:10:49.400 --> 00:10:50.780
It does not work.

156
00:10:50.870 --> 00:10:57.290
So we have to think outside the box now something is going in there and deleting things very very quickly.

157
00:10:57.290 --> 00:11:01.750
It could be antivirus again there could be a script running saying hey delete everything out of this

158
00:11:01.760 --> 00:11:03.890
that you know doesn't belong here.

159
00:11:04.040 --> 00:11:07.520
I'm guessing we're probably up against some sort of antivirus but we're not sure at this point.

160
00:11:08.090 --> 00:11:11.990
So what we can do is you could say well we're in here.

161
00:11:12.080 --> 00:11:17.990
Maybe I can upload something like net cat and then just run a malicious BHP shell or something along

162
00:11:17.990 --> 00:11:19.110
those lines.

163
00:11:19.130 --> 00:11:20.730
So if you've never seen this before.

164
00:11:20.750 --> 00:11:22.190
Let me walk you through it.

165
00:11:22.220 --> 00:11:27.700
So on your box your Cally machine you have the neck cat.

166
00:11:27.790 --> 00:11:34.880
You can do a quick locate neck cat EMC and you can see we've got this user share windows resources binaries

167
00:11:34.880 --> 00:11:37.280
net cat that we've talked about this in the past right.

168
00:11:37.820 --> 00:11:41.720
Well let's go ahead and do something like this.

169
00:11:41.720 --> 00:11:49.550
We'll do a copy paste and we'll say just neck cat the EMC right into the root folder which are just

170
00:11:49.550 --> 00:11:56.000
copying this binary into our route and then we're just going to go over to this SMB which we launched

171
00:11:56.000 --> 00:11:59.170
in route Amazon to say put net cat dot XY

172
00:12:03.320 --> 00:12:08.840
and then what we can do is we can go ahead and use a malicious BHP file.

173
00:12:09.170 --> 00:12:11.700
So I've gone ahead and created one.

174
00:12:11.720 --> 00:12:13.210
Let's go ahead and check it out.

175
00:12:14.300 --> 00:12:21.830
So I've called it just a that BHP reverse step BHP and we can go ahead and just look at the command.

176
00:12:21.830 --> 00:12:26.990
So we're gonna say Hey when we run this go ahead and execute something on the system and you're going

177
00:12:26.990 --> 00:12:33.620
to execute net cat you see we're going to execute the command at EMC and we're going to say 10 dot 10

178
00:12:33.620 --> 00:12:34.790
to 14 dot five.

179
00:12:34.790 --> 00:12:38.740
That's my IP address and then I'm going to listen on 4 4 4 4.

180
00:12:38.790 --> 00:12:42.670
It's going to be a basic reverse shell written in P P.

181
00:12:42.800 --> 00:12:43.160
OK.

182
00:12:43.190 --> 00:12:45.710
So go ahead and get that typed out.

183
00:12:45.740 --> 00:12:47.210
Pause if you need to.

184
00:12:47.270 --> 00:12:52.770
I'm going to go ahead and just close out I I'VE ALREADY GOT IT SAVED AND THEN WE'RE GOING TO RUN THIS.

185
00:12:52.790 --> 00:12:58.010
SO WHAT WE'RE GONNA DO IS WE'RE GOING TO DO A QUICK alas make sure our net cat still there it is.

186
00:12:58.100 --> 00:13:04.530
I'm gonna put in this reverse stock p p and I'm going to run a net cat listener.

187
00:13:04.600 --> 00:13:08.310
So NBL DLP four four four four.

188
00:13:08.420 --> 00:13:09.150
We're listening.

189
00:13:09.170 --> 00:13:15.980
I'm going to go to the Web page and I'm just gonna do a quick read that BHP and it's stalling which

190
00:13:15.980 --> 00:13:18.110
is usually a good sign when come in and you could see.

191
00:13:18.140 --> 00:13:18.440
OK.

192
00:13:18.440 --> 00:13:21.130
Hey we're at C iiNet pub new site.

193
00:13:21.130 --> 00:13:21.610
Do you click.

194
00:13:21.610 --> 00:13:22.360
Who am I.

195
00:13:22.820 --> 00:13:24.520
SEC notes Tyler.

196
00:13:24.740 --> 00:13:32.240
And then we can just do a quick system info go a little bit information about this computer etc. But

197
00:13:32.240 --> 00:13:39.390
what we've done up to this point is we have now gotten access o look system info is actually denied.

198
00:13:39.470 --> 00:13:44.870
Let's see a quick query to see if we're up against when defend well it might be up against Gerri it

199
00:13:44.870 --> 00:13:51.320
is running so the windows 10 version of of this is probably doing a lot better job than the Windows

200
00:13:51.380 --> 00:13:57.830
7 that we've seen the past so there's a good chance that we're actually getting some sort of some sort

201
00:13:57.830 --> 00:13:59.960
of antivirus that we're up against.

202
00:13:59.960 --> 00:14:05.630
But from here I want you to do a little bit of thinking outside the box on your own.

203
00:14:05.630 --> 00:14:11.840
I really do believe with the little bit of guidance from this article this is the payloads all the things

204
00:14:11.840 --> 00:14:14.200
again from your course resources.

205
00:14:14.360 --> 00:14:21.560
Look at this look at this closely utilised commands that you can run against the machine to find where

206
00:14:21.590 --> 00:14:25.540
Bashar XY exists or w SL that e XY exist.

207
00:14:25.700 --> 00:14:31.910
Figure out how that might work for you and how you can utilize this and see what level route use your

208
00:14:31.910 --> 00:14:34.040
eye or what level of user you are going to give it away.

209
00:14:34.040 --> 00:14:40.580
You're going to be rude but do a little bit of enumeration try to get into the system itself and go

210
00:14:40.580 --> 00:14:47.420
from there see if you could figure out how to find your way to escalate privileges into system.

211
00:14:47.420 --> 00:14:53.660
I have faith in you however in the next video we are going to walk through this and I'll show you exactly

212
00:14:53.660 --> 00:14:58.770
how to find this file how we're going to abuse it and how we're going to elevate privileges.

213
00:14:58.800 --> 00:15:00.950
OK so I'll see you over in the next video.
