MODULE 10 - CERTIFICATION CYBER OPS ASSOCIATE Flashcards
DHCP Dynamic Host Configuration Protocol
The Dynamic Host Configuration Protocol (DHCP) for IPv4 service automates the assignment of IPv4 addresses, subnet masks, gateways, and other IPv4 networking parameters.
This is referred to as dynamic addressing. The alternative to dynamic addressing is static addressing.
When using static addressing, the network administrator manually enters IP address information on hosts.
When a host connects to the network, the DHCP server is contacted, and an address is requested.
The DHCP server chooses an address from a configured range of addresses called a pool and assigns (leases) it to the host.
On larger networks, or where the user population changes frequently, DHCP is preferred for address assignment.
New users may arrive and need connections; others may have new computers that must be connected.
Rather than use static addressing for each connection, it is more efficient to have IPv4 addresses assigned automatically using DHCP.
DHCP can allocate IP addresses for a configurable period of time, called a lease period.
The lease period is an important DHCP setting, When the lease period expires or the DHCP server gets a DHCPRELEASE message the address is returned to the DHCP pool for reuse.
Users can freely move from location to location and easily re-establish network connections through DHCP.
As the figure shows, various types of devices can be DHCP servers.
The DHCP server in most medium-to-large networks is usually a local, dedicated PC-based server.
With home networks, the DHCP server is usually located on the local router that connects the home network to the ISP.
https://snipboard.io/0Z2oJD.jpg
Many networks use both DHCP and static addressing. DHCP is used for general purpose hosts, such as end user devices.
Static addressing is used for network devices, such as gateway routers, switches, servers, and printers.
DHCP for IPv6 (DHCPv6) provides similar services for IPv6 clients.
One important difference is that DHCPv6 does not provide a default gateway address.
This can only be obtained dynamically from the Router Advertisement message of the router.
DHCP Operation As shown in the figure, when an IPv4, DHCP-configured device boots up or connects to the network, the client broadcasts a DHCP discover (DHCPDISCOVER) message to identify any available DHCP servers on the network.
A DHCP server replies with a DHCP offer (DHCPOFFER) message, which offers a lease to the client.
The offer message contains the IPv4 address and subnet mask to be assigned, the IPv4 address of the DNS server, and the IPv4 address of the default gateway. The lease offer also includes the duration of the lease.
https://snipboard.io/3EBk29.jpg
The client may receive multiple DHCPOFFER messages if there is more than one DHCP server on the local network. Therefore, it must choose between them, and sends a DHCP request (DHCPREQUEST) message that identifies the explicit server and lease offer that the client is accepting. A client may also choose to request an address that it had previously been allocated by the server.
Assuming that the IPv4 address requested by the client, or offered by the server, is still available, the server returns a DHCP acknowledgment (DHCPACK) message that acknowledges to the client that the lease has been finalized.
If the offer is no longer valid, then the selected server responds with a DHCP negative acknowledgment (DHCPNAK) message.
If a DHCPNAK message is returned, then the selection process must begin again with a new DHCPDISCOVER message being transmitted.
After the client has the lease, it must be renewed prior to the lease expiration through another DHCPREQUEST message. The DHCP server ensures that all IP addresses are unique (the same IP address cannot be assigned to two different network devices simultaneously).
Most ISPs use DHCP to allocate addresses to their customers. DHCPv6 has a set of messages that is similar to those for DHCPv4. The DHCPv6 messages are SOLICIT, ADVERTISE, INFORMATION REQUEST, and REPLY.
DHCP Message Format The DHCPv4 message format is used for all DHCPv4 transactions. DHCPv4 messages are encapsulated within the UDP transport protocol.
DHCPv4 messages that are sent from the client use UDP source port 68 and destination port 67.
DHCPv4 messages sent from the server to the client use UDP source port 67 and destination port 68. The structure of the DHCPv4 message is shown below.
https://snipboard.io/1mnH9v.jpg
https://snipboard.io/1mnH9v.jpg
The fields are explained here: :
– Operation (OP) Code
– Hardware Type
– Hardware Address Length
– Hops
– Transaction Identifier
– Seconds
– Flags
– Client IP Address
– Your IP Address
– Server IP Address
– Gateway IP Address
– Client Hardware Address
– Server Name
– Boot Filename
– DHCP Options
https://snipboard.io/1mnH9v.jpg
The fields are explained here: :
– Operation (OP) Code
– Hardware Type
– Hardware Address Length
– Hops
– Transaction Identifier
– Seconds
– Flags
– Client IP Address
– Your IP Address
– Server IP Address
– Gateway IP Address
– Client Hardware Address
– Server Name
– Boot Filename
– DHCP Options
Operation (OP) Code :
Specifies the general type of message. A value of 1 indicates a request message; a value of 2 is a reply message.
https://snipboard.io/1mnH9v.jpg
The fields are explained here: :
– Operation (OP) Code
– Hardware Type
– Hardware Address Length
– Hops
– Transaction Identifier
– Seconds
– Flags
– Client IP Address
– Your IP Address
– Server IP Address
– Gateway IP Address
– Client Hardware Address
– Server Name
– Boot Filename
– DHCP Options
Hardware Type :
Identifies the type of hardware used in the network. For example, 1 is Ethernet, 15 is Frame Relay, and 20 is a serial line. These are the same codes used in ARP messages.
https://snipboard.io/1mnH9v.jpg
The fields are explained here: :
– Operation (OP) Code
– Hardware Type
– Hardware Address Length
– Hops
– Transaction Identifier
– Seconds
– Flags
– Client IP Address
– Your IP Address
– Server IP Address
– Gateway IP Address
– Client Hardware Address
– Server Name
– Boot Filename
– DHCP Options
Hardware Address Length :
Specifies the length of the address.
https://snipboard.io/1mnH9v.jpg
The fields are explained here: :
– Operation (OP) Code
– Hardware Type
– Hardware Address Length
– Hops
– Transaction Identifier
– Seconds
– Flags
– Client IP Address
– Your IP Address
– Server IP Address
– Gateway IP Address
– Client Hardware Address
– Server Name
– Boot Filename
– DHCP Options
Hops :
Controls the forwarding of messages. Set to 0 by a client before transmitting a request.
https://snipboard.io/1mnH9v.jpg
The fields are explained here: :
– Operation (OP) Code
– Hardware Type
– Hardware Address Length
– Hops
– Transaction Identifier
– Seconds
– Flags
– Client IP Address
– Your IP Address
– Server IP Address
– Gateway IP Address
– Client Hardware Address
– Server Name
– Boot Filename
– DHCP Options
Transaction Identifier :
Used by the client to match the request with replies received from DHCPv4 servers.
https://snipboard.io/1mnH9v.jpg
The fields are explained here: :
– Operation (OP) Code
– Hardware Type
– Hardware Address Length
– Hops
– Transaction Identifier
– Seconds
– Flags
– Client IP Address
– Your IP Address
– Server IP Address
– Gateway IP Address
– Client Hardware Address
– Server Name
– Boot Filename
– DHCP Options
Seconds :
Identifies the number of seconds elapsed since a client began attempting to acquire or renew a lease. Used by DHCPv4 servers to prioritize replies when multiple client requests are outstanding.
https://snipboard.io/1mnH9v.jpg
The fields are explained here: :
– Operation (OP) Code
– Hardware Type
– Hardware Address Length
– Hops
– Transaction Identifier
– Seconds
– Flags
– Client IP Address
– Your IP Address
– Server IP Address
– Gateway IP Address
– Client Hardware Address
– Server Name
– Boot Filename
– DHCP Options
Flags :
Used by a client that does not know its IPv4 address when it sends a request. Only one of the 16 bits is used, which is the broadcast flag. A value of 1 in this field tells the DHCPv4 server or relay agent receiving the request that the reply should be sent as a broadcast.
https://snipboard.io/1mnH9v.jpg
The fields are explained here: :
– Operation (OP) Code
– Hardware Type
– Hardware Address Length
– Hops
– Transaction Identifier
– Seconds
– Flags
– Client IP Address
– Your IP Address
– Server IP Address
– Gateway IP Address
– Client Hardware Address
– Server Name
– Boot Filename
– DHCP Options
Client IP Address :
Used by a client during lease renewal when the address of the client is valid and usable, not during the process of acquiring an address. The client puts its own IPv4 address in this field if and only if it has a valid IPv4 address while in the bound state; otherwise, it sets the field to 0.
https://snipboard.io/1mnH9v.jpg
The fields are explained here: :
– Operation (OP) Code
– Hardware Type
– Hardware Address Length
– Hops
– Transaction Identifier
– Seconds
– Flags
– Client IP Address
– Your IP Address
– Server IP Address
– Gateway IP Address
– Client Hardware Address
– Server Name
– Boot Filename
– DHCP Options
Your IP Address :
Used by the server to assign an IPv4 address to the client.
https://snipboard.io/1mnH9v.jpg
The fields are explained here: :
– Operation (OP) Code
– Hardware Type
– Hardware Address Length
– Hops
– Transaction Identifier
– Seconds
– Flags
– Client IP Address
– Your IP Address
– Server IP Address
– Gateway IP Address
– Client Hardware Address
– Server Name
– Boot Filename
– DHCP Options
Server IP Address :
Used by the server to identify the address of the server that the client should use for the next step in the bootstrap process, which may or may not be the server sending this reply. The sending server always includes its own IPv4 address in a special field called the Server Identifier DHCPv4 option.
https://snipboard.io/1mnH9v.jpg
The fields are explained here: :
– Operation (OP) Code
– Hardware Type
– Hardware Address Length
– Hops
– Transaction Identifier
– Seconds
– Flags
– Client IP Address
– Your IP Address
– Server IP Address
– Gateway IP Address
– Client Hardware Address
– Server Name
– Boot Filename
– DHCP Options
Gateway IP Address :
Routes DHCPv4 messages when DHCPv4 relay agents are involved. The gateway address facilitates communications of DHCPv4 requests and replies between the client and a server that are on different subnets or networks.
https://snipboard.io/1mnH9v.jpg
The fields are explained here: :
– Operation (OP) Code
– Hardware Type
– Hardware Address Length
– Hops
– Transaction Identifier
– Seconds
– Flags
– Client IP Address
– Your IP Address
– Server IP Address
– Gateway IP Address
– Client Hardware Address
– Server Name
– Boot Filename
– DHCP Options
Client Hardware Address :
Specifies the physical layer of the client.
https://snipboard.io/1mnH9v.jpg
The fields are explained here: :
– Operation (OP) Code
– Hardware Type
– Hardware Address Length
– Hops
– Transaction Identifier
– Seconds
– Flags
– Client IP Address
– Your IP Address
– Server IP Address
– Gateway IP Address
– Client Hardware Address
– Server Name
– Boot Filename
– DHCP Options
Server Name :
Used by the server sending a DHCPOFFER or DHCPACK message. The server may optionally put its name in this field. This can be a simple text nickname or a DNS domain name, such as dhcpserver.netacad.net.
https://snipboard.io/1mnH9v.jpg
The fields are explained here: :
– Operation (OP) Code
– Hardware Type
– Hardware Address Length
– Hops
– Transaction Identifier
– Seconds
– Flags
– Client IP Address
– Your IP Address
– Server IP Address
– Gateway IP Address
– Client Hardware Address
– Server Name
– Boot Filename
– DHCP Options
Boot Filename :
Optionally used by a client to request a particular type of boot file in a DHCPDISCOVER message. Used by a server in a DHCPOFFER to fully specify a boot file directory and filename.
https://snipboard.io/1mnH9v.jpg
The fields are explained here: :
– Operation (OP) Code
– Hardware Type
– Hardware Address Length
– Hops
– Transaction Identifier
– Seconds
– Flags
– Client IP Address
– Your IP Address
– Server IP Address
– Gateway IP Address
– Client Hardware Address
– Server Name
– Boot Filename
– DHCP Options
DHCP Options :
Holds DHCP options, including several parameters required for basic DHCP operation. This field is variable in length. Both client and server may use this field.
DNS Overview :
The webservers that we so often connect to using names like www⋅cisco⋅com, are actually reached by assigning IP addresses to packets.
On the internet, these domain names are much easier for people to remember than an IP address such as 74.163.4.161. If Cisco decides to change the numeric address of www⋅cisco⋅com, it is transparent to the user because the domain name remains the same.
The new address is simply linked to the existing domain name and connectivity is maintained.
The Domain Name System (DNS) was developed to provide a reliable means of managing and providing domain names and their associated IP addresses.
The DNS system consists of a global hierarchy of distributed servers that contain databases of name to IP address mappings.
The client computer in the figure will send a request to the DNS server to get the IP address for www⋅cisco⋅com so that it can address packets to that server.
A recent analysis of network security threats discovered that over 90% of malicious software exploits use the DNS system to carry out network attack campaigns.
A cybersecurity analyst should have a thorough understanding of the DNS system and the ways in which malicious DNS traffic can be detected through protocol analysis and the inspection of DNS monitoring information. In addition, malware frequently contacts command-and-control servers by using DNS.
This makes the server URLs indicators of compromise for specific exploits. DNS Resolves Names to IP Addresses:
https://snipboard.io/50MOic.jpg
The DNS Domain Hierarchy The DNS consists of a hierarchy of generic top-level domains (gTLD) which consist of .com, .net, .org, .gov, .edu, and numerous country-level domains, such as .br (Brazil), .es (Spain), .uk (United Kingdom), etc.
At the next level of the DNS hierarchy are second-level domains.
These are represented by a domain name that is followed by a top-level domain. Subdomains are found at the next level of the DNS hierarchy and represent some division of the second-level domain.
Finally, a fourth level can represent a host in a subdomain. Each element of a domain specification is sometimes called a label.
The labels move from the top of the hierarchy downward from right to left. A dot (“.“) at the end of a domain name represents the root server at the top of the hierarchy.
The figure illustrates this DNS domain hierarchy. The different top-level domains represent either the type of organization or the country of origin.
Examples of top-level domains are the following: .com - a business or industry .org - a non-profit organization .au - Australia .co - Colombia
https://snipboard.io/CBFD2L.jpg
The DNS Lookup Process To understand DNS, cybersecurity analysts should be familiar with the following terms:
– Resolver
– Recursion
– Authoritative Server
– Recursive Resolver
– FQDN
– RR
– Zone
Resolver :
A DNS client that sends DNS messages to obtain information about the requested domain name space.
The DNS Lookup Process To understand DNS, cybersecurity analysts should be familiar with the following terms:
– Resolver
– Recursion
– Authoritative Server
– Recursive Resolver
– FQDN
– RR
– Zone
Recursion :
The action taken when a DNS server is asked to query on behalf of a DNS resolver.
The DNS Lookup Process To understand DNS, cybersecurity analysts should be familiar with the following terms:
– Resolver
– Recursion
– Authoritative Server
– Recursive Resolver
– FQDN
– RR
– Zone
Authoritative Server :
A DNS server that responds to query messages with information stored in Resource Records (RRs) for a domain name space stored on the server.
The DNS Lookup Process To understand DNS, cybersecurity analysts should be familiar with the following terms:
– Resolver
– Recursion
– Authoritative Server
– Recursive Resolver
– FQDN
– RR
– Zone
Recursive Resolver :
A DNS server that recursively queries for the information asked in the DNS query.
The DNS Lookup Process To understand DNS, cybersecurity analysts should be familiar with the following terms:
– Resolver
– Recursion
– Authoritative Server
– Recursive Resolver
– FQDN
– RR
– Zone
FQDN :
A Fully Qualified Domain Name is the absolute name of a device within the distributed DNS database.
The DNS Lookup Process To understand DNS, cybersecurity analysts should be familiar with the following terms:
– Resolver
– Recursion
– Authoritative Server
– Recursive Resolver
– FQDN
– RR
– Zone
RR :
A Resource Record is a format used in DNS messages that is composed of the following fields: NAME, TYPE, CLASS, TTL, RDLENGTH, and RDATA.
The DNS Lookup Process To understand DNS, cybersecurity analysts should be familiar with the following terms:
– Resolver
– Recursion
– Authoritative Server
– Recursive Resolver
– FQDN
– RR
– Zone
Zone :
A database that contains information about the domain name space stored on an authoritative server.
When attempting to resolve a name to an IP address, a user host, known in the system as a resolver, will first check its local DNS cache.
If the mapping is not found there, a query will be issued to the DNS server or servers that are configured in the network addressing properties for the resolver.
These servers may be present at an enterprise or ISP. If the mapping is not found there, the DNS server will query other higher-level DNS servers that are authoritative for the top-level domain in order to find the mapping. These are known as recursive queries.
Because of the potential burden on authoritative top-level domain servers, some DNS servers in the hierarchy maintain caches of all DNS records that they have resolved for a period of time.
These caching DNS servers can resolve recursive queries without forwarding the queries to higher level servers. If a server requires data for a zone, it will request a transfer of that data from an authoritative server for that zone.
The process of transferring blocks of DNS data between servers is known as a zone transfer.
https://snipboard.io/QzTSqO.jpg
Click each button to review the steps are involved in DNS resolution. :
– Step 1
– Step 2
– Step 3
– Step 4
– Step 5
Step 1
The user types an FQDN into a browser application Address field.
https://snipboard.io/tveIVC.jpg
Click each button to review the steps are involved in DNS resolution. :
– Step 1
– Step 2
– Step 3
– Step 4
– Step 5
Step 2 :
A DNS query is sent to the designated DNS server for the client computer. https://snipboard.io/RL2AqD.jpg
Click each button to review the steps are involved in DNS resolution. :
– Step 1
– Step 2
– Step 3
– Step 4
– Step 5
Step 3 :
The DNS server matches the FQDN with its IP address. https://snipboard.io/Y1QRdX.jpg
Click each button to review the steps are involved in DNS resolution. :
– Step 1
– Step 2
– Step 3
– Step 4
– Step 5
Step 4 :
The DNS query response is sent back to the client with the IP address for the FQDN.
https://snipboard.io/Y1QRdX.jpg
Click each button to review the steps are involved in DNS resolution. :
– Step 1
– Step 2
– Step 3
– Step 4
– Step 5
Step 5 :
The client computer uses the IP address to make requests of the server.
https://snipboard.io/duIQWf.jpg
DNS Message Format DNS uses UDP port 53 for DNS queries and responses. DNS queries originate at a client and responses are issued from DNS servers.
If a DNS response exceeds 512 bytes, such as when Dynamic DNS (DDNS) is used, TCP port 53 is used to handle the message. It includes the format for queries, responses, and data. The DNS protocol communications use a single format called a message.
This message format shown in the figure is used for all types of client queries and server responses, error messages, and the transfer of resource record information between servers.
The DNS server stores different types of RRs used to resolve names.
These records contain the name, address, and type of record. Here is a list of some of these record types:
– A
– NS
– AAAA
– MX