Anda di halaman 1dari 68

Fachri Rahman

11201030
Jaringan Komputer B

LAB 2
Lab - Tracing Route
Objectives
Part 1: Verifying Network Connectivity Using Ping
Langkah 1 - Mulai CyberOps VM - lalu gunakan username dan passworld yang sudah
disediakan
Username : analyst
Passworld ; cyberops
Langkah 2 - Bukalah terminal di VM dan lakukan ping ke remote server seperti www.cisco.com
Selanjutnya, Baris keluaran pertama menampilkan Fully Qualified Domain Name (FQDN). Ini
diikuti dengan alamat IP 104.93.97.215. Cisco menghosting konten web yang sama di server
yang berbeda di seluruh dunia (dikenal sebagai mirrors). Oleh karena itu, tergantung di mana
anda berada secara geografis, FQDN dan alamat IP akan berbeda.
Four pings were sent and a reply was received from each ping. Because each ping received a
response, there was 0% packet loss. On average, it took 3005 ms (3005 milliseconds) for the
packets to cross the network. A millisecond is 1/1,000th of a second. Your results will likely be
different.

Step 2: Tracing a Route to a Remote Server Using Traceroute


Now that basic reachability has been verified by using the ping tool, it is helpful to look more
closely at each network segment that is crossed.

Rute yang dilacak dapat melalui banyak hop dan sejumlah Penyedia Layanan Internet (ISP) yang
berbeda, tergantung pada ukuran ISP anda dan lokasi host sumber dan tujuan. Setiap hop
mewakili sebuah router. Router adalah jenis komputer khusus yang digunakan untuk
mengarahkan lalu lintas di internet. Bayangkan mengambil perjalanan mobil melintasi beberapa
negara menggunakan banyak jalan raya. Pada titik yang berbeda dalam perjalanan anda dating ke
a bercabang di jalan di mana anda memiliki pilihan untuk memilih dari beberapa jalan raya yang
berbeda. Sekarang bayangkan lebih jauh bahwa ada perangkat di setiap persimpangan jalan yang
mengarahkan anda untuk mengambil jalan raya yang benar ke final tujuan anda. Itulah yang
dilakukan oleh router untuk paket di jaringan.

Karena komputer berkomunikasi dalam bilangan biner atau heksadesimal, bukan kata-kata,
router diidentifikasi secara unik menggunakan alamat IP. Alat traceroute menunjukkan kepada
anda jalur apa yang melalui jaringan sebuah paket informasi dibutuhkan untuk mencapai tujuan
akhir. Alat traceroute juga memberi anda gambaran tentang seberapa cepat lalu lintas terjadi
setiap segmen jaringan. Paket dikirim ke setiap router di jalur, dan waktu kembali diukur dalam
milidetik. Note: Pengaturan jaringan CyberOps Workstation VM mungkin perlu diatur ke
adaptor yang dijembatani jika Anda tidak mendapatkan hasil traceroute apa pun. Untuk
memeriksa pengaturan jaringan, buka : Machine > Settings, select Network, pilih tab Adapter
1, terlampir Bridge Adapter.
Melakukan Traceroute
a. Pada terminal, ketik traceroute www.cisco.com
b. If you would like to save the traceroute output to a text file for later review, use the right
carat (>) and the desired filename to save the output in the present directory. In this
example, the traceroute output is saved in the /home/analyst/cisco-traceroute.txt file
traceroute www.cisco.com > cisco-traceroute.txt
c. Lakukan dan simpan hasil traceroute untuk salah satu situs web berikut. Ini adalah
Internet Regional Situs Web Registry (RIR) yang berlokasi di berbagai belahan dunia.
Africa: www.afrinic.net
Australia: www.apnic.net
Europe: www.ripe.net
South America: www.lacnic.net
Note: Some of these routers along the route may not respond to traceroute

Part 3: Trace a Route to a Remote Server Using Web-Based Traceroute Tool


a. Open a web browser in the VM and search for a visual traceroute tool that you can use
in the web browser. Try going to the following website: https://gsuite.tools/traceroute
b. Enter any website you wish. Example: www.twitter.com and Press Trace

Reflection Question
Apa perbedaan traceroute saat membuka www.cisco.com atau situs web lain dari terminal
(lihat pada part2) daripada dari situs online? (Hasil anda dapat bervariasi tergantung di
mana anda berada geografis, dan ISP mana yang menyediakan konektivitas ke sekolah
anda.).
Jawab :
Traceroute dari terminal berbeda dengan traceroute dari situs web domain, seperti
cisco.com, dapat dihosting di banyak situs web atau mirror di seluruh dunia. Hal ini
dilakukan agar waktu akses ke situs akan cepat dari mana saja di dunia.
Lab - Introduction to Wireshark
Objectives

Required Resources
• CyberOps Workstation virtual machine

Part 1: Install and Verify the Mininet Topology


Step 1: Verify your PC’S Interface addresses Mulai CyberOps VM dan masuk menggunakan
kredensial yang telah diberikan.
Username : analyst
Password : cybercops
Step 2: Run the Python script to Install the Mininet Topology
Step 3: Record IP and MAC addresses for H1 and H2
a. Pada prompt Mininet, buka jendela terminal pada host H1 dan H2. Ini akan membuka jendela
terpisah untuk host ini. Setiap host akan memiliki konfigurasi terpisah untuk jaringan termasuk
alamat IP dan MAC unik.

b. Pada prompt di Node: H1, ketik ip address untuk memverifikasi alamat IPv4 dan mencatat
alamat MAC. Untuk Node: H2 lakukan hal yang sama
Host-Interface Ip Address MAC Address

H1-eth0 10.0.0.11/24 6e:1d:d8:45:c6:75

H2-eth0 10.0.0.12/24 9a:2c:45:3e:ec:04

Part 2: Capture and Analyze ICMP Data in Wireshark

Step 1: Examine the captured data on the same LAN.


a. On Node: H1, ketik wireshark & to start Wireshark (pop-up warning akan muncul) klik OK
untuk melanjutkan.

b. Pada jendela Wireshark di bawah judul capture, pilih antaramuka H1-eth0. Klik mulai untuk
menangkap lalu lintas data.
c. Pada Node: H1, tekan tombol Enter, jika perlu, untuk mendapatkan prompt. Kemudian ketik
ping -c 5 10.0.0.12 untuk melakukan ping H2 sebanyak lima kali. Opsi perintah -c menentukan
jumlah ping. 5 menentukan bahwa lima ping harus dikirim. Semua ping akan berhasil.
d. Arahkan jendela Wireshark, klik Stop untuk menghentikan pengambilan paket.
e. Filter dapat diterapkan hanya untuk menampilkan lalu lintas yang tertarik. Ketik icmp di
bidang filter dan klik apply.
f. Jika perlu, klik frame pertama di bagian atas Wireshark. Perhatikan bahwa kolom sumber
memiliki alamat IP H1, dan kolom tujuan memiliki alamat IP H2.

g. Dengan bingkai PDU ini masih dipilih di bagian atas, navigasikan ke bagian tengah. Klik
panas ke kiri baris Ethernet II untuk melihat alamat MAC Tujuan dan Sumber.

Note: Dalam contoh sebelumnya dari permintaan ICMP yang ditangkap, data ICMP
dienkatulapsi di dalam IPv4 paket PDU (header IPv4) yang kemudian dienkapsulasi dalam frame
PDU Ethernet II (header Ethernet II) untuk transisi pada LAN.
Step 2: Examine the captured data on the remote LAN
Anda akan melakukan ping ke host jarak jauh (host tidak di LAN) dan memeriksa data yang
dihasilkan dari ping tersebut. Kemudian kamu akan tentukan apa yang berbeda tentang data ini
dari data yang diperiksa di Bagian 1.

a. Pada prompt Mininet, mulai jendela terminal pada host H4 dan R1.
b. Saat diminta di Node: H4, masukkan alamat ip untuk memverifikasi alamat IPv4 dan catat
alamat MAC. Kerjakan hal yang sama untuk Node: R1. Ketik ip address untuk mencetak ip
address interface.
Host-Interface Ip Address MAC Address

H4-eth0 172.16.0.40/12 72:4c:72:8d:a6:67

R1-eth1 10.0.0.1/24 c2:6e:90:5e:f4:f3

R1-eth2 172.16.0.1/12 36:51:c7:34:14:93

c. Mulailah wireshark pada H1 dengan Capture > Start. Bisa juga menekan Start atau menekan
Ctrl + E tanpa menyimpang tangkapan baru.
d. H4 adalah server jarak jauh yang disimulasikan. Ping H4 dari H1. Ping harus berhasil.

e. Tinjau kembali data yang diambil di Wireshark. Periksa alamat IP dan MAC yang anda ping.
Perhatikan alamat MAC itu adalah untuk antar muka R1-eth1. Cantumkan alamat IP dan MAC
tujuan.
IP Address: 172.16.0.40
MAC Address: 7a:03:f3:f2:ba:cf
f. Di jendela utama CyberOps VM, masukkan quit untuk menghentikan Mininet.

g. Untuk membersihkan semua proses yang digunakan oleh Mininet, masukkan perintah sudo mn
-c pada prompt. Note: Lakukan pembersihan sebelum memberhentikan Mininet
Lab – Using Wireshark to Examine Ethernet Frames
Mininet Topology

Part 1: Examine the Header Field in an Ethernet II Frame


Di bagian 1 ini, anda akan memeriksa bidang header dan konten dalam Frame Ethernet II yang
disediakan untuk anda. Wireshark capture akan digunakan untuk memeriksa konten di bidang
tersebut.
Step 1: Review the Ethernet II header field descriptions and lengths

Preamble Destination Source Frame Type Data FCS


Address Address

8 Byte 6 Byte 6 Byte 2 Byte 46 - 1500 Byte 4 Byte

Step 2: Examine Ethernet frames in a Wireshark capture Wireshark capture di bawah ini
menunjukkan paket yang dihasilkan dari ping yang dikeluarkan dari host PC ke default gateway.
Filter telah diterapkan ke Wireshark untuk melihat protocol ARP dan ICMP saja. Itu sesi dimulai
dengan permintaan ARP dari router gateway, diikuti oleh empat permintaan ping dan balasan.
Step 3: Examine the Ethernet II header contents of an ARP request. The following table takes the
first frame in the Wireshark capture and displays the data in the Ethernet II header fields
What is significant about the contents of the destination address field?
- Semua host di LAN akan menerima bingkai siaran ini. Host dengan alamat IP
192.168.1.1 (gateway default) akan mengirim balasan unicast ke sumber (host PC).
Balasan ini berisi alamat MAC NIC dari Default Gateway.
Why does the PC send out a broadcast ARP prior to sending the first ping request?
- Sebelum PC dapat mengirim permintaan ping ke host, PC perlu menentukan alamat
MAC tujuan sebelum dapat membuat frame header untuk permintaan ping tersebut.
Siaran ARP digunakan untuk meminta alamat MAC dari host dengan alamat IP yang
terdapat dalam ARP.
What is the MAC address of the source in the first frame?
- f4:8c:50:62:62:6d
What is the Vendor ID (OUI) of the Source’s NIC?
- IntelCor (Intel Corporation)
What portion of the MAC address is the OUI?
- 3 oktet pertama dari alamat MAC menunjukkan OUI
What is the Source’s NIC serial number?
- 62:62:6d
Part 2: Use Wireshark to Capture and Analyze Ethernet Frames
Di bagian 2, anda akan menggunakan Wireshark untuk menangkap frame Ethernet local dan
jarak jauh. Anda kemudian akan memeriksa informasi yang terkandung dalam bidang header
bingkai.
Step 1: Examine the network configuration of H3
Start and log into your CyberOps Workstation VM using the following credentials:
Username: analyst
Password: cyberops
b. Buka terminal untuk memulai Mininet dan masukkan perintah berikut pada prompt. Ketika
sudah mengetik perintah tersebut, ketikkan cyberops sebagai kata sandi.

c. Pada prompt Mininet, mulai jendela terminal pada host H3.


d. Pada prompt di Node: H3, masukkan alamat IP untuk memverifikasi alamat IPv4 dan catat
alamat MAC.

Host-Interface Ip Address MAC Address

H3-eth0 10.0.0.13/24 fe:eb:57:26:30:1b

e. Pada prompt di Node: H3, masukkan netstat -r untuk menampilkan informasi gateway default

What is the IP address of the default gateway for the host H3-eth0
IP address : 10.0.0.1
Step 2: Clear the ARP cache on H3 and start capturing traffic on H3-eth0
a. Di jendela terminal untuk Node: H3, masukkan arp -n untuk menampilkan konten cache ARP.

b. Jika ada informasi ARP yang ada di cache, bersihkan dengan memasukkan perindah berikut:
arp -d ip address. Ulangi sampai semua informasi cache telah dihapus.

( error pak, maaf)


c. Di jendela terminal unutk Node: H3, buka Wireshark dan mulai pengambilan paket untuk
antarmuka H3-eth0
Step 3: Ping H1 of H3
a. Dari terminal H3, ping gateway default dan berhenti setelah mengirim 5 paket permintaan.

b. Setelah ping selesai, stop wireshark capture.


Step 4: Filter Wireshark to Examine display only ICMP traffic
Apply the icmp filter to the captured traffic so only ICMP traffic is shown in the results

Step 5: Examine the first Echo (ping) request in Wireshark Jendela utama Wireshark dibagi
menjadi tiga bagian: panel Daftar paket (atas), panel Detail paket (tengah), dan panel Packet
Bytes (bawah). Jika anda memilih antarmuka yang benar untuk menangkap paket di Langkah 3,
Wireshark harus menampilkan informasi ICMP di panel Daftar paket Wireshark, mirip dengan
contoh berikut.
a. In the Packet List pane (top section), click the first frame listed. You should see Echo (ping)
request under the Info heading. This should highlight the line blue.
b. Examine the first line in the Packet Details pane (middle section). This line displays the length
of the frame; 98 bytes in this example.
c. The second line in the Packet Details pane shows that it is an Ethernet II frame. The source
and destination MAC addresses are also displayed.

What is the MAC address of the PC’s NIC?


0e:14:ff96:64:6a
What is the default gateway’s MAC Address?
33:33:00:00:00:02

d. You can click the arrow at the beginning of the second line to obtain more information about
the Ethernet II frame.

What type of frame is displayed?


(0x86dd)IPv6
e. Dua baris terakhir yang ditampilkan di bagian tengah memberikan informasi tentang bidang
data bingkai. Perhatikan bahwa data berisi informasi alamat IPv4 sumber dan tujuan
What is the source IP address?
10.0.0.13
What is the destination IP address?
10.0.0.1

f. Anda dapat mengklik garis mana pun di bagian tengah untuk menyorot bagian bingkai tersebut
(hex dan ASCII) di Panel Paket Bytes (bagian bawah). Klik baris Protokol Pesan Kontrol
Internet di tengah bagian dan periksa apa yang disorot di panel Packet Bytes.
g. Klik bingkai berikutnya di bagian atas dan periksa bingkai balasan Echo. Perhatikan bahwa
sumber dan alamat MAC tujuan telah terbalik, karena bingkai ini dikirim dari router gateway
default sebagai balasan untuk ping pertama. What device and MAC address is displayed as the
destination address? Host H3, f6:b1:ef:89:44:ad

Step 6: Start a new capture in Wireshark


a. Klik ikon Start Capture untuk memulai pengambilan Wireshark baru. Anda akan menerima
jendela sembulan yang menanyakan apakah Anda ingin menyimpan paket yang diambil
sebelumnya ke file sebelum memulai pengambilan baru. Klik lanjutkan tanpa menyimpan.
b. Di jendela terminal Node: H3, kirim 5 paket permintaan ping ke 172.16.0.40 c. Berhentikan
capture ketika ping sudah selesai.
c. Berhentikan capture ketika ping sudah selesai.

Step 7: Examine the new data in the packet list pane of Wireshark
In the first echo (ping) request frame, what are source and destination MAC Address?
Source: 22:79:dd:eb:b0:25
Destination: f6:b1:ef:89:44:ad

What are the source and destination IP addresses contained in the data field of the frame?
Source: 10.0.0.13
Destination: 172.16.0.40

Compare these addresses to the addresses you received in Step 5. The only address that changed
is the destination IP address. Question:
Why has the destination IP address changed, while the destination MAC address remained the
same? Frame layer 2 tidak pernah meninggalkan LAN. Ketika ping dikeluarkan ke host jarak
jauh, sumber akan menggunakan alamat MAC Gateway Default untuk tujuan bingkai. Default
gateway menerima paket, menghapus informasi frame layer 2 dari paket dan kemudian membaut
header frame baru dengan alamat MAC hop berikutnya. Proses ini berlanjut dari router ke router
hingga paket mencapai alamat IP tujuannya.

Reflection

Wireshark does not display the preamble field of a frame header. What does the preamble
contain? The preamble berisi tujuh octet dari 1010 urutan bergantian, dan satu octet yang
menandakan awal bingkai, 10101011.
Lab – Using Wireshark to Observe the TCP 3-Way Handshake
Mininet Topology

Part 1: Prepare the Hosts to Capture the Traffic

a. Seperti biasa, mulai VM cyberops, dan login dengan username dan passworld
seperti yg di lms
b. Mulai mininet seperti sebelumnya

c. Start host H1 and H4 in Mininet

d. mulai web server di H4.


[root@secOps analyst]# /home/analyst/lab.support.files/scripts/reg_server_start.sh

e. For security purposes, you are not able to run Firefox from the root user account.
On host H1, use the switch user command to switch from the root user to the
analyst user account:
[root@secOps analyst]# su analyst
f. Mulai browser pada H1. Ini akan memakan waktu beberapa saat.

g. After the Firefox window opens, start a tcpdump session in the terminal Node: H1
and send the output to a file called capture.pcap. With the -v option, you can watch
the progress. This capture will stop after capturing 50 packets, as it is configured
with the option -c 50.
h. After the tcpdump starts, quickly navigate to 172.16.0.40 in the Firefox web
browser. Akan muncul seperti dibawah jika berhasil

Part 2: Analyze the Packets using Wireshark


Step 1: Apply a filter to the saved capture.
a. Press ENTER to see the prompt. Start Wireshark on Node: H1. Click OK when
prompted by the warning regarding running Wireshark as superuser.
[analyst@secOps ~]$ wireshark &

b. In Wireshark, click File > Open. Select the saved pcap file located at
/home/analyst/capture.pcap.
c. Apply a tcp filter to the capture. In this example, the first 3 frames are the
interested traffic

Step 2: Examine the information within packets including IP addresses, TCP port
numbers, and TCP control flags
a. Dalam contoh ini, frame 1 adalah awal dari three-way handshake antara PC dan server
di H4. Di panel daftar paket (bagian atas jendela utama), pilih paket pertama, jika perlu.
b. Klik panah di sebelah kiri Transmission Control Protocol di panel detail paket untuk
memperluasnya dan memeriksa informasi TCP. Cari informasi port sumber dan tujuan.
c. Klik panah di sebelah kiri Bendera. Nilai 1 berarti telah ditetapkan. Cari bendera yang
diatur di paket ini.

What is the the TCP source port number?


- Port source is 47362
How would you classify the source port?
- Dynamic or Private
What is the TCP destination port number?
- Port 80
How would you classify the destination port?
- port HTTP atau web protocol
Which flag (or flags) is set?
- SYN
What is the relative sequence number set to?
- 0
d. Select the next packet in the three-way handshake. In this example, this is frame 2.
This is the web server replying to the initial request to start a session.

What are the values of the source and destination ports?


Source nya adalah 80 dan destination nya adalah 47362
Which flags are set?
SYN (Syn flag) dan ACK (The Acknowledgement flag)
What are the relative sequence and acknowledgement numbers set to?
Relative sequence number nya 1 dan relative acknowledgement nya 1

e. Finally, select the third packet in the three-way handshake. Examine the third and final
packet of the handshake.
Periksa paket three-way handshake ketiga dan terakhir Which flag (or flags) is set.
- ACK

Urutan relative dan nomor pengakuan diatur ke 1 sebagai titik awal.


Selanjutnya TCP koneksi dibuat dan komunikasi antara komputer sumber dan server web
dapat mulai.

Part 3: View the Packets using tcpdump


You can also view the pcap file and filter for the desired information.
a. Open a new terminal window, enter man tcpdump. Note: You may need to press
ENTER to see the prompt.
Using the manual pages available with the Linux operating system, you read or
search through the manual pages for options for selecting the desired information
from the pcap file

To search through the man pages, you can use / (searching forward) or ?
(searching backward) to find specific terms, and n to forward to the next match
and q to quit. For example, search for the information on the switch -r, type /-r.
Type n to move to the next match. Question: What does the switch -r do?
- Opsi -r memungkinkan Anda untuk membaca paket dari file yang disimpan
menggunakan opsi -w dengan tcpdump atau alat lain yang menulis file pcap
atau pcap-ng seperti Wireshark.
b. In the same terminal, open the capture file using the following command to view
the first 3 TCP packets captured:

Untuk melihat three-way handshake, anda mungkin perlu menambah jumlah baris
setelah opsi -c
c. Arahkan ke terminal yang digunakan untuk memulai Mininet. Hentikan Mininet
dengan memasukkan quit di main. Jendela terminal CyberOps VM.

d. d. After quitting Mininet, enter sudo mn -c to clean up the processes started by


Mininet. Enter the password cyberops when prompted.
[analyst@secOps ~]$ sudo mn -c [sudo] password for analyst:

Reflection Question
1. Ada ratusan filter yang tersedia di Wireshark. Jaringan besar dapat memiliki
banyak filter dan banyak berbagai jenis lalu lintas. Sebutkan tiga filter yang
mungkin berguna bagi administrator jaringan.
- Filter TCP, specific IP Addresses (source and/or destination) dan protocol
seperti HTTP
2. What other ways could wireshark be used in a production network?
- Wireshark sering digunakan untuk tujuan keamanan untuk analisis
after-the-fact dari lalu lintas normal atau setelah serangan jaringan. Protokol
atau layanan baru mungkin perlu ditangkap untuk menentukan port atau
port apa yang digunakan.
Lab - Using Wireshark to Examine a UDP DNS Capture Topology

Part 1 : Record a PC’s IP configuration information


In Part 1, you will use commands on your CyberOps Workstation VM to find and record
the MAC and IP addresses of your VM’s virtual network interface card (NIC), the IP
address of the specified default gateway, and the DNS server IP address specified for the
PC. Record this information in the table provided. The information will be used in parts
of this lab with packet analysis.
Description Settings

Ip Address 192.168.1.8/24

MAC Address 08:00:27:8f:c8:a3

Default Gateway IP Address 192.168.1.1

DNS server Ip Address 8.8.4.4


a. Your CyberOps Workstation VM network settings should be set to bridged
adapter. To check your network settings go to: Machine > Settings, select
Network, the tab Adapter 1, Attached to: Bridged Adapter.

b. Buka terminal di VM. Masukkan infconfig pada prompt untuk menampilkan


informasi antarmuka. Jika anda tidak memiliki alamat IP di jaringa local anda,
jalankan perintah berikut di terminal

c. At the terminal prompt, enter cat /etc/resolv.conf to determine the DNS server.
d. At the terminal prompt, enter cat /etc/resolv.conf to determine the DNS server.

e. At the terminal prompt, enter netstat -rn to display the IP routing table to the
default gateway IP address.
[analyst@secOps ~]$ netstat -rn

Note: Alamat IP DNS dan Alamat IP Gateway sering kali sama, terutama dalam
jaringan ukuran kecil. Namun, dalam jaringan bisnis atau sekolah, alamatnya
kemungkinan besar akan berbeda
Part 2: Use Wireshark to Capture DNS Queries and Responses
Pada bagian 2, anda akan mengatur Wireshark untuk menangkap kueri DNS dan paket
response. Ini akan menunjukkan penggunaan protokol transport UDP saat berkomunikasi
dengan server DNS.
a. In the terminal window, start Wireshark and click OK when prompted.

b. In the Wireshark window, select and double-click enp0s3 from the interface list.

c. Open the web browser and navigate to www.google.com.


d. Click Stop to stop the Wireshark capture when you see Google’s home page.

Part 3: Analyze Captured DNS or UDP Packets

Step 1: Filter DNS packets. a. In the Wireshark main window, type dns in the Filter field.
Click Apply
b. In the packet list pane (top section) of the main window, locate the packet that includes
Standard query and A www.google.com. See frame 429 above as an example.

Step 2: Examine the fields in a DNS query packet


a. In the first line in the packet details pane, frame 429 had 74 bytes of data on the
wire. This is the number of bytes it took to send a DNS query to a named server
requesting the IP addresses of www.google.com. If you used a different web
address, such as www.cisco.com, the byte count might be different.
b. The Ethernet II line displays the source and destination MAC addresses. The
source MAC address is from your VM because your VM originated the DNS
query. The destination MAC address is from the default gateway because this is
the last stop before this query exits the local network. Question: Is the source
MAC address the same as the one recorded from Part 1 for the VM?
Jawabannya Iya.
c. In the Internet Protocol Version 4 line, the IP packet Wireshark capture indicates
that the source IP address of this DNS query is 192.168.8.10 and the destination IP
address is 8.8.4.4. In this example, the destination address is the DNS server. Can
you identify the IP and MAC addresses for the source and destinations of this
packet?
Can you identify the IP and MAC addresses for the source and destinations of this
packet? Device IP Address MAC Address Source Workstation 192.168.1.29
08:00:27:c4:7e:55 Destination DNS Server / Default Gateway 8.8.4.4
44:59:43:28:16:c6

Device IP Address MAC Address

Source Workstation 192.168.1.29 08:00:27:c4:7e:55

Destination DNS Server / 8.8.4.4 44:59:43:28:16:c6


Default Gateway

d. A UDP header only has four fields: source port, destination port, length, and
checksum. Each field in a UDP header is only 16 bits as depicted below.
In this example, the length of the UDP segment is 40 bytes. The length of the UDP
segment in your example may be different. Out of 40 bytes, 8 bytes are used as the
header. The other 32 bytes are used by The 32 bytes of DNS query data is in the
following illustration in the packet bytes pane (lower section) of the Wireshark
main window.

Checksum digunakan untuk menentukan integritas header UDP setelah melintasi


internet. Header UDP memiliki overhead yang rendah karena UDP tidak memiliki
bidang yang terkait dengan three way handshake di TCP. Setiap masalah
keandalan transfer data yang terjadi harus ditangani oleh lapisan aplikasi. Perluas
seperlunya untuk melihat detailnya. Catat hasil Wireshark anda pada tabel di
bawah ini
Description Wireshark result

Frame size 74 bytes

Source MAC Address 08:00:27:82:75:df

Destination MAC Address 00:78:cd:01:f6:50

Source Ip Address 192.168.8.10

Destination Ip Address 8.8.4.4

Source Port 58029

Destination Port 53

Is the source IP address the same as the local PC’s IP address you recorded in Part
1? Yes

Is the destination IP address the same as the default gateway noted in Part 1? No,
Default gateway nya ialah 192.168.1.1 dan DNS Servernya 8.8.4.4

Step 3: Examine the fields in a DNS response packet

a. In this example, frame 488 is the corresponding DNS response packet. Notice the
number of bytes on the wire is 90. It is a larger packet compared to the DNS query
packet. This is because the DNS response packet will include a variety of
information about the domain.
b. In the Ethernet II frame for the DNS response, what device is the source MAC
address and what device is the destination MAC address? Source MAC adalah
default gateway dan destination MAC adalah VM.

c. Notice the source and destination IP addresses in the IP packet. Questions:

What is the destination IP address?


- 192.168.8.10
What is the source IP address?
- 8.8.4.4
What happened to the roles of source and destination for the VM and default
gateway?
- VM dan server DNS telah membalikkan peran mereka dalam query DNS
dan paket respons

d. In the UDP segment, the role of the port numbers has also reversed. The
destination port number is 58029. Port number 58029 is the same port that was
generated by the VM when the DNS query was sent to the DNS server. Your VM
listens for a DNS response on this port.

The source port number is 53. The DNS server listens for a DNS query on port 53
and then sends a DNS response with a source port number of 53 back to the
originator of the DNS query.

When the DNS response is expanded, notice the resolved IP addresses for
www.google.com in the Answers section.
Reflection Question
What are the benefits of using UDP instead of TCP as a transport protocol for
DNS? TCP as a transport protocol for DNS? UDP as a transport protocol
provides quick session establishment, quick response, minimal
overhead, no need for retries, segment reassembly, and
acknowledgment of received packets.
Lab – Using Wireshark to Examine TCP and UDP Captures

Topology - Part 1 (FTP)

Mininet Topology - Part 2 (TFTP)


Part 1: Identify TCP Header Fields and Operation Using a Wireshark FTP Session
Capture

in Part 1, you use Wireshark to capture an FTP session and inspect TCP header fields.
Step 1: Start a Wireshark capture. a. Start and log into the CyberOps Workstation
VM.
a. Open a terminal window and start Wireshark. The ampersand (&) sends the
process to the background and allows you to continue to work in the same
terminal. [analyst@secOps ~]$ wireshark &

b. Start a Wireshark capture for the enp0s3 interface.


c. Open another terminal window to access an external ftp site. Enter ftp ftp.cdc.gov
at the prompt. Log into the FTP site for Centers for Disease Control and
Prevention (CDC) with user anonymous and no password.
[analyst@secOps ~]$ ftp ftp.cdc.gov
Step 2: Download the Readme file
a. Cari dan unduh file Readme dengan memasukkan perintah ls untuk membuat
daftar file

b. Enter the command get Readme to download the file. When the download is
complete, enter the command quit to exit. (Note: If you are unable to download the
file, you can proceed with the rest of the lab.)

c. After the transfer is complete, enter quit to exit ftp.

Step 3: Stop the Wireshark capture.


Step 4: View the Wireshark main window.
Wireshark captured many packets during the FTP session to ftp.cdc.gov. To limit
the amount of data for analysis, apply the filter tcp and ip.addr == 198.246.117.106 and
click Apply
Step 5: Analyze the TCP fields
After the TCP filter has been applied, the first three packets (top section) display the
sequence of [SYN], [SYN, ACK], and [ACK] which is the TCP three-way handshake.

TCP is routinely used during a session to control datagram delivery, verify datagram
arrival, and manage window size. For each data exchange between the FTP client and
FTP server, a new TCP session is started. At the conclusion of the data transfer, the TCP
session is closed. When the FTP session is finished, TCP performs an orderly shutdown
and termination.

In Wireshark, detailed TCP information is available in the packet details pane (middle
section). Highlight the first TCP datagram from the host computer, and expand portions
of the TCP datagram, as shown below.
From the VM to CDC server (only SYN bit is set to 1)

Description Wireshark Result

Source Ip Address 192.168.1.8

Destination Ip Address 198.246.117.106

Source Port number 42544

Destination port Number 21

Sequence Number 0

Acknowledgment number Tidak berlaku untuk pengambilan ini ( No


set )

Header length 40 byte

Window size 42340


Isi informasi berikut mengenai pesan SYN-ACK

Description Wireshark Result

Source Ip Address 192.168.1.8

Destination Ip Address 198.246.117.106

Source Port number 42544

Destination port Number 21

Sequence Number 0

Acknowledgment number Tidak berlaku untuk pengambilan ini ( No


set )

Header length 24 byte

Window size 32120

In the final stage of the negotiation to establish communications, the VM sends an


acknowledgment message to the server. Notice that only the ACK bit is set to 1, and the
Sequence number has been incremented to 1.
Description Wireshark Result

Source Ip Address 192.168.1.8

Destination Ip Address 198.246.117.106

Source Port number 42544

Destination port Number 21

Sequence Number 0

Acknowledgment number Tidak berlaku untuk pengambilan ini ( No


set )

Header length 20 byte

Window size 42340


How many other TCP datagrams contained a SYN bit? Satu. Paket pertama yang dikirim
oleh host pada awal sesi TCP.

Setelah sesi TCP dibuat, lalu lintas FTP dapat terjadi antara PC dan server FTP. Klien
FTP dan server berkomunikasi satu sama lain, tidak menyadari bahwa TCP memiliki
control dan manajemen atas sesi.
Ketika server FTP mengirim Responss: 220 ke klien FTP, sesi TCP pada klien FTP
mengirim pengakuan ke sesi TCP di server. Urutan ini terlihat dalam tangkapan
Wireshark di bawah ini.

When the FTP session has finished, the FTP client sends a command to “quit”. The FTP server
acknowledges the FTP termination with a Response: 221 Goodbye. At this time, the FTP server
TCP session sends a TCP datagram to the FTP client, announcing the termination of the TCP
session. The FTP client TCP session acknowledges receipt of the termination datagram, then
sends its own TCP session termination. When the originator of the TCP termination (the FTP
server) receives a duplicate termination, an ACK datagram is sent to acknowledge the
termination and the TCP session is closed. This sequence is visible in the diagram and capture
below.
Dengan menerapkan filter ftp, seluruh urutan lalu lintas FTP dapat diperiksa di Wireshark.
Perhatikan urutan kejadian selama sesi FTP ini. Nama pengguna anonim digunakan untuk
mengambil file Readme. Setelah transfer file selesai, pengguna mengakhiri sesi FTP.

Terapkan filter TCP lagi di Wireshark untuk memeriksa penghentian sesi TCP. Empat paket
adalah ditransmisikan untuk penghentian sesi TCP. Karena koneksi TCP full duplex, setiap arah
harus berakhir secara independent. Periksa alamat sumber dan tujuan.

Part 2: Identify UDP Header Fields and Operation Using a Wireshark TFTP Session
Capture
Step 1: Start Mininet and tftpd service
a. Mulai Mininet. Masukkan cyberops sebagai kata sandi saat diminta
b. Mulai H1 dan H2 di mininet prompt

c. c. In the H1 terminal window, start the tftpd server using the provided script.

Step 2: Create a file for tftp transfer


a. Create a text file at the H1 terminal prompt in the /srv/tftp/ folder
b. Verify that the file has been created with the desired data in the folder.
c. Because of the security measure f or this particular tftp server, the name of the receiving
file needs to exist already. On H2, create a file named my_tftp_data.

Step 3: Capture a TFTP session in Wireshark


a. Start Wireshark in H1

b. From the Edit menu, choose Preferences and click the arrow to expand Protocols. Scroll
down and select UDP. Click the Validate the UDP checksum if possible check box and
click OK.

c. Start a Wireshark capture on the interface H1-eth0.


d. Start a tftp session from H2 to the tftp server on H1 and get the file my_tftp_data.
[root@secOps analyst]# tftp 10.0.0.11 -c get my_tftp_data
e. Stop the Wireshark capture. Set the filter to tftp and click Apply. Use the three TFTP
packets to fill in the table and answer the questions in the rest of this lab.

Menggunakan penangkapan Wireshark dari datagram UDP pertama, isi informasi tentang
header UDP. Itu nilai checksum adalah nilai heksadesimal (basis 16), dilambangkan
dengan kode 0x sebelumnya.

How does UDP verify datagram integrity? Sebuah checksum dikirim dalam datagram
UDP, dan nilai checksum datagram dihitung ulang setelah diterima. Jika checksum yang
dihitung identik dengan checksum yang dikirim, maka datagram UDP dianggap lengkap

Description Wireshark Result

Source Ip Address 10.0.0.12

Destination Ip Address 10.0.0.11

Source Port number 47393

Destination port Number 69

UDP Message length 32

UDP checksum 0x21ec


How does UDP verify datagram integrity? Sebuah checksum dikirim dalam datagram UDP, dan
nilai checksum datagram dihitung ulang setelah diterima. Jika checksum yang dihitung identik
dengan checksum yang dikirim, maka datagram UDP dianggap lengkap

Examine the first frame returned from the tftpd server. Fill in the information about the UDP
header

Description Wireshark Result

Source Ip Address 10.0.0.12

Destination Ip Address 10.0.0.11

Source Port number 34567

Destination port Number 47393

UDP Message length 46

UDP checksum 0x1456 (“incorrect, should be 0xce60


(maybe caused by “UDP checksum
offload”?)
Step 4: Clean up
a. in the terminal that started Mininet, enter quit at the prompt.

b. At the prompt, enter sudo mn –c to clean up the processes started by Mininet.


Reflection Question
This lab provided the opportunity to analyze TCP and UDP protocol operations from
captured FTP and TFTP sessions. How does TCP manage communication differently
than UDP? TCP mengelola komunikasi jauh berbeda dari UDP karena keandalan dan
pengiriman terjamin memerlukan kontrol tambahan atas saluran komunikasi. UDP
memiliki lebih sedikit overhead dan control, dan protokol lapisan atas harus menyediakan
beberapa jenis control pengakuan. Kedua protocol, bagaimanapun mengangkut data
antara klien dan server menggunakan protokol lapisan aplikasi dan sesuai untuk protokol
lapisan atas yang didukung masing-masing.
Lab – Using Wireshark to Examine HTTP and HTTPS Traffic
Part 1: Capture and View HTTP Traffic
In this part, you will use tcpdump to capture the content of HTTP traffic. You will use
command options to save the traffic to a packet capture (pcap) file. These records can
then be analyzed using different applications that read pcap files, including Wireshark.

Step 1: Start the virtual machine and log in.


Start the Cyber Ops Workstation VM. Use the following user credentials:
Username: analyst Password: cyberops

Step 2: Open a terminal and start tcpdump


a. Open a terminal application and enter the command ip address.
[analyst@secOps ~]$ ip address
b. List the interfaces and their IP addresses displayed in the ip address output.
c. While in the terminal application, enter the command sudo tcpdump –i enp0s3 –s 0 –w
httpdump.pcap.
Enter the password cyberops for the user analyst when prompted.

Perintah ini memulai tcpdump dan mencatat lalu lintas jaringan pada interface enp0s3.

Opsi perintah -i memungkinkan anda untuk menentukan interface. Jika tidak ditentukan,
tcpdump akan menangkap semua lalu lintas di semua interface.
Opsi perintah -s menentukan Panjang snapshot untuk setiap paket. Anda harus membatasi
snaplen untuk nomor terkecil yang akan menangkap informasi protocol yang anda minati.
Pengaturan snaplen ke 0 menyetelnya ke default 262144, untuk kompatibilitas mundur
dengan versi tcpdump yang lama.
Opsi perintah -w digunakan untuk menulis hasil dari perintah tcpdump ke file.
Menambahkan ekstensi .pcap memastikan bahwa sistem operasi dan aplikasi akan dapat
membaca file. Semua direkam lalu lintas akan dicetak ke file httpdump.pcap di direktori
home analyst pengguna.

Gunakan halaman manual untuk tcpdump untuk menentukan penggunaan opsi perintah -s
dan -w.

d. Open a web browser from the launch bar within the CyberOps Workstation VM.
Navigate to http://www.altoromutual.com/login.jsp
Because this website uses HTTP, the traffic is not encrypted. Click the Password field to
see the warning pop up.

e. Masukkan username Admin dan password Admin dan klik login.


f. Tutup web browser
g. Kembali ke terminal tcpdump yang berjalan. Masukkan CTRL + C untuk
menghentikan pengambilan paket.

Step 3: View the HTTP capture.


a. Click the File Manager icon on the desktop and browse to the home folder for the user
analyst. Doubleclick the httpdump.pcap file, in the Open With dialog box scroll down to
Wireshark and then click Open.

b. In the Wireshark application, filter for http and click Apply


c. Browse through the different HTTP messages and select the POST message.

d. In the lower window, the message is displayed. Expand the HTML Form URL
Encoded: application/x-www-form-urlencoded section.
What two pieces of information are displayed? uid Admin dan password Admin.

e. Close the Wireshark application.

Part 2: Capture and View HTTPS Traffic


Step 1: Start tcpdump within a terminal.
a. While in the terminal application, enter the command sudo tcpdump –i enp0s3 –s 0 –w
httpsdump.pcap. Enter the password cyberops for the user analyst when prompted.

b. Open a web browser from the launch bar within the CyberOps Workstation VM.
Navigate to www.netacad.com.

Note: jika menerima pesan “Secure Connection Failed” di halaman web. Kemungkinan
date dan time tidak benar. Update date dan time menggunakan command di bawah, ubah
sesuai dengan hari dan jam anda.
What do you notice about the website URL? Website ini menggunakan protokol HTTPS
dan secured.
c. Click log in
d. Enter in your NetAcad username and password. Click Next.

e. Close the web browser in the VM.


f. Return to the terminal window where tcpdump is running. Enter CTRL+C to stop the
packet capture.

Step 2: View the HTTPS capture.


The tcpdump executed in Step 1 printed the output to a file named httpsdump.pcap. This file is
located in the home directory for the user analyst.
a. Click the File System icon on the desktop and browse to the home folder for the user
analyst. Open the httpsdump.pcap file
b. Di aplikasi Wireshark, perluas jendela pengambilan secara vertikal lalu filter berdasarkan
lalu lintas HTTPS melalui port 443. Masukkan tcp.port == 443 di filter, dan klik apply.
c. Jelajahi pesan HTTPS yang berbeda dan pilih pesan Data Aplikasi

d. Di jendela bawah, pesan ditampilkan. What has replaced the HTTP section that was in
the previous capture file? Setelah bagian TCP, sekarang ada bagian Secure Sockets Layer
(SSL/TLS 1.2) bukan HTTP.
e. Perluas sepenuhnya bagian Secure Sockets Layer
f. Klik Encrypted Application Data. Is the application data in a plaintext or readable
format? Tidak, payload data dienkripsi menggunakan TLSv1.2 dan tidak dapat dilihat.
g. Tutup semua windows dan matikan virtual machine.

Reflection Question
What are the advantages of using HTTPS instead of HTTP? Saat menggunakan HTTPS, muatan
data pesan dienkripsi dan hanya dapat dilihat oleh perangkat yang merupakan bagian dari
percakapan terenkripsi.
Are all websites that use HTHTPS considered trustworthy? Tidak, karena situs web jahat dapat
menggunakan HTTPS agar tampak sah sambal tetap menangkap data pengguna dan login.

SEKIAN DAN TERIMA KASIH PAK :)

Anda mungkin juga menyukai