{"id":198,"date":"2023-10-22T04:11:03","date_gmt":"2023-10-22T04:11:03","guid":{"rendered":"https:\/\/corp.ad\/?p=198"},"modified":"2023-12-01T13:33:39","modified_gmt":"2023-12-01T13:33:39","slug":"prevent-the-traffic-escaping-private-network","status":"publish","type":"post","link":"https:\/\/www.corpad.org\/?p=198","title":{"rendered":"Prevent the traffic escaping private network"},"content":{"rendered":"\n<p>When a private (internal) network utilizes an existing public Internet domain name as a private domain name, a domain name collision occurs, potentially causing traffic to escape the private network.<\/p>\n\n\n\n<p>There are two typical misconfigurations can expose private networks to security risks:<\/p>\n\n\n\n<p><strong>1. Allowing the use of public DNS servers within a private network<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"570\" height=\"319\" src=\"http:\/\/35.212.132.239\/wp-content\/uploads\/2023\/10\/escape01.png\" alt=\"\" class=\"wp-image-202\" srcset=\"https:\/\/www.corpad.org\/wp-content\/uploads\/2023\/10\/escape01.png 570w, https:\/\/www.corpad.org\/wp-content\/uploads\/2023\/10\/escape01-300x168.png 300w\" sizes=\"auto, (max-width: 570px) 85vw, 570px\" \/><\/figure>\n\n\n\n<p>The first situation involves a device connected to the private network but configured to use public DNS servers for resolving private server IP addresses. For instance, a BYOD laptop might be set to use Google Public DNS (8.8.8.8) to ensure stable Internet connectivity at home.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"197\" src=\"http:\/\/35.212.132.239\/wp-content\/uploads\/2023\/10\/manualdns.png\" alt=\"\" class=\"wp-image-204\" srcset=\"https:\/\/www.corpad.org\/wp-content\/uploads\/2023\/10\/manualdns.png 977w, https:\/\/www.corpad.org\/wp-content\/uploads\/2023\/10\/manualdns-300x60.png 300w, https:\/\/www.corpad.org\/wp-content\/uploads\/2023\/10\/manualdns-768x155.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<p>The problem arises when the user attempts to access an internal server. The device queries the public DNS for the server&#8217;s name, leading to a connection attempt to the public server instead of the intended internal one.<\/p>\n\n\n\n<p>To mitigate this vulnerability, the best option is to deploy a network firewall or traffic controller that blocks all outbound DNS queries. This prevents devices on the private network from querying public DNS records, ensuring they remain within the private network.<\/p>\n\n\n\n<p><strong>2. Configuring private DNS servers to query public DNS servers for private domain names<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"567\" height=\"432\" src=\"http:\/\/35.212.132.239\/wp-content\/uploads\/2023\/10\/escape02.png\" alt=\"\" class=\"wp-image-203\" srcset=\"https:\/\/www.corpad.org\/wp-content\/uploads\/2023\/10\/escape02.png 567w, https:\/\/www.corpad.org\/wp-content\/uploads\/2023\/10\/escape02-300x229.png 300w\" sizes=\"auto, (max-width: 567px) 85vw, 567px\" \/><\/figure>\n\n\n\n<p>The second situation involves a misconfigured private DNS server that queries public DNS servers for unregistered hostnames. For example, if a user mistypes a URL, say &#8216;sata.corp.ad&#8217; instead of &#8216;data.corp.ad&#8217;, the private DNS server first checks its internal zone file for &#8216;sata.corp.ad&#8217;. If not found, it queries the public DNS for the location of &#8216;sata.corp.ad&#8217;. The public DNS responds with the public IP address for &#8216;sata.corp.ad&#8217;, which the private DNS relays, leading the internal device to connect to the public &#8216;sata.corp.ad&#8217;.<\/p>\n\n\n\n<p>To mitigate this vulnerability, configure a wildcard DNS record (such as *.corp.ad) pointing to a dummy internal IP address in the private DNS. This ensures that invalid subdomain names match this record, directing mistyped hostnames to the dummy IP address.<\/p>\n\n\n\n<p><strong>So what is the security risk in detail?<\/strong><\/p>\n\n\n\n<p>In the corp.ad case, the public corp.ad server will simply respond with a 404 not found error and redirect the device to a warning page. However, what if a private network uses an unclaimed or expired domain that a malicious actor can easily hijack and connect it to a dangerous public server?<\/p>\n\n\n\n<p>In such a scenario, the malicious actor could do numerous things with that server. They could redirect any Not Found URLs to a phishing page that mimics a workspace solution login form, or they could create a fake browser update page that tricks users into installing a RAT (remote access trojan). Such actions could lead to a severe security incident.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When a private (internal) network utilizes an existing public Internet domain name as a private domain name, a domain name collision occurs, potentially causing traffic to escape the private network. There are two typical misconfigurations can expose private networks to security risks: 1. Allowing the use of public DNS servers within a private network The &hellip; <a href=\"https:\/\/www.corpad.org\/?p=198\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Prevent the traffic escaping private network&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[14,21],"class_list":["post-198","post","type-post","status-publish","format-standard","hentry","category-security","tag-domain-name-collision","tag-escaping-private-network"],"_links":{"self":[{"href":"https:\/\/www.corpad.org\/index.php?rest_route=\/wp\/v2\/posts\/198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.corpad.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.corpad.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.corpad.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.corpad.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=198"}],"version-history":[{"count":2,"href":"https:\/\/www.corpad.org\/index.php?rest_route=\/wp\/v2\/posts\/198\/revisions"}],"predecessor-version":[{"id":298,"href":"https:\/\/www.corpad.org\/index.php?rest_route=\/wp\/v2\/posts\/198\/revisions\/298"}],"wp:attachment":[{"href":"https:\/\/www.corpad.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.corpad.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.corpad.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}