-: The CIA Triad. 2 2
In this lesson, we're going to talk about the CIA Triad. 3 3
Now this is important because by default, 4 4
our networks are fundamentally not secure. 5 5
When they were developed and all these different 6 6
networking standards were created many years ago, 7 7
security was not in the discussion. 8 8
Instead, over the years, 9 9
we've tried to bolt on and add on security as we go, 10 10
to make these networking protocols more secure. 11 11
But to begin with, a network is a very unsecure place. 12 12
To make matters worse, networks are increasingly 13 13
becoming more connected with other networks. 14 14
If my company begins to do a partnership with your company, 15 15
we may decide to tie our networks together during that time. 16 16
And this introduces all sorts of risks and vulnerabilities 17 17
from your network into my network and vice versa. 18 18
So we have to be aware of this. 19 19
These risks don't just exist between business partners 20 20
or between different people on the internet, 21 21
but they also exist within our own organizations. 22 22
Your organization may have numerous sub networks, 23 23
and when you tie them all together, 24 24
that's going to start bringing other risks into your networks. 25 25
We have to be careful to in order to minimize and eliminate 26 26
these risks over time, and that's where network security 27 27
is going to come into play. 28 28
If we can understand the various threats that are facing our 29 29
networks, then we're going to be better able 30 30
to defend our networks against the onslaught 31 31
of cyber attacks that we are facing on a daily basis. 32 32
The way we look at security in our networks 33 33
is based on something called the CIA Triad. 34 34
Now this stands for Confidentiality, 35 35
Integrity and Availability. 36 36
Those are the three tenants that make up this Triad 37 37
that give us security. 38 38
Now when I can provide all three of these things, 39 39
I can secure the data inside the center of this triangle. 40 40
Now this sounds really, really easy, but in reality, 41 41
it's really, really hard. 42 42
We're going to talk more about these three components 43 43
of the CIA Triad in this lesson. 44 44
Our first one is C, for Confidentiality. 45 45
Now confidentiality is concerned 46 46
with keeping your data safe and private. 47 47
We want to use things like encryption and authentication 48 48
to verify that somebody has the need to know 49 49
and that they should be allowed to see that data. 50 50
By using encryption, we can ensure that that data 51 51
can only be read or decoded by the intended recipient, 52 52
and that person is going to have a secret encryption 53 53
or decryption key to be able to read it. 54 54
Now to do this, we can use either symmetric encryption 55 55
or asymmetric encryption. 56 56
Now if you're not familiar with those concepts, 57 57
we're going to cover them here for you 58 58
to bring you up to speed. 59 59
Symmetric encryption is something that is the basis 60 60
of confidentiality. 61 61
Both the sender and the receiver are going to use 62 62
the exact same key, 63 63
which is why we call it symmetric encryption 64 64
or symmetric key cryptography. 65 65
Now we can go from plain text to ciphertext using one key, 66 66
and then the other person who wants to read it, 67 67
will use that same key to decrypt it from ciphertext 68 68
back into plain text, 69 69
so they can actually read it in normal language. 70 70
Now there are several different types 71 71
of symmetric encryptions out there, 72 72
but in the case of the Network+ exam, 73 73
we only really need to focus on three of them. 74 74
This is DES, Triple DES and AES. 75 75
The first of these is DES. 76 76
Now DES is the Data Encryption Standard, 77 77
and it uses a 56-bit encryption key to secure its data, 78 78
using symmetric encryption. 79 79
DES was actually developed all the way back 80 80
in the mid 1970s. 81 81
Now that's about 40 years ago, so as you can imagine, 82 82
it's not really that secure, 83 83
but yet we still use it today in things like SNMP, 84 84
the Simple Network Management Protocol version 3. 85 85
DES is considered a weak encryption algorithm today, 86 86
but it is still better than having nothing, 87 87
which is what we had in earlier versions of SNMP. 88 88
Next, we have Triple DES, 89 89
and this was because DES was becoming insecure 90 90
because of this 56-bit key. 91 91
It was starting to become very easy to crack 92 92
as computers got smarter and faster. 93 93
So, as these computers got stronger, 94 94
they decided we need to have better encryption. 95 95
So they decided to take something, encrypt it with one key, 96 96
decrypt it, and then re-encrypt it again. 97 97
And each of those portions would use a different 56-bit key. 98 98
So we used DES to encrypt it, 99 99
then we decrypt it with a different key, 100 100
scrambling it further, 101 101
and then re-encrypt it a third time with a different key, 102 102
scrambling it even more. 103 103
This means that we get a total key strength 104 104
of about 168-bits, 105 105
because we're doing this encrypt decrypt encrypt cycle 106 106
using three different keys, and that makes our data totally 107 107
unreadable or ineligible for anyone 108 108
who doesn't have all of those three keys. 109 109
Finally, we have AES, or the Advanced Encryption Standard. 110 110
This is the modern contemporary encryption system 111 111
that we use on pretty much everything these days. 112 112
This is the preferred symmetric key encryption 113 113
that we're going to use in any network today, 114 114
and it's also use by default in WPA2 115 115
for securing our wireless networks, 116 116
as well as BitLocker for encrypting our hard drives 117 117
to provide us data at rest. 118 118
AES, or the Advanced Encryption Standard, 119 119
is going to use three different size encryption keys. 120 120
It can use 128-bit key, a 192-bit key or 256-bit key 121 121
making it very secure. 122 122
Now when we look at symmetric encryption, 123 123
the sender and the receiver are both using the same key 124 124
to encrypt and decrypt it, which is great, 125 125
and it makes it extremely fast. 126 126
In fact, symmetric encryption is almost 1000 times faster 127 127
than using asymmetric encryption, 128 128
where we use two different keys. 129 129
Now we're going to cover asymmetric encryption 130 130
in just a second, 131 131
but first we need to talk about some problems 132 132
with symmetric encryption. 133 133
Now there is one large problem 134 134
with symmetric encryption though. 135 135
And this is that we both have to have the same key 136 136
to encrypt and decrypt that data. 137 137
Now if you and I have never met before, 138 138
how are we going to make sure we both have the same shared key? 139 139
Well, if I'm doing this on a large scale, 140 140
let's say I encrypted a folder on my Google Drive 141 141
that I wanted to share with all of my students, 142 142
I would have 300,000 people who need to access 143 143
that Google Drive, 144 144
and I have to get each of them a copy of that key, 145 145
that'd be a really hard task to do and to do it securely. 146 146
Now, let's imagine that one of those students 147 147
shouldn't have access anymore. 148 148
Now I have to go and change that key and give it 149 149
to the other 299,999 people who still need access. 150 150
And I have to have a secure way to redistribute that new key 151 151
to all of those people who still need to access it. 152 152
You see, this is the biggest problem 153 153
we have with symmetric encryption. 154 154
It's key management. 155 155
Even though symmetric encryption is fast, 156 156
and even though it's secure, 157 157
we still have to figure out a way to get a secured 158 158
share secret key to all the users who need to use it. 159 159
So, how are we going to solve that problem? 160 160
Well, enter the world of asymmetric encryption. 161 161
Now asymmetric encryption is used to give confidentiality 162 162
as well, but it does this by using two different keys, 163 163
one for the sender and one for the receiver. 164 164
Now, RSA is by far the most popular implementation of this, 165 165
and it uses what we call Public Key Infrastructure, or PKI. 166 166
Now PKI is where we encrypt the data between an email sender 167 167
and an email receiver, 168 168
or when you're going to an E-commerce site like Amazon, 169 169
you're going to be using PKI to do a key exchange. 170 170
This way, you can get a secure email exchange 171 171
or secure web browsing, 172 172
and it solves the problem of having to distribute those keys 173 173
ahead of time because we're using public keys. 174 174
So how does asymmetric encryption work? 175 175
Well, it works on the concept of having a Key Pair. 176 176
This key pair is made up of a Public and a Private key. 177 177
The Public Key, anybody can know, 178 178
and we can share with everyone in the entire world, 179 179
but the Private Key is something that only I should know 180 180
and nobody else should see it. 181 181
Let's see how this works in the real world. 182 182
Well, when we look at this, there's a sender and receiver 183 183
and they're both going to use different keys to encrypt 184 184
and decrypt the message. 185 185
In this case, if I'm the sender, 186 186
and I want to send something to the receiver, 187 187
I'm going to use the receiver's public key, 188 188
which everyone in the world can know because it's public. 189 189
Now, once I've encrypted that data using their public key, 190 190
the only key in the entire world that can open up that 191 191
message and decrypt, is going to be their private key. 192 192
And the only person with that private key is that receiver. 193 193
So we know it has confidentiality 194 194
'cause only they can decrypt this message. 195 195
This guarantees that we're going to have confidentiality 196 196
of the data because nobody can read it except them, 197 197
and once I encrypt that data, even I can't read it 198 198
because I don't have the receiver's private key. 199 199
So how does this work if we're going to use 200 200
E-commerce for instance? 201 201
Well, I said before that we can use asymmetric keys 202 202
as a way to do a key exchange. 203 203
And we're going to be able to share a symmetric key 204 204
through that by creating an encrypted tunnel. 205 205
So, what we're going to do here in E-commerce 206 206
is using asymmetric to then turn over to symmetric. 207 207
In this case, if I wanted to be the client 208 208
and I wanted to go to Amazon to buy something, 209 209
I would do it this way. 210 210
First, I'm going to request the website by going to amazon.com, 211 211
and I'm going to use the secure version of the website 212 212
by going to https://amazon.com. 213 213
Now when I go to that server, the server is going to tell me 214 214
that it has a public key available. 215 215
That public key is going to have what we like to call 216 216
a Digital Certificate. 217 217
Now when you buy a VeriSign Certificate, 218 218
or some other trusted certificate for your server, 219 219
that server is going to then hold a copy of your public key 220 220
for you and any client who wants to get it can go to that 221 221
trusted third party and get a copy of your public key. 222 222
So, my web client is going to go to VeriSign, 223 223
it's going to grab Amazon's public key, 224 224
and then I'm going to create a random number 225 225
and whatever I'm going to choose, 226 226
and I'm going to encrypt that random number using 227 227
the public key that Amazon has. 228 228
Now, I'm going to send that back over to the Amazon Server 229 229
because Amazon will be the only person who can unlock 230 230
that message and decrypt it using their private key, 231 231
which is part of their server code, 232 232
now they can open that message and see that random number. 233 233
So, now that they have the random number I chose, 234 234
I know it because I chose it, 235 235
and they know it because they decrypted the message. 236 236
So, we've used a asymmetric encryption to be able 237 237
to pass this random number, 238 238
which will now act as our symmetric key. 239 239
Now, we can both create a tunnel and that tunnel can be 240 240
secured by that symmetric key we just chose, 241 241
and we can use that for the entire session. 242 242
This becomes known as a session key, 243 243
which is a simply that random number that I chose 244 244
and sent over to Amazon. 245 245
Now we can communicate securely for the rest of the session, 246 246
creating a nice secure encrypted tunnel 247 247
between me and the Amazon Server. 248 248
Now, why would I do it this way? 249 249
Why wouldn't I just use an asymmetric key the entire time 250 250
and send data back and forth? 251 251
Well, the problem is, asymmetric is pretty slow. 252 252
In fact, symmetric key is a thousand times faster 253 253
than asymmetric. 254 254
So, we want to use symmetric to the maximum extent possible, 255 255
but there's some things that symmetric doesn't do well 256 256
like a key exchange. 257 257
So, for that reason, we're going to use asymmetric 258 258
to do the handshake and exchange a key, 259 259
and then we're going to switch over to symmetric 260 260
using that key we just exchanged to get those faster speeds 261 261
for all the rest of our data transfer. 262 262
All right, the next thing we to talk about 263 263
is the I in the CIA Triad. 264 264
This is Integrity. 265 265
Now Integrity is all about making sure that the data you 266 266
have was not modified in storage or in transit. 267 267
This verifies that the source of the traffic 268 268
that it originated from, was where you thought it came from. 269 269
We're not going to be subject to an on-path 270 270
or man in the middle attack here, 271 271
because we want to make sure that that data has integrity. 272 272
Also, this will help us prevent forms of spoofing 273 273
like IP spoofing, ARP spoofing or Mac spoofing. 274 274
Integrity violations can also happen if there's a defacement 275 275
of your corporate webpage for example, 276 276
because somebody is changing the data on your server 277 277
and you didn't authorize it. 278 278
All these are examples of integrity violations. 279 279
Now another example of this would be 280 280
if somebody went to your E-commerce site, 281 281
and they'd like to buy a product that's supposed to sell 282 282
for a 100 dollars, but they actually changed that 283 283
to 10 dollars by removing a zero. 284 284
That will be an integrity breach because they also modified 285 285
the electronically stored financial records on your server. 286 286
So, what if I decided to add a couple of zeros 287 287
to my bank account balance? 288 288
Guess what, that's also an integrity breach 289 289
because I'm changing the balance 290 290
and I'm not authorized to do that. 291 291
All these things are things that we don't want to happen 292 292
inside of our network. 293 293
So, how do we ensure that we have integrity? 294 294
Well, we're going to use Hashing. 295 295
Now Hashing is an algorithm that runs a string of data 296 296
through the algorithm, 297 297
and then it creates a hash or a hash digest. 298 298
This serves as a unique individual fingerprint for a file 299 299
or a data set. 300 300
All right, if you see here on the screen, 301 301
I have the word password written in three different ways. 302 302
I have it written as password, 303 303
I have it written as password with a capital P, 304 304
and I have it written as password with a capital P 305 305
and a period at the end. 306 306
Notice, those three hashes are vastly different, 307 307
even though I changed very little, 308 308
just adding a period or changing a letter 309 309
from lowercase to uppercase. 310 310
In this example, I'm using an MD5 hash for each one of these 311 311
and this algorithm ensures drastic changes to the output, 312 312
when a slight change is made to the input. 313 313
Now, by just adding that period or making a capital letter 314 314
instead of a lowercase letter, 315 315
we have this huge amount of change to the hash digest. 316 316
That's how we're using them as individual fingerprints. 317 317
Once I run this data through the algorithm, 318 318
I get this hash, and the data and the hash 319 319
are then going to be sent over to the receiver. 320 320
Now when the receiver gets the data, 321 321
they're going to run it through the same hash on their own side 322 322
and compare that hash they get to the hash that I sent them. 323 323
If the two are going to match, 324 324
that means there was integrity in the transmission. 325 325
If they don't match, 326 326
it's going to reject that transmission and ask for it to be 327 327
sent again, because it assumes it was bad, 328 328
or there was some kind of an integrity breach. 329 329
Now, there are lots of different 330 330
hashing algorithms out there. 331 331
The first one is MD5, 332 332
which is the one I used in my examples. 333 333
This is by far the oldest one, MD5 is 128-bit hash. 334 334
And it works very well for the most part, 335 335
and you'll still find it in use today. 336 336
Now the biggest problem we have with MD5 337 337
is that the key space is rather small with only 128-bits, 338 338
which means, there's only so many combinations 339 339
and those would have to be reused over time 340 340
because we have an infinite amount of words or phrases 341 341
that we could have. 342 342
For example, when we have the word Jason here, 343 343
and it's MD5 hash shown, there are other words 344 344
that might also give us that same MD5 hash. 345 345
So, if I could find another word or phrase 346 346
that gives me the same hash, 347 347
this is known as a collision, 348 348
because two things share the same hash value. 349 349
We want to be able to minimize the collisions. 350 350
And the best way to do that is by increasing our key space 351 351
from 128-bits to something larger. 352 352
So, computer scientists came up with a new algorithm 353 353
known as SHA-1. 354 354
Now SHA-1 is a secure hash algorithm Version one, 355 355
and it uses 160-bit hash, instead of that 356 356
128-bit hash digest that we use with MD5. 357 357
This way we would have less collisions. 358 358
Now over time though, 359 359
we found that there were going to be more collisions. 360 360
Now there's less than MD5, 361 361
but there's still a good amount of collisions. 362 362
So, they increase the key size again, 363 363
and they came up with SHA-256. 364 364
Now SHA-256 is a 256-bit hash digest, 365 365
and it gives us a lot more options and choices 366 366
and less overlap, and therefore fewer collisions. 367 367
SHA-256 has a much longer hash digest than an MD5 hash. 368 368
In fact, it's double the length because it's 256-bits 369 369
instead of 128-bits. 370 370
Now this doesn't mean there's double the amount 371 371
of possible combinations. 372 372
Instead, we have an exponential amount of more combinations 373 373
because we're going from two to the one 28th 374 374
to two to the 256 power, 375 375
which is a much, much bigger number. 376 376
The final algorithm we need to talk about 377 377
when we talk about hashes is CRAM-MD5. 378 378
This is the Challenge Response Authentication Mechanism, 379 379
message-digest five. 380 380
And this is a common variant of MD5, 381 381
and it's usually used in email systems for authentication. 382 382
All right, let's move to our third component 383 383
of the CIA Triad. 384 384
This is the A, for Availability. 385 385
Now Availability is going to measure the accessibility 386 386
of that data. 387 387
Can I get to the data when I want to and where I want to? 388 388
That's what we're asking here. 389 389
This is increased by designing redundant networks, 390 390
by having multiple components doing the same functions. 391 391
We're going to talk a lot more about redundant networks 392 392
and talk about high availability and redundancy 393 393
in a separate lesson, as we start digging more 394 394
into how we can create good availability 395 395
within our networks. 396 396
But for now, 397 397
let's talk about how availability could be compromised. 398 398
Well, there's lots of different things that you can do 399 399
to hurt your availability. 400 400
You could crash a router or switch 401 401
by sending improperly format data to it, 402 402
like the old Ping of Death attack. 403 403
And that would actually turn off your router or switch 404 404
and make the entire network go down. 405 405
Therefore, your availability would be failed as well. 406 406
Now you can also flood a network with just so much traffic, 407 407
even if it's legitimate requests that they simply 408 408
can't be processed in time. 409 409
This is known as a Denial of Service, 410 410
or Distributed Denial of Service attack, 411 411
and this can make your network fail as well. 412 412
This can also happen when you have a good problem. 413 413
For instance, if my site became wildly popular overnight, 414 414
and I had a million people trying to access it all 415 415
at the same time, that could crush my website 416 416
because I became too popular, too fast. 417 417
This would also be considered a Denial of Service, 418 418
even though it was more of a self-imposed one 419 419
by becoming too popular. 420 420
Now, you could also have a power outage in your area, 421 421
and that could cause your network to fail, 422 422
or maybe there's a flood, 423 423
and your server room is now underwater. 424 424
And guess what? 425 425
That's going to take a hit to your availability as well. 426 426
All these are things that can really hurt you. 427 427
Maybe you have some really old routers and switches 428 428
that are out of warranty, and one of them dies from old age. 429 429
Well, that's going to hurt the availability of your network 430 430
because the network is going to go down 431 431
when that core switch goes down. 432 432
I think you get the idea, but we will dive deeper into this 433 433
later on as we cover availability more in depth.