YouTube2Text

POV: You Learn Networking For Fun — Transcript

by dzuma · 12,213 words · 1,864 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Do you want to get into cybersecurity?
  2. 0:02Do you want to be let epic hacker? Well,
  3. 0:05hack the algorithm by liking and
  4. 0:07commenting. Do you want to get into
  5. 0:08self-hosting? The most [music] important
  6. 0:10thing you can learn before learning
  7. 0:12Linux, before learning a language like
  8. 0:14Python, is networking. Do you not want
  9. 0:16to waste time doing pointless Cisco
  10. 0:18stuff like anding and subnetting by hand
  11. 0:22when you already understand math?
  12. 0:24Seriously, like why why they even make
  13. 0:26us do that in networking class? Are you
  14. 0:28tired of learning absolutely nothing
  15. 0:31from boring CompTIA labs that you spent
  16. 0:33hundreds of dollars on just to force
  17. 0:35yourself through them with YouTube
  18. 0:37tutorials like these?
  19. 0:38>> config. make
  20. 0:41>> [laughter]
  21. 0:41>> What is this [ __ ] Why Why is there
  22. 0:44Subway Surfers gameplay and just a
  23. 0:46random black guy licking his lips in the
  24. 0:49top left corner? What the [ __ ] is going
  25. 0:51on?
  26. 0:52>> Well, fret not. I am here. The OSI
  27. 0:55model, corporate slop. CompTIA labs,
  28. 0:58boring classes. Who needs them? Paying
  29. 1:01money to learn? As if. There's an
  30. 1:04open-source alternative to everything,
  31. 1:06even learning. The only way to learn is
  32. 1:08to want to learn and most importantly,
  33. 1:10to have fun and to apply yourself. By
  34. 1:12the end of this video, you're going to
  35. 1:14understand basic networking. You're
  36. 1:16going to learn how to manually set up a
  37. 1:18simple network with a router and
  38. 1:20switches. You're going to learn all the
  39. 1:21basics all the way from DHCP, DNS, IPs,
  40. 1:26ports, firewalls, all of it. You're
  41. 1:27going to learn and actually perform
  42. 1:30basic networking attacks as well as
  43. 1:32learning networking security to put
  44. 1:34yourself ahead of like 90% of people.
  45. 1:44>> [music]
  46. 1:58[music]
  47. 2:08[music]
  48. 2:21>> I hated my networking class and going
  49. 2:24through my education in the past in the
  50. 2:26vast majority of my classes, I was
  51. 2:28constantly sitting there thinking that
  52. 2:30there must be a better way to learn. A
  53. 2:33way that's actually fun. Everything
  54. 2:35valuable that I've ever learned was
  55. 2:37completely self-taught and I had fun
  56. 2:39while doing it. Yes, I did go to school,
  57. 2:41but I found myself bored out of my mind
  58. 2:44and struggled to retain anything useful.
  59. 2:46At some point, I realized that I am just
  60. 2:48simply incapable of learning in a
  61. 2:51structured classroom setting. I've a
  62. 2:53passion for teaching others and through
  63. 2:55the years, I've developed my own
  64. 2:57philosophy on learning and teaching. The
  65. 3:00majority of you watching this video were
  66. 3:01sci-op'd into the belief that learning
  67. 3:03is boring because of a fundamental flaw
  68. 3:06in the educational systems. The modern
  69. 3:08education framework was designed during
  70. 3:10the Industrial Revolution to train
  71. 3:12obedient factory workers rather than
  72. 3:14creative thinkers. My learning
  73. 3:16philosophy is a complete contradiction
  74. 3:18to the structured classroom lecture and
  75. 3:20textbook way of learning where students
  76. 3:22are forced to sit through a boring
  77. 3:24lecture and at the end of it, they
  78. 3:25barely retain anything since they didn't
  79. 3:27actually do anything aside from
  80. 3:29listening to a guy read a pre-existing
  81. 3:32slideshow made by some mega-corporation
  82. 3:34like Cisco. Learning isn't a checklist,
  83. 3:37nor can it be structured in a rigid
  84. 3:39manner because that's just not how the
  85. 3:41brain learns and I completely disagree
  86. 3:44with trying to restrict something as fun
  87. 3:46and free as learning a new skill into a
  88. 3:48specific pre-structured corporatized
  89. 3:50road to follow that seeps all of the
  90. 3:52passion and exploration out of
  91. 3:54everything. Learning should be fun and
  92. 3:56it should allow room for exploring and
  93. 3:59getting sidetracked and making mistakes.
  94. 4:01If you scare a student with the
  95. 4:03possibility of a failing grade, they're
  96. 4:05going to focus more on not failing
  97. 4:07rather than focusing on actually
  98. 4:09learning something new. If you do thrive
  99. 4:11in a structured classroom setting, good
  100. 4:13for you. You're awesome. I'm not trying
  101. 4:15to be condescending towards you. I'm
  102. 4:17just proposing a new way for people like
  103. 4:19me. My way of learning is a new way that
  104. 4:22I have used on every skill that I know,
  105. 4:25and I will teach you since you can use
  106. 4:27this on any skill. It's very simple. The
  107. 4:29core concept is just to throw yourself
  108. 4:32in the water and figure it out. My
  109. 4:34philosophy to learning is just throwing
  110. 4:36a student into the water, kind of like
  111. 4:38teaching a duck to swim by throwing it
  112. 4:40in the water because its instincts won't
  113. 4:42let it drown, even if it's never swam
  114. 4:44before. And then by giving the student a
  115. 4:46goal to achieve, and naturally through
  116. 4:49trying to accomplish that goal, many
  117. 4:50questions will arise from trying to do
  118. 4:52that, and you can do stuff like use the
  119. 4:55infinite collection of information that
  120. 4:58is the internet to answer those
  121. 4:59questions to achieve that goal. By the
  122. 5:02end of it, you will learn the same stuff
  123. 5:04as you would with a lecture, except
  124. 5:06you'll actually retain it because it
  125. 5:08wasn't boring, and you were actually
  126. 5:10doing something rather than just
  127. 5:12listening to some guy explain it. So,
  128. 5:14the first thing we're going to do is
  129. 5:15install Cisco Packet Tracer. Believe me,
  130. 5:18if there was an open source alternative
  131. 5:20that was as good as this, I'd use it.
  132. 5:22Install it on whatever operating system
  133. 5:24you have, and just open it. It's going
  134. 5:26to ask you to log in. If you're an opsec
  135. 5:29bro like me, and don't want to make an
  136. 5:31account just for your data to be sold,
  137. 5:32just disabling your internet when
  138. 5:34opening it bypasses this screen
  139. 5:36entirely. Once you open it, you're going
  140. 5:38to be left with this blank white screen.
  141. 5:40Your task is to set up a router, two
  142. 5:422960 switches, and two computers, and
  143. 5:45then get the two computers to
  144. 5:46communicate with each other. That is the
  145. 5:48assignment and your goal. Every time you
  146. 5:50get stuck or have a question, just look
  147. 5:52it up. I'm going to walk you through it
  148. 5:54real quick. If you're following along
  149. 5:55with me, try to pause the video and do
  150. 5:57it yourself as often as you can without
  151. 5:59just doing everything I'm doing.
  152. 6:01Naturally, the first question is
  153. 6:03probably, "How do I place a router?"
  154. 6:05Well, you can either explore the UI
  155. 6:07until you figure it out or just look it
  156. 6:09up. Shout out for get meta search engine
  157. 6:11by the way. This is the most important
  158. 6:13core foundational skill in your arsenal
  159. 6:15when it comes to learning. It's
  160. 6:17seriously just as simple as looking it
  161. 6:19up every time you get stuck. That might
  162. 6:21be obvious to a lot of you, but you'd be
  163. 6:23surprised at how many people exist that
  164. 6:25just don't know that this is an option.
  165. 6:28People in my IRL life think I'm a genius
  166. 6:30of some kind, but the only thing
  167. 6:32separating me from them is not
  168. 6:33intelligence. It's the ability to solve
  169. 6:36problems by using the resources that I
  170. 6:38have, and the most important resource is
  171. 6:40a search engine. The more questions you
  172. 6:42ask yourselves during this entire
  173. 6:44process, the more you can look up, and
  174. 6:46the more you can learn. It's literally a
  175. 6:48snowball effect because the more
  176. 6:49questions you answer, the more questions
  177. 6:51will arise, and you'll just keep
  178. 6:52learning infinitely. Anyways, let's go
  179. 6:54through this network setup.
  180. 6:59>> [music]
  181. 7:03>> Okay, we're looking at network devices,
  182. 7:06and we want a router. I guess um
  183. 7:09anyone works. I'm just going to go with
  184. 7:11this one. Then, we want two switches.
  185. 7:14We're just going to use these 2960
  186. 7:16switches, and then
  187. 7:18two PCs.
  188. 7:22Now, how do we get all of these to
  189. 7:24communicate with each other?
  190. 7:26Well, we have to plug them into each
  191. 7:29other, right? Via Ethernet. So, we're
  192. 7:31going to go to connections. Okay, the
  193. 7:33lightning bolt automatically chooses the
  194. 7:36best option, but we're not we're we're
  195. 7:38avoiding the lightning bolt. All you
  196. 7:40need to know is that this solid black
  197. 7:41line is just the copper straight through
  198. 7:43cable. So, we're going to use that.
  199. 7:46So, by clicking on this, go into the
  200. 7:48router, and then we'll just use Gigabit
  201. 7:50Ethernet 0/1, and then you can connect
  202. 7:53it to the switches.
  203. 7:54And we're also just going to do Gigabit
  204. 7:56Ethernet. Boom, now these are connected,
  205. 7:58so let's do the same thing
  206. 8:01over here.
  207. 8:03And then, from the switch to the PC.
  208. 8:08Okay, now they're all physically
  209. 8:09connected. Step one is complete.
  210. 8:12Okay, the next step, naturally, is
  211. 8:15getting all of these to communicate. How
  212. 8:17do we do that? Are addresses
  213. 8:19automatically assigned already? Do we
  214. 8:22What the hell do we do? Since there is
  215. 8:24no DHCP server, we have to manually
  216. 8:27configure an IP address on each PC,
  217. 8:29manually assign an IP address on every
  218. 8:32router, and we need to put a no shutdown
  219. 8:34on each router interface. So, let's see
  220. 8:36if Let's see if we have an IP. When we
  221. 8:39IP config, we have no address. And like
  222. 8:42I said before, that's because there's no
  223. 8:43DHCP server. So, we're just going to
  224. 8:45assign addresses to them. So, we're
  225. 8:47going to start with the PCs. We're going
  226. 8:48to assign an address to this one first.
  227. 8:51To do that,
  228. 8:53when you click on the PC, you just go to
  229. 8:54desktop and then IP configuration. You
  230. 8:57can set up a DHCP server for this [ __ ]
  231. 8:59to do it automatically, but we're going
  232. 9:01to do it manually because we're starting
  233. 9:03from the very basic foundational aspects
  234. 9:05of this stuff. Okay, so for IPv4, we're
  235. 9:08going to put 192.168.10.10.
  236. 9:11And why this? Why Why this specific
  237. 9:13address? Well, 192.168
  238. 9:17is a private address space intended for
  239. 9:18internal networks, and these addresses
  240. 9:20are
  241. 9:21never directly routed across the public
  242. 9:23internet. Also, it's a subnet mask that
  243. 9:25was automatically assigned when I type
  244. 9:27this in. It's also commonly written like
  245. 9:29/24 at the end of this. /24 and this
  246. 9:33subnet mask basically mean the same
  247. 9:34thing. The first three little numbers
  248. 9:37here identify the network, and the final
  249. 9:40number identifies the device within that
  250. 9:42network. It doesn't have to be 10. It
  251. 9:44could be 5, 25, or even 200, as long as
  252. 9:47it's not one, which is commonly assigned
  253. 9:49to the router or default gateway, or
  254. 9:51255, which is the broadcast address and
  255. 9:54cannot normally be assigned. So, just
  256. 9:56use whatever works for you as this last
  257. 9:58number. Okay, so let's ensure that this
  258. 10:00actually works. Let's go into the
  259. 10:01command prompt, IP config again, and
  260. 10:03just like that, we now have an IPv4.
  261. 10:06Let's do the same thing for the other
  262. 10:07PC.
  263. 10:10PC A and PCB are on opposite sides of
  264. 10:13the router and connected different
  265. 10:14switches. So, instead of putting 10 here
  266. 10:16like before, I put 20. That is because
  267. 10:19you can see this as another network. Why
  268. 10:21didn't we do something like this? Why
  269. 10:23didn't we do like 10.11? Well, if we did
  270. 10:26this, PCA would believe PCB was on the
  271. 10:29same local network and then they would
  272. 10:31then send an ARP broadcast looking for
  273. 10:33PCB instead of sending traffic to the
  274. 10:35router because routers do not normally
  275. 10:37forward ARP broadcast. The computers
  276. 10:40wouldn't find each other and we wouldn't
  277. 10:41be able to ping each other. Making
  278. 10:43mistakes is how you learn this stuff.
  279. 10:44That's how I learned the first time. If
  280. 10:46both PCs were connected to the same
  281. 10:48switch, then we could do that, but
  282. 10:50they're not, so we're doing 20 here. And
  283. 10:52I also accidentally put zero here
  284. 10:54instead of 10, so make sure you make
  285. 10:56sure you don't do the same thing I did.
  286. 10:58Okay, now that we have that set up,
  287. 11:00let's actually go into the router and
  288. 11:01open up the command line. Okay, we're
  289. 11:03just going to skip the initial
  290. 11:05configuration dialogue. We don't really
  291. 11:07need to we don't really need our hand
  292. 11:08held through this. Anytime you don't
  293. 11:10know what to do, just type question mark
  294. 11:12and a bunch of commands are going to
  295. 11:14show up. It's kind of like typing help
  296. 11:16or {dash}h for like [ __ ] on Linux. So,
  297. 11:19to set up the router, we're just going
  298. 11:21to enable. Okay, why did this arrow turn
  299. 11:24into a [ __ ] hashtag? Well, this
  300. 11:26little [ __ ] carrot pointer thing is
  301. 11:29exact mode. When we type enable, that
  302. 11:32puts us into privileged exact mode. I
  303. 11:34know, it's confusing as [ __ ] but you
  304. 11:36can thank Cisco for that. That's just
  305. 11:37how they do stuff. They have like four
  306. 11:39different privilege modes and it's all
  307. 11:41so stupid. So, once we enter a new
  308. 11:43privilege level, we have different
  309. 11:45commands available to us. What we're
  310. 11:47going to do is type show IP interface
  311. 11:50brief and that's going to tell us that
  312. 11:52we have every all these IP addresses
  313. 11:54unassigned and that their status is
  314. 11:56down. Now, you might have some questions
  315. 11:58arising from this. Like, what is an
  316. 12:00interface? Why does one router have
  317. 12:01multiple interfaces? Why do they have no
  318. 12:03addresses? What does administratively
  319. 12:06down mean? And what is the difference
  320. 12:08between status and protocol because they
  321. 12:09both say down. An interface is one of
  322. 12:13the router's network connections. Each
  323. 12:15interface belongs to a different network
  324. 12:16and therefore receives its own IP
  325. 12:18address. Administratively down means
  326. 12:20that that interface has been
  327. 12:21deliberately disabled by its
  328. 12:23configuration. Cisco router interfaces
  329. 12:25are disabled by default. So, we're going
  330. 12:27to enter a new mode. Oh my god, I hate
  331. 12:30how Cisco does this. If we type
  332. 12:32configure terminal, we are now [music]
  333. 12:34in config what is called configuration
  334. 12:37mode. Why can't everything just be in
  335. 12:39this [ __ ] privilege mode? I don't
  336. 12:41know. I don't know. There's also a
  337. 12:43config if mode, a config router mode, a
  338. 12:46config line mode. I don't know why it's
  339. 12:48like this. You just have to deal with it
  340. 12:50because in the IT world, everybody uses
  341. 12:54Cisco for some reason. Okay, well, we we
  342. 12:57want to select the left interface. I
  343. 13:00I messed something up earlier, so I
  344. 13:01deleted the router and put in a new one.
  345. 13:04Just remember what you connected to
  346. 13:06what. I connected I connected gigabit
  347. 13:08Ethernet 0/0 to the left switch and
  348. 13:10gigabit Ethernet 0/1 to the right
  349. 13:12switch. We're going to start with the
  350. 13:13left switch first. Just in this command,
  351. 13:16use whatever interface you used. So,
  352. 13:19interface gigabit Ethernet 0/
  353. 13:230 0/0.
  354. 13:25We are now inside config interface mode.
  355. 13:28Hooray, a new mode. You might be asking,
  356. 13:31why are we configuring an interface
  357. 13:33instead of assigning one IP to the
  358. 13:35entire router? A router does not have
  359. 13:37one universal IP address. Each routed
  360. 13:39interface receives an address belonging
  361. 13:41to the network connected to that
  362. 13:43interface. And to give it an address,
  363. 13:45we're just going to type IP address
  364. 13:47192.168.10.1
  365. 13:51and the subnet mask 255.255.255.0.
  366. 13:56Now, why are we using .1 here? And why
  367. 13:59here? Because the left side, if you
  368. 14:01remember with the PC, we're using 10 on
  369. 14:03the left side as as as as the thing. And
  370. 14:06.1 is typically always assigned to the
  371. 14:09router. I don't think it had to be .1,
  372. 14:12but that is standard for pretty much
  373. 14:14every network topology ever. So, we're
  374. 14:16just going to go for it. Now, to enable
  375. 14:18this, guess what the command is? Because
  376. 14:20it's not enable. It's no shutdown. I
  377. 14:23don't know what genius thought of that,
  378. 14:26but to enable this router, you type no
  379. 14:28shutdown. They [music] change state to
  380. 14:30up. There we go. If you inspect the link
  381. 14:32here, you there should now be a green
  382. 14:34arrow instead of these red ones. That
  383. 14:36proves that the physical and and the
  384. 14:38data link connection is operational. It
  385. 14:40does not prove yet that the PCs are are
  386. 14:43addressed correctly and can communicate
  387. 14:44to each other. But, this green line is a
  388. 14:46good sign. So, after we assign the first
  389. 14:49address, we're just going to exit and
  390. 14:51now we're back to config mode. And now
  391. 14:53we want to select the other interface.
  392. 14:55Now, what I want you to do is pause the
  393. 14:56video and then assign the other IP
  394. 14:58address to the other switch. You should
  395. 15:01know exactly what to do from here.
  396. 15:05>> [music]
  397. 15:05>> Okay, I I I hope you did it. If you're
  398. 15:07just watching for fun, we're going to do
  399. 15:09interface gigabit ethernet 0/1
  400. 15:14and then IP address 192.168.20.1
  401. 15:20and then the same subnet mask. I already
  402. 15:22explained why it can't be .10 here
  403. 15:25before and why we're using .1 here. So,
  404. 15:27I'm not going to rephrase. Let's just
  405. 15:29enter. And then to enable it, no
  406. 15:31shutdown again. That is so stupid. I'm
  407. 15:33never going to get over that. There's
  408. 15:35also multiple ways to get out of of this
  409. 15:38config if mode. Typing exit just takes
  410. 15:40you back to regular config mode, but
  411. 15:42typing end takes you all the way
  412. 15:45takes you all the way back to privilege
  413. 15:47mode. So, green lines everywhere. That I
  414. 15:49I think that means that it works, but to
  415. 15:51verify, show IP interface brief. Okay?
  416. 15:55IP address, they now have IP addresses
  417. 15:58and status and protocol are both up.
  418. 16:00We're basically done. Now, you might
  419. 16:01have some questions. Did the
  420. 16:02configuration actually work? Can we
  421. 16:04trust this? Is this lying to us? Is this
  422. 16:07all sci-op? Well, let let's let's verify
  423. 16:10everything. First, we're just going to
  424. 16:11show IP route. We don't have to do this,
  425. 16:13but we're just it just says it gives us
  426. 16:17some useful information. This makes
  427. 16:19another useful question. How does the
  428. 16:21router know where these networks are
  429. 16:23when we never created a route aside from
  430. 16:25just physically plugging them in? That
  431. 16:27is because assigning an address to an
  432. 16:29active interface automatically adds that
  433. 16:31interface's network to the routing
  434. 16:33table. You don't need static routes
  435. 16:35because both networks connect directly
  436. 16:37to the router. Once everything works,
  437. 16:39make sure to do this. You copy running
  438. 16:42config and startup config. For a file
  439. 16:46name, just press enter and then we're
  440. 16:49basically done. Running config is the
  441. 16:51configuration currently in memory and
  442. 16:53startup config is the saved
  443. 16:55configuration that is loaded every time
  444. 16:57this thing is started. So, now let's
  445. 16:59check if the
  446. 17:00Terry cameo. We have a Terry cameo going
  447. 17:03over the opsec folder. W Terry. Okay, uh
  448. 17:06command prompt. We're going to try
  449. 17:08pinging the other computer.
  450. 17:09192.168.20.10.
  451. 17:13Request timed out. What happened? Why
  452. 17:15didn't it work? Why is our stupid
  453. 17:17request timing out? What did we do
  454. 17:19wrong? Do we have to restart everything
  455. 17:21from scratch? Let's just nuke this
  456. 17:23stupid router and start
  457. 17:25>> [music]
  458. 17:28>> Well,
  459. 17:29it didn't work because I deliberately
  460. 17:32didn't put the default I didn't assign
  461. 17:34the computers a default gateway. I
  462. 17:37wanted to make this mistake to
  463. 17:38demonstrate that mistakes often lead to
  464. 17:41you learning something new. If you ran
  465. 17:43into this problem, you'd go through a
  466. 17:45checklist. You say, "Okay, all the
  467. 17:47addresses are correctly assigned.
  468. 17:49There's green lines running. Why is it
  469. 17:50still not connecting?" Eventually,
  470. 17:52you'll look at the IP configuration and
  471. 17:55you'll see that the default gateway is
  472. 17:57just 0.0.0.0.
  473. 17:59So, we want to make the default gateway
  474. 18:01the same address as the router. And we
  475. 18:04want to use and we want to use the
  476. 18:06specific left side network and the right
  477. 18:08side network for for both PCs. So, if
  478. 18:11this is .10, the third number, then
  479. 18:13we're going to use .10 here and then .1
  480. 18:15cuz that's the router. Let's do the same
  481. 18:17thing on the other one. 192.168.20.1.
  482. 18:21Now, if all goes well, I should be able
  483. 18:24to ping the other computer.
  484. 18:26Reply. I thought I thought it was over
  485. 18:28for a sec cuz request timed out, but we
  486. 18:30got a reply. It's working. Objective
  487. 18:32complete. Computers are now
  488. 18:34communicating and you should now have a
  489. 18:36basic understanding of how all this
  490. 18:39works. This is the very basic foundation
  491. 18:42of everything. It's normal if you do not
  492. 18:45yet understand every packet level
  493. 18:47detail, but this is a strong foundation
  494. 18:50for everything we're about to talk
  495. 18:51about. We learned that just physically
  496. 18:54connecting stuff doesn't mean that
  497. 18:55they're always going to be able to
  498. 18:57communicate with each other. Nowadays,
  499. 18:59nine times out of 10, just connecting
  500. 19:01something, it means it's going to be
  501. 19:02able to communicate with each other like
  502. 19:03any
  503. 19:04like basically any home network. But, I
  504. 19:06wanted to demonstrate manually setting
  505. 19:08up a network from scratch because I
  506. 19:11think it's just something important to
  507. 19:13know. Whether you get into networking as
  508. 19:15a career or not, it is something very
  509. 19:17valuable to know, especially if you're
  510. 19:19into cybersecurity. We learned very
  511. 19:22foundational stuff like a computer needs
  512. 19:24a unique IP address, a subnet mask
  513. 19:26determines which address belongs to the
  514. 19:28same network, a router connects
  515. 19:29different networks together, which are
  516. 19:31these switches, router interfaces must
  517. 19:33be enabled before they operate, switches
  518. 19:36can forward the local traffic without
  519. 19:38having IP addresses because if you
  520. 19:40remember, we did no actual configuration
  521. 19:42on these, communication also requires a
  522. 19:44return path, so both PCs need gateways,
  523. 19:47and without those gateways, we weren't
  524. 19:49able to communicate with each other. And
  525. 19:51we learned that DHCP is what allows
  526. 19:54automatic IP address assignment, which
  527. 19:56many people take for granted or don't
  528. 19:58even know exists because they're just so
  529. 20:00used to everything working
  530. 20:01>> [music]
  531. 20:01>> right out of the box. Congratulations.
  532. 20:04You have made two computers communicate
  533. 20:06across two separate networks, but you
  534. 20:08probably have a lot of questions after
  535. 20:10all that. And that's good. That means
  536. 20:12you have a curiosity about this stuff,
  537. 20:14and curiosity is what sparks the desire
  538. 20:16to learn. Let's start with the basics.
  539. 20:19How did computer A ping computer B? What
  540. 20:22is a ping? How does it work? Ping uses
  541. 20:25ICMP echo request and echo reply
  542. 20:27messages and it basically tests whether
  543. 20:30another IP host can be reached and if
  544. 20:32the IP host can respond. How does
  545. 20:34computer A decide where to send the
  546. 20:36ping? Well, it compares its own address
  547. 20:38to the destination address and since its
  548. 20:40number is 20, meaning it's outside of
  549. 20:43its own network, it sends the packet
  550. 20:44through the default gateway, which is
  551. 20:46just the IP for the router. How does it
  552. 20:48know to send it to the router? Because
  553. 20:50the 20 here tells the computer that the
  554. 20:52destination is outside of its network.
  555. 20:54To find the gateway, it knows its IP
  556. 20:57address, but it still needs the MAC
  557. 20:59address. What is a MAC address? Well,
  558. 21:01it's kind of like a legal name. Everyone
  559. 21:03has a name and your MAC address is
  560. 21:05completely unique to your device's
  561. 21:07hardware level network card. This is not
  562. 21:09taking into account things like MAC
  563. 21:11address spoofing and and stuff like
  564. 21:12that, by the way. It's like trying to
  565. 21:14send a package of a phallic-shaped
  566. 21:16object and having an address, which is
  567. 21:18represented by the IP, but not having
  568. 21:20the name, aka the MAC address. You can't
  569. 21:22send the package. It's like a mailman
  570. 21:24arriving to your apartment building, but
  571. 21:26there is no specific name or unit on the
  572. 21:28package, so he just doesn't know what to
  573. 21:30do with it. So, to get the missing
  574. 21:31information, computer A sends an ARP
  575. 21:33broadcast, which introduces its IP, MAC
  576. 21:36address, [music]
  577. 21:37ARP broadcast and ARP caches and switch
  578. 21:40A stores the MAC address in the MAC
  579. 21:42address table and forwards that packet
  580. 21:44to the router. What is an ARP broadcast?
  581. 21:46It's basically like your computer
  582. 21:48standing in a room full of people with a
  583. 21:50package addressed to 192.168.20.10
  584. 21:53and since [music] the room is full of a
  585. 21:54bunch of other IPs, your computer
  586. 21:56naturally can't just walk directly to
  587. 21:58the recipient because they don't know
  588. 22:00who they are, so they [music] just stand
  589. 22:02up and say, "Yo, who the [ __ ] has IP
  590. 22:04address 192.168.20.10?
  591. 22:07Tell me your MAC address so I can give
  592. 22:09you this packet." Everybody in the room
  593. 22:11sees the message, but 192.168.20.10
  594. 22:15says, "Yo, that's me, dude. Here's
  595. 22:18Here's a Here's my MAC address." After
  596. 22:21switch A forwards the packet to the
  597. 22:22router, it examines the destination IP,
  598. 22:25checks the routing table it has stored
  599. 22:26locally, sees the destination in its
  600. 22:28routing table, and sends the packet
  601. 22:30through to switch B, which it then
  602. 22:32forwards it to computer B. An echo reply
  603. 22:34is sent back through the chain all the
  604. 22:36way back up to PC A. Why did we do
  605. 22:39something as barbaric as manually
  606. 22:41configuring the IP address? We did that
  607. 22:43just to understand how IP addresses are
  608. 22:45assigned because it's important [music]
  609. 22:47to know. Nine times out of 10, the IP
  610. 22:49address will be assigned in a different
  611. 22:51way. If the IP address isn't manually
  612. 22:53assigned by me, how is it assigned?
  613. 22:55Well, let me introduce you to DHCP.
  614. 22:58DHCP, or the Dynamic Host Configuration
  615. 23:00Protocol, automates the boring process
  616. 23:02of manually assigning IP addresses on
  617. 23:04the network. In the era of instant
  618. 23:06gratification, you can't manually learn
  619. 23:08or do anything without the required
  620. 23:10black guy in the corner and Subway
  621. 23:12Surfer gameplay on the side. That is why
  622. 23:15DHCP is there to do it for you so you
  623. 23:17could continue to fritter away scrolling
  624. 23:19Instagram Reels and lose time [music]
  625. 23:21you'll never truly get back. A DHCP
  626. 23:23server maintains a pool of addresses
  627. 23:25that it is allowed to distribute, and on
  628. 23:27most home networks, the router usually
  629. 23:28acts as a DHCP server, which is why you
  630. 23:31usually don't manually set one up. Large
  631. 23:33organizations in the IT world may use
  632. 23:35dedicated DHCP servers rather than
  633. 23:38having them integrated directly into the
  634. 23:39router. Think of DHCP kind of like
  635. 23:42renting a room in the Bannered [music]
  636. 23:43Mare in Skyrim. You walk into the
  637. 23:45Bannered Mare with the sole intention of
  638. 23:47getting drunk off Honningbrew Mead so
  639. 23:49you can get a little too handsy with
  640. 23:51Saadia. The DHCP server is kind of like
  641. 23:53the innkeeper Hulda, who assigns you a
  642. 23:55room, tells you where the exits are,
  643. 23:57tells you how to contact the front desk,
  644. 23:59and gives you the room temporarily
  645. 24:01rather than you owning it forever. All
  646. 24:03right, she doesn't do like half of those
  647. 24:05things I just said, but like just for
  648. 24:06the analogy, just pretend like she does.
  649. 24:09The room is your IP address, and the
  650. 24:11exit is your default gateway, and the
  651. 24:13information on how to contact the front
  652. 24:15desk is a DNS server. Okay, so how can a
  653. 24:18computer request an address when it
  654. 24:19doesn't have one? It broadcasts a DHCP
  655. 24:22message to everyone on the local network
  656. 24:24through a process [music] called Dora.
  657. 24:25Dora stands for Dora the Explorer Dora
  658. 24:28stands for discover, offer, request, and
  659. 24:31acknowledge. Discover is discovering
  660. 24:33whether there is a DHCP server. Offer is
  661. 24:36the DHCP server offering a specific
  662. 24:38address to a computer. And request is
  663. 24:40your computer being like, "Sure, I'll
  664. 24:42take that address." Then finally,
  665. 24:43acknowledge is just both parties
  666. 24:45acknowledging that the transaction
  667. 24:47happened. The DHCP server gives
  668. 24:49everything that is needed like an IP
  669. 24:51address, subnet mask, default gateway,
  670. 24:53DNS servers, etc. Now that we know how
  671. 24:56devices communicate with each other
  672. 24:58locally, how does communicating with the
  673. 25:00internet outside of your network work?
  674. 25:02So, let's say you go to Rule 34 to
  675. 25:05research art. First, your computer will
  676. 25:07make a request to your router. It
  677. 25:09packages this request into a digital
  678. 25:10envelope called a packet that contains a
  679. 25:12bunch of stuff like this. Let's just
  680. 25:14ignore all of that for now because like,
  681. 25:16ew, look at it. And let's just direct
  682. 25:19our small attention spans onto the two
  683. 25:21main things we need to know. The MAC
  684. 25:22address and the IP address for both the
  685. 25:24source and the destination. Your router
  686. 25:26has its own public IP address which it
  687. 25:28uses to connect to the outside world.
  688. 25:30Think of the router like the portal to
  689. 25:32the nether. The overworld is your local
  690. 25:34network, and you can enter the nether
  691. 25:37aka the outside internet through the
  692. 25:39router aka the portal. Okay, but how
  693. 25:42does my computer know that Rule 34 is
  694. 25:44Rule 34? Well, that is through the
  695. 25:46magical thing that is known as DNS. What
  696. 25:49the hell is DNS and why do you keep
  697. 25:50mentioning it? DNS stands for Domain
  698. 25:53Name System. Say you're trying to buy my
  699. 25:55merch and you type in zooma.shop into
  700. 25:57your browser and you go on my website to
  701. 25:59buy my awesome merch. Every website
  702. 26:01needs their own IP. But us as humans,
  703. 26:04we're not going to [ __ ] manually type
  704. 26:06down and remember a million IP addresses
  705. 26:09for every website that we like. So, that
  706. 26:11is where DNS comes in. DNS turns
  707. 26:13zooma.shop into an IP that your network
  708. 26:16needs to know to communicate with it
  709. 26:17properly. The way it works is that when
  710. 26:19you type zooma.shop into your browser,
  711. 26:21your computer is going to go check its
  712. 26:23own DNS cache, host file, and previous
  713. 26:25local configurations. And if it cannot
  714. 26:27find the IP that matches the domain in
  715. 26:29there, the computer is going to ask,
  716. 26:31"Hmm, where should I ask about this
  717. 26:33site?" Well, I'll send a request to a
  718. 26:35DNS resolver ran by the ISP. If the DNS
  719. 26:38resolver doesn't have the answer, it
  720. 26:40then asks a root name server about
  721. 26:42zumda.shop, and the root name server
  722. 26:44reads the top-level domain, aka the TLD,
  723. 26:47which is basically just this end part of
  724. 26:49any given domain. You more commonly see
  725. 26:52.com or .org, but in this case it is
  726. 26:54.shop. Each TLD has its very own TLD
  727. 26:57registry, and the root name server asks
  728. 27:00the TLD registry for the IP address of
  729. 27:02the domain, and that IP is sent all the
  730. 27:04way back to your computer. That's all
  731. 27:06you need to know for now. I'm not going
  732. 27:07to get into poisoning DNS responses and
  733. 27:09TLS certificates yet. I should probably
  734. 27:11mention that one machine can run several
  735. 27:13network programs simultaneously. Whether
  736. 27:16that be a website, SSH server, Jellyfin
  737. 27:18server, or Minecraft server all under
  738. 27:21the same IP address. When traffic
  739. 27:23reaches that computer, how does it know
  740. 27:25which program should receive it? This is
  741. 27:27where ports come in. Say you're
  742. 27:29self-hosting a Minecraft server on TCP
  743. 27:31port 25565,
  744. 27:33and you host a Jellyfin server on TCP
  745. 27:35port 8096.
  746. 27:37Those ports would be open, meaning that
  747. 27:39there is a socket that is actively
  748. 27:41listening for traffic on that port. The
  749. 27:43operating system on the computer reads
  750. 27:45the destination port in the TCP [music]
  751. 27:47header, and delivers the data to the
  752. 27:48socket listening on that port. For that
  753. 27:50port to be reachable by the broader
  754. 27:52internet, you [music] can forward those
  755. 27:53packets doing something called port
  756. 27:55forwarding, but this comes with a myriad
  757. 27:57of risks that I'll get into later. What
  758. 27:59is TCP and UDP? You can think of TCP and
  759. 28:02UDP like delivery service providers.
  760. 28:04[music]
  761. 28:04So, think like FedEx or Amazon shipping
  762. 28:07or some [ __ ] like that. TCP is focused
  763. 28:09on reliable delivery. First, to deliver
  764. 28:11data, TCP uses a three-way handshake.
  765. 28:13[music] So, the client basically goes to
  766. 28:15the server and says, "Yo, what's up?"
  767. 28:18The server then says, "Hey, man, what's
  768. 28:20up?" Then the client says, "Nothing
  769. 28:22much. Let's talk." And communication is
  770. 28:24established, and then [music] they
  771. 28:25passionately start making out right in
  772. 28:27front of you. Typically, by default, TCP
  773. 28:29is not encrypted, but modern HTTPS
  774. 28:32places TLS above TCP, so it's
  775. 28:34transported in a way that is invisible
  776. 28:36to literally anybody that is watching.
  777. 28:38If data is missing or something doesn't
  778. 28:40arrive, TCP retransmits that data, and
  779. 28:42if data arrives out of order, TCP can
  780. 28:45reassemble the byte stream before
  781. 28:46delivering it to the application.
  782. 28:47[music] UDP is like minimal transport.
  783. 28:50Instead of establishing a handshake or
  784. 28:52anything, UDP is a chad. It doesn't care
  785. 28:54if the recipient is ready or
  786. 28:56or even exists. It just fires the data
  787. 28:59and sends it regardless of anything. And
  788. 29:01unlike TCP, the packets have no disaster
  789. 29:03protocol in case things go wrong. TCP
  790. 29:05basically sits in the corner and is
  791. 29:07like, "Well, what if this goes wrong? We
  792. 29:09need a plan. What if my girlfriend
  793. 29:11leaves me? Oh my god, what am I going to
  794. 29:13do? Let's halt the entire network and
  795. 29:16figure this out right now." UDP's
  796. 29:18philosophy is that having a plan B is
  797. 29:20basically admitting to yourself that
  798. 29:22you're going to fail. In UDP's mind,
  799. 29:24failure is not even a possibility. So,
  800. 29:27if packets are dropped along the way,
  801. 29:28they're just forgotten to time and
  802. 29:30become hollow like in Dark Souls. These
  803. 29:32both serve specific purposes. When
  804. 29:34something goes wrong with TCP, usually
  805. 29:36the network pauses and makes sure
  806. 29:38everything is in order before keeping
  807. 29:40data flowing. With UDP, speed is the
  808. 29:42number one priority. If you're playing
  809. 29:44something like Counter-Strike, you don't
  810. 29:45want the entire connection to freeze
  811. 29:47just because your opponent has bad
  812. 29:49internet, which is why something like
  813. 29:50UDP would be better suited for that than
  814. 29:53TCP. TCP is more suited to something
  815. 29:55like downloading Counter-Strike.
  816. 29:57Everything needs to be sent, and if UDP
  817. 29:59is used, you risk corrupted game files.
  818. 30:01[music] Maybe that whole every copy of
  819. 30:03Mario 64 is personalized meme was
  820. 30:05because of UDP downloading a slightly
  821. 30:07different game for every host. Okay, we
  822. 30:09now know how a device can communicate
  823. 30:11with the broader internet. [music]
  824. 30:12How can hundreds of devices all share
  825. 30:15the same public IP address? Welcome to
  826. 30:17NAT and PAT. NAT and PAT are like the
  827. 30:20RAM and ROM of networking. [music]
  828. 30:22Who the [ __ ] is RAM?
  829. 30:24Uh oh [ __ ] I don't know.
  830. 30:28A lot of people confuse PAT and NAT
  831. 30:30since they both translate your device's
  832. 30:32private internal addresses into a single
  833. 30:34public address so they can access the
  834. 30:36wider internet. That means network
  835. 30:38address translation. Basically, a router
  836. 30:40strips the private IP off the packet and
  837. 30:42replaces it with your house's public IP
  838. 30:44address. You can think of NAT like
  839. 30:46Indiana Jones replacing that golden idol
  840. 30:49thing with the bag of sand. NAT is
  841. 30:51fairly limited, though. Basic NAT
  842. 30:52requires a unique public IP for every
  843. 30:55single individual device that wants to
  844. 30:57go online at the same time. If you have
  845. 30:5920 devices, but only one public IP, only
  846. 31:01one device can use the internet at a
  847. 31:03time. If NAT is a one-to-one swap, you
  848. 31:05can think of PAT,
  849. 31:06>> [music]
  850. 31:06>> or port address translation, as a
  851. 31:08many-to-one swap. It's kind of like how
  852. 31:10One For All is technically one quirk,
  853. 31:12and All For One lets you take on as many
  854. 31:15quirks as he want. Instead [music] of
  855. 31:16just changing the IP address like like
  856. 31:19basic NAT, PAT utilizes source port
  857. 31:21numbers on top of this to keep track of
  858. 31:23who asked for what, so it knows to send
  859. 31:25the Rule 34 traffic to your device,
  860. 31:27instead of your mom's device. So, say
  861. 31:29you and your mom both click a link at
  862. 31:31the exact same time. To avoid mixing
  863. 31:34that data, the router assigns a source
  864. 31:36port to both packets and uses a
  865. 31:38different source port number for each
  866. 31:39packet. Then, it writes this down in a
  867. 31:41translation table. So, say the port for
  868. 31:43your packet is one, and the port for
  869. 31:45your mom's packet is two. Traffic
  870. 31:47returning on port one goes to you, and
  871. 31:49traffic returning on port two goes to
  872. 31:51your mom. All of what I just discussed
  873. 31:52combined is what allows the modern
  874. 31:54internet to exist and allows you to
  875. 31:56interact with it. There is other stuff I
  876. 31:58didn't mention like like switching
  877. 32:00centers, deep sea routing cables, but
  878. 32:03whatever, all of that's not important. I
  879. 32:04just want to know, how did we bang a
  880. 32:06couple rocks together thousands of years
  881. 32:08ago and end up with this? I have no
  882. 32:10[ __ ] idea. It's best not to think
  883. 32:12about it. If you had fun with the
  884. 32:13hands-on thing we did with Packet
  885. 32:15Tracer, I'm going to link a GitHub
  886. 32:16repository that includes a collection of
  887. 32:18already set up network topologies, each
  888. 32:21with a specific problem that needs to be
  889. 32:23fixed, that covers everything I just
  890. 32:24discussed. They range between beginner
  891. 32:26[music] to intermediate in difficulty.
  892. 32:28I'll also link some labs from Witty
  893. 32:29Networks that are more advanced that
  894. 32:31each present a broken network where
  895. 32:33something isn't working correctly. It
  896. 32:35doesn't tell you what's wrong. It only
  897. 32:37gives you a specific objective, so you
  898. 32:39are completely on your own with these.
  899. 32:40They're actually pretty hard. I tried
  900. 32:42three of them and only completed one of
  901. 32:44them. I highly recommend doing these if
  902. 32:46you plan on getting into a career in
  903. 32:48actual networking and network
  904. 32:49maintenance. If you just want to be an
  905. 32:51anonymous hacker man that hacks into the
  906. 32:53main frame, you can get by with just
  907. 32:55knowing the basics, but I still
  908. 32:56recommend you at least do one or two of
  909. 32:58these things since the knowledge you'll
  910. 33:00get is instrumental. Okay, with most of
  911. 33:02the basics done, let's get into network
  912. 33:04attacks and network security.
  913. 33:12>> [music]
  914. 33:19[music]
  915. 33:29>> This video is sponsored by Hacker
  916. 33:31Blueprint. More information on them in
  917. 33:34the pinned comment. Much like what I did
  918. 33:36with networking basics, we're just going
  919. 33:38to throw ourselves into the water with
  920. 33:39this one. So, download Wireshark on
  921. 33:41whatever operating system you're on and
  922. 33:43just start capturing packets. Spend some
  923. 33:46time getting familiar with what you're
  924. 33:47looking at and what is actually
  925. 33:49happening. Wireshark is not illegal, but
  926. 33:51[music] what you do with Wireshark can
  927. 33:53be illegal. So, make sure you're only
  928. 33:54using this on a network you have
  929. 33:56permission to be doing this on. Okay,
  930. 33:58boring disclaimer out of the way. Once
  931. 33:59you're kind of familiar with Wireshark,
  932. 34:01go to a site like this, which is HTTP
  933. 34:03only. This is a demo site where you can
  934. 34:05log in with any credentials. Whatever
  935. 34:07you do, do not type in your real login
  936. 34:09or password for anything. [music] If
  937. 34:11you're scared, don't do anything and
  938. 34:13just watch. I typed in a username and a
  939. 34:15password. Okay, nothing happened. Now
  940. 34:16what? Well, let's filter by HTTP and
  941. 34:19inspect the packets. After searching for
  942. 34:21about 2 seconds, I was able to find this
  943. 34:23get request and there is this little
  944. 34:25authorization header that is just this
  945. 34:27random string of encoded text. The
  946. 34:29entire thing absolutely reeks of a
  947. 34:32password to me. This string of text is a
  948. 34:34base 64 encoding, not to be confused
  949. 34:37with an encryption. Encoding changes the
  950. 34:39representation of the text and is
  951. 34:41designed to be reversible. It's just one
  952. 34:43small thing that prevents the human eye
  953. 34:45from immediately seeing passwords in
  954. 34:46plain text. Encryption requires a key to
  955. 34:49unlock, which this does not have.
  956. 34:51Wireshark automatically decodes this,
  957. 34:53and just by clicking this little arrow
  958. 34:55here, oh look, and my username and
  959. 34:58password visible in plain text. This is
  960. 35:01why nobody uses HTTP anymore. Despite
  961. 35:04HTTPS being introduced in 1994, HTTP
  962. 35:08remained the dominant internet standard
  963. 35:10until around 2015, when free HTTPS
  964. 35:13certificates were introduced by a
  965. 35:14nonprofit called Let's Encrypt, with the
  966. 35:16final nail in the coffin happening in
  967. 35:182018 with Google Chrome's not secure
  968. 35:21update, which introduced this red
  969. 35:23warning every time you try connecting to
  970. 35:25a non-HTTPS site. Since Chrome is the
  971. 35:27browser with the highest market share in
  972. 35:29the entire world, every site was scared
  973. 35:32of users being frightened away by the
  974. 35:33warning, which forced a global migration
  975. 35:36to HTTPS. [music]
  976. 35:37In the modern day, modern browsers no
  977. 35:39longer allow you to connect to a
  978. 35:40non-HTTPS site without explicitly
  979. 35:43clicking like four buttons to allow it.
  980. 35:44And a lot of HTTP sites automatically
  981. 35:47redirect you to an HTTPS version of it,
  982. 35:49which is exactly what my merch site
  983. 35:51does. If you type in HTTP zuma.shop,
  984. 35:55it's going to redirect you to HTTPS
  985. 35:57zuma.shop. Nowadays, we have things like
  986. 36:00HTTPS and TLS, which prevent this from
  987. 36:02happening this easily. But, I wanted to
  988. 36:04demonstrate it to help you understand
  989. 36:06networking. Let's break down the actual
  990. 36:08HTTP request. Let's start all the way
  991. 36:10with the source IP and destination IP.
  992. 36:13The source IP is my computer's local
  993. 36:15IPv4, which is why I'm not blurring it
  994. 36:17because it really doesn't matter if
  995. 36:18somebody sees your local IP. The
  996. 36:20destination IP is just a website in IP
  997. 36:22form. The source port is this very high
  998. 36:25number. Your computer has 65,535
  999. 36:28possible ports you can open. When making
  1000. 36:30a request through HTTP or HTTPS, your
  1001. 36:33computer typically opens up a random
  1002. 36:35high port number, typically between
  1003. 36:3749,152
  1004. 36:39and 65,535
  1005. 36:41for like a split second to make the
  1006. 36:43request. Why? Because a port is like a
  1007. 36:45door and a door needs to be open for
  1008. 36:47information to pass through it. But why
  1009. 36:49not just leave the port open the entire
  1010. 36:51time? There is a bunch of risks that
  1011. 36:53come with exposing [music] ports to the
  1012. 36:54open internet which can lead to your
  1013. 36:56computer getting hacked depending on if
  1014. 36:57there are any vulnerable services
  1015. 36:59exposed. [music] The destination port is
  1016. 37:0180, which is the standard for HTTP.
  1017. 37:04There are different types of HTTP
  1018. 37:05requests. Get is to retrieve something
  1019. 37:08like a webpage or image. Post is to
  1020. 37:10submit something for processing. Put is
  1021. 37:12to replace something. Patch is to change
  1022. 37:14part of a resource like a profile
  1023. 37:16picture. Delete is requesting something
  1024. 37:18to be removed like deleting a comment.
  1025. 37:20Head is to get the response headers like
  1026. 37:22if you're checking the file size of
  1027. 37:23something. Options is to ask what
  1028. 37:25method/features are supported. Connect
  1029. 37:27[music] is for creating a tunnel through
  1030. 37:29a proxy. Trace is to ask the server to
  1031. 37:32echo the request. In this case, we are
  1032. 37:34covering a get request. Get is the
  1033. 37:35request line. Host is this IP and URL
  1034. 37:38form and we are able to reach it because
  1035. 37:40of DNS. User agent is your user agent,
  1036. 37:42so your browser and your system
  1037. 37:44information like your operating system.
  1038. 37:46Authorization here is where the
  1039. 37:47credentials actually are since this
  1040. 37:49specific packet is the packet that
  1041. 37:51transmitted the credentials from my
  1042. 37:52computer to the web [music] server. I
  1043. 37:54want to clarify that this site uses the
  1044. 37:56browser's built-in HTTP basic
  1045. 37:58authentication prompt. Most modern
  1046. 38:00websites send credentials in a post or
  1047. 38:03JSON request and then verify that on the
  1048. 38:05server, return [music] a session cookie
  1049. 38:07or token, and use that token or cookie
  1050. 38:08for later requests. Without HTTPS, the
  1051. 38:11password, cookie, and token can all be
  1052. 38:13captured. Post by itself doesn't really
  1053. 38:15make it any harder. You might be asking,
  1054. 38:17"Would a VPN protect us from happening?"
  1055. 38:19Um, it could and it could not. A VPN
  1056. 38:22would hide the HTTP request from
  1057. 38:24observers between the device and the VPN
  1058. 38:27server, but the HTTP traffic becomes
  1059. 38:29plain text after leaving the VPN towards
  1060. 38:31the website. So, the VPN provider or
  1061. 38:34anyone on that end of the network will
  1062. 38:35still be able to see that information
  1063. 38:37even if [music] you can't. But you are
  1064. 38:39still safe from local level attackers
  1065. 38:41exploiting this. Can HTTPS traffic ever
  1066. 38:44be observed and opened like this in
  1067. 38:45Wireshark? only if the person observing
  1068. 38:48possesses the session keys to that
  1069. 38:49connection, which is unlikely. It can be
  1070. 38:51captured and viewed, but normally cannot
  1071. 38:53be decrypted without the session keys I
  1072. 38:55mentioned or TLS interception. A TLS
  1073. 38:58interception is basically a
  1074. 38:59man-in-the-middle attack that replaces
  1075. 39:01two legit encrypted connections with
  1076. 39:03malicious ones. With TLS interception,
  1077. 39:05your traffic is routed through an
  1078. 39:07inspection proxy. The proxy connects to
  1079. 39:09the real website. The proxy then creates
  1080. 39:11its own certificate pretending to be the
  1081. 39:12website. The certificate is signed by a
  1082. 39:15private root CA installed in your
  1083. 39:16device's certificate store. Then your
  1084. 39:18browser trusts it and establishes TLS
  1085. 39:20with the proxy, and the proxy can
  1086. 39:22decrypt and inspect all of your HTTPS
  1087. 39:25traffic. It re-encrypts it on the way
  1088. 39:27back to your device, so you can't tell
  1089. 39:29that it was decrypted along the way.
  1090. 39:30Legitimate examples of entities who use
  1091. 39:33TLS interception include employers,
  1092. 39:35parental control software, schools, and
  1093. 39:38corporate companies. But these are
  1094. 39:40limited to those entity-specific
  1095. 39:42in-house devices, not a network-wide
  1096. 39:44thing that applies to your personal
  1097. 39:45computer. To remain safe, just be
  1098. 39:47careful, and you can always check this
  1099. 39:49little padlock to see who is issuing the
  1100. 39:51TLS certificate. If you're on Linux, you
  1101. 39:53can also inspect your CA certificates
  1102. 39:55pretty easily. I'm not sure how to do it
  1103. 39:57on Windows. I don't use it, so figure it
  1104. 39:59out if you think you're at risk. Just
  1105. 40:01know that simply downloading a random
  1106. 40:02sketchy free non-reputable VPN can
  1107. 40:05install trusted root certificate for TLS
  1108. 40:07interception, which is part of the
  1109. 40:08reason of why I've always repeatedly
  1110. 40:11stressed the importance of auditing your
  1111. 40:12VPNs on my channel. So we just saw what
  1112. 40:15can happen when an adversary can observe
  1113. 40:17your traffic. But for most network-based
  1114. 40:19attacks, the attacker has to answer a
  1115. 40:20few questions. The main ones being, what
  1116. 40:23machines can I reach? Which ports are
  1117. 40:25open? What programs are listening behind
  1118. 40:27those ports? And are any of them
  1119. 40:28vulnerable? These four questions is like
  1120. 40:3190% of what people refer to as hacking,
  1121. 40:33and our beautiful Nmap answers pretty
  1122. 40:35much all of those questions. To
  1123. 40:37demonstrate my point, I'm going to use
  1124. 40:39the Kioptrix box from the Terry the Fly
  1125. 40:41video. If you want to follow along,
  1126. 40:43download Kioptrix level one and a Kali
  1127. 40:46Linux virtual machine, and put them on
  1128. 40:48their own isolated network. It doesn't
  1129. 40:50have to be Kali, by the way. It could be
  1130. 40:51any Linux distro. Kali just comes
  1131. 40:53pre-installed with everything that we
  1132. 40:55need for this demonstration and I'm too
  1133. 40:57lazy to download everything manually.
  1134. 40:59The first step is to see your own IP,
  1135. 41:01then the other IPs on your network. To
  1136. 41:03do that, the IP adder command shows the
  1137. 41:06address assigned to each interface on
  1138. 41:08your device. You can also run IP route
  1139. 41:10to display the routing table. The first
  1140. 41:1224 bits of this IP identify the network.
  1141. 41:15So, in this case, any IP starting with
  1142. 41:17192.168.150
  1143. 41:20are treated as part of that local
  1144. 41:21network. So, anything between
  1145. 41:22192.168.150.1 to 192.168.150.254
  1146. 41:28are usable devices and reachable devices
  1147. 41:31on the network as long as they exist.
  1148. 41:33192.168.150.0
  1149. 41:35is the network address and
  1150. 41:37192.168.150.255
  1151. 41:41is the broadcast address. You might be
  1152. 41:43asking, "Why do we need to know our own
  1153. 41:45address?" Well, that is because it tells
  1154. 41:47us which network to investigate since
  1155. 41:48the only thing we know about the target
  1156. 41:50machine is that it is on this current
  1157. 41:52network. The next thing to do is to
  1158. 41:54actually find the target machine and
  1159. 41:56since we already have the address of the
  1160. 41:58network, we can just type Nmap and then
  1161. 42:00the IP address. Optionally, you can also
  1162. 42:02use the {dash} sn tag for Nmap which
  1163. 42:05performs host discovery without scanning
  1164. 42:07ports. [music]
  1165. 42:08192.168.150.0/24
  1166. 42:12is telling Nmap to check every reachable
  1167. 42:14address in that specific subnet. How
  1168. 42:16does Nmap even discover hosts on a
  1169. 42:18networking level? Some people say it's a
  1170. 42:20ping sweep, but in this case, it's not.
  1171. 42:23A ping sweep checks a range of IP
  1172. 42:25addresses to determine which ones appear
  1173. 42:27to have active devices. When scanning
  1174. 42:29outside of a local network, ARP cannot
  1175. 42:31cross routers. So, Nmap usually combines
  1176. 42:33ICMP echo and ICMP timestamp, which is
  1177. 42:36basically just pinging along with TCP
  1178. 42:38syn, meaning synchronize, to port 443
  1179. 42:41and TCP ack, meaning acknowledgement, to
  1180. 42:44port 80. All of this combined is used to
  1181. 42:46discover hosts. On a local Ethernet
  1182. 42:48network, Nmap typically discovers hosts
  1183. 42:51using ARP, which I explained earlier. If
  1184. 42:53all goes well, we should now have the
  1185. 42:55address of the Kioptrix machine. In this
  1186. 42:58case, the address is 192.168.150.121.
  1187. 43:02All that's left now is to discover the
  1188. 43:04versions of the services running on the
  1189. 43:05Kioptrix machine. Running the same Nmap
  1190. 43:08scan, but this time with the SV flag,
  1191. 43:10which SV sends protocol-specific probes
  1192. 43:13to identify listening software and
  1193. 43:14versions to discover the exact version
  1194. 43:16numbers of the services. After letting
  1195. 43:18it run for a couple seconds, you should
  1196. 43:20now see the version numbers of
  1197. 43:21everything on the open ports. After
  1198. 43:24this, it's time to do the most important
  1199. 43:26part of hacking, which is taking the
  1200. 43:29version numbers and services and looking
  1201. 43:31up if any vulnerabilities exist. I'm not
  1202. 43:33even kidding. This is like a huge part
  1203. 43:35of a penetration test. Hacking a
  1204. 43:37computer in the literal sense in the
  1205. 43:39simplest terms that I can possibly put
  1206. 43:41it is discovering which services to
  1207. 43:44reach, which ports are open, then seeing
  1208. 43:46which services are running, and seeing
  1209. 43:48the version number of those services
  1210. 43:50running, then just looking up exploits
  1211. 43:52and vulnerabilities. So, port 22 has
  1212. 43:54OpenSSH version 2.9p2 running. So, just
  1213. 43:57go to a search engine and just look up
  1214. 43:59OpenSSH 2.9p2 vulnerability. I'm not
  1215. 44:03even kidding. It's that easy. Obviously,
  1216. 44:05this is a deliberately vulnerable system
  1217. 44:07explicitly made to be hacked, and I'm
  1218. 44:09simplifying it drastically. There's a
  1219. 44:11lot more that goes into it like like
  1220. 44:13[ __ ] finding zero-day vulnerabilities
  1221. 44:15that has no searching like this
  1222. 44:17involved. But, this exact methodology is
  1223. 44:19performed on actual real systems to some
  1224. 44:22degree or another during actual real
  1225. 44:24penetration tests. It's just usually a
  1226. 44:26little more complicated. I spent like an
  1227. 44:28hour researching every version number of
  1228. 44:30every service running for exploits and
  1229. 44:32chose to exploit the Apache
  1230. 44:33vulnerability. Why no OpenSSH? Well, the
  1231. 44:36results I found were mostly username
  1232. 44:38enumeration or attacks that required
  1233. 44:40credentials or like some sort of local
  1234. 44:42access or some sort of weird special
  1235. 44:44configuration. I was looking for
  1236. 44:46unauthenticated root access here, and I
  1237. 44:49had two ways I can go about doing it. I
  1238. 44:51can exploit a Samba vulnerability, which
  1239. 44:53is running on port 139, or the Apache
  1240. 44:56vulnerability. I chose Apache because I
  1241. 44:58already did the Samba exploit in my Fly
  1242. 45:00Brain Hacking video, and I already know
  1243. 45:02the correct steps, so it wouldn't really
  1244. 45:04be as fun. You can click the top right
  1245. 45:06if you want to watch that one. Does an
  1246. 45:08old version number always automatically
  1247. 45:10prove something is vulnerable? No. On
  1248. 45:13real systems, sysadmins sometimes
  1249. 45:15backport security fixes manually without
  1250. 45:17changing the visible version, which is
  1251. 45:19why in a real penetration test, just
  1252. 45:21seeing the version number isn't enough
  1253. 45:23to actually prove a vulnerability
  1254. 45:24exists. You can think of these as a lead
  1255. 45:27inside of an investigation. In any given
  1256. 45:30investigation, for say a journalist,
  1257. 45:32private investigator, or like some
  1258. 45:34police detective, there will be multiple
  1259. 45:36leads for a specific case. The
  1260. 45:38investigator will follow all of those
  1261. 45:40leads until they achieve their goal and
  1262. 45:41solve that case. In this specific case,
  1263. 45:44the goal that we want to achieve is root
  1264. 45:46access on the Kioptrix machine, and the
  1265. 45:48lead we currently have is the Apache
  1266. 45:50vulnerability we just researched. I'm
  1267. 45:52doing this to demonstrate how
  1268. 45:53instrumental networking is in
  1269. 45:55cybersecurity. None of this would be
  1270. 45:57possible without networking. The first
  1271. 45:59step is literally only networking, and
  1272. 46:01then researching exploits is only
  1273. 46:03possible because networking exists. In
  1274. 46:05fact, you being able to watch this video
  1275. 46:07is only possible because of networking.
  1276. 46:09I also wanted to mention that the
  1277. 46:10specific exploit I already needed
  1278. 46:12existed built into Kali with a tool
  1279. 46:15called SearchSploit, which is another
  1280. 46:17way you can search exploits. You just
  1281. 46:19type SearchSploit, then the service
  1282. 46:21version number in quotes, and you get of
  1283. 46:23existing exploits. [music]
  1284. 46:25I'm going to run through the rest of
  1285. 46:26this really quickly because the main
  1286. 46:27goal was to demonstrate how important
  1287. 46:29networking knowledge is when it comes to
  1288. 46:30cybersecurity, and not how to actually
  1289. 46:33like hack a [ __ ] system like this.
  1290. 46:35But, we already made it this far, so
  1291. 46:37let's just go. I was able to take the
  1292. 46:38remote exploit from SearchSploit, or or
  1293. 46:41alternatively download it off Exploit
  1294. 46:43DB, which is a database of existing
  1295. 46:45exploits, and then compile it with GCC,
  1296. 46:48which GCC just compiles C source code,
  1297. 46:51and the exploit was made with C. Then,
  1298. 46:53all I had to do was simply run the a
  1299. 46:56exploit, which is the correct exploit
  1300. 46:57for the corresponding version, and point
  1301. 46:59it towards the IP of the Kioptrix
  1302. 47:01machine we got from the Nmap, along with
  1303. 47:03the port running the service we are
  1304. 47:05exploiting. -c40 here is optional. I
  1305. 47:08just used this 40 connections to make it
  1306. 47:09more reliable. Within seconds, I had a
  1307. 47:12reverse shell on the target machine. I
  1308. 47:14say this calls for celebration.
  1309. 47:17But, what happened on the networking
  1310. 47:19level? Well,
  1311. 47:20well, first, the attacker machine
  1312. 47:22checked its routing table and saw that 1
  1313. 47:24121 of the target machine is local.
  1314. 47:27Then, the attacker machine uses ARP to
  1315. 47:29discover the MAC address of the Kioptrix
  1316. 47:31box if it needs to. In this case, it
  1317. 47:33didn't since we already have it cached
  1318. 47:35from the Nmap scan we did earlier. When
  1319. 47:37a TCP handshake is performed, the
  1320. 47:39exploit exchanges specially constructed
  1321. 47:42SSLv2/mod_ssl
  1322. 47:44data with Apache that the vulnerable
  1323. 47:46Apache process mishandles, leading to
  1324. 47:48its memory getting corrupted. Through
  1325. 47:50that corruption, execution is redirected
  1326. 47:52into the exploit's shellcode, and the
  1327. 47:54shellcode attaches a command shell to
  1328. 47:57the existing network socket, letting
  1329. 47:58your keystrokes and the shell output
  1330. 48:00travel through that TCP connection. It's
  1331. 48:03like a comically more complex version of
  1332. 48:05how the image XSS payload works that I
  1333. 48:08demonstrated in the fly video, where an
  1334. 48:10image is called with a non-existent
  1335. 48:11source, and since that source doesn't
  1336. 48:13exist, an error happens. And that is
  1337. 48:15where on error equals comes in, which
  1338. 48:17will let you run a command when that
  1339. 48:19error happens. And you can get creative
  1340. 48:21with these commands to do pretty much
  1341. 48:22whatever. The attacks work extremely
  1342. 48:24differently, and the exploit we used
  1343. 48:25here is much more complex, but on a
  1344. 48:27conceptual level, both exploits provide
  1345. 48:31invalid input that leads to the
  1346. 48:32attacker's code being executed. To
  1347. 48:34explain it very simply and briefly, the
  1348. 48:37exploit converts the buffer overflow
  1349. 48:39into a targeted pointer override.
  1350. 48:41Basically, it replaces Apache's address
  1351. 48:43for the free function, which is just
  1352. 48:45used to free up memory, with the address
  1353. 48:47of the shellcode. And when Apache later
  1354. 48:50calls the free function, the CPU runs
  1355. 48:52the shellcode that we want. You might be
  1356. 48:53asking, "Would a firewall have stopped
  1357. 48:55this?" It could have if it was
  1358. 48:57configured to deny access to port 443.
  1359. 48:59[music] And I believe I haven't
  1360. 49:00mentioned this yet, what exactly is a
  1361. 49:02firewall? A firewall is basically like a
  1362. 49:04bouncer standing between a device or
  1363. 49:06network and everyone trying to
  1364. 49:08communicate with it. Depending on how
  1365. 49:09you configured it, the traffic that
  1366. 49:11wants to come in has to fit a certain
  1367. 49:13criteria to be allowed entry into the
  1368. 49:15door that the bouncer is guarding. Every
  1369. 49:16packet has information like where it
  1370. 49:18came from, where it's going, which
  1371. 49:20protocol it uses, and which port it
  1372. 49:22wants to reach. The firewall compares
  1373. 49:23the information in the packet against a
  1374. 49:25set of rules you determine and decides
  1375. 49:27to either allow it through, drop it
  1376. 49:29silently, or reject it and report that
  1377. 49:31it was blocked. Is hacking really this
  1378. 49:33easy? Well, it could be. In this case,
  1379. 49:35the machine is a deliberately vulnerable
  1380. 49:37system, which makes this process
  1381. 49:39extremely easy. Modern systems use an
  1382. 49:41entire myriad of mitigations like
  1383. 49:44address space randomization,
  1384. 49:45non-executable memory, stack
  1385. 49:47protections, and more strictly hardened
  1386. 49:49services. However, the core concept is
  1387. 49:51the same for real hardened systems. It's
  1388. 49:53just drastically more complex and
  1389. 49:56requires more work. At this point, I had
  1390. 49:58a shell, but running commands like ID
  1391. 50:00and who am I, I was still not root. Even
  1392. 50:03without root access, a reverse shell is
  1393. 50:05still a huge vulnerability, but I wanted
  1394. 50:07root access, so I'm going to go get it.
  1395. 50:09Through researching the specific kernel
  1396. 50:11version using uname -a, I saw the kernel
  1397. 50:13version and through researching exploits
  1398. 50:15on that kernel version, I found that an
  1399. 50:17exploit existed that would let me
  1400. 50:18escalate my privileges to root. I
  1401. 50:20compiled the exploit I found from
  1402. 50:22searchsploit and just simply ran it and
  1403. 50:24I had root access within a couple
  1404. 50:25seconds. I'm not going to go too deep
  1405. 50:27into it as it's not really networking
  1406. 50:29related in this video. It's about
  1407. 50:30networking and I kind of just got
  1408. 50:32sidetracked here. But for those of you
  1409. 50:33that are curious, the exploit used a
  1410. 50:35race condition that exploited a specific
  1411. 50:38kernel version's module loading process
  1412. 50:40to manipulate the timing to access a
  1413. 50:42privileged process during that unsafe
  1414. 50:44window. And like I said earlier, all of
  1415. 50:46this ties back into networking
  1416. 50:47fundamentals. The subnet told us where
  1417. 50:50machines could exist, host discovery
  1418. 50:51discovered the IP, a port scan
  1419. 50:53identified reachable entry points,
  1420. 50:55version detection identified the program
  1421. 50:57and version beyond those ports. TCP
  1422. 50:59carried the exploit and returned the
  1423. 51:01initial shell, which allowed us to
  1424. 51:03execute commands on the target machine
  1425. 51:05and gain root access. Literally
  1426. 51:07everything ties back into networking, so
  1427. 51:09you should really learn it. For the blue
  1428. 51:11teamers out there, how do we prevent
  1429. 51:13this from happening [music] to our
  1430. 51:14systems? Well, simply updating all of
  1431. 51:16the services to the latest versions
  1432. 51:18would have made this exploit impossible,
  1433. 51:20and updating the Linux kernel on the
  1434. 51:21actual machine would have prevented
  1435. 51:23privilege escalation. Other mitigations
  1436. 51:25could have been closing port 443 if it
  1437. 51:27isn't necessary, restricting which
  1438. 51:29networks can reach those services
  1439. 51:31depending on their purpose for existing,
  1440. 51:33keeping the services under low privilege
  1441. 51:34accounts in better isolation with the
  1442. 51:36usage of compartmentalization, and
  1443. 51:38setting up some sort of firewall that
  1444. 51:40restricts traffic. There is other
  1445. 51:41things, but those are some basics I can
  1446. 51:43think of on the top of my head.
  1447. 51:45>> [sighs]
  1448. 51:45>> All right, let's move on to cracking
  1449. 51:47Wi-Fi passwords.
  1450. 51:53>> [groaning]
  1451. 51:53>> Okay, first things first. Only do this
  1452. 51:55on networks you either own or have
  1453. 51:57explicit permission to do this on. Wink,
  1454. 52:00wink. There are multiple security
  1455. 52:02generations when it comes to this stuff.
  1456. 52:03WEP is completely broken, and if you see
  1457. 52:05any network with that is under WEP, you
  1458. 52:08can get in pretty much guaranteed. It
  1459. 52:10repeatedly encrypts traffic using a
  1460. 52:11static shared key combined with small
  1461. 52:13initialization vectors that repeat
  1462. 52:15themselves, which allows statistical
  1463. 52:16attacks to recover the key. Even with
  1464. 52:19the world's strongest passwords with
  1465. 52:20[ __ ] 7 trillion entropy, that won't
  1466. 52:23prevent a WEP network from being
  1467. 52:25compromised. WPA is completely obsolete,
  1468. 52:28and cracking them is easy. It was
  1469. 52:29designed as an emergency replacement
  1470. 52:31that could run on older hardware, and it
  1471. 52:33introduced the modern four-way handshake
  1472. 52:35we see with WPA2, but its encryption is
  1473. 52:38obsolete and pretty easy to crack. The
  1474. 52:40two main types that you see nowadays are
  1475. 52:42WPA2 and WPA3. WPA2 is still used today,
  1476. 52:46and it's relatively secure as long as
  1477. 52:48you have a strong password for your
  1478. 52:49network that is like at least 12
  1479. 52:52characters. The encryption is still
  1480. 52:54relatively good by today's standards,
  1481. 52:56and the main fault with WPA2 networks
  1482. 52:58being cracked is because of human error
  1483. 53:00via weak passwords. WPA2 typically uses
  1484. 53:03AES-CCMP
  1485. 53:05and a four-way handshake that is easy to
  1486. 53:07interpret. WPA3 is the current gold
  1487. 53:10standard and is designed to resist
  1488. 53:12handshake captures. WPA3 replaces WPA2's
  1489. 53:15password derived shared key
  1490. 53:17authentication with SAE followed by a
  1491. 53:19four-way key installation handshake.
  1492. 53:21Okay Zima, you keep drawing around these
  1493. 53:23terms like I'm supposed to understand
  1494. 53:25them. What is a four-way handshake? A
  1495. 53:27four-way handshake is a short
  1496. 53:28conversation between the client and
  1497. 53:30access point to prove that they possess
  1498. 53:32the same secret that creates fresh
  1499. 53:34encryption keys without transmitting the
  1500. 53:35Wi-Fi password itself. Basically, you
  1501. 53:37can think of the Wi-Fi network as a frat
  1502. 53:39bro standing in front of the door to a
  1503. 53:41party. First, a phone or other similar
  1504. 53:44client device walks up to the Wi-Fi and
  1505. 53:46is like, "Yo, could I uh could I come
  1506. 53:48in?" Then the Wi-Fi is like, "I don't
  1507. 53:50know, man. You got any [ __ ] grass,
  1508. 53:52or cash?" Then the phone is like, "Nah,
  1509. 53:54sorry." So then the Wi-Fi says, "All
  1510. 53:57right, you can get in if you solve this
  1511. 53:59challenge to prove you're worthy." The
  1512. 54:01phone that did its research before
  1513. 54:03approaching the frat bro then goes like,
  1514. 54:04"All right, I'll just use my cheat
  1515. 54:06sheet, aka the Wi-Fi password, to solve
  1516. 54:09this challenge." Then after solving the
  1517. 54:11challenge, the network goes like, "Damn,
  1518. 54:12you really know ball, bro. Come come on
  1519. 54:15in." And then the router gives the phone
  1520. 54:17a beer. In this case, the beer is the
  1521. 54:19necessary information to create
  1522. 54:21encryption keys and the phone takes that
  1523. 54:23and enjoys a party. Now you can picture
  1524. 54:25yourself being the little attacker you
  1525. 54:27are who captures a handshake as the
  1526. 54:29weirdo with meta glasses who records the
  1527. 54:31entire conversation that the phone
  1528. 54:33[music] and frat bro just had. You
  1529. 54:35basically record the challenge being
  1530. 54:37given to the phone [music]
  1531. 54:38and you take it home and try to make
  1532. 54:40thousands of different cheat sheets, aka
  1533. 54:42passwords, that would solve that
  1534. 54:43challenge. If you successfully get the
  1535. 54:45password, you go back to the frat bro
  1536. 54:47and get entry to the party. To capture a
  1537. 54:49handshake, you need a Wi-Fi adapter
  1538. 54:51capable of packet injection/monitor
  1539. 54:54mode. Then a network which you own or
  1540. 54:56have permission to do this on. In this
  1541. 54:58case, I just created the basic little
  1542. 55:00WPA2 network using airmon-ng, you start
  1543. 55:03your network card which puts it into
  1544. 55:05monitor mode, then you run airodump.ng
  1545. 55:08on that network card, and after that
  1546. 55:10it'll scan all the nearby networks,
  1547. 55:12listed types, BSSIDs, and all this other
  1548. 55:14[ __ ] And then you run airodump.ng with
  1549. 55:17the BSSID on channel 6, and write the
  1550. 55:20results to a capture file with that
  1551. 55:21network adapter. From here, you either
  1552. 55:23just wait for somebody to connect to the
  1553. 55:25network, which will initiate a four-way
  1554. 55:26handshake that you can capture, or you
  1555. 55:28can deauthenticate a client with
  1556. 55:30airplay-ng, which will force a client to
  1557. 55:32disconnect, and nine times out of 10,
  1558. 55:34it'll automatically reconnect to the
  1559. 55:36network pretty much immediately, [music]
  1560. 55:38which allows you to capture the
  1561. 55:39handshake. Then you can now crack the
  1562. 55:41password with your preferred cracking
  1563. 55:42method. Here's a simple dictionary
  1564. 55:44attack using the rockyou wordlist. There
  1565. 55:46are also wordlists that are specifically
  1566. 55:48designed to target default Wi-Fi
  1567. 55:49credentials. I'm just using rockyou for
  1568. 55:51demonstration purposes. You can also try
  1569. 55:54a brute force, but I recommend
  1570. 55:55converting it into a hash that hashcat
  1571. 55:57can crack, since hashcat allows GPU
  1572. 55:59acceleration, so the actual cracking
  1573. 56:02will be significantly faster. However,
  1574. 56:04even with this weak 14-character
  1575. 56:05password, the potential guesses were
  1576. 56:07this absurd number. So, I supplied 10 of
  1577. 56:10the characters just for demonstration
  1578. 56:11purposes. We now have the password and
  1579. 56:13can connect to the network. You might
  1580. 56:15have some questions, like what is
  1581. 56:17actually inside a handshake, and how is
  1582. 56:19a password able to crack it? The
  1583. 56:20password is never actually transmitted
  1584. 56:22through the air. The handshake contains
  1585. 56:24the access point and client MAC address,
  1586. 56:26a random value from the access point
  1587. 56:28called the A nonce, a random value from
  1588. 56:30the client called the S nonce, EAPOL
  1589. 56:32handshake data, and message integrity
  1590. 56:35code. Both the access point and the
  1591. 56:37client use the same Wi-Fi password,
  1592. 56:39SSID, nonces, and addresses to derive
  1593. 56:42the same session keys, and the message
  1594. 56:44integrity code proves that the client
  1595. 56:45derived the correct key without
  1596. 56:47revealing the actual password. When you
  1597. 56:49capture a handshake, you can perform all
  1598. 56:51of those calculations completely offline
  1599. 56:53and compare the message integrity code
  1600. 56:55you generate with the captured message
  1601. 56:57integrity code. When both integrity
  1602. 56:59codes match, that confirms that the
  1603. 57:00correct password was guessed. Now, how
  1604. 57:02do we defend against this? Simply using
  1605. 57:04a strong password that is a minimum of
  1606. 57:0612 characters and doesn't exist on any
  1607. 57:08wordlist floating around on the internet
  1608. 57:09is a good first step. Also, using WPA3
  1609. 57:12over WPA2 is also a good countermeasure
  1610. 57:15if you're not competent enough to come
  1611. 57:16up with a strong password. In the
  1612. 57:18description, I'll leave a link to some
  1613. 57:20handshakes that are already captured
  1614. 57:21with weak passwords that you can just
  1615. 57:23crack to learn the various Wi-Fi
  1616. 57:25cracking techniques. Okay, next is a
  1617. 57:28man-in-the-middle.
  1618. 57:29>> [music]
  1619. 57:34>> Once again, to preface this, I just
  1620. 57:35wanted to say that everything in this
  1621. 57:37demonstration runs completely on one
  1622. 57:39computer that I own and have permission
  1623. 57:41[music] to experiment on. There is no
  1624. 57:42real third-party Wi-Fi network, account,
  1625. 57:44or credentials being attacked. Only
  1626. 57:46perform security testing on systems that
  1627. 57:48you own or have explicit permission to
  1628. 57:49test on. Okay, let's go. First, I built
  1629. 57:51a little isolated network and verified
  1630. 57:53connectivity within the three virtual
  1631. 57:55machines that I made. I established HTTP
  1632. 57:58traffic on the gateway VM and requested
  1633. 58:00a page as the victim machine. You can
  1634. 58:02see here a message received by the
  1635. 58:03server from the victim. Then, I started
  1636. 58:05observing HTTP traffic as the attacker
  1637. 58:08VM. After that, I poisoned both ARP
  1638. 58:10caches that basically tells the victim
  1639. 58:12that the gateway's IP belongs to the
  1640. 58:13attacker's MAC address. I did the same
  1641. 58:15for the gateway by telling it that the
  1642. 58:17victim's IP belongs to the attacker's
  1643. 58:18MAC. So, now both the gateway and the
  1644. 58:20victim believe that the corresponding IP
  1645. 58:22they have to reach belongs to the MAC
  1646. 58:24address of the attacker. This is
  1647. 58:26confirmation that both the gateway and
  1648. 58:28victim associate each other's IPs with
  1649. 58:29the attacker's MAC address. Now, if some
  1650. 58:31sort of password or login is transmitted
  1651. 58:33between these, the attacker would be
  1652. 58:35able to see that in Wireshark in plain
  1653. 58:37text since ARP has no authentication.
  1654. 58:39The IPs remain unchanged, only the
  1655. 58:41Ethernet destination MAC address changes
  1656. 58:43for each local hop, and the switch sends
  1657. 58:45the frames to the attacker because the
  1658. 58:46machine's ARP caches were poisoned in a
  1659. 58:48way that directs that traffic to the
  1660. 58:51attacker's MAC address. Even once it
  1661. 58:52reaches the attacker machine, packet
  1662. 58:54forwarding relays them to the real
  1663. 58:56destination, so it's hard to detect
  1664. 58:57something like this happening. This
  1665. 58:59entire attack worked because the
  1666. 59:00attacker basically lied about who owned
  1667. 59:03the IP address at the Ethernet layer.
  1668. 59:05The attack isn't that good since it can
  1669. 59:07be easily mitigated with something like
  1670. 59:09HTTPS, and the attacker [music] would
  1671. 59:11have to decrypt something using a like a
  1672. 59:13TLS certificate or some sort of endpoint
  1673. 59:15compromise of some kind. To mitigate
  1674. 59:17this, you can either use HTTPS or
  1675. 59:19dynamic ARP inspection with DHCP
  1676. 59:21snooping on any switches on your
  1677. 59:23network. Anyways, that was like an
  1678. 59:24extremely simplified demonstration of
  1679. 59:26ARP poisoning. Let's move on to the last
  1680. 59:28basic networking attack, an evil twin.
  1681. 59:31>> [music]
  1682. 59:36>> I'm going to keep this one extremely
  1683. 59:37brief because the last time I did
  1684. 59:39anything with any sort of login panel
  1685. 59:41involved, YouTube uh didn't like it very
  1686. 59:44much. An evil twin is exactly what it
  1687. 59:46sounds like. You take an existing Wi-Fi
  1688. 59:48network and set up an identical clone
  1689. 59:50with the exact same SSID, channel, and
  1690. 59:53security configuration. The only
  1691. 59:55difference is typically the BSSID, but
  1692. 59:57it is possible to spoof the BSSID to
  1693. 59:59match the actual network as well.
  1694. 1:00:01Typically, with evil twin attacks, the
  1695. 1:00:02most common demonstration I see on
  1696. 1:00:04YouTube is a network with the same name,
  1697. 1:00:06but it appears as two completely
  1698. 1:00:08different networks when you're looking
  1699. 1:00:09to connect to it. That's some basic
  1700. 1:00:11slop. It is possible to set up the twin
  1701. 1:00:13in such a way that it is so similar to
  1702. 1:00:16the original network that they literally
  1703. 1:00:18show up as the same network if you're
  1704. 1:00:20looking for Wi-Fi. Typically, this is
  1705. 1:00:21done, and then the target is sent
  1706. 1:00:23deauthentication packets from the real
  1707. 1:00:25network, and then their device
  1708. 1:00:26automatically reconnects to the evil
  1709. 1:00:28twin, and at that point they're pretty
  1710. 1:00:29much cooked, and you can set it up so
  1711. 1:00:31that they're sent to a login panel.
  1712. 1:00:33monitor the traffic, poison the ARP,
  1713. 1:00:35whatever. Just get creative. I'm not
  1714. 1:00:36going to show you explicit ways to
  1715. 1:00:38exploit this attack. I just wanted to
  1716. 1:00:40demonstrate how this attack works. The
  1717. 1:00:41easiest way to do an evil twin is with
  1718. 1:00:43an existing tool called Airgeddon, which
  1719. 1:00:45has multiple different types of
  1720. 1:00:47networking-based attacks from denial of
  1721. 1:00:49service, handshake capturing and
  1722. 1:00:50cracking, evil twin, and all of this
  1723. 1:00:52[ __ ] Another way is manually setting up
  1724. 1:00:54everything yourself without the usage of
  1725. 1:00:56a tool. With Airgeddon, it's comically
  1726. 1:00:58straightforward. You just click through
  1727. 1:00:59a couple prompts, and you're pretty much
  1728. 1:01:01done. For my demonstration, I just made
  1729. 1:01:03it go to this little webpage when I
  1730. 1:01:04connected to the evil twin and to
  1731. 1:01:06YouTube. This was all done on my own
  1732. 1:01:08network and hardware, and I had
  1733. 1:01:09permission to do this. To defend [music]
  1734. 1:01:11from this, never enter passwords into a
  1735. 1:01:13webpage that appeared right after you
  1736. 1:01:15connected to a network unless you
  1737. 1:01:16manually audited the fact that it's real
  1738. 1:01:19and a real legitimate reason exists for
  1739. 1:01:21needing that password. Pay attention to
  1740. 1:01:23certificate warnings, disable automatic
  1741. 1:01:25connections, and just just use common
  1742. 1:01:27sense. Okay, that's it. Now spread your
  1743. 1:01:30wings and fly, dear viewer. You should
  1744. 1:01:32now know enough about networking to do
  1745. 1:01:34most things that you want to do like
  1746. 1:01:37self-hosting, home labbing, messing
  1747. 1:01:39around with cybersecurity stuff. The
  1748. 1:01:40possibilities are endless and it's up to
  1749. 1:01:43you what you want to do. [music] I
  1750. 1:01:44really recommend self-hosting stuff
  1751. 1:01:46since that'll force you to learn more
  1752. 1:01:48and you get something valuable out of
  1753. 1:01:49it. If you want to learn more, give
  1754. 1:01:51yourself a goal, throw yourself into it
  1755. 1:01:52without any preparation, and get stuck.
  1756. 1:01:55Pay attention to exactly how you got
  1757. 1:01:56stuck, break things, fix them, and
  1758. 1:01:58explain what happened and why it
  1759. 1:02:00happened in your notes. And I promise
  1760. 1:02:02that you'll learn significantly more
  1761. 1:02:03than you would in any textbook or
  1762. 1:02:05classroom or YouTube course. [music]
  1763. 1:02:06I assembled this 10-day little road map
  1764. 1:02:09for those of you who need direction. Day
  1765. 1:02:11one, just focus on finding your
  1766. 1:02:13interface, MAC address, IP, prefix,
  1767. 1:02:15gateway, and DNS server, and define them
  1768. 1:02:17in your own words in your in your own
  1769. 1:02:19notes. Day two, observe ARP and perform
  1770. 1:02:22a basic ping and just play around with
  1771. 1:02:23stuff. Day three, solve at least one of
  1772. 1:02:25the challenges on Packet Tracer that are
  1773. 1:02:27linked in the description and take notes
  1774. 1:02:29on things that you learn. Day four,
  1775. 1:02:30[music]
  1776. 1:02:31install Wireshark and play around with
  1777. 1:02:32it. Download some Wireshark captures
  1778. 1:02:34online that are centered on achieving a
  1779. 1:02:36task and achieve that task. Day five,
  1780. 1:02:38run traceroute and try to explain each
  1781. 1:02:40hop, then capture a TCP handshake from
  1782. 1:02:42your own WPA2 network that you set up
  1783. 1:02:45and try to crack it. Day six, host a
  1784. 1:02:47basic webpage locally. Day seven, try
  1785. 1:02:50hosting a metasearch engine like SearXNG
  1786. 1:02:52or Forget. Day eight, set up a
  1787. 1:02:54man-in-the-middle or evil twin lab and
  1788. 1:02:56try it out. Day nine, scan services on a
  1789. 1:02:58vulnerable box like Kioptrix and try to
  1790. 1:03:01find an exploit a vulnerability through
  1791. 1:03:02looking up the service version numbers
  1792. 1:03:04and whether they are vulnerable or not.
  1793. 1:03:05Day 10, reflect on all your notes and be
  1794. 1:03:08happy that you learned so much and came
  1795. 1:03:09so far while having so much fun and it
  1796. 1:03:11was all in 10 days. At the beginning of
  1797. 1:03:13the video, I threw you into [music]
  1798. 1:03:15Packet Tracer and told you to make two
  1799. 1:03:16computers communicate across separate
  1800. 1:03:18networks. At the time, depending on your
  1801. 1:03:20knowledge, you might have had no idea
  1802. 1:03:21what the hell's going on or even which
  1803. 1:03:23cables to even use or how anything
  1804. 1:03:25works. Look how far you've come. You
  1805. 1:03:27should be proud of yourself. Learning
  1806. 1:03:29can be fun and it's up to you to get
  1807. 1:03:31yourself far in whatever you want to
  1808. 1:03:32learn. Don't rely on pre-existing
  1809. 1:03:34courses and classroom lectures to learn
  1810. 1:03:36something. Just explore, experiment,
  1811. 1:03:38break things, fix them, and improvise,
  1812. 1:03:40and most importantly, have fun [music]
  1813. 1:03:43and never stop learning. There's going
  1814. 1:03:45to be some resources in the in the
  1815. 1:03:47description for those of you who want to
  1816. 1:03:48keep skill maxing. Just know that I
  1817. 1:03:50believe in all your individual
  1818. 1:03:52potentials to become [music] something
  1819. 1:03:53great. Thank you for watching everybody.
  1820. 1:03:55It's time for the channel membership
  1821. 1:03:57battle. I'm currently mid rabbit hole
  1822. 1:03:59investigation on some privacy stuff
  1823. 1:04:01regarding the medical industry. I found
  1824. 1:04:03some interesting things. It's too early
  1825. 1:04:05to like actually say anything
  1826. 1:04:06definitive, but depending on how it
  1827. 1:04:08goes, it might be a crazy video. I also
  1828. 1:04:10wanted to thank you for 100,000
  1829. 1:04:12subscribers. I truly never saw the day
  1830. 1:04:15that something like like this can happen
  1831. 1:04:17to an idiot like me. But here we are. I
  1832. 1:04:19guess I chose the right dialogue options
  1833. 1:04:21and got the good ending. If you want to
  1834. 1:04:22support the channel, buy the merch,
  1835. 1:04:24become a channel member to join in on
  1836. 1:04:26these battles, and visit the description
  1837. 1:04:28to see other ways to support. If you
  1838. 1:04:30don't want to spend any money, your view
  1839. 1:04:33and the fact that you learned something
  1840. 1:04:34is more [music] than enough for me.
  1841. 1:04:36Thank you all for getting me this far.
  1842. 1:04:38Congratulations to this guy on screen
  1843. 1:04:40for for winning. I'm not relaxing
  1844. 1:04:42running the attack yet. I'm I'm just I'm
  1845. 1:04:45going to do it [music] during editing.
  1846. 1:04:46Shout out to whoever's name is listed on
  1847. 1:04:48screen. If you want to fight amongst our
  1848. 1:04:50members, you know what to do. That's
  1849. 1:04:52pretty much Let's go back to the
  1850. 1:04:55original outro for hitting [music] 100K.
  1851. 1:04:57So until then, I'll see you.
  1852. 1:05:00Thank you.
  1853. 1:05:01>> I'll be waiting for
  1854. 1:05:03>> [music]
  1855. 1:05:03>> the sunrise
  1856. 1:05:07in the desert
  1857. 1:05:08>> [music]
  1858. 1:05:09>> of my heart.
  1859. 1:05:10But still
  1860. 1:05:11the desert
  1861. 1:05:12come alive.
  1862. 1:05:14My
  1863. 1:05:15soul was [music] run dry.
  1864. 1:05:20Sun wish for happiness. [music]

About this transcript

This page contains the full transcript of POV: You Learn Networking For Fun by dzuma, generated from the public captions YouTube serves with the video. The transcript has 12,213 words across 1,864 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.