{"id":90,"date":"2025-06-14T17:19:23","date_gmt":"2025-06-14T17:19:23","guid":{"rendered":"https:\/\/epbrtcybersecurityportfolio.xyz\/?p=90"},"modified":"2025-06-14T17:20:50","modified_gmt":"2025-06-14T17:20:50","slug":"ipv4","status":"publish","type":"post","link":"https:\/\/epbrtcybersecurityportfolio.xyz\/?p=90","title":{"rendered":"IPv4"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Lab 1.4 \u2013 IPv4 Packet Analysis<\/h3>\n\n\n\n<p>This lab focused on examining network traffic at the <strong>IPv4 layer<\/strong>, with an emphasis on identifying abnormal or suspicious behavior within the packet capture. <\/p>\n\n\n\n<p><strong>Lab Setup<\/strong><\/p>\n\n\n\n<p>For this exercise, I used the capture file called <code>ipv4.pcap<\/code>.<\/p>\n\n\n\n<p>Once downloaded, I opened the file in Wireshark and began my analysis.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Exercise 1 \u2013 Analyzing the First IPv4 Packet<\/h3>\n\n\n\n<p><strong>a) What version of IP is the first packet?<\/strong><\/p>\n\n\n\n<p>We can find this either by looking at the Ethernet header or the IP header. Looking at the IP Header, the IP version is located in the higher-order nibble of the 0 byte offset. We can see there that this is an IPv4 packet.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"528\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-24-1024x528.png\" alt=\"\" class=\"wp-image-92\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-24-1024x528.png 1024w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-24-300x155.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-24-768x396.png 768w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-24-1536x792.png 1536w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-24.png 1572w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>b) What is the IP Time To Live value, in decimal, in this packet?<\/strong><\/p>\n\n\n\n<p>To answer this, I examined the <strong>IPv4 header<\/strong> of the first packet in the <code>ipv4.pcap<\/code> file. I specifically looked at the <strong>Time To Live (TTL)<\/strong> field, which determines how many hops (routers) the packet can pass through before being discarded.<\/p>\n\n\n\n<p>The TTL field is located 8 bytes into the IP header, but Wireshark conveniently displays this value directly in the decoded packet details. In this case, the TTL value was <strong>64<\/strong>, which is a common default for Linux-based systems.<\/p>\n\n\n\n<p>This value can also give clues about the operating system or network behavior based on how far the packet has traveled.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"227\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-25-1024x227.png\" alt=\"\" class=\"wp-image-93\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-25-1024x227.png 1024w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-25-300x67.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-25-768x170.png 768w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-25.png 1325w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>c) What is the source IP address, in hexadecimal, in the first packet?<\/strong><\/p>\n\n\n\n<p>To find the source IP address in hexadecimal, I examined the <strong>IPv4 header<\/strong> in the first packet of the <code>ipv4.pcap<\/code> capture. The source IP address is located between <strong>bytes 12 and 15<\/strong> from the start of the IP header.<\/p>\n\n\n\n<p>Wireshark makes this easy by displaying both the decimal and hexadecimal representations. For the first packet, the source IP is <strong>192.168.11.65<\/strong> in decimal, which corresponds to <strong>0xc0 0xa8 0x0b 0x41<\/strong> in hexadecimal.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"192\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-26-1024x192.png\" alt=\"\" class=\"wp-image-95\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-26-1024x192.png 1024w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-26-300x56.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-26-768x144.png 768w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-26.png 1424w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>d) What is the destination IP address, in hexadecimal, in the first packet?<\/strong><\/p>\n\n\n\n<p>To find the destination IP address in hexadecimal, I examined the IPv4 header of the first packet in the <code>ipv4.pcap<\/code> file. According to the IP header structure, the destination IP is stored between <strong>bytes 16 and 19<\/strong> from the start of the IP header.<\/p>\n\n\n\n<p>Wireshark clearly shows this value in both hexadecimal and decimal. In this case, the destination IP is <strong>192.168.1.1<\/strong>, which corresponds to the hexadecimal representation <strong>0xc0 0xa8 0x01 0x01<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"219\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-27-1024x219.png\" alt=\"\" class=\"wp-image-96\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-27-1024x219.png 1024w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-27-300x64.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-27-768x164.png 768w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-27.png 1330w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Exercise 2 \u2013 Identifying Abnormalities in the IPv4 Header<\/h3>\n\n\n\n<p>In this exercise, I examined the <strong>second packet<\/strong> in the <code>ipv4.pcap<\/code> capture and identified two key problems with its IP header.<\/p>\n\n\n\n<p><strong>Problem 1: Invalid IP Version<\/strong><br>The first issue is that the IP header lists <strong>version 8<\/strong>, which is not a valid or supported IP version. Only versions <strong>4<\/strong> and <strong>6<\/strong> are in use today. Because of this, Wireshark marks the packet in <strong>red<\/strong> and does not attempt to decode it further.<\/p>\n\n\n\n<p><strong>Problem 2: Invalid Header Checksum<\/strong><br>After inspecting the raw packet bytes, I found another issue in <strong>bytes 10 and 11<\/strong>, which represent the IP header checksum. The value was <code>0x0000<\/code>, which is invalid and indicates the packet may have been corrupted or crafted improperly.<\/p>\n\n\n\n<p><strong>Impact<\/strong><br>Both of these abnormalities would cause the packet to be <strong>dropped immediately<\/strong> by the first router or system it attempts to pass through. This exercise helped me understand how malformed packets are detected and discarded at the network layer.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"134\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-28-1024x134.png\" alt=\"\" class=\"wp-image-97\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-28-1024x134.png 1024w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-28-300x39.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-28-768x101.png 768w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-28.png 1328w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Exercise 3 \u2013 Hex Analysis Using tcpdump<\/h3>\n\n\n\n<p>In this part of the lab, I used the <code>tcpdump<\/code> command-line tool to inspect raw packet data and answer questions related to the <strong>third packet<\/strong> in the <code>ipv4.pcap<\/code> capture.<\/p>\n\n\n\n<p>To extract the first few packets in hexadecimal format, I ran:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"727\" height=\"274\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-29.png\" alt=\"\" class=\"wp-image-100\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-29.png 727w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-29-300x113.png 300w\" sizes=\"auto, (max-width: 727px) 100vw, 727px\" \/><\/figure>\n\n\n\n<p><strong>a) What version of IP is this packet?<\/strong> <strong>What is the header length if the packet ?<\/strong><\/p>\n\n\n\n<p>By looking at the raw hexadecimal output of the third packet, I found it starts with the byte 0x45. This first byte breaks down into two nibbles:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>4<\/strong> \u2192 IP version<\/li>\n\n\n\n<li><strong>5<\/strong> \u2192 header length <\/li>\n<\/ul>\n\n\n\n<p>So, the version number of this packet is <strong>IPv4<\/strong>, as indicated by the high-order nibble of the first byte.<\/p>\n\n\n\n<p>The header length field is in units of double word so it has to be multiplied by 4 to be converted to a length of 20 bytes.<\/p>\n\n\n\n<p><strong>b) What is the embedded protocol in this packet, according to the IP header?<\/strong><\/p>\n\n\n\n<p>To determine the embedded protocol, I examined <strong>byte offset 9<\/strong> in the IP header of the third packet. This byte indicates which protocol is encapsulated within the IPv4 packet.<\/p>\n\n\n\n<p>Using the <code>tcpdump<\/code> output, I located the value at this offset. For this packet, the value was <strong>0x01<\/strong>, which corresponds to <strong>ICMP (Internet Control Message Protocol)<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"556\" height=\"65\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-30.png\" alt=\"\" class=\"wp-image-102\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-30.png 556w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-30-300x35.png 300w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Exercise 4 \u2013 Calculating ICMP Header and Data Length<\/h3>\n\n\n\n<p>In this task, I analyzed the <strong>fourth packet<\/strong> in the <code>ipv4.pcap<\/code> file to determine how many bytes were used by the <strong>ICMP header and data<\/strong>, following the IPv4 header.<\/p>\n\n\n\n<p>To do this, I used two values from the IP header:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"857\" height=\"123\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-31.png\" alt=\"\" class=\"wp-image-104\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-31.png 857w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-31-300x43.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/06\/image-31-768x110.png 768w\" sizes=\"auto, (max-width: 857px) 100vw, 857px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Total Length<\/strong>: 68 bytes (it is found in the 3rd byte offset of the IP Header \/\/ it has a hexadecimal value of 0x44)<\/li>\n\n\n\n<li><strong>Header Length<\/strong>: 20 bytes (which is shown as a value of <code>5<\/code> in the header, multiplied by 4)<\/li>\n<\/ul>\n\n\n\n<p>By subtracting the IP header length from the total IP datagram size:<br><code>68 - 20 = 48 bytes<\/code><\/p>\n\n\n\n<p>So, the ICMP header and data together occupy <strong>48 bytes<\/strong> in this packet.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lab 1.4 \u2013 IPv4 Packet Analysis This lab focused on examining network traffic at the IPv4 layer, with an emphasis on identifying abnormal or suspicious behavior within the packet capture. Lab Setup For this exercise, I used the capture file called ipv4.pcap. Once downloaded, I opened the file in Wireshark and began my analysis. Exercise [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[7,3,6],"class_list":["post-90","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-ipv4","tag-tcpdump","tag-wireshark"],"_links":{"self":[{"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=\/wp\/v2\/posts\/90","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=90"}],"version-history":[{"count":5,"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=\/wp\/v2\/posts\/90\/revisions"}],"predecessor-version":[{"id":106,"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=\/wp\/v2\/posts\/90\/revisions\/106"}],"wp:attachment":[{"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}