Tu tapes la bonne adresse et arrives sur un faux site — Transcript
Full transcript
- 0:00You can type the right address into
- 0:02your web browser and still end up in
- 0:03the wrong place. It's not because you
- 0:06made a mistake or because the site was
- 0:09hacked, but because your computer can
- 0:11sometimes trust a bad DNS response. How
- 0:14is that possible? Why would your
- 0:17computer trust a bad response? In this
- 0:20video, you will understand what allows
- 0:23this attack to exist, why it can affect
- 0:25far more than one user, and how DNS has
- 0:27evolved to resist it. The problem is
- 0:34that this situation is not a bug in
- 0:36your browser. It is not a typo either.
- 0:39In reality, it relies on a weakness
- 0:41that has long existed in how DNS works.
- 0:44A weakness that can allow an attacker
- 0:47to make a resolver accept and store bad
- 0:50DNS information. This is what is known
- 0:53as DNS cache poisoning. But to
- 0:55understand how this attack is possible,
- 0:57we must first understand what happens
- 0:59normally when a computer simply looks
- 1:01for the IP of a domain name. Because
- 1:04before seeing how an attacker can
- 1:06deceive a DNS resolver, we must
- 1:07understand why that resolver might
- 1:09trust a response. Let’s start by
- 1:12following the path of a DNS query. When
- 1:19you type youtube.com in your browser,
- 1:21your computer must first find the IP
- 1:23address of the server to contact. To do
- 1:25this, it usually asks for this
- 1:27information from a DNS resolver, a
- 1:29server tasked with finding the answer
- 1:31on its behalf. If it doesn't already
- 1:34know the answer, the resolver will
- 1:36search for it by querying different DNS
- 1:38servers. It can, for example, go
- 1:42through the root servers, those
- 1:44responsible for the .fr domains, up to
- 1:46the authoritative DNS server that has
- 1:48the requested information. Once the IP
- 1:52address is obtained, the resolver sends
- 1:54it back to your computer, and it is
- 1:55ultimately this address that lets your
- 1:57computer know where to connect. Redoing
- 2:04all these searches every time would be
- 2:06unnecessarily slow. That is why the
- 2:09resolver temporarily stores some
- 2:11answers it gets in what is called its
- 2:13DNS cache. If another user then asks
- 2:17for youtube.com, the resolver can
- 2:19provide them directly with the IP
- 2:21address it already has without
- 2:23restarting the whole search. It's
- 2:26faster and avoids unnecessarily
- 2:28straining the DNS infrastructure. But
- 2:32this also means something important for
- 2:34what follows. Information stored by the
- 2:38resolver can be reused to answer
- 2:40multiple users. And now, we arrive at
- 2:47the essential question. The resolver
- 2:49just requested the IP address for
- 2:51youtube.com. A few milliseconds later,
- 2:53a response arrives. But how can it know
- 2:56that it actually corresponds to the
- 2:57request it just sent? The resolver
- 3:00cannot just accept any response. Before
- 3:03processing it, it checks that it
- 3:05corresponds to a request that is still
- 3:07pending. To do this, it compares
- 3:08several pieces of information. It
- 3:10specifically verifies the requested
- 3:12domain name and the type of information
- 3:14sought. For example, an IPv4 address.
- 3:16It also verifies an identifier called
- 3:19the transaction ID. This identifier is
- 3:22chosen when the request is sent and
- 3:24then copied into the response to
- 3:25associate both messages with the same
- 3:28transaction. But that is not the only
- 3:30element checked. Modern resolvers also
- 3:32verify other parameters, notably the IP
- 3:35address of the queried server, the UDP
- 3:38ports used, and the request class. Only
- 3:40when these various elements match can
- 3:43the response be considered acceptable.
- 3:45In other words, the resolver does not
- 3:48simply accept the first response it
- 3:50receives. It can process the first
- 3:52response that matches the pending
- 3:54request and meets its validation rules.
- 3:57And this is precisely where things can
- 3:59go wrong. You now understand how the
- 4:05resolver decides that a response is
- 4:07acceptable. Let's see now how this
- 4:09mechanism can be hijacked. Imagine an
- 4:11attacker knows that a resolver has just
- 4:13sent a DNS request. Their goal is not
- 4:16to hack the DNS server. They are simply
- 4:19trying to get a forged DNS response
- 4:21accepted before the transaction is
- 4:23finished. To do this, they craft a
- 4:25response that must look as much as
- 4:27possible like the one the resolver
- 4:29expects. It must contain the correct
- 4:31domain name, the correct request type,
- 4:33the correct transaction ID, the correct
- 4:35UDP ports, and more generally match the
- 4:37various parameters that the resolver
- 4:38verifies before accepting a response.
- 4:41If this response is deemed acceptable
- 4:43before the legitimate response is
- 4:45processed, the resolver may use it. But
- 4:47for the attacker, successfully getting
- 4:49this fake response accepted is only a
- 4:51first step. The attacker is therefore
- 4:53not trying to convince the resolver
- 4:55that they are the genuine DNS server.
- 4:58They are simply trying to get it to
- 5:00accept a response that appears to
- 5:01correspond exactly to the current
- 5:03request. But at this stage, only one
- 5:05response has been falsified. The real
- 5:08problem begins when this false
- 5:10information is kept in the resolver's
- 5:12cache. For security reasons, I will not
- 5:19show you the commands used by the
- 5:21hacker to launch the attack. However, I
- 5:23do talk about it in my cybersecurity
- 5:25bootcamp. So if you want to see how to
- 5:28install and configure all the machines
- 5:30on this diagram, the link to the
- 5:31cybersecurity bootcamp is in the
- 5:33description or in the comment section
- 5:35below. Here is the environment I have
- 5:38set up for DNS cache poisoning. First
- 5:42step, the client opens their browser
- 5:44and enters www.cyber-demo.test. We
- 5:48assume that it does not know the IP
- 5:50address associated with this domain. So
- 5:52, the PC will request this information
- 5:54from the DNS resolver, which is
- 5:57172.16.10.9. The DNS resolver does not
- 6:00have the information. It will ask the
- 6:02authoritative DNS server 172.16.10.6,
- 6:04which will respond with the correct
- 6:06information. Then, in parallel, the
- 6:09attacker sends erroneous information to
- 6:13the DNS resolver, causing a DNS cache
- 6:16update on the DNS resolver. So, there
- 6:19will be in this cache. -demo.test
- 6:21172.16.10.8 which is the IP address
- 6:26announced by the attacker. Then the DNS
- 6:29resolver will tell the PC that
- 6:32www.cyber-demo.test is reachable via
- 6:35172.16.10. 10.8. So it will be the same
- 6:40for PC1 and PC2. Thus, all PCs that use
- 6:43this DNS resolver will be able to
- 6:45connect to www.cyber-demo.test via the
- 6:48IP address 172.16.10.8. So, this is the
- 6:53attack diagram. In the first part of
- 6:56the attack, the attacker's machine
- 6:58constantly sends a message to the DNS
- 7:00resolver. So here is the MAC address
- 7:02here. The message being sent constantly
- 7:04. So you can see it here. So we have
- 7:07several messages that repeat. So the
- 7:10attacker's machine announces to the DNS
- 7:13resolver machine that 172.16.10.6 is on
- 7:15the attacker's machine. So this is the
- 7:19MAC address associated with the
- 7:20attacker's machine. It will announce
- 7:22this information in a loop so that this
- 7:24information is recorded by this machine
- 7:26, the DNS resolver. This is the first
- 7:28part of the attack. Quick reminder, the
- 7:30real machine 172.16.10.6 6 has this MAC
- 7:34address. So you can see that it is
- 7:36different from what we had in the
- 7:38previous capture. So all this means
- 7:40that the attacker's machine succeeds in
- 7:43announcing false information to the
- 7:45victim's machine, which is the DNS
- 7:47resolver. Now, we are connected to a
- 7:50machine that uses the DNS resolver as
- 7:53its DNS server. So as a reminder,
- 7:56172.16.10.9 is our DNS resolver. This
- 8:00DNS resolver receives information that
- 8:02is false from the attacker. So the
- 8:05attacker has successfully announced
- 8:07false information for the domain
- 8:09www.cyber-demo.test to the 172.16.10.9
- 8:11machine. So here, we will attempt a
- 8:15resolution to find the IP address
- 8:17associated with this domain. Since the
- 8:20attacker is announcing false
- 8:21information to the DNS resolver used by
- 8:23this machine. When I run the command,
- 8:26normally I should get 172.16.10. 10.8,
- 8:29which is the IP address announced by
- 8:31the attacker. So here is the result of
- 8:34the nslookup command. You can see that
- 8:36the domain www.cyber-demo.test is
- 8:38associated with this IP address. Then,
- 8:41I will go to a web browser to try to
- 8:44access this website. So here is the
- 8:46result. When I go to
- 8:47www.cyber-demo.test. I am being
- 8:50redirected to the hacker's machine. So
- 8:53I added this information to show you
- 8:55that we reach the site. I switch to the
- 8:58DNS resolver 172.16.10.9. I connect to
- 9:02this machine to show you its DNS cache
- 9:05and prove that it has been poisoned.
- 9:08The cache was modified by the hacker.
- 9:11So with the false information the
- 9:14hacker announced to this machine, we
- 9:16can see that I exported the resolver's
- 9:19DNS cache and I am searching for info
- 9:22on www.cyber-demo.test. You can see
- 9:27that on this DNS resolver, it recorded
- 9:30that the domain www.cyber-demo.test is
- 9:33associated with the IP address
- 9:36172.16.10.8, which is actually the
- 9:38hacker's IP. So you can see that the
- 9:42hacker successfully modified the server
- 9:44cache of this DNS resolver. Now, if I
- 9:48stop the attack on the hacker's machine
- 9:50—for security reasons, I can't show
- 9:52you the command—let's assume I stop
- 9:54the attack. Next, I go to the DNS
- 9:58resolver, 172.16.10.9, and I will clear
- 10:02its cache. There we go. The next step
- 10:05is to also go to the client machine
- 10:08that uses the IP address 172.16.10.9 as
- 10:13its DNS server. To summarize, this
- 10:16machine—as a reminder—uses the DNS
- 10:18resolver that was infected. So we have
- 10:22stopped the attack, cleared the DNS
- 10:25resolver's cache, and now I go to
- 10:27machine 172.16.10.7 to clear the cache
- 10:30on this machine as well. To clear the
- 10:33cache on this machine, you must use the
- 10:35command ipconfig/flushdns. There we go.
- 10:38And I will perform a DNS resolution
- 10:41again for www.cyber-demo.test. There,
- 10:45I'm running the command. You can see
- 10:49that the IP address is now 172.16.10.6,
- 10:52which is the real server. It is no
- 10:56longer 10.8 as it was before. And when
- 10:58I use the web browser and go to
- 11:00www.cyber-demo.test, cyber-demo.test.
- 11:03This time, I am redirected to the
- 11:06legitimate server. What you just saw
- 11:09helps explain the principle of DNS
- 11:11cache poisoning, but that doesn't mean
- 11:13it's currently that easy to poison the
- 11:15cache of a modern resolver. Current
- 11:18protections make this type of attack
- 11:20much more difficult, and some go even
- 11:22further by allowing verification of the
- 11:25authenticity of the DNS data itself. Up
- 11:31to now, we have seen how incorrect DNS
- 11:33information can be accepted by a
- 11:35resolver and lead your computer to the
- 11:37wrong destination. But how can we avoid
- 11:39this? This is precisely one of the
- 11:41problems that DNSSEC seeks to address.
- 11:44Its goal is to allow the resolver to
- 11:46cryptographically verify the
- 11:47authenticity and integrity of the DNS
- 11:49data it receives. To understand the
- 11:51idea, let's imagine you are requesting
- 11:53the IP address for example.fr. If this
- 11:55zone uses DNSSEC, certain DNS
- 11:57information is accompanied by a digital
- 12:00signature. The resolver performing
- 12:02DNSSEC validation can then verify this
- 12:05signature. To do this, DNSSEC uses
- 12:08several record types, such as DNSKEY,
- 12:10which contains a public key, and RRSIG,
- 12:12which contains a signature associated
- 12:14with DNS data. And thanks to a chain of
- 12:18trust, the resolver can gradually trace
- 12:20back to a source it considers reliable.
- 12:23If the checks succeed, the data can be
- 12:25considered authentic. But if an
- 12:27attacker modifies the IP address in a
- 12:29DNS response, they normally cannot
- 12:31produce the corresponding valid
- 12:33signature without possessing the
- 12:35private key used by the zone. The
- 12:37tampering can therefore be detected and
- 12:39the response considered invalid. And
- 12:41this is where DNSSEC truly changes the
- 12:43rules of the game. We are no longer
- 12:45just trying to make a fake response
- 12:47difficult to get accepted. We are
- 12:50trying to verify that the DNS data
- 12:52received is authentic and has not been
- 12:54modified. But even if a bad DNS
- 12:56response still manages to direct your
- 12:58browser to an attacker's server,
- 13:00another protection can still come into
- 13:02play. HTTPS. For the connection to be
- 13:05considered legitimate, this server must
- 13:07, among other things, present a valid
- 13:10certificate for the site you actually
- 13:12wanted to visit. Without this
- 13:14certificate, your browser can detect
- 13:16the problem and display an alert or
- 13:18prevent a normal HTTPS connection.
- 13:21HTTPS does not fix the bad DNS response
- 13:24, but it constitutes an additional
- 13:26barrier that can prevent this bad
- 13:28redirection from going unnoticed. To
- 13:31summarize, DNSSEC acts directly on the
- 13:33authenticity of DNS data, and HTTPS can
- 13:36provide a second barrier at the time of
- 13:38connection to the server. You now
- 13:45understand how you can type the right
- 13:47address into your browser and still be
- 13:49directed to the wrong place. The
- 13:51problem does not necessarily come from
- 13:53what you typed into your browser. It
- 13:55can come from the DNS information used
- 13:58to determine where your computer should
- 14:00connect. If an attacker manages to get
- 14:03a falsified response accepted, this
- 14:05information can be used in place of the
- 14:07real response. And if it is then kept
- 14:09in a resolver's cache, it can
- 14:11potentially affect much more than a
- 14:13single request. Today, modern resolvers
- 14:16make this type of attack much more
- 14:18difficult, and mechanisms like DNSSEC
- 14:20allow us to go further by
- 14:22cryptographically verifying the
- 14:24authenticity of DNS data. But the
- 14:26essential lesson remains the same on
- 14:28the internet. Typing the right address
- 14:31does not, by itself, guarantee that the
- 14:33information used to find the
- 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.