17.1.7 Lab - Exploring Dns Traffic
17.1.7 Lab - Exploring Dns Traffic
Objectives
Part 1: Capture DNS Traffic
Part 2: Explore DNS Query Traffic
Part 3: Explore DNS Response Traffic
Background / Scenario
Wireshark is an open source packet capture and analysis tool. Wireshark gives a detailed breakdown of the
network protocol stack. Wireshark allows you to filter traffic for network troubleshooting, investigate security
issues, and analyze network protocols. Because Wireshark allows you to view the packet details, it can be
used as a reconnaissance tool for an attacker.
In this lab, you will install Wireshark and use Wireshark to filter for DNS packets and view the details of both
DNS query and response packets.
Required Resources
1 PC with internet access and Wireshark installed
Instructions
2017 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 8 www.netacad.com
Lab - Exploring DNS Traffic
(ii) If you are using system-resolved, enter systemd-resolve --flush-caches to flush the cache for
Systemd-Resolved before restarting the service. The following commands restart the associated
service using elevated privileges:
Systemd-Resolved: sudo systemctl restart systemd-resolved.service
DNSMasq: sudo systemctl restart dnsmasq.service
NSCD: sudo systemctl restart nscd.service
3) For the macOS, enter sudo killall -HUP mDNSResponder to clear the DNS cache in the Terminal.
Perform an internet search for the commands to clear the DNS cache for an older OS.
c. At a command prompt or terminal, type nslookup enter the interactive mode.
d. Enter the domain name of a website. The domain name www.cisco.com is used in this example.
e. Type exit when finished. Close the command prompt.
f. Click Stop capturing packets to stop the Wireshark capture.
b. Select the DNS packet contains Standard query and A www.cisco.com in the Info column.
c. In the Packet Details pane, notice this packet has Ethernet II, Internet Protocol Version 4, User Datagram
Protocol and Domain Name System (query).
2017 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 8 www.netacad.com
Lab - Exploring DNS Traffic
d. Expand Ethernet II to view the details. Observe the source and destination fields.
What are the source and destination MAC addresses? Which network interfaces are these MAC
addresses associated with?
alamat MAC sumber dikaitkan dengan NIC pada PC dan alamat MAC tujuan dikaitkan dengan gateway
default. Jika ada server DNS lokal, alamat MAC tujuan akan menjadi alamat MAC dari server DNS lokal.
2017 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 8 www.netacad.com
Lab - Exploring DNS Traffic
e. Expand Internet Protocol Version 4. Observe the source and destination IPv4 addresses.
What are the source and destination IP addresses? Which network interfaces are these IP addresses
associated with?
alamat IP sumber dikaitkan dengan NIC pada PC dan alamat IP tujuan dikaitkan dengan layanan DNS
2017 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 8 www.netacad.com
Lab - Exploring DNS Traffic
f. Expand the User Datagram Protocol. Observe the source and destination ports.
What are the source and destination ports? What is the default DNS port number?
Nomor port sumber adalah 57729 dan port tujuan adalah 53, yang merupakan nomor port DNS default.
Compare the MAC and IP addresses in the Wireshark results to the IP and MAC addresses. What is your
observation?
Alamat IP dan MAC yang ditangkap dalam hasil Wireshark sama dengan alamat yang tercantum dalam
perintah arp – a dan ipconfig /all.
h. Expand Domain Name System (query) in the Packet Details pane. Then expand the Flags and
Queries.
2017 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 8 www.netacad.com
Lab - Exploring DNS Traffic
i. Observe the results. The flag is set to do the query recursively to query for the IP address to
www.cisco.com.
2017 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 6 of 8 www.netacad.com
Lab - Exploring DNS Traffic
What are the source and destination MAC and IP addresses and port numbers? How do they compare to
the addresses in the DNS query packets?
IP sumber, alamat MAC, dan nomor port dalam paket kueri sekarang menjadi alamat tujuan. IP tujuan,
alamat MAC, dan nomor port dalam paket kueri sekarang menjadi alamat sumber.
b. Expand Domain Name System (response). Then expand the Flags, Queries, and Answers.
c. Observe the results.
Can the DNS server do recursive queries?
Ya, DNS dapat menangani kueri rekursif.
2017 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 7 of 8 www.netacad.com
Lab - Exploring DNS Traffic
Hasil di Wireshark harus sama dengan hasil dari nslookup di Command Prompt.
Reflection
1. From the Wireshark results, what else can you learn about the network when you remove the filter?
Tanpa filter, hasilnya menampilkan paket lain, seperti DHCP dan ARP. Dari paket-paket ini dan informasi yang
terkandung di dalam paket-paket ini, Anda dapat mempelajari tentang perangkat lain dan fungsinya di dalam
LAN.
2017 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 8 of 8 www.netacad.com
Lab - Exploring DNS Traffic
2. How can an attacker use Wireshark to compromise your network security?
Penyerang di LAN dapat menggunakan Wireshark untuk mengamati lalu lintas jaringan dan bisa mendapatkan
informasi sensitif dalam detail paket jika lalu lintas tidak dienkripsi.
2017 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 9 of 8 www.netacad.com