liveBook · Manning

DNS cache

As explained in Grokking Web Application Security

A DNS cache is stored DNS resolution data retained temporarily to answer repeated lookups without querying upstream servers.

A DNS cache temporarily retains lookup results so repeated requests can be answered without contacting upstream servers. Caching happens in the browser, operating system, ISP, and corporate network, making DNS more scalable but creating targets for traffic diversion. section 7.7

Security implications include:

  • Attackers can poison caches to redirect users toward a different destination. section 7.7
  • Editing /etc/hosts on Linux or C:\Windows\System32\drivers\etc\hosts on Windows can redirect traffic locally. section 7.7
  • HTTPS limits the impact of diverted traffic because a fake site still needs a certificate and cannot automatically decrypt protected traffic. section 7.7

A layered lookup

A browser may obtain a domain’s address from its memory cache; otherwise the operating system or ISP DNS server may answer before an authoritative server is queried. section 7.7

How Grokking Web Application Security covers it

How deep it goes
Explains caching across browser, operating-system, ISP, and corporate layers, but does not detail cache implementation.
Examples
Uses browser memory, operating-system and ISP caches, host-file paths, and a Swedish ISP compromise as examples.
What you can do after
Evaluate DNS-poisoning exposure by locating cache layers and applying HTTPS as a protective control.
How it connects
Connects DNS caches with DNS poisoning, host files, HTTPS, authoritative servers, and DNS lookup chains.

Also explained in

Compare how 2 books explain DNS cache →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Web Application Security. The section links point to the parts of the book it draws on.