Application layer protocols

The most common application layer protocols include DHCP used to obtain client IP addresses and configuration information, DNS for hostname resolution, HTTP, SMB, POP/SMTP, and FTP for the most common network services and SIP, RTP, and RTCP for VoIP and video conferencing.

Extensive coverage of all the upper layer protocols is beyond the scope of this book. A brief overview of DHCP and DNS will be provided, as these protocols universally support network operations and HTTP as an example of one of the most common application layer protocols. The reader is encouraged to research any or all of these protocols further depending on their scope of interest and need to meet the analysis tasks being addressed.

Dynamic Host Configuration Protocol

Dynamic Host Configuration Protocol (DHCP) allows a client to lease an IP address from a pool managed by a DHCP server. The client can receive other configuration options such as the default gateway, subnet mask, and one or more DNS server addresses as well. DHCP is derived from an older BOOTP protocol; Wireshark uses bootp in display filter syntax. DHCP works by the client sending a broadcast packet using UDP source port 67 to UDP destination port 68. A DHCP server will respond to the requestor's IP address and using UDP source port 68 to UDP destination port 67.

DHCP servers don't necessarily have to reside on the same local network segment as clients. A relay agent such as a router can forward DHCP requests and respond to/from a different network where a DHCP server resides.

Wireshark DHCP filters

Capture filter(s): port 67 (DHCP is between ports 67 and 68; filtering on port 67 is sufficient to get both sides of the conversations)

Display filter(s): bootp bootp.option.value == 0 (DHCP Discover message)

Dynamic Host Configuration Protocol Version 6

Dynamic Host Configuration Protocol Version 6 (DHCPv6) is the IPv6 version of DHCP. Since IPv6 doesn't use broadcasts, DHCPv6 clients use the multicast address for All_DHCP_Relay_Agents_and_Servers (ff02::1:2) to locate DHCPv6 servers or relay agents.

Wireshark DHCPv6 filters

Capture filter(s): port 546 (DHCPv6 is between ports 546 and 547; either will work)

Display filter(s): dhcpv6 dhcpv6.msgtype == 1(DHCPv6 Solicit message)

Domain Name Service

Domain Name Service (DNS) is used to convert host names, such as www.wireshark.org to IP addresses. DNS can also be used to identify the hostname associated with an IP address (an inverse or pointer (PTR) query) and several other network information services. This is a good protocol to become familiar with as it is used extensively to locate nodes both within an enterprise and on the Internet using hostnames.

Wireshark DNS filters

Capture filter(s): port 53

Display filter(s): dns dns.flags.response == 0(DNS query) dns.flags.response == 1(DNS response) dns.flags.rcode != 0(DNS response contains an error)

Hypertext Transfer Protocol

Hypertext Transfer Protocol (HTTP) is the application protocol used when someone browses (unsecured) websites on the Internet, along with the secure version (HTTPS). HTTP/1.1 is the current version—although HTTP/2.0 is starting to appear in some environments. Be aware that some network devices such as proxy servers and gateways may not support HTTP/2.0 yet.

An example of a HTTP packet delivering a GET request to a web server is depicted in the following screenshot:

Hypertext Transfer Protocol

The most common features and fields of the HTTP protocol include HTTP Methods, Host, and Request Modifiers.

In the preceding screenshot, the HTTP header includes:

  • Request Method: GET
  • Request URI: /Orion (a home page on the web server)
  • Request Version: HTTP/1.1

HTTP Methods

Some of the more common HTTP Methods are listed and described in the following table:

Method

Description

GET

This retrieves information defined by the Uniform Resource Identifier (URI) field

HEAD

This retrieves meta data related to the desired URI

POST

This sends data to the HTTP server/application

OPTIONS

This determines the options associated with a resource

PUT

This sends data to the HTTP server/application

DELETE

This deletes the resource defined by the URI

CONNECT

This is used to connect to a proxy device

Host

The Host field identifies the target host and port number of the resource being requested. In the preceding screenshot, Host is pktiqsvr1 on port 8080.

Request Modifiers

HTTP requests and responses use Request Modifiers to provide details for the request. In the preceding screenshot, Request Modifiers includes:

  • Connection: This indicates the preference for a persistent connection (keep-alive).
  • Accept: This is a list of data formats (text/html and application/xhtml plus xml) accepted.
  • User-agent: This is a list of browser and operating system parameters (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit) for the requesting device.
  • Accept-encoding: This is a list of the acceptable HTTP compression schemes (gzip, deflate, and sdch).
  • Accept-language: The acceptable languages (en-US and en; q=0.8) where q=0.8 is a relative quality factor that specifies the language the user would prefer on a scale of 0 to 1.
  • Cookie: This is a session ID cookie (ASP.NET_SessionId=sidsruxjbm4eaed4d3dgg4zd) that was previously stored on the user's browser in a cookie and is being provided to the website.

The following table lists some of the more commonly used modifiers:

Request Modifier

Description

Accept

Acceptable content types

Accept-charset

Acceptable character sets

Accept-encoding

Acceptable encodings

Accept-language

Acceptable languages

Accept-ranges

Server can accept range requests

Authorization

Authentication credentials for HTTP authentication

Cache-control

Caching directives

Connection

Type of connection preferred by the user agent

Cookie

HTTP cookie (a small piece of data sent from the website and stored in a user's browser, and/or sent back to the website the next time the user visits containing session information)

Content-length

Length of the request body in bytes

Content-type

Mime type of the body (used with POST and PUT requests)

Date

Date and time the message was sent

Expect

Defines server behavior expected by the client

If-match

Perform action if client-provided information matches

If-modified-since

Provide date/time of cached data; return 304 Not Modified if the cached data is still current

If-range

Request for range of missing information

IF-unmodified-since

Only send if unmodified since the provided date/time

Max-forwards

Limit the number of forwards through proxies or gateways

Proxy-authorization

Authorization credential for a proxy connection

Range

Request only part of an entity

TE

Transfer encodings accepted

User-agent

A string containing browser and operating system information

Via

The proxies traversed

Wireshark HTTP filters

Capture filter(s): tcp port http tcp port https

Display filter(s): http http.request.method == "GET" or http.request.method == "POST" http.response.code > 399 (identifies client or server error packets)

Additional information

Covering all the most common upper layer protocols or covering them to any great depth is obviously more than what can be included in a book of this size. I encourage you to spend some time studying those protocols that are of interest to you for personal or job-related reasons. The return on your investment in time will be well worth the effort.

Additional information for any of the protocols discussed in this chapter as well as all those not covered can be found online.

Wireshark wiki

If you are inspecting a protocol within the Wireshark's Packet Details pane, you can right-click on a protocol header or field within a header and select the Wiki Protocol Page from the menu to go to the specific page on the Wireshark wiki that contains information on that protocol. More information can be found at http://wiki.wireshark.org/ProtocolReference.

You can also get a complete list of Wireshark display filters on specific protocols by selecting a protocol header or a field within a header, right-clicking, and selecting Filter Field Reference.

Protocols on Wikipedia

You can find general information on various protocols on Wikipedia. Start with the Internet protocol. Additional links to the entire Internet protocol suite are also provided at http://en.wikipedia.org/wiki/Internet_Protocol.

Requests for Comments

The Requests for Comment (RFC) documents contain detailed information for all the Internet protocols. These documents are maintained by the Internet Engineering Task Force (IETF) and are the final word on how the protocols should be implemented and function (http://www.ietf.org/rfc.html). If you want to search for a specific RFC by title or keyword, use the link http://www.rfc-editor.org/search/rfc_search.php.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.7.174