Skip to main content

LHWKCv8keou0wAmKZJYpgLUUnQmQ11prdEnsb_sCaCpkfU0O9rbPKMALPaYS3OeLgOeVOaW-HG4ROQF8nfoRj-UAsIJD1p3ZG1RNkNQvOigo8kykqjiVwxfD7fVdzbZta-FDMcDWOrZo3CrKgoce860

Netskope Global Technical Success (GTS)

Implementing and Verifying DNS Security Measures

 

Netskope Cloud Version - 120

Objective

This article provides a comprehensive overview of DNS-based security measures, focusing on techniques to block malicious DNS traffic, implement Sinkholing, and prevent DNS tunneling attacks.

 

Prerequisite

To use the DNS security feature, you need two specific licenses:

1. Cloud Firewall license

2. DNS Security license

 

Context

As one of the most exploited internet protocols, DNS requires robust security measures to protect against a variety of attacks. DNS Security is a vital feature of Netskope's Cloud Firewall, designed to protect DNS services from various cyber threats. This document will detail how to configure DNS Security to block these malicious requests and implement sinkholes effectively. 

 

Foundational Concepts

  • What is DNS Sinkholing?

DNS sinkholing is a security technique that redirects malicious DNS queries to a controlled IP address, often referred to as a "sinkhole." This method prevents users from connecting to harmful domains by resolving their requests to an IP that provides warning messages or logs the activity, allowing organizations to monitor and analyze potential threats.

 

  • What is DNS Tunneling?

DNS tunneling is a method used by attackers to encode non-DNS traffic within DNS queries and responses. Since DNS traffic is often allowed through firewalls, attackers can exploit this to bypass security measures. By disguising the data as DNS requests, they can communicate with a remote server or exfiltrate information without detection.

 

Step-by-Step Configuration

We will proceed to configure the following setup in this demonstration:

  • Sinkhole for Newly Registered and Newly Observed Domain Categories
  • Block All Security Risk Categories
  • Manually add specific domains to both the blocklist.
  • Block DNS Tunneling

Before we begin, please ensure that the Netskope steering configuration is set up as outlined in the document provided here

 

Key points: 

  • Inspection of DNS over HTTPS or DNS over TLS is not currently supported by Netskope. Therefore, Netskope recommends configuring a policy to steer and block this traffic.
  • Block all Security Risk categories, but be careful with NRDs and NODs to ensure users can still access legitimate resources. Consider using RBI for SWG as an alternative.
  • DNS steering exceptions must be manually created for internal domains.
  • The steering exceptions for both “Local IP address range” and “Bogon Networks” must be edited to select “Bypass, except for DNS traffic.” This ensures that NSClient will steer DNS requests sent to internal DNS servers.
  • A Real-Time Protection Policy that associates a DNS Profile with the user’s traffic must be created and placed above any Layer 3/4 or Layer 7 policies that explicitly allow DNS traffic.

 

Step1: Configure a DNS Profile:

Path: Netskope Tenant UI >>> Policies >>> Profiles >>> DNS >>> Click on "New DNS Profile"

 

We have configured the DNS profile with the following settings: 

All security risk categories are blocked, the categories for Newly Registered and Newly Observed Domains are set to sinkhole with an IP address of 163.116.128.90, explicitly blocked domain “example.com” and DNS tunneling is set to Block.

Note : Configure logging to capture only blocked DNS traffic.. If troubleshooting or specific users require it, you can select “all DNS traffic”.

AD_4nXdPoYlR8fdK9hKD-gYTXvUlA_D9417MBjB79BDhyTHwYwppzM8Hcs7G-k_8xy_W5cQgBUB4kf3VDA8uVXPHOqGwfaCV7ouGAxLp0lWhn1LHPcyQrheAEbNvh7wKOBg0uAG1oMG9I9BmNJL7a9O1JzjimMjm?key=U83Jc51_rDl_choQaJpAOQ

AD_4nXdV9v2hjoocDoMxRU6qdzDAjT6vcHssXGKIfF1RpmRbcKNir-8ldCtPAlOWBY_MaBOQZD929G96kqioJiYs7O9TpmdTL3vdO4344U0KP6MhaIFHVae1StKAwsTzt5gg5AWVoP3O9d1x9FGs3DOWkrQzZE3i?key=U83Jc51_rDl_choQaJpAOQ

AD_4nXcPa4HBfu_p9lQh35yGQ6ovYFhZTJoXxf5mSA7gp2t07AmpO7nsDBB9lNqQD0oL41pUPjU2hpW_8g3ymgULukuCbNumtJ36itmcQMiqR2xwEsbJ_Tlcn7ozhQ5fot36EuNtU-KBZc87HZ-qD85KeqQFxCPY?key=U83Jc51_rDl_choQaJpAOQ

 

AD_4nXcxiCNFV0ec2B5qSu15tRBbbaPK-M6MT6euBQQ1oQQBo_tt1HAf0l5f4tQPZP7y_1Hdxd7nB3EPogPv1TYGLs_T0CebRmIaTZPXxU1YU1Dv1jQOzGy1LKPQ8oGY299btM7G5pQCB55aTcB8D89Dcr6IMm8?key=U83Jc51_rDl_choQaJpAOQ

 

Step 2: Add the DNS profile to a Real-Time Policy

Path: Netskope Tenant UI >>> Policies >>> Real-Time Protection >>> Click on “New Policy” and select DNS.

AD_4nXdVWf-jnSlII7GIehMvy9_xueiaY1k66ikRTSxi_oWw93iT-yTefSGnchKDCYFxsSwp7zgksqx6pruANUWxkGPiFbwRt6pUBUGoXncI1ia82AWGD0D5Cek8Rs0-SM7ApFT7g-8EmB-Sam1ziDWKQ2Kmo3Hl?key=U83Jc51_rDl_choQaJpAOQ

 

Sinkhole for Newly Registered and Newly Observed Domain Categories

  • To achieve this, we took inspiration from the “EPoT” solution, which operates using IP addresses in the 163.116.128.0/24 range assigned to Netskope. These addresses do not provide any publicly available Internet services ,their purpose is solely to route traffic to the Netskope Point of Presence (PoP). Following this concept, we selected the IP address 163.116.128.90 as our “Sinkhole” address.
  • The primary advantage of using the Sinkhole option is that it allows end users to see a block page when attempting to access sinkholed traffic. For example, if a user tries to access a Newly Registered Domain, a DNS query will be generated from their machine. Netskope will respond to that DNS query with a sinkholed IP address, leading the user to receive a block page based on the real-time protection policy we set up. To implement this, we will configure a firewall application for the IP address 163.116.128.90 and set the action to "block" in the real-time policy. Please note that this configuration is only necessary if you want a block page. If you prefer, you can skip this step, and the sinkhole will still function without displaying a block page.

Note : Currently we only support A type DNS query (IPv4) for sinkholing. All other DNS query types will receive an NXDOMAIN response (empty section).

AD_4nXfXax_lNzb2I5qL6PdHbdkEPxejhKYV0n-N1VkhOVPuFTZoMl8eAOm6Oz1gun8-_bP3KkCp0jaaKWbD0fEGrKOlMsgVBcOahtKFklCzaVK2E2VR_1aHBS566dmPwZ9XxT_l1kq06wS5yE5Wfmpm0AIj6MWg?key=U83Jc51_rDl_choQaJpAOQ

 

Step 1: Configure a Cloud Firewall Application for IP 163.116.128.90:

Path: Netskope Tenant UI >>> Settings >>> Security Cloud Platform >>> Traffic Steering >>> App Definition >>> Click on "New App Definition Rule" and then select the Firewall App.

 

AD_4nXfNWlrRoAydEv3zA8-HPkh8pF4Ctdfs82CJlqnPN_wJeN7z78BSCVqpgVoLJ84LkfbLVBeV4UPQfkKooOhlA6_ZDeNP9rptoPp3YXpT8mn5waPTI7FFeM8PTTbA1r4m6YHajYlgD9Yyut00nP-qrRneAlk?key=U83Jc51_rDl_choQaJpAOQ

 

Configure the CFW App as outlined, then click "Save" and “Apply the changes”

AD_4nXffMhNj4v7puXglE4G_zNMq_oCb5k-Yrr-Pw_3icjxH9ffuwRncKa1GBuoWs5IRHMW8LTRxfB6PXJ1KBnK9doz_my9Xcg4aVHYxB_sqDSyz-6WM_A78QKZ_SC93XC0_ctvNPrN6vedn-oF9vDt87t20WQ06?key=U83Jc51_rDl_choQaJpAOQ


 

Step 2: Map the configured CFW App nDNS Sinkhole IP] in the real-time protection policy, setting the action to "Block."

Path: Netskope Tenant UI >>> Policies >>> Real-Time Protection >>> Click on “New Policy” and select Firewall.

AD_4nXenrniijgVRY92rc6nK-Grg1TpRsgnfGJPwtH6yfmbPco1WYtnCuX0Ux2m-_0s8BppoMTZZCX5CkBNiVsygUEgpbm1-DxZ-lr_fEtDLnexSD89wjsrs_UK5xCiUjv10gOqWww8x2Mn92KQNfpxWiYjHkDE?key=U83Jc51_rDl_choQaJpAOQ

Note :The block page will make use of the default template, which cannot be changed.You can still edit the default template to insert more information about the block.

Path: Netskope Tenant UI >>> Policies >>> Templates >>> User Notifications >>> Default Template with Type Block

AD_4nXcQQYfdkfH2bKkVOJAyc641qnERNyPLsqAiqIN8XGaxafpxI0vXfXApJ6l6_xeWHDtLAcqPSgBdhEMj0TaYpOenof2lFBjza60lj4F9tyU_f94zUDj59hWsXajCLurLC4UbikxReFvHz1ysW84zAh_BfvM_?key=U83Jc51_rDl_choQaJpAOQ
 

Verification

Sinkhole domains:

We picked some random newly registered domains from external sites such as:  https://dnpedia.com/domains/dailydata.php

The nslookup output for newly registered sites returned the DNS sinkhole IP as the response.

AD_4nXcHWQhvAE4QJUMkhYaYgSi-VEyn8Luwj4Dh8gGrt3eDZxyA7bJLrQgB-WR7ShvANcXAY3UPdCKeuQ1jczR9bogJSlgDMqnPZo0rT-oYktGxJRMlQMPRhjWVMPc0SfmeQduq14O72EENyqhWQxJis_BOfEc?key=U83Jc51_rDl_choQaJpAOQ

When the user attempted to access the newly registered site from the browser, it got blocked with the default template.

AD_4nXfcC0eVgHxbJyJ8nzqzqEWogbG8hSR0L3L2WaZz0n62QVzTeodmt7OsJVT8f0T2-pW-KlCl_do2QPmF3ZhjYI0J4KR8USJJoE3omedQw_rtbkWYZ8hDdUHMAD-p_W5bvv8d3A95AnzMEZaxigiDSAThNuNf?key=U83Jc51_rDl_choQaJpAOQ

Blocked domains:

“Security Risk” categorization can be tested using the Netskope hardcoded domains listed below.

Security Risk - Ad Fraud

ns-catid-583-sn.netskopetools.com

Security Risk - Attack

ns-catid-588-sn.netskopetools.com

Security Risk - Botnets

ns-catid-578-sn.netskopetools.com

Security Risk - Command and Control server

ns-catid-579-sn.netskopetools.com

Security Risk - Compromised/malicious sites

ns-catid-580-sn.netskopetools.com

Security Risk - Cryptocurrency Mining

ns-catid-589-sn.netskopetools.com

Security Risk - Hacking

ns-catid-584-sn.netskopetools.com

Security Risk - Malware Distribution Point

ns-catid-586-sn.netskopetools.com

Security Risk - Phishing/Fraud

ns-catid-581-sn.netskopetools.com

Security Risk - Spam sites

ns-catid-582-sn.netskopetools.com

Security Risk - Spyware & Questionable Software

ns-catid-587-sn.netskopetools.com

Security Risk - DGA

ns-catid-594-sn.netskopetools.com

 

AD_4nXc3RKGLHNH1mAbjdbAXsST1GB5vWcC4ZIPDZ99p0YZgtFUIQ7dJ7aPmIaqKVjIevEDqDaCENjo5TxyQG5KdVkyu-eSrE-I9vy_n2hyx0_fvpf2paywPPOiplrYp-hGC0Pi09n2lY663QkW5DSKGenEh3mGQ?key=U83Jc51_rDl_choQaJpAOQ

 

Now let’s check nslookup to “example.com” which is explicitly blocked in the DNS profile.

AD_4nXdR2rskzI76kpd4ctJOQaEVPLMP0eH_0CbjwX1IZzeW_pJdr-X556qtFrMSnsksBowP1ZoPjFhuTbseeWZndMnj2wOmhe87esEMTeQwXFaWQ_7-MSW1A46tOtndrwk6tyAa96JPPqLw63isWnpqDe_DCiaH?key=U83Jc51_rDl_choQaJpAOQ

 

In the Netskope tenant UI,blocked,sinkholed and DNS Tunnel logs can be found under SkopeIT > Alerts. You can filter the results by selecting "Alert Type: DNS" to focus exclusively on DNS traffic.

AD_4nXdJaNT_d1ICxE5DT-EnURL97YMju1wnLskQCfT8N-XDcX1wq1vyIOhYCrq0fFTAwWryo6ZxHft8mZdmAah38AmdzUqONeDx0rJ4epRNoy8NJV0M2-GOBH6u-pXH83JQunVxjfbLX5UefB0AZy9KOI9VDg3J?key=U83Jc51_rDl_choQaJpAOQ

 

Explicitly blocked domains can be filtered using query  “(alert_type eq 'DNS') and threat_type eq domain_blocked”

AD_4nXeLguoAt464qBQDlUm-U-qBeFgh_qTwWn8IWkc1IioPlM4XPMmQlLyHvJs2rpZRHMlXa7t2MgOfW5EVA297g1v21-KoRCLPs7-pgzoYLafDwuTqXg47ChJsSJxVA-F4bigejL9W1JQzkcV65qM3bIkc5twm?key=U83Jc51_rDl_choQaJpAOQ

 

Events based on categories are generated with the type "domain_category."

AD_4nXfsugF7CiFLqWxOMmfIUPWCf03YSgKKPAtOxLSYnh9IxGEX8RIjrugR0m9agLJyoqwu8fFblV6frFnhbSXC0YPGnihnOGn2yBwl9gcARXA_yt_JuKn1Dwuvz296PZ1-lbUkufY6xhJr-CCj2nlttCCbpdYI?key=U83Jc51_rDl_choQaJpAOQ

 

Whenever DNS tunneling is detected, an event will be generated with the event subtype labeled as "dns_tunnel”

AD_4nXfPWe_O42JempS7117KTgeC32wuAlD31e2pR-DDpIJYwdmLmZCrQ7QrvfaIGXwk5Wlkr7IJDrpQisblS44duhp_x4gooCbjB9aw8K3f-evKGEeCy-_Z_whfFl0mw_TioiUoO1ARcnFgZeP-O1BHBZo3Rz4?key=U83Jc51_rDl_choQaJpAOQ

 

AD_4nXfGaOwdVSls0UIpLuoYocH2FG9NeUyin6b_oAGELw3ex3maggxrMxn0wkVi0LosDNikiCKNPwpkVdY9RMQocIb4lRiY-i3-EK6AARdgCUR6d-MbSFjnn5PO2Vz2pEeQ5H2rQhKEtkd0MBAZJywSBE3aKwcf?key=U83Jc51_rDl_choQaJpAOQ

 

FAQ:

Question 1 - Which traffic steering methods support the DNS security feature?

Answer - This feature is available with IPSec, GRE, and Netskope Client traffic steering methods.

 

Question 2 - What does the "None" action signify in a DNS profile?

Answer - "None" means the DNS queries are allowed.

 

Question 3 - How often does Netskope update its threat database?

Answer - Netskope updates the DNS threat database every 15 minutes

 

Question 4 - Can I create DNS exceptions on the client?

Answer - Yes, you can create exceptions based on DNS Resource Record, IP, and Domains.

 

Question 5 - Which operating systems support this feature?

Answer - The feature is supported on Windows 10 and later, as well as macOS Big Sur and later.

Currently it’s not supported on Linux , Android and iOS

 

Question 6 - What standard ports does Netskope recognize for DNS traffic?

Answer - 

  •      DNS over UDP: Port 53
  •      DNS over TCP: Port 53
  •      DNS over TLS: Port 853
  •      mDNS (Multicast DNS): Port 5353

 

Question 7 -How is DNS Traffic Inspected in Order?

Answer - DNS traffic is inspected in the following order:

  1. Blocklist Check: If the domain is on the blocklist, the DNS traffic is denied.
  2. Allowlist Check: If the domain is on the allowlist, the DNS traffic is permitted.
  3. Categorization: Domains are categorized, and appropriate actions (allow,block,or sinkhole) are taken based on their categorization.
  4. Uncategorized Domains: Domains that do not fall under any specific category will be allowed.

 

Terms and Conditions

  • All documented information undergoes testing and verification to ensure accuracy.
  • In the future, it is possible that the application's functionality may be altered by the vendor. If any such changes are brought to our attention, we will promptly update the documentation to reflect them.

 

Notes

  • This article is authored by Netskope Global Technical Success (GTS).
  • For any further inquiries related to this article, please contact Netskope GTS by submitting a support case with 'Case Type – How To Questions'.