{"id":1379,"date":"2021-05-20T09:00:27","date_gmt":"2021-05-20T06:00:27","guid":{"rendered":"https:\/\/macrosec.tech\/?p=1379"},"modified":"2021-05-16T19:49:56","modified_gmt":"2021-05-16T16:49:56","slug":"dns-tunneling-c2","status":"publish","type":"post","link":"https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/","title":{"rendered":"DNS Tunneling for Defense Evasion and Command and Control"},"content":{"rendered":"<p><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-1 fusion-parallax-none nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-padding-right:50px;--awb-padding-left:50px;--awb-background-color:#686868;--awb-background-image:url(&quot;https:\/\/macrosec.tech\/wp-content\/uploads\/2020\/01\/85204.jpg&quot;);--awb-background-size:cover;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last\" style=\"--awb-padding-top:0%;--awb-padding-right:0%;--awb-padding-bottom:0%;--awb-padding-left:0%;--awb-bg-size:cover;--awb-margin-top:10px;--awb-margin-bottom:10px;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-column-wrapper-legacy\"><div class=\"fusion-column-content-centered\"><div class=\"fusion-column-content\"><div class=\"fusion-text fusion-text-1\"><h2 style=\"text-align: center; font-size: 40px;\"><strong><span style=\"text-decoration: underline;\">DNS TUNNELING FOR DEFENCE EVASION AND COMMAND AND CONTROL<\/span><\/strong><\/h2>\n<\/div><div class=\"fusion-image-element fusion-image-align-center in-legacy-container\" style=\"text-align:center;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><div class=\"imageframe-align-center\"><span class=\" fusion-imageframe imageframe-none imageframe-1 hover-type-none\"><img decoding=\"async\" width=\"400\" height=\"400\" alt=\"Haystack - Hack The Box Machine\" title=\"dns\" src=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/dns.jpeg\" class=\"img-responsive wp-image-1398\" srcset=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/dns-200x200.jpeg 200w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/dns.jpeg 400w\" sizes=\"(max-width: 800px) 100vw, 400px\" \/><\/span><\/div><\/div><\/div><\/div><div class=\"fusion-clearfix\"><\/div><\/div><\/div><\/div><\/div><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-2 nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-padding-top:30px;--awb-padding-right:50px;--awb-padding-left:50px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-1 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last\" style=\"--awb-bg-size:cover;--awb-margin-top:10px;--awb-margin-bottom:10px;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-column-wrapper-legacy\"><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-separator fusion-no-large-visibility fusion-full-width-sep\" style=\"margin-left: auto;margin-right: auto;margin-top:15px;margin-bottom:15px;width:100%;\"><\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-text fusion-text-2\"><p style=\"font-size: 18px;\">This blog post was written by <a href=\"https:\/\/twitter.com\/TerminatorSh?s=20\">Alex Maina<\/a>.<\/p>\n<\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-separator fusion-clearfix\" style=\"float:left;margin-top:15px;margin-bottom:15px;width:100%;max-width:35%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;--awb-sep-color:#b51616;border-color:#b51616;border-top-width:1px;\"><\/div><\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-text fusion-text-3\"><h2 style=\"font-size: 24px; color: #b51616; text-align: left;\"><strong>Introduction<\/strong><\/h2>\n<p style=\"font-size: 20px;\">Before we look at exploiting DNS through DNS tunneling we need to understand DNS and how it is critical to an organization\u2019s infrastructure.<\/p>\n<p style=\"font-size: 20px;\">DNS is used to translate IP addresses into domain names.<\/p>\n<p style=\"font-size: 20px;\">For example, if you type the URL, www.example.com in your browser it is the DNS that is responsible for converting the domain name to the relevant IP then displaying the content of the URL in the browser.<\/p>\n<p style=\"font-size: 20px;\">More on DNS can be found here:<\/p>\n<p style=\"font-size: 20px;\"><a href=\"https:\/\/www.youtube.com\/watch?v=72snZctFFtA\">DNS Explained &#8211; YouTube<\/a><\/p>\n<h3 style=\"font-size: 22px; color: #b51616; text-align: left;\"><strong>Why is this Important:<\/strong><\/h3>\n<p style=\"font-size: 20px;\">The most notable ones are:<\/p>\n<ol>\n<li style=\"font-size: 20px;\">DNS is the only system that can help you browse the internet. Without DNS then the internet as we know it would not exist.<\/li>\n<li style=\"font-size: 20px;\">No need to memorize IP addresses \u2013 as DNS servers provide a solution for converting domain or subdomains to IP addresses.<\/li>\n<\/ol>\n<p style=\"font-size: 20px;\">This is very important for most organizations.<\/p>\n<p style=\"font-size: 20px;\">Hackers (blackhats) can also exploit DNS for malicious purposes as listed below as some of the disadvantages of DNS.<\/p>\n<h3 style=\"font-size: 22px; color: #b51616; text-align: left;\"><strong>Disadvantages<\/strong><\/h3>\n<ol>\n<li style=\"font-size: 20px;\">DNS queries don\u2019t carry any information about the client who initiated it, this is very useful for blackhats as the server side will only see the IP address from where the query came from.<\/li>\n<li style=\"font-size: 20px;\">Another disadvantage is the way DNS servers are built an example is if the main server is broken or altered it will be hard to access the page that was hosted on the server (blackhats) can use this to their advantage by targeting the main servers of popular websites to redirect to users to malicious sites e.g. the watering-hole technique which has been used by several APTs as seen below to target popular websites.<\/li>\n<\/ol>\n<p style=\"font-size: 20px;\">More on this can be found here:<\/p>\n<p style=\"font-size: 20px;\"><a href=\"https:\/\/attack.mitre.org\/techniques\/T1189\/\">Drive-by Compromise, Technique T1189 &#8211; Enterprise | MITRE ATT&amp;CK\u00ae<\/a><\/p>\n<p>&nbsp;<\/p>\n<p style=\"font-size: 20px;\">Another method that an attacker can use is DNS to his advantage is through DNS tunneling for command and control, defense evasion and data exfiltration as it is not a highly monitored protocol by firewalls and disabling it could hinder usage of the internet<\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"font-size: 24px; color: #b51616; text-align: left;\"><strong>DNS Tunneling<\/strong><\/h2>\n<p style=\"font-size: 20px;\">DNS tunneling is a nonstandard solution to exchange data using the DNS protocol.<\/p>\n<p style=\"font-size: 20px;\">There are different types of DNS Tunneling:<\/p>\n<ul>\n<li style=\"font-size: 20px;\">HTTP-DNS tunneling<\/li>\n<li style=\"font-size: 20px;\">HTTPS-DNS tunneling<\/li>\n<li style=\"font-size: 20px;\">POP3-DNS tunneling<\/li>\n<li style=\"font-size: 20px;\">FTP-DNS tunneling<\/li>\n<\/ul>\n<p style=\"font-size: 20px;\">This can be used maliciously to establish, Command and control channels with an external server or Data Exfiltration.\/p&gt;<\/p>\n<\/div><div class=\"fusion-image-element fusion-image-align-center in-legacy-container\" style=\"text-align:center;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><div class=\"imageframe-align-center\"><span class=\" fusion-imageframe imageframe-none imageframe-2 hover-type-none\" style=\"border:5px solid #e2e0e0;\"><img decoding=\"async\" width=\"624\" height=\"270\" title=\"Picture1\" src=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/Picture1-1.png\" alt class=\"img-responsive wp-image-1381\" srcset=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/Picture1-1-200x87.png 200w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/Picture1-1-400x173.png 400w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/Picture1-1-600x260.png 600w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/Picture1-1.png 624w\" sizes=\"(max-width: 800px) 100vw, 624px\" \/><\/span><\/div><\/div><div class=\"fusion-text fusion-text-4\"><p>&nbsp;<\/p>\n<p style=\"font-size: 20px;\">From the image above we can see a simple representation of a DNS tunnel between a client and server.<\/p>\n<p style=\"font-size: 20px;\">Demo of how DNS can be used to establish command and control:<\/p>\n<p style=\"font-size: 20px;\">For this, we will be using Blackarch a penetration testing distro based on Arch Linux as the attacker machine and windows system as the target machine.<\/p>\n<p style=\"font-size: 20px;\">The tool we will be using is DNSCAT2 by Ron or iagox86 a Proof of Concept (POC) tool for the above attack.<\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"font-size: 24px; color: #b51616; text-align: left;\"><strong>DNSCAT2 Installation<\/strong><\/h2>\n<p style=\"font-size: 20px;\">You will require GoLang to be installed for this. It can be installed using the commands below:<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">git clone https:\/\/github.com\/iagox86\/dnscat2.git<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">cd dnscat2\/server\/<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">gem install bundler<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">bundle install<\/p>\n<p style=\"font-size: 20px;\">To start the server use the following command:<\/p>\n<p style=\"font-size: 20px; color: #b51616; text-align: left;\">sudo ruby dnscat.rb &#8211;dns \u201cdomain=hacker,host=192.168.0.28\u201d &#8211;no-cache<\/p>\n<p style=\"font-size: 20px;\">Demo Videos are below:<\/p>\n<\/div><div class=\"fusion-video fusion-selfhosted-video\" style=\"max-width:100%;\"><div class=\"video-wrapper\"><video playsinline=\"true\" width=\"100%\" style=\"object-fit: cover;\" loop=\"true\" preload=\"auto\" controls=\"1\"><source src=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/bandicam-2021-02-21-18-04-27-908.mp4\" type=\"video\/mp4\">Sorry, your browser doesn&#039;t support embedded videos.<\/video><\/div><\/div><div class=\"fusion-text fusion-text-5\"><p>&nbsp;<\/p>\n<p style=\"font-size: 20px;\">Command and Control using DNSCAT2:<\/p>\n<\/div><div class=\"fusion-video fusion-selfhosted-video\" style=\"max-width:100%;\"><div class=\"video-wrapper\"><video playsinline=\"true\" width=\"100%\" style=\"object-fit: cover;\" loop=\"true\" preload=\"auto\" controls=\"1\"><source src=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/WhatsApp-Video-2021-05-10-at-4.26.39-PM.mp4\" type=\"video\/mp4\">Sorry, your browser doesn&#039;t support embedded videos.<\/video><\/div><\/div><div class=\"fusion-text fusion-text-6\"><p>&nbsp;<\/p>\n<p style=\"font-size: 20px;\">As you can see from the video above we were able to establish a command and control channel through DNS while an updated version of windows defender was running.<\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"font-size: 24px; color: #b51616; text-align: left;\"><strong>TODO<\/strong><\/h2>\n<p style=\"font-size: 20px;\">Now to demonstrate this in a phishing attack we can use hot-manchego by fortyNorthSecurity to create a Maldoc to execute the DNSCAT2 PowerShell client.<\/p>\n<p style=\"font-size: 20px;\">Then we can try and employ the red team concept of Bring Your Own Land (BYOL) on the compromised machine by running BITSAdmin to download our malware and enumeration tools.<\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"font-size: 24px; color: #b51616; text-align: left;\"><strong>Detecting and Mitigation of DNS Tunneling<\/strong><\/h2>\n<ol>\n<li style=\"font-size: 20px;\">Looking at the frequency of DNS requests &#8211; For example if the number of DNS requests from a host are usually 100\/200 then suddenly the number spikes up to 500\/600 request this could indicate that dns tunneling it be employed on the host network.<\/li>\n<li style=\"font-size: 20px;\">Length of a DNS request &#8211; The typical length of a DNS request is not that long e.g. that of google.com. If blue teams notice a longer DNS request this could imply that DNS tunneling is in place and they could use third-party software to create an alert when this happens.<\/li>\n<li style=\"font-size: 20px;\">Destination of the DNS requests, most companies have their own DNS servers which clients use for the DNS resolution. Through the use of third-party software, we could detect external DNS Servers and create an alarm if there are any outbound DNS connections.<\/li>\n<li style=\"font-size: 20px;\">The pattern of the DNS requests. For example, a typical URL will not consist of a lot of number\u2019s but when DNS tunneling is employed by the attacker the data could consist of a lot of numbers as it is encoded. This could suggest the use of DNS tunneling. Through third-party software\u2019s we could create rules to detect this and alert blue teams. A good example of this third party software\u2019s include:<\/li>\n<\/ol>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"font-size: 20px;\">Norton<\/li>\n<li style=\"font-size: 20px;\">LogRhythm<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p style=\"font-size: 20px;\">You can also refer to the following blog for more information:<\/p>\n<p style=\"font-size: 20px;\"><a href=\"https:\/\/logrhythm.com\/blog\/detecting-dns-tunneling\/\">Detecting DNS Tunneling | LogRhythm<\/a><\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"font-size: 24px; color: #b51616; text-align: left;\"><strong>Application in the Real World<\/strong><\/h2>\n<p style=\"font-size: 20px;\">As you can see abusing DNS has been employed by a lot of APTs for different purposes as per MITRE ATT&#038;CK. The main reason being it is not a heavily monitored protocol.<\/p>\n<\/div><div class=\"fusion-image-element fusion-image-align-center in-legacy-container\" style=\"text-align:center;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><div class=\"imageframe-align-center\"><span class=\" fusion-imageframe imageframe-none imageframe-3 hover-type-none\" style=\"border:5px solid #e2e0e0;\"><img decoding=\"async\" width=\"624\" height=\"424\" title=\"Picture2\" src=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/Picture2-2.png\" alt class=\"img-responsive wp-image-1382\" srcset=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/Picture2-2-200x136.png 200w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/Picture2-2-400x272.png 400w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/Picture2-2-600x408.png 600w, https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/Picture2-2.png 624w\" sizes=\"(max-width: 800px) 100vw, 624px\" \/><\/span><\/div><\/div><div class=\"fusion-text fusion-text-7\"><p>&nbsp;<\/p>\n<p style=\"font-size: 20px;\">More on this can be found here:<\/p>\n<p style=\"font-size: 20px;\"><a href=\"https:\/\/attack.mitre.org\/techniques\/T1071\/004\/\">Application Layer Protocol: DNS, Sub-technique T1071.004 &#8211; Enterprise | MITRE ATT&#038;CK\u00ae<\/a><\/p>\n<p style=\"font-size: 20px;\">One major disadvantage of using this protocol is that it is quite slow as compared to using protocols such as HTTP and HTTPS.<\/p>\n<p>&nbsp;<\/p>\n<\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-separator fusion-full-width-sep\" style=\"margin-left: auto;margin-right: auto;width:100%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;border-color:#3e3e3e;border-top-width:1px;\"><\/div><\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-text fusion-text-8\"><h2 style=\"font-size: 16px; color: #b51616; text-align: left;\"><strong>Disclaimer<\/strong><\/h2>\n<p style=\"font-size: 10px;\">The MacroSec blogs are solely for informational and educational purposes. Any actions and or activities related to the material contained within this website are solely your responsibility. The misuse of the information on this website can result in criminal charges brought against the persons in question. The authors and MacroSec will not be held responsible in the event any criminal charges be brought against any individuals misusing the information in this website to break the law.<\/p>\n<\/div><div class=\"fusion-clearfix\"><\/div><\/div><\/div><\/div><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":4,"featured_media":1398,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","footnotes":""},"categories":[10,8,13],"tags":[],"class_list":["post-1379","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-offensive-security","category-pentesting","category-red-teaming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>DNS Tunneling for Defense Evasion and Command and Control &#8212; MacroSEC<\/title>\n<meta name=\"description\" content=\"DNS tunneling is a nonstandard solution to exchange data using the DNS protocol.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DNS Tunneling for Defense Evasion and Command and Control &#8212; MacroSEC\" \/>\n<meta property=\"og:description\" content=\"DNS tunneling is a nonstandard solution to exchange data using the DNS protocol.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/\" \/>\n<meta property=\"og:site_name\" content=\"MacroSEC\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-20T06:00:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/dns.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Varun Gupta\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Varun Gupta\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/05\\\/20\\\/dns-tunneling-c2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/05\\\/20\\\/dns-tunneling-c2\\\/\"},\"author\":{\"name\":\"Varun Gupta\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#\\\/schema\\\/person\\\/25a4f831e9e50082deebea9327b48bf0\"},\"headline\":\"DNS Tunneling for Defense Evasion and Command and Control\",\"datePublished\":\"2021-05-20T06:00:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/05\\\/20\\\/dns-tunneling-c2\\\/\"},\"wordCount\":2970,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/05\\\/20\\\/dns-tunneling-c2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/macrosec.tech\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/dns.jpeg\",\"articleSection\":[\"Offensive Security\",\"Penetration Testing\",\"Red Teaming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/05\\\/20\\\/dns-tunneling-c2\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/05\\\/20\\\/dns-tunneling-c2\\\/\",\"url\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/05\\\/20\\\/dns-tunneling-c2\\\/\",\"name\":\"DNS Tunneling for Defense Evasion and Command and Control &#8212; MacroSEC\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/05\\\/20\\\/dns-tunneling-c2\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/05\\\/20\\\/dns-tunneling-c2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/macrosec.tech\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/dns.jpeg\",\"datePublished\":\"2021-05-20T06:00:27+00:00\",\"description\":\"DNS tunneling is a nonstandard solution to exchange data using the DNS protocol.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/05\\\/20\\\/dns-tunneling-c2\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/05\\\/20\\\/dns-tunneling-c2\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/05\\\/20\\\/dns-tunneling-c2\\\/#primaryimage\",\"url\":\"https:\\\/\\\/macrosec.tech\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/dns.jpeg\",\"contentUrl\":\"https:\\\/\\\/macrosec.tech\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/dns.jpeg\",\"width\":400,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/index.php\\\/2021\\\/05\\\/20\\\/dns-tunneling-c2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/macrosec.tech\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DNS Tunneling for Defense Evasion and Command and Control\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#website\",\"url\":\"https:\\\/\\\/macrosec.tech\\\/\",\"name\":\"MacroSEC\",\"description\":\"Your Cybersecurity Partner - Kenya\",\"publisher\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/macrosec.tech\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#organization\",\"name\":\"MacroSec Ltd\",\"url\":\"https:\\\/\\\/macrosec.tech\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/macrosec.tech\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/MobileIcon_Retine.png\",\"contentUrl\":\"https:\\\/\\\/macrosec.tech\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/MobileIcon_Retine.png\",\"width\":400,\"height\":107,\"caption\":\"MacroSec Ltd\"},\"image\":{\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/macrosec.tech\\\/#\\\/schema\\\/person\\\/25a4f831e9e50082deebea9327b48bf0\",\"name\":\"Varun Gupta\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/52bc834329f8953672ef80ade6d06e40673c985c5434ad9aa3ba360e5ca444e1?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/52bc834329f8953672ef80ade6d06e40673c985c5434ad9aa3ba360e5ca444e1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/52bc834329f8953672ef80ade6d06e40673c985c5434ad9aa3ba360e5ca444e1?s=96&d=mm&r=g\",\"caption\":\"Varun Gupta\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"DNS Tunneling for Defense Evasion and Command and Control &#8212; MacroSEC","description":"DNS tunneling is a nonstandard solution to exchange data using the DNS protocol.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/","og_locale":"en_US","og_type":"article","og_title":"DNS Tunneling for Defense Evasion and Command and Control &#8212; MacroSEC","og_description":"DNS tunneling is a nonstandard solution to exchange data using the DNS protocol.","og_url":"https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/","og_site_name":"MacroSEC","article_published_time":"2021-05-20T06:00:27+00:00","og_image":[{"width":400,"height":400,"url":"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/dns.jpeg","type":"image\/jpeg"}],"author":"Varun Gupta","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Varun Gupta","Est. reading time":"15 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/#article","isPartOf":{"@id":"https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/"},"author":{"name":"Varun Gupta","@id":"https:\/\/macrosec.tech\/#\/schema\/person\/25a4f831e9e50082deebea9327b48bf0"},"headline":"DNS Tunneling for Defense Evasion and Command and Control","datePublished":"2021-05-20T06:00:27+00:00","mainEntityOfPage":{"@id":"https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/"},"wordCount":2970,"commentCount":0,"publisher":{"@id":"https:\/\/macrosec.tech\/#organization"},"image":{"@id":"https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/#primaryimage"},"thumbnailUrl":"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/dns.jpeg","articleSection":["Offensive Security","Penetration Testing","Red Teaming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/","url":"https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/","name":"DNS Tunneling for Defense Evasion and Command and Control &#8212; MacroSEC","isPartOf":{"@id":"https:\/\/macrosec.tech\/#website"},"primaryImageOfPage":{"@id":"https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/#primaryimage"},"image":{"@id":"https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/#primaryimage"},"thumbnailUrl":"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/dns.jpeg","datePublished":"2021-05-20T06:00:27+00:00","description":"DNS tunneling is a nonstandard solution to exchange data using the DNS protocol.","breadcrumb":{"@id":"https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/#primaryimage","url":"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/dns.jpeg","contentUrl":"https:\/\/macrosec.tech\/wp-content\/uploads\/2021\/05\/dns.jpeg","width":400,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/macrosec.tech\/index.php\/2021\/05\/20\/dns-tunneling-c2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/macrosec.tech\/"},{"@type":"ListItem","position":2,"name":"DNS Tunneling for Defense Evasion and Command and Control"}]},{"@type":"WebSite","@id":"https:\/\/macrosec.tech\/#website","url":"https:\/\/macrosec.tech\/","name":"MacroSEC","description":"Your Cybersecurity Partner - Kenya","publisher":{"@id":"https:\/\/macrosec.tech\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/macrosec.tech\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/macrosec.tech\/#organization","name":"MacroSec Ltd","url":"https:\/\/macrosec.tech\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/macrosec.tech\/#\/schema\/logo\/image\/","url":"https:\/\/macrosec.tech\/wp-content\/uploads\/2018\/04\/MobileIcon_Retine.png","contentUrl":"https:\/\/macrosec.tech\/wp-content\/uploads\/2018\/04\/MobileIcon_Retine.png","width":400,"height":107,"caption":"MacroSec Ltd"},"image":{"@id":"https:\/\/macrosec.tech\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/macrosec.tech\/#\/schema\/person\/25a4f831e9e50082deebea9327b48bf0","name":"Varun Gupta","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/52bc834329f8953672ef80ade6d06e40673c985c5434ad9aa3ba360e5ca444e1?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/52bc834329f8953672ef80ade6d06e40673c985c5434ad9aa3ba360e5ca444e1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/52bc834329f8953672ef80ade6d06e40673c985c5434ad9aa3ba360e5ca444e1?s=96&d=mm&r=g","caption":"Varun Gupta"}}]}},"_links":{"self":[{"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/posts\/1379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/comments?post=1379"}],"version-history":[{"count":5,"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/posts\/1379\/revisions"}],"predecessor-version":[{"id":1409,"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/posts\/1379\/revisions\/1409"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/media\/1398"}],"wp:attachment":[{"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/media?parent=1379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/categories?post=1379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/macrosec.tech\/index.php\/wp-json\/wp\/v2\/tags?post=1379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}