CISSP Blog Post 17, Domain 4: Network: OSI Layers 2 (Data Link) & 3 (Network)


Credit: Post based on CISSP course presented by Dennis Lee, November 2018

Not going to spend a lot of time on OSI Layer 2, aka the Data Link Layer. At this layer, protocols are responsible for node-to-node or link-to-link communications between systems on the same network

Common protocols include:

  • Address Resolution Protocol (ARP) which resolves IP addresses to MAC addresses. It is susceptible to ARP cache poisoning attacks.
  • Multiprotocol Label Switching (MPLS) operates at both L2 and L3 of the OSI model. In summary, data enters the MPLS network through a Label Edge Router which passes traffic to Label Switch Routers until data gets to the final Edge Router and exits the MPLS network to the destination. MPLS routers add special encapsulating data labels to send data along pre-defined network paths. The Switch routers forward data along the directed path, where the last edge router strips off the labels before the data exists the network.

The OSI Layer 3, Network Layer protocols are responsible for network-to-network, router-to-router, or gateway-to-gateway communications and include:

The IP Protocol (IPv4) handles IP addressing. Without going into the difference between the two, the main reason IPv6 was developed is because IPv4 has literally run out of addressable addresses to assign to Internet devices.

  • IPv4 = 32-bit addresses which provide 2^32 addresses
  • IPv6 = 128-bit addresses which provides 2^128 addresses

The IP protocol handles data fragmentation and reassembly of packets if you’re sending over networks with different maximum transmission unit (MTU) sizes. The IP header element includes items such as:

  • Total fragment length
  • Fragment ID
  • Different flags
  • Fragment offset
  • Time-to-live
  • IP source address
  • IP destination address
  • Etc.

The Internet Control Message Protocol (ICMP) can be abused to conduct Man-in-the-Middle (MITM) and Denial of Service (DoS) attacks. It provides network diagnostics (such as ping, traceroute, etc.) and network error reporting. It also provides ICMP redirect functionality where a router can inform a sender of a better route to the final destination.

A couple of common Layer 3 attacks include the:

  • Tear Drop Attack which crashes a system by exploiting the fragment offset field to overload the receiving system with malformed packets.
  • SMURF Attack where an ICMP echo request is sent to the network broadcast address of a spoofed victim, causing all nodes to reply to the victim with echo reply. A similar attack called a FRAGGLE attack uses the UDP protocol to create a similar effect.
SMURF Attack Process
SMURF Attack Process

CISSP Blog Post 16, Domain 4: Network: WiFi


Credit: Post based on CISSP course presented by Dennis Lee, November 2018

Let’s dive a little deeper into the OSI Layer 1, Physical layer for WiFi:

There are a couple of different wireless transmission methods that include:

  • Direct Sequence Spread Spectrum (DSSS) which is a wide frequency channel (band). An example is 802.11b
  • Frequency Hopping Spread Spectrum (FHSS) uses multiple narrow frequency channels / bands in sequential order. An example technology is Bluetooth.
  • Orthogonal Frequency Division Multiplexing (OFDM) uses multiple narrow frequency channels / bands simultaneously for faster throughput. The example here is 802.11n.

How about Wi-Fi Authentication Methods? These include:

  • Open System Authentication is essentially no authentication – all that’s required is for the client device to transmit a service set identifier (aka SSID) for the access point to which it’s transmitting. This is a weak form of authentication because anyone can sniff and copy an SSID, even if the AP isn’t broadcasting it.
  • MAC Address Filtering at the access point – this is also weak as someone can sniff and spoof a MAC address.
  • The 802.1x protocol is the strongest authentication option. This is a port-based authentication protocol standard for both wired and wireless networks and has two components:
  • The Extensible Authentication Protocol (EAP)
  • And the Remote Authentication Dial-in User System aka RADIUS, which has a central server to control an access list.
RADIUS Authentication Process
RADIUS Authentication Process

Okay, you’ve authenticated your device to the network – so here’s a summary of how you can encrypt your data while in transit via Wi-Fi:

Wi-Fi Encryption Standard Algorithm Key Usage Integrity Checking
Wired Equivalent Privacy (WEP) RC4 Can choose either a 40-bit key or 104-bit key. The 40-bit key has a 24-bit IV so equivalent of a 64-bit key. The 104-bit key has a 24-bit IV, equivalent to a 128-bit key. Checksums proves accidental changes did not occur
WiFi Protected Access (WPA) RC4 128-bit temporal key + Client MAC (48-bit) + IV (48-bit) = Temporal Key Integrity Protocol (TKIP) key. This is different for each user session. The IV is different for each packet, it’s based on a data sequence number. Uses HMAC with 2 phases of hashing (including key) proving both accidental and intentional tampering didn’t occur
IEEE 802.11i (WPA2) AES TKIP or Countermode of AES CBD-MAC 2 stages of encryption proves both accidental and intentional tampering didn’t occur

Here’s a summary of all the IEEE Standard’s we’ve covered thus far:

IEEE Description
802.1x Port-based authentication protocol
802.11i WPA2 WiFi Encryption Standard
802.3 Ethernet
802.5 Token Ring
IEEE Frequency Band Data Rate Transmission Method Common Name
802.11b 2.4 GHz 11 Mbps DSSS These are all Wi-Fi Standards
802.11a 5 GHz 54 Mbps OFDM
802.11g 2.4 GHz 54 Mbps OFDM
802.11n 5 and 2.4 GHz 250 Mbps+ OFDM
802.11ac 5 GHz 430 Mbps+ OFDM
802.16 2 – 11 GHz or 10 – 66 GHz Many OFDM and Others WiMax for wired metro network
802.15.1 2.4 GHz Many FHSS Bluetooth

CISSP Blog Post 20, Domain 4: Network Firewalls


Credit: Post based on CISSP course presented by Dennis Lee, November 2018

09/06/2020 – Edit: I am starting to publish a series of blog posts on topics related to studying for the Certified Information System Security Professional (CISSP) exam. I am updating this post first but I’m changing the name of the post as well to help folks better identify where this post falls in the series. I’m also adding in illustrations!

It’s been quite a while since my last post so here’s hoping I can keep the momentum going!

In this post, I’m going to walk through the four different types of firewalls and what they are best used for.

The four types of firewalls, from most basic to most complex include:

  1. Static Packet Filtering Firewall
  2. Stateful (aka Dynamic) Inspection Packet Firewall
  3. Circuit Level Proxy Firewall
  4. Application Level Proxy Firewall

Static Packet Filtering Firewalls
Static Packet Filtering Firewalls are the most basic type of firewall. The only type of filtering you can do is allow or block specific IP addresses and ports from entering or existing the firewall. I.e. you can block computers on your network from accessing Google’s DNS service by creating a block of any outgoing traffic to 8.8.8.8:53 (TCP & UDP).

Benefits: Cheapest option, fast to apply rules

Drawbacks: Limited filtering abilities, cannot scan or inspect inside a data payload

Static Packet Filtering Firewall
Static Packet Filtering Firewall

Stateful (aka Dynamic) Inspection Packet Firewall
Stateful or Dynamic Inspection Packet Firewalls provide all the functionality of Static Packet Filtering Firewalls, plus they “inspect” and allow or block based on connection states. For example, the firewall can watch a TCP handshake being performed and determine if it is executed normally, or if there’s a denial of service (aka a SYN flood) attack occurring and then automatically block the incoming traffic, keeping your internal machines from being overwhelmed.

A typical TCP handshake occurs when a SYN request is sent from one machine to another, the second machine sends back a SYN and an ACK acknowledgment back to the requesting machine. The original machine then sends an ACK acknowledgement back completing the handshake and allowing communication to begin. If the original machine doesn’t send a second ACK acknowledgment and instead just continues to send a stream of SYN requests, the firewall will realize that the handshake is incorrect and block the flood of incoming SYN requests.

Benefits: Stronger filtering capabilities, retains (logs) state information about a connection for further offline analysis

Drawbacks: More expensive system, slightly slower filtering, still cannot inspect inside a data payload, requires static rules to allow unsolicited inbound traffic (e.g. email incoming to an email server)

Stateful Inspection Firewall
Stateful Inspection Firewall

Circuit Level Proxy Firewall
Circuit Level Proxy Firewalls provide all the aforementioned functionality of both the static packet filtering and stateful inspection packet firewalls. In addition, they provide Network Address Translation (NAT) and Port Translation.

Benefits: There is no direct contact between client and external server, internal IPs are hidden from external systems, malformed packets are dropped and not forwarded onwards

Drawbacks: Requires a minimum of 4 packets per round trip (e.g. client sends packet #1 to firewall, firewall repackages into new packet #2 & sends to external server, external server sends reply packet #3 back to firewall, firewall repackages into new packet #4 and sends to internal client), more expensive system than the previous two, still cannot inspect inside a data payload.

Proxy Firewall - Circuit Level
Proxy Firewall – Circuit Level

Application Level Proxy Firewall
Application Level Proxy Firewalls do everything the last three firewalls can do and in addition, can inspect inside data payloads! The firewall does this through proxies that are written for each service that’s required to pass through the firewall “air gap”. A proxy is a piece of software that’s customized to each service (e.g. HTTP, SMTP, FTP, etc.) and is able to unpack the data packet and inspect the data inside, and filters the content based on proxy rules.

Benefits: Can inspect inside data packets! Can even inspect inside encrypted payloads provided you have the requisite certificates to un-encrypt the payload and re-encrypt before sending onward.

Drawbacks: Most expensive option, much slower to filter data, not all services have proxies written and may require custom coding or a generic UDP/TCP proxy to essentially bypass the proxy filtering capabilities (i.e. it can’t scan inside the payload) and allow traffic through on a specific service port.

Proxy Firewall - Application Level
Proxy Firewall – Application Level