1
1

00:00:00,280  -->  00:00:02,210
<v ->General network attacks.</v>
2

2

00:00:02,210  -->  00:00:03,870
In this lesson, we're going to discuss
3

3

00:00:03,870  -->  00:00:06,510
some general network attacks that you may come across
4

4

00:00:06,510  -->  00:00:08,020
while working in the field.
5

5

00:00:08,020  -->  00:00:09,970
These attacks include things like on-path
6

6

00:00:09,970  -->  00:00:11,400
or Man in the Middle attacks,
7

7

00:00:11,400  -->  00:00:15,630
session hijacking, DNS poisoning and rogue DHCP servers.
8

8

00:00:15,630  -->  00:00:17,960
Let's jump right into our first type of attack,
9

9

00:00:17,960  -->  00:00:19,750
known as an on-path attack,
10

10

00:00:19,750  -->  00:00:22,130
but you may be more familiar with it by another name,
11

11

00:00:22,130  -->  00:00:24,930
the MITM or Man in the Middle attack.
12

12

00:00:24,930  -->  00:00:27,490
Now, a Man in the Middle attack occurs when an attacker
13

13

00:00:27,490  -->  00:00:29,280
puts themselves between the victim
14

14

00:00:29,280  -->  00:00:30,990
and the intended destination.
15

15

00:00:30,990  -->  00:00:33,790
For example, if you're trying to connect to yourbank.com
16

16

00:00:33,790  -->  00:00:34,623
from your laptop,
17

17

00:00:34,623  -->  00:00:36,640
and someone's able to get in between your laptop
18

18

00:00:36,640  -->  00:00:37,840
and the bank servers,
19

19

00:00:37,840  -->  00:00:40,100
this would be an on-path attack.
20

20

00:00:40,100  -->  00:00:41,270
In this type of attack,
21

21

00:00:41,270  -->  00:00:42,820
the attacker is simply going to have the ability
22

22

00:00:42,820  -->  00:00:44,530
to monitor whenever you're sending,
23

23

00:00:44,530  -->  00:00:46,420
or they can even manipulate it
24

24

00:00:46,420  -->  00:00:48,360
because they're in the middle of the communications
25

25

00:00:48,360  -->  00:00:50,100
between you and the server.
26

26

00:00:50,100  -->  00:00:52,120
For example, let's pretend I have a client
27

27

00:00:52,120  -->  00:00:54,570
who is client number 12345,
28

28

00:00:54,570  -->  00:00:57,630
and they want to conduct a transaction at their online bank.
29

29

00:00:57,630  -->  00:01:00,320
They go and they log on and they go to transfer $50
30

30

00:01:00,320  -->  00:01:01,480
to their account.
31

31

00:01:01,480  -->  00:01:05,940
Now they send a request to move $50 to account 12345
32

32

00:01:05,940  -->  00:01:07,070
from their checking account
33

33

00:01:07,070  -->  00:01:08,190
and they think that request
34

34

00:01:08,190  -->  00:01:10,320
went straight to the bank servers for processing,
35

35

00:01:10,320  -->  00:01:12,970
but little did they know they were in the middle
36

36

00:01:12,970  -->  00:01:15,780
of a Man in the Middle attack or on-path attack.
37

37

00:01:15,780  -->  00:01:17,420
So what happens?
38

38

00:01:17,420  -->  00:01:19,520
Well from this position of the Man in the Middle
39

39

00:01:19,520  -->  00:01:20,650
of the communication,
40

40

00:01:20,650  -->  00:01:22,720
they're sitting between the client and the bank.
41

41

00:01:22,720  -->  00:01:25,970
So the attacker can then change the amount from $50
42

42

00:01:25,970  -->  00:01:29,130
to $5,000, or they could change the bank account
43

43

00:01:29,130  -->  00:01:30,970
that funds are going to be transferred to.
44

44

00:01:30,970  -->  00:01:33,490
So instead of going to account 12345,
45

45

00:01:33,490  -->  00:01:36,820
it now goes to 67890 instead.
46

46

00:01:36,820  -->  00:01:39,970
Now the bank servers still believe there's an authentication
47

47

00:01:39,970  -->  00:01:42,510
that has happened between the client and the bank servers.
48

48

00:01:42,510  -->  00:01:44,460
So they're going to process the requests
49

49

00:01:44,460  -->  00:01:47,210
and instead they're going be sending 100 times the money
50

50

00:01:47,210  -->  00:01:48,590
from the client's checking account
51

51

00:01:48,590  -->  00:01:49,710
to the attacker's account,
52

52

00:01:49,710  -->  00:01:52,620
as directed by this modified request they received.
53

53

00:01:52,620  -->  00:01:54,660
Now another type of general network attack
54

54

00:01:54,660  -->  00:01:56,500
is known as session hijacking.
55

55

00:01:56,500  -->  00:01:58,600
Session hijacking occurs when an attacker
56

56

00:01:58,600  -->  00:02:00,890
is able to guess the session ID that is in use
57

57

00:02:00,890  -->  00:02:02,500
between a client and a server,
58

58

00:02:02,500  -->  00:02:04,340
and then they could try to take over
59

59

00:02:04,340  -->  00:02:06,280
that already authenticated session.
60

60

00:02:06,280  -->  00:02:07,470
In this type of attack,
61

61

00:02:07,470  -->  00:02:09,580
it's very similar to an on-path attack,
62

62

00:02:09,580  -->  00:02:11,460
but instead of being placed into the middle
63

63

00:02:11,460  -->  00:02:13,800
of the conversation and relaying the victim's request
64

64

00:02:13,800  -->  00:02:14,633
to the server,
65

65

00:02:14,633  -->  00:02:17,430
it instead focuses on taking over the session completely
66

66

00:02:17,430  -->  00:02:19,560
and the victim's machine is no longer receiving
67

67

00:02:19,560  -->  00:02:20,900
any of the data.
68

68

00:02:20,900  -->  00:02:23,200
This type of attack is focused on exploiting the way
69

69

00:02:23,200  -->  00:02:26,210
TCP/IP protocols are going to use session numbers
70

70

00:02:26,210  -->  00:02:29,500
or session IDs at layer five of the OSI model.
71

71

00:02:29,500  -->  00:02:31,400
In the early days of TCP/IP,
72

72

00:02:31,400  -->  00:02:33,710
the session IDs were not randomly assigned,
73

73

00:02:33,710  -->  00:02:36,200
but instead they were assigned in sequential order.
74

74

00:02:36,200  -->  00:02:38,800
So if I had session ID 123,
75

75

00:02:38,800  -->  00:02:40,620
I could probably guess that your next session
76

76

00:02:40,620  -->  00:02:42,470
was going to be 124,
77

77

00:02:42,470  -->  00:02:44,410
and if you create your session right before,
78

78

00:02:44,410  -->  00:02:48,770
or right after me, I can then guess your ID as 122 or 124,
79

79

00:02:48,770  -->  00:02:52,410
because it's one before or one after my particular session.
80

80

00:02:52,410  -->  00:02:53,940
So to combat this,
81

81

00:02:53,940  -->  00:02:56,820
session ID's now got to be randomized
82

82

00:02:56,820  -->  00:02:59,630
inside our newer TCP/IP configurations.
83

83

00:02:59,630  -->  00:03:01,970
So if I now have session 123,
84

84

00:03:01,970  -->  00:03:06,130
you might have session 934, or 523 or anything else, really,
85

85

00:03:06,130  -->  00:03:08,330
because it's going to be just randomly assigned to you
86

86

00:03:08,330  -->  00:03:10,520
and that way I can't guess your session ID
87

87

00:03:10,520  -->  00:03:13,800
and take over your session using session hijacking.
88

88

00:03:13,800  -->  00:03:17,250
Next, we're going to discuss an attack known as DNS poisoning.
89

89

00:03:17,250  -->  00:03:19,890
Now, DNS poisoning occurs when an attacker manipulates
90

90

00:03:19,890  -->  00:03:22,600
known vulnerabilities within the domain name system,
91

91

00:03:22,600  -->  00:03:25,580
or DNS, to reroute traffic from one site
92

92

00:03:25,580  -->  00:03:27,690
to a fake version of that site.
93

93

00:03:27,690  -->  00:03:30,860
DNS poisoning usually occurs on a company's internal DNS
94

94

00:03:30,860  -->  00:03:33,500
servers instead of on the public facing DNS servers
95

95

00:03:33,500  -->  00:03:35,690
used by most of us on the internet.
96

96

00:03:35,690  -->  00:03:38,310
But in some cases, those internet DNS servers
97

97

00:03:38,310  -->  00:03:39,930
have also been poisoned.
98

98

00:03:39,930  -->  00:03:43,430
Remember DNS is used for one big thing.
99

99

00:03:43,430  -->  00:03:45,980
It's to be able to provide a method of changing domain names
100

100

00:03:45,980  -->  00:03:48,370
into IP addresses and vice versa.
101

101

00:03:48,370  -->  00:03:49,920
When a client needs to go to a website
102

102

00:03:49,920  -->  00:03:51,410
like diontraining.com,
103

103

00:03:51,410  -->  00:03:53,930
they asked their DNS server for the location of that server,
104

104

00:03:53,930  -->  00:03:56,910
and they receive an IP address back as the location
105

105

00:03:56,910  -->  00:03:58,270
from that DNS server
106

106

00:03:58,270  -->  00:04:00,350
and then their computer goes to the IP address
107

107

00:04:00,350  -->  00:04:01,630
to load the website.
108

108

00:04:01,630  -->  00:04:04,130
Now, since DNS works in a hierarchal manner,
109

109

00:04:04,130  -->  00:04:05,930
the client assets local DNS servers
110

110

00:04:05,930  -->  00:04:08,050
for the resolution of that domain first.
111

111

00:04:08,050  -->  00:04:09,880
If the DNS server has the domain name
112

112

00:04:09,880  -->  00:04:12,110
and IP address stored locally within its cache,
113

113

00:04:12,110  -->  00:04:14,390
it's going to return that address to the client.
114

114

00:04:14,390  -->  00:04:17,630
So what does an attacker do in DNS poisoning?
115

115

00:04:17,630  -->  00:04:20,040
Well, they're going to attempt to change the IP address
116

116

00:04:20,040  -->  00:04:22,400
of a domain name stored in the DNS cache
117

117

00:04:22,400  -->  00:04:24,120
of a given DNS server.
118

118

00:04:24,120  -->  00:04:26,630
If they can do that, any client who requests to visit
119

119

00:04:26,630  -->  00:04:27,930
that website in the future
120

120

00:04:27,930  -->  00:04:30,840
will be redirected to a website controlled by the attacker,
121

121

00:04:30,840  -->  00:04:32,800
allowing them to conduct further exploitation
122

122

00:04:32,800  -->  00:04:35,300
of your client, which is now their victim.
123

123

00:04:35,300  -->  00:04:37,830
Remember, DNS poisoning works by poisoning
124

124

00:04:37,830  -->  00:04:40,500
either a workstation or servers DNS cache,
125

125

00:04:40,500  -->  00:04:42,320
hijacking their local DNS server
126

126

00:04:42,320  -->  00:04:44,780
or performing an unauthorized zone transfer
127

127

00:04:44,780  -->  00:04:47,660
to an unpatched DNS server to change the IP address
128

128

00:04:47,660  -->  00:04:49,750
of a given web servers A record.
129

129

00:04:49,750  -->  00:04:51,820
To counteract DNS poisoning attacks,
130

130

00:04:51,820  -->  00:04:55,878
a secure version of DNS known as DNSSEC has been created.
131

131

00:04:55,878  -->  00:04:58,160
DNSSEC uses encrypted digital signatures
132

132

00:04:58,160  -->  00:05:00,500
when passing DNS information between servers
133

133

00:05:00,500  -->  00:05:02,210
to help protect it from poisoning.
134

134

00:05:02,210  -->  00:05:04,690
You can also prevent your DNS servers from being poisoned
135

135

00:05:04,690  -->  00:05:07,280
by ensuring your server has the latest security patches
136

136

00:05:07,280  -->  00:05:08,920
and the latest updates to make sure
137

137

00:05:08,920  -->  00:05:10,970
they're always properly protected.
138

138

00:05:10,970  -->  00:05:12,510
The next attack we're going to discuss
139

139

00:05:12,510  -->  00:05:15,230
involves the use of rogue DHCP servers.
140

140

00:05:15,230  -->  00:05:18,470
Now a rogue DHCP server is any DHCP server
141

141

00:05:18,470  -->  00:05:19,900
that is connected to your network,
142

142

00:05:19,900  -->  00:05:21,820
but you as the network administrator
143

143

00:05:21,820  -->  00:05:24,850
did not have control over and did not install it.
144

144

00:05:24,850  -->  00:05:27,500
This usually happens when an attacker or an end user
145

145

00:05:27,500  -->  00:05:29,990
connects their own DHCP server to your network,
146

146

00:05:29,990  -->  00:05:33,340
and often it's unintentionally done by your own users.
147

147

00:05:33,340  -->  00:05:36,020
When that rogue DHCP servers connected to the network,
148

148

00:05:36,020  -->  00:05:38,150
it's going to do what DHCP servers do
149

149

00:05:38,150  -->  00:05:40,020
and it's going to start assigning IPs to clients
150

150

00:05:40,020  -->  00:05:41,550
on the network when they boot up
151

151

00:05:41,550  -->  00:05:43,120
and reconnect to the network.
152

152

00:05:43,120  -->  00:05:45,640
Now, the issue here is that these rogue DHCP servers
153

153

00:05:45,640  -->  00:05:49,190
are now handing out IP addresses, subnet masks, gateways,
154

154

00:05:49,190  -->  00:05:52,380
and DNS server assignments to your network clients.
155

155

00:05:52,380  -->  00:05:53,220
In the best case,
156

156

00:05:53,220  -->  00:05:55,680
these rogue DHCP servers are simply going to be connected
157

157

00:05:55,680  -->  00:05:56,970
by one of your end users
158

158

00:05:56,970  -->  00:05:58,840
because they wanted to add a wireless access point
159

159

00:05:58,840  -->  00:06:00,310
to their office and so they ran down
160

160

00:06:00,310  -->  00:06:02,280
to the local electronics store and they bought themselves
161

161

00:06:02,280  -->  00:06:03,930
a wireless router or gateway.
162

162

00:06:03,930  -->  00:06:07,070
Little did they know these devices include a DHCP server
163

163

00:06:07,070  -->  00:06:08,470
that's turned on by default.
164

164

00:06:08,470  -->  00:06:10,000
So when they connected it to the network,
165

165

00:06:10,000  -->  00:06:13,450
it began its job as handing out DHCP server addresses.
166

166

00:06:13,450  -->  00:06:15,450
This can lead to clients that have the same IP address
167

167

00:06:15,450  -->  00:06:18,360
as other clients in the network because this DHCP server
168

168

00:06:18,360  -->  00:06:20,670
is rogue and it doesn't know what addresses
169

169

00:06:20,670  -->  00:06:23,040
your official DHCP server was already using
170

170

00:06:23,040  -->  00:06:24,570
inside that same scope.
171

171

00:06:24,570  -->  00:06:27,640
This is especially popular inside private class C addresses
172

172

00:06:27,640  -->  00:06:31,200
of 192.168.1.0/24.
173

173

00:06:31,200  -->  00:06:34,160
And this can lead to two clients having connectivity issues
174

174

00:06:34,160  -->  00:06:37,250
on the network because they both have the same IP address.
175

175

00:06:37,250  -->  00:06:38,370
Now, in the worst case,
176

176

00:06:38,370  -->  00:06:40,900
this rogue DHCP server was actually attached to your network
177

177

00:06:40,900  -->  00:06:41,900
by an attacker.
178

178

00:06:41,900  -->  00:06:43,880
The attacker could then issue out IP addresses
179

179

00:06:43,880  -->  00:06:46,740
and subnet mask that will properly connect to your network.
180

180

00:06:46,740  -->  00:06:49,700
But these rogue DHCP servers can also be used
181

181

00:06:49,700  -->  00:06:51,500
to configure clients to use a gateway
182

182

00:06:51,500  -->  00:06:52,890
that the attacker controls,
183

183

00:06:52,890  -->  00:06:55,170
and this would allow them to do an on-path attack
184

184

00:06:55,170  -->  00:06:57,310
and intercept or modify communications
185

185

00:06:57,310  -->  00:06:59,640
between the clients and the outside servers.
186

186

00:06:59,640  -->  00:07:01,360
This essentially becomes an on-path
187

187

00:07:01,360  -->  00:07:02,860
or Man in the Middle attack.
188

188

00:07:02,860  -->  00:07:04,810
These rogue DHCP servers can also assign
189

189

00:07:04,810  -->  00:07:06,980
a different DNS server for the clients to use.
190

190

00:07:06,980  -->  00:07:09,950
This can effectively create the same effect as DNS poisoning
191

191

00:07:09,950  -->  00:07:11,330
from the client's perspective.
192

192

00:07:11,330  -->  00:07:13,950
So you want to be wary of these rogue DHCP servers,
193

193

00:07:13,950  -->  00:07:15,410
and always look for them on your network
194

194

00:07:15,410  -->  00:07:17,860
and when you find them, get them off the network.
195

195

00:07:19,023  -->  00:07:21,220
(static whooshing)
