{"id":463,"date":"2021-03-01T20:31:02","date_gmt":"2021-03-01T20:31:02","guid":{"rendered":"https:\/\/cas.cybercop-training.ch\/?page_id=463"},"modified":"2021-03-01T20:42:54","modified_gmt":"2021-03-01T20:42:54","slug":"a1-dns","status":"publish","type":"page","link":"https:\/\/cas.cybercop-training.ch\/index.php\/a1-dns\/","title":{"rendered":"A1: DNS"},"content":{"rendered":"<h1>Assignment Series #A1 DNS<\/h1>\n<h2>Task description<\/h2>\n<p>The command <code>dig<\/code> is a tool for querying DNS nameservers for information about host addresses, mail exchanges, nameservers, and related information. This tool can be used from any Linux (Unix) or Macintosh OS X operating system. Please use <code>dig<\/code> to solve the following tasks:<\/p>\n<ol>\n<li>a record of www.microsoft.com<\/li>\n<li>reverse lookup of the ip 80.254.178.110<\/li>\n<li>a record of teams.microsoft.com via Google dns 8.8.8.8<\/li>\n<li>ns records of ost.ch<\/li>\n<li>mx records of ost.ch<\/li>\n<li>zone transfer @nsztm1.digi.ninja zonetransfer.me<\/li>\n<li>show dns trace when looking up hsr.hacking-lab.com domain<\/li>\n<li>dns over http request via cloudflare of the hostname academy.hacking-lab.com<\/li>\n<li>DS of the domain switch.ch<\/li>\n<li>DNSKEY of the domain switch.ch<\/li>\n<\/ol>\n<h2>Solution<\/h2>\n<ol>\n<li>\n<p>a record of microsoft.com:<\/p>\n<blockquote>\n<blockquote>\n<p>\u256d\u2500 ~\/Desktop\/Assignments\/A1\/DNS                                              \u2714<br \/>\n\u2570\u2500 dig -t a microsoft.com +short<br \/>\n40.76.4.15<br \/>\n40.112.72.205<br \/>\n40.113.200.201<br \/>\n13.77.161.179<br \/>\n104.215.148.63<\/p>\n<\/blockquote>\n<\/blockquote>\n<\/li>\n<li>\n<p>reverse lookup of the ip 80.254.178.110<\/p>\n<blockquote>\n<blockquote>\n<p>\u256d\u2500 ~\/Desktop\/Assignments\/A1\/DNS                                              \u2714<br \/>\n\u2570\u2500 dig -x 80.254.178.110 +short<br \/>\n110-178-254-80.static.dsl-net.ch.<\/p>\n<\/blockquote>\n<\/blockquote>\n<\/li>\n<li>\n<p>a record of teams.microsoft.com via Google dns 8.8.8.8<\/p>\n<blockquote>\n<blockquote>\n<p>;; Query time: 12 msec<br \/>\n;; SERVER: 8.8.8.8#53(8.8.8.8)<br \/>\n;; WHEN: Tue Oct 20 16:11:22 EDT 2020<br \/>\n;; MSG SIZE  rcvd: 155<\/p>\n<p>\u256d\u2500 ~\/Desktop\/Assignments\/A1\/DNS                                              \u2714<br \/>\n\u2570\u2500 dig @8.8.8.8 -t a teams.microsoft.com +short<br \/>\nteams.office.com.<br \/>\nteams-office-com.s-0005.s-msedge.net.<br \/>\ns-0005.s-msedge.net.<br \/>\n52.113.194.132<\/p>\n<\/blockquote>\n<\/blockquote>\n<\/li>\n<li>\n<p>ns records of ost.ch<\/p>\n<blockquote>\n<blockquote>\n<p>\u2500 ~\/Desktop\/Assignments\/A1\/DNS                                              \u2714<br \/>\n\u2570\u2500 dig -t ns ost.ch +short<br \/>\ndns02.ost.ch.<br \/>\ndns01.ost.ch.<\/p>\n<\/blockquote>\n<\/blockquote>\n<\/li>\n<li>\n<p>mx records of ost.ch<\/p>\n<blockquote>\n<blockquote>\n<p>\u256d\u2500 ~\/Desktop\/Assignments\/A1\/DNS                                              \u2714<br \/>\n\u2570\u2500 dig -t mx ost.ch +short<br \/>\n0 ost-ch.mail.protection.outlook.com.<\/p>\n<\/blockquote>\n<\/blockquote>\n<\/li>\n<li>\n<p>zone transfer @nsztm1.digi.ninja zonetransfer.me<\/p>\n<blockquote>\n<blockquote>\n<p>\u256d\u2500 ~\/Desktop\/Assignments\/A1\/DNS                                              \u2714<br \/>\n\u2570\u2500 dig axfr @nsztm1.digi.ninja zonetransfer.me       <\/p>\n<\/blockquote>\n<\/blockquote>\n<\/li>\n<\/ol>\n<p>I decided to write only the command down instead of the full output. For a detailed explanation what this command does, please visit <a href=\"https:\/\/digi.ninja\/projects\/zonetransferme.php\">https:\/\/digi.ninja\/projects\/zonetransferme.php<\/a><\/p>\n<ol start=\"7\">\n<li>\n<p>show dns trace when looking up hsr.hacking-lab.com domain<\/p>\n<blockquote>\n<blockquote>\n<p>\u2500 ~\/Desktop\/Assignments\/A1\/DNS                                              \u2714<br \/>\n\u2570\u2500 dig +trace +short hsr.hacking-lab.com<br \/>\nNS l.root-servers.net. from server 172.16.16.16 in 12 ms.<br \/>\nNS i.root-servers.net. from server 172.16.16.16 in 12 ms.<br \/>\nNS a.root-servers.net. from server 172.16.16.16 in 12 ms.<br \/>\nNS b.root-servers.net. from server 172.16.16.16 in 12 ms.<br \/>\nNS f.root-servers.net. from server 172.16.16.16 in 12 ms.<br \/>\nNS m.root-servers.net. from server 172.16.16.16 in 12 ms.<br \/>\nNS c.root-servers.net. from server 172.16.16.16 in 12 ms.<br \/>\nNS d.root-servers.net. from server 172.16.16.16 in 12 ms.<br \/>\nNS k.root-servers.net. from server 172.16.16.16 in 12 ms.<br \/>\nNS e.root-servers.net. from server 172.16.16.16 in 12 ms.<br \/>\nNS j.root-servers.net. from server 172.16.16.16 in 12 ms.<br \/>\nNS h.root-servers.net. from server 172.16.16.16 in 12 ms.<br \/>\nNS g.root-servers.net. from server 172.16.16.16 in 12 ms.<br \/>\nA 152.96.6.131 from server 193.135.215.40 in 16 ms.<\/p>\n<\/blockquote>\n<\/blockquote>\n<\/li>\n<li>\n<p>dns over http request via cloudflare of the hostname academy.hacking-lab.com<\/p>\n<blockquote>\n<p>Cloudflare DNS is <code>1.1.1.1<\/code>, but I wasn&#8217;t sure how to solve this task. I got stuck and tried this from the cloudfare developers guide out:<br \/>\n<a href=\"https:\/\/developers.cloudflare.com\/1.1.1.1\/dns-over-https\/json-format\">https:\/\/developers.cloudflare.com\/1.1.1.1\/dns-over-https\/json-format<\/a><\/p>\n<blockquote>\n<p>curl -H &#8218;accept: application\/dns-json&#8216; &#8218;<a href=\"https:\/\/cloudflare-dns.com\/dns-query?name=academy.hacking-lab.com&amp;type=AAAA\">https:\/\/cloudflare-dns.com\/dns-query?name=academy.hacking-lab.com&#038;type=AAAA<\/a>&#8218;<\/p>\n<\/blockquote>\n<\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/cas.cybercop-training.ch\/wp-content\/uploads\/2021\/03\/cloudflare_api.png\" alt=\"\" \/><\/p>\n<\/li>\n<li>\n<p>ds of the domain switch.ch<\/p>\n<blockquote>\n<blockquote>\n<p>\u256d\u2500 ~\/Desktop\/Assignments\/A1\/DNS                                                                                     9 \u2718  15s<br \/>\n\u2570\u2500 dig ds switch.ch +short<br \/>\n41243 13 2 7EB1BDE852B56AF1FB24B7018764BFA34D1E6A2A02F1338A40EF0A77 430F5607<\/p>\n<\/blockquote>\n<\/blockquote>\n<\/li>\n<li>\n<p>DNS Key of the domain switch.ch<\/p>\n<blockquote>\n<blockquote>\n<p>\u256d\u2500 ~\/Desktop\/Assignments\/A1\/DNS                                                                                            \u2714<br \/>\n\u2570\u2500 dig DNSKEY switch.ch +short<br \/>\n256 3 13 5TaAxIstxl3gVaGScS5L6Ccs4\/GZhqVUld5XHoEhlNJetxXBT5BPwAXA V2teG9sA9XBxNFAeD26ekts7OW6n+Q==<br \/>\n257 3 13 COIkIJpWDaeEInm8UP+TKzg0H\/DEqtTUvjz3Os\/TK2biHlXtJL7sPrmw vw5QYP8f9hy9O2uBlotrhNR35SxX1g==<br \/>\n256 3 13 wZLnkiai6vlaP\/gOxnhQdWZ21WPzIpkpCh5Uw1IFg276KJDkvJ\/RVZYh omttXiC1pv9hUCLLo0blRcWTILxAcQ==<\/p>\n<\/blockquote>\n<\/blockquote>\n<\/li>\n<\/ol>\n<h2>Notes<\/h2>\n<p>I was unsure howto solve task 8. I did spend a lot of <code>google time<\/code> to find a solution howto do that with <code>dig<\/code> and decided now to upload this report with the curl command described in the cloudflare developers guide. Please let me know your solution for this task. I&#8217;m always eager to learn \ud83d\ude09<\/p>\n<p>PDF Report<br \/>\n<a href=\"https:\/\/cas.cybercop-training.ch\/wp-content\/uploads\/2021\/03\/dns1.pdf\" class=\"mtli_attachment mtli_pdf\" title=\"dns#1\">dns#1<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Assignment Series #A1 DNS Task description The command dig is a tool for querying DNS nameservers for information about host addresses, mail exchanges, nameservers, and related information. This tool can be used from any Linux (Unix) or Macintosh OS X operating system. Please use dig to solve the following tasks: a record of www.microsoft.com reverse [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-463","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/cas.cybercop-training.ch\/index.php\/wp-json\/wp\/v2\/pages\/463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cas.cybercop-training.ch\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cas.cybercop-training.ch\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cas.cybercop-training.ch\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/cas.cybercop-training.ch\/index.php\/wp-json\/wp\/v2\/comments?post=463"}],"version-history":[{"count":2,"href":"https:\/\/cas.cybercop-training.ch\/index.php\/wp-json\/wp\/v2\/pages\/463\/revisions"}],"predecessor-version":[{"id":488,"href":"https:\/\/cas.cybercop-training.ch\/index.php\/wp-json\/wp\/v2\/pages\/463\/revisions\/488"}],"wp:attachment":[{"href":"https:\/\/cas.cybercop-training.ch\/index.php\/wp-json\/wp\/v2\/media?parent=463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}