YouTube2Text

Tu tapes la bonne adresse et arrives sur un faux site — Transcript

by Techno · 2,193 words · 346 segments · language en · Watch on YouTube

Full transcript

  1. 0:00You can type the right address into
  2. 0:02your web browser and still end up in
  3. 0:03the wrong place. It's not because you
  4. 0:06made a mistake or because the site was
  5. 0:09hacked, but because your computer can
  6. 0:11sometimes trust a bad DNS response. How
  7. 0:14is that possible? Why would your
  8. 0:17computer trust a bad response? In this
  9. 0:20video, you will understand what allows
  10. 0:23this attack to exist, why it can affect
  11. 0:25far more than one user, and how DNS has
  12. 0:27evolved to resist it. The problem is
  13. 0:34that this situation is not a bug in
  14. 0:36your browser. It is not a typo either.
  15. 0:39In reality, it relies on a weakness
  16. 0:41that has long existed in how DNS works.
  17. 0:44A weakness that can allow an attacker
  18. 0:47to make a resolver accept and store bad
  19. 0:50DNS information. This is what is known
  20. 0:53as DNS cache poisoning. But to
  21. 0:55understand how this attack is possible,
  22. 0:57we must first understand what happens
  23. 0:59normally when a computer simply looks
  24. 1:01for the IP of a domain name. Because
  25. 1:04before seeing how an attacker can
  26. 1:06deceive a DNS resolver, we must
  27. 1:07understand why that resolver might
  28. 1:09trust a response. Let’s start by
  29. 1:12following the path of a DNS query. When
  30. 1:19you type youtube.com in your browser,
  31. 1:21your computer must first find the IP
  32. 1:23address of the server to contact. To do
  33. 1:25this, it usually asks for this
  34. 1:27information from a DNS resolver, a
  35. 1:29server tasked with finding the answer
  36. 1:31on its behalf. If it doesn't already
  37. 1:34know the answer, the resolver will
  38. 1:36search for it by querying different DNS
  39. 1:38servers. It can, for example, go
  40. 1:42through the root servers, those
  41. 1:44responsible for the .fr domains, up to
  42. 1:46the authoritative DNS server that has
  43. 1:48the requested information. Once the IP
  44. 1:52address is obtained, the resolver sends
  45. 1:54it back to your computer, and it is
  46. 1:55ultimately this address that lets your
  47. 1:57computer know where to connect. Redoing
  48. 2:04all these searches every time would be
  49. 2:06unnecessarily slow. That is why the
  50. 2:09resolver temporarily stores some
  51. 2:11answers it gets in what is called its
  52. 2:13DNS cache. If another user then asks
  53. 2:17for youtube.com, the resolver can
  54. 2:19provide them directly with the IP
  55. 2:21address it already has without
  56. 2:23restarting the whole search. It's
  57. 2:26faster and avoids unnecessarily
  58. 2:28straining the DNS infrastructure. But
  59. 2:32this also means something important for
  60. 2:34what follows. Information stored by the
  61. 2:38resolver can be reused to answer
  62. 2:40multiple users. And now, we arrive at
  63. 2:47the essential question. The resolver
  64. 2:49just requested the IP address for
  65. 2:51youtube.com. A few milliseconds later,
  66. 2:53a response arrives. But how can it know
  67. 2:56that it actually corresponds to the
  68. 2:57request it just sent? The resolver
  69. 3:00cannot just accept any response. Before
  70. 3:03processing it, it checks that it
  71. 3:05corresponds to a request that is still
  72. 3:07pending. To do this, it compares
  73. 3:08several pieces of information. It
  74. 3:10specifically verifies the requested
  75. 3:12domain name and the type of information
  76. 3:14sought. For example, an IPv4 address.
  77. 3:16It also verifies an identifier called
  78. 3:19the transaction ID. This identifier is
  79. 3:22chosen when the request is sent and
  80. 3:24then copied into the response to
  81. 3:25associate both messages with the same
  82. 3:28transaction. But that is not the only
  83. 3:30element checked. Modern resolvers also
  84. 3:32verify other parameters, notably the IP
  85. 3:35address of the queried server, the UDP
  86. 3:38ports used, and the request class. Only
  87. 3:40when these various elements match can
  88. 3:43the response be considered acceptable.
  89. 3:45In other words, the resolver does not
  90. 3:48simply accept the first response it
  91. 3:50receives. It can process the first
  92. 3:52response that matches the pending
  93. 3:54request and meets its validation rules.
  94. 3:57And this is precisely where things can
  95. 3:59go wrong. You now understand how the
  96. 4:05resolver decides that a response is
  97. 4:07acceptable. Let's see now how this
  98. 4:09mechanism can be hijacked. Imagine an
  99. 4:11attacker knows that a resolver has just
  100. 4:13sent a DNS request. Their goal is not
  101. 4:16to hack the DNS server. They are simply
  102. 4:19trying to get a forged DNS response
  103. 4:21accepted before the transaction is
  104. 4:23finished. To do this, they craft a
  105. 4:25response that must look as much as
  106. 4:27possible like the one the resolver
  107. 4:29expects. It must contain the correct
  108. 4:31domain name, the correct request type,
  109. 4:33the correct transaction ID, the correct
  110. 4:35UDP ports, and more generally match the
  111. 4:37various parameters that the resolver
  112. 4:38verifies before accepting a response.
  113. 4:41If this response is deemed acceptable
  114. 4:43before the legitimate response is
  115. 4:45processed, the resolver may use it. But
  116. 4:47for the attacker, successfully getting
  117. 4:49this fake response accepted is only a
  118. 4:51first step. The attacker is therefore
  119. 4:53not trying to convince the resolver
  120. 4:55that they are the genuine DNS server.
  121. 4:58They are simply trying to get it to
  122. 5:00accept a response that appears to
  123. 5:01correspond exactly to the current
  124. 5:03request. But at this stage, only one
  125. 5:05response has been falsified. The real
  126. 5:08problem begins when this false
  127. 5:10information is kept in the resolver's
  128. 5:12cache. For security reasons, I will not
  129. 5:19show you the commands used by the
  130. 5:21hacker to launch the attack. However, I
  131. 5:23do talk about it in my cybersecurity
  132. 5:25bootcamp. So if you want to see how to
  133. 5:28install and configure all the machines
  134. 5:30on this diagram, the link to the
  135. 5:31cybersecurity bootcamp is in the
  136. 5:33description or in the comment section
  137. 5:35below. Here is the environment I have
  138. 5:38set up for DNS cache poisoning. First
  139. 5:42step, the client opens their browser
  140. 5:44and enters www.cyber-demo.test. We
  141. 5:48assume that it does not know the IP
  142. 5:50address associated with this domain. So
  143. 5:52, the PC will request this information
  144. 5:54from the DNS resolver, which is
  145. 5:57172.16.10.9. The DNS resolver does not
  146. 6:00have the information. It will ask the
  147. 6:02authoritative DNS server 172.16.10.6,
  148. 6:04which will respond with the correct
  149. 6:06information. Then, in parallel, the
  150. 6:09attacker sends erroneous information to
  151. 6:13the DNS resolver, causing a DNS cache
  152. 6:16update on the DNS resolver. So, there
  153. 6:19will be in this cache. -demo.test
  154. 6:21172.16.10.8 which is the IP address
  155. 6:26announced by the attacker. Then the DNS
  156. 6:29resolver will tell the PC that
  157. 6:32www.cyber-demo.test is reachable via
  158. 6:35172.16.10. 10.8. So it will be the same
  159. 6:40for PC1 and PC2. Thus, all PCs that use
  160. 6:43this DNS resolver will be able to
  161. 6:45connect to www.cyber-demo.test via the
  162. 6:48IP address 172.16.10.8. So, this is the
  163. 6:53attack diagram. In the first part of
  164. 6:56the attack, the attacker's machine
  165. 6:58constantly sends a message to the DNS
  166. 7:00resolver. So here is the MAC address
  167. 7:02here. The message being sent constantly
  168. 7:04. So you can see it here. So we have
  169. 7:07several messages that repeat. So the
  170. 7:10attacker's machine announces to the DNS
  171. 7:13resolver machine that 172.16.10.6 is on
  172. 7:15the attacker's machine. So this is the
  173. 7:19MAC address associated with the
  174. 7:20attacker's machine. It will announce
  175. 7:22this information in a loop so that this
  176. 7:24information is recorded by this machine
  177. 7:26, the DNS resolver. This is the first
  178. 7:28part of the attack. Quick reminder, the
  179. 7:30real machine 172.16.10.6 6 has this MAC
  180. 7:34address. So you can see that it is
  181. 7:36different from what we had in the
  182. 7:38previous capture. So all this means
  183. 7:40that the attacker's machine succeeds in
  184. 7:43announcing false information to the
  185. 7:45victim's machine, which is the DNS
  186. 7:47resolver. Now, we are connected to a
  187. 7:50machine that uses the DNS resolver as
  188. 7:53its DNS server. So as a reminder,
  189. 7:56172.16.10.9 is our DNS resolver. This
  190. 8:00DNS resolver receives information that
  191. 8:02is false from the attacker. So the
  192. 8:05attacker has successfully announced
  193. 8:07false information for the domain
  194. 8:09www.cyber-demo.test to the 172.16.10.9
  195. 8:11machine. So here, we will attempt a
  196. 8:15resolution to find the IP address
  197. 8:17associated with this domain. Since the
  198. 8:20attacker is announcing false
  199. 8:21information to the DNS resolver used by
  200. 8:23this machine. When I run the command,
  201. 8:26normally I should get 172.16.10. 10.8,
  202. 8:29which is the IP address announced by
  203. 8:31the attacker. So here is the result of
  204. 8:34the nslookup command. You can see that
  205. 8:36the domain www.cyber-demo.test is
  206. 8:38associated with this IP address. Then,
  207. 8:41I will go to a web browser to try to
  208. 8:44access this website. So here is the
  209. 8:46result. When I go to
  210. 8:47www.cyber-demo.test. I am being
  211. 8:50redirected to the hacker's machine. So
  212. 8:53I added this information to show you
  213. 8:55that we reach the site. I switch to the
  214. 8:58DNS resolver 172.16.10.9. I connect to
  215. 9:02this machine to show you its DNS cache
  216. 9:05and prove that it has been poisoned.
  217. 9:08The cache was modified by the hacker.
  218. 9:11So with the false information the
  219. 9:14hacker announced to this machine, we
  220. 9:16can see that I exported the resolver's
  221. 9:19DNS cache and I am searching for info
  222. 9:22on www.cyber-demo.test. You can see
  223. 9:27that on this DNS resolver, it recorded
  224. 9:30that the domain www.cyber-demo.test is
  225. 9:33associated with the IP address
  226. 9:36172.16.10.8, which is actually the
  227. 9:38hacker's IP. So you can see that the
  228. 9:42hacker successfully modified the server
  229. 9:44cache of this DNS resolver. Now, if I
  230. 9:48stop the attack on the hacker's machine
  231. 9:50—for security reasons, I can't show
  232. 9:52you the command—let's assume I stop
  233. 9:54the attack. Next, I go to the DNS
  234. 9:58resolver, 172.16.10.9, and I will clear
  235. 10:02its cache. There we go. The next step
  236. 10:05is to also go to the client machine
  237. 10:08that uses the IP address 172.16.10.9 as
  238. 10:13its DNS server. To summarize, this
  239. 10:16machine—as a reminder—uses the DNS
  240. 10:18resolver that was infected. So we have
  241. 10:22stopped the attack, cleared the DNS
  242. 10:25resolver's cache, and now I go to
  243. 10:27machine 172.16.10.7 to clear the cache
  244. 10:30on this machine as well. To clear the
  245. 10:33cache on this machine, you must use the
  246. 10:35command ipconfig/flushdns. There we go.
  247. 10:38And I will perform a DNS resolution
  248. 10:41again for www.cyber-demo.test. There,
  249. 10:45I'm running the command. You can see
  250. 10:49that the IP address is now 172.16.10.6,
  251. 10:52which is the real server. It is no
  252. 10:56longer 10.8 as it was before. And when
  253. 10:58I use the web browser and go to
  254. 11:00www.cyber-demo.test, cyber-demo.test.
  255. 11:03This time, I am redirected to the
  256. 11:06legitimate server. What you just saw
  257. 11:09helps explain the principle of DNS
  258. 11:11cache poisoning, but that doesn't mean
  259. 11:13it's currently that easy to poison the
  260. 11:15cache of a modern resolver. Current
  261. 11:18protections make this type of attack
  262. 11:20much more difficult, and some go even
  263. 11:22further by allowing verification of the
  264. 11:25authenticity of the DNS data itself. Up
  265. 11:31to now, we have seen how incorrect DNS
  266. 11:33information can be accepted by a
  267. 11:35resolver and lead your computer to the
  268. 11:37wrong destination. But how can we avoid
  269. 11:39this? This is precisely one of the
  270. 11:41problems that DNSSEC seeks to address.
  271. 11:44Its goal is to allow the resolver to
  272. 11:46cryptographically verify the
  273. 11:47authenticity and integrity of the DNS
  274. 11:49data it receives. To understand the
  275. 11:51idea, let's imagine you are requesting
  276. 11:53the IP address for example.fr. If this
  277. 11:55zone uses DNSSEC, certain DNS
  278. 11:57information is accompanied by a digital
  279. 12:00signature. The resolver performing
  280. 12:02DNSSEC validation can then verify this
  281. 12:05signature. To do this, DNSSEC uses
  282. 12:08several record types, such as DNSKEY,
  283. 12:10which contains a public key, and RRSIG,
  284. 12:12which contains a signature associated
  285. 12:14with DNS data. And thanks to a chain of
  286. 12:18trust, the resolver can gradually trace
  287. 12:20back to a source it considers reliable.
  288. 12:23If the checks succeed, the data can be
  289. 12:25considered authentic. But if an
  290. 12:27attacker modifies the IP address in a
  291. 12:29DNS response, they normally cannot
  292. 12:31produce the corresponding valid
  293. 12:33signature without possessing the
  294. 12:35private key used by the zone. The
  295. 12:37tampering can therefore be detected and
  296. 12:39the response considered invalid. And
  297. 12:41this is where DNSSEC truly changes the
  298. 12:43rules of the game. We are no longer
  299. 12:45just trying to make a fake response
  300. 12:47difficult to get accepted. We are
  301. 12:50trying to verify that the DNS data
  302. 12:52received is authentic and has not been
  303. 12:54modified. But even if a bad DNS
  304. 12:56response still manages to direct your
  305. 12:58browser to an attacker's server,
  306. 13:00another protection can still come into
  307. 13:02play. HTTPS. For the connection to be
  308. 13:05considered legitimate, this server must
  309. 13:07, among other things, present a valid
  310. 13:10certificate for the site you actually
  311. 13:12wanted to visit. Without this
  312. 13:14certificate, your browser can detect
  313. 13:16the problem and display an alert or
  314. 13:18prevent a normal HTTPS connection.
  315. 13:21HTTPS does not fix the bad DNS response
  316. 13:24, but it constitutes an additional
  317. 13:26barrier that can prevent this bad
  318. 13:28redirection from going unnoticed. To
  319. 13:31summarize, DNSSEC acts directly on the
  320. 13:33authenticity of DNS data, and HTTPS can
  321. 13:36provide a second barrier at the time of
  322. 13:38connection to the server. You now
  323. 13:45understand how you can type the right
  324. 13:47address into your browser and still be
  325. 13:49directed to the wrong place. The
  326. 13:51problem does not necessarily come from
  327. 13:53what you typed into your browser. It
  328. 13:55can come from the DNS information used
  329. 13:58to determine where your computer should
  330. 14:00connect. If an attacker manages to get
  331. 14:03a falsified response accepted, this
  332. 14:05information can be used in place of the
  333. 14:07real response. And if it is then kept
  334. 14:09in a resolver's cache, it can
  335. 14:11potentially affect much more than a
  336. 14:13single request. Today, modern resolvers
  337. 14:16make this type of attack much more
  338. 14:18difficult, and mechanisms like DNSSEC
  339. 14:20allow us to go further by
  340. 14:22cryptographically verifying the
  341. 14:24authenticity of DNS data. But the
  342. 14:26essential lesson remains the same on
  343. 14:28the internet. Typing the right address
  344. 14:31does not, by itself, guarantee that the
  345. 14:33information used to find the
  346. 14:34destination is correct. What?

About this transcript

This page contains the full transcript of Tu tapes la bonne adresse et arrives sur un faux site by Techno, generated from the public captions YouTube serves with the video. The transcript has 2,193 words across 346 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.