Network Security Lecture Notes

Overview of Network Security Appliances and Technologies

  • Network security is a multi-faceted discipline achieved through the strategic deployment of specialized appliances and the implementation of advanced technologies.
  • Modern networks utilize dedicated security appliances designed specifically to protect organizational assets and data.
  • Standard networking devices, such as switches and routers, are equipped with built-in security features that should be leveraged to provide comprehensive protection.
  • A layered approach to security involves utilizing both dedicated appliances and the security features inherent in standard networking hardware, significantly improving the overall defense posture of the network.
  • Key security appliances and technologies include:
    • Firewalls
    • Proxy servers
    • Deception instruments
    • Intrusion detection and prevention systems
    • Access Control Lists (ACLs)
    • Virtual Private Networks (VPNs)
    • Data Loss Prevention (DLP) systems

Firewall Fundamentals and Operational Criteria

  • A firewall serves as a primary defense mechanism by performing bidirectional inspection, examining both incoming (ingress) and outgoing (egress) packets.
  • Rule-based Firewalls: These devices permit or deny traffic based on a predefined set of specific criteria or rules. Parameters used in these rules include:
    • Addresses and Ports: Source and destination IP addresses and port numbers.
    • Protocols: The specific protocol used, such as TCP, UDP, ICMP, or IP.
    • Traffic Direction: Whether the packet is moving into the network (ingress), out of the network (egress), or both.
    • Contextual Data: Variables such as time of day, priority levels, and geographical location.
  • Policy-based Firewalls: These offer greater flexibility than rule-based systems by allowing administrators to use generic statements. For instance, a policy might "allow management traffic from trusted networks*" rather than listing every specific IP address.
  • Content/URL Filtering Firewalls: These systems monitor web traffic and assess the content of web pages. They maintain whitelists (allowed sites) and blacklists (blocked sites) based on specific URLs to control employee access and prevent exposure to malicious sites.

Broad Categories of Firewalls

  • Stateless vs. Stateful:
    • Stateless Firewall: This type evaluates individual packets in isolation. It permits or denies traffic based strictly on established rules without considering the context of previous packets.
    • Stateful Firewall: This type is more advanced; it applies rules but also maintains a record of the state of active connections. It prevents incoming packets from passing unless an internal endpoint initiated the connection request previously.
  • Hardware vs. Software:
    • Software Firewall: Runs as a program or service on a standard device. Most modern operating systems include a host-based firewall, such as the Microsoft Windows Defender Firewall on Windows systems.
    • Hardware Firewall: A specialized, standalone physical device dedicated to traffic inspection. It is typically positioned behind the router to protect the internal Local Area Network (LAN).
  • Open Source vs. Proprietary:
    • Open-Source Firewall: These are often available at no cost and may incorporate a wider range of features developed by the community.
    • Proprietary Firewall: Developed by an entity that retains exclusive rights to the source code. While they involve a cost, these vendors typically provide dedicated customer service and professional technical support.

Specialized Firewall Solutions

  • Web Application Firewall (WAF): Specifically designed to monitor and filter HTTP traffic. It protects web applications by blocking specific websites and preventing web-based attacks such as cross-site scripting (XSS) and SQL injection.
  • Network Address Translation (NAT) Gateway:
    • NAT Technique: Replaces the private IP address of an internal endpoint with the public IP address of the gateway or external router as packets exit the network.
    • Security Function: It maintains a record of these translations to reverse the process when responses return. NAT provides security by obfuscating the private IP addresses of internal devices from the public Internet.
  • Next-Generation Firewall (NGFW): Provides sophisticated functionality beyond traditional packet filtering. It can filter traffic based on specific applications and utilize deep packet inspection (DPI) to examine the actual payload of packets for hidden malware.
  • Unified Threat Management (UTM): An all-in-one security appliance that integrates multiple functions into a single device, including packet filtering, antispam, antiphishing, antispyware, encryption, intrusion protection, and web filtering.

Proxy Servers: Forward and Reverse Proxies

  • Proxies acts as intermediaries or substitutes that make requests on behalf of other devices.
  • Forward Proxy:
    • A computer or application that intercepts user requests originating from the internal secure network.
    • It processes these requests on behalf of the user. Instead of the endpoint connecting directly to a remote server, it connects to the proxy.
    • Caching: If the proxy has cached the requested file or page from a previous interaction, it serves it directly. If not, it fetches the data using its own IP address.
  • Reverse Proxy: Routes incoming requests from an external network (like the Internet) to the appropriate internal server.
  • Security Benefits of Proxies:
    • Malware Scanning: Proxies can intercept and inspect traffic for malware before it reaches an internal endpoint.
    • IP Anonymity: They hide the internal IP addresses of secure network devices, as only the proxy server's IP address is visible to the open Internet.
  • Traffic Example:
    • A user with Source IP 192.146.118.20192.146.118.20 makes a request.
    • The Forward Proxy replaces the source IP with its own 192.146.118.254192.146.118.254 to fetch the webpage.

Deception Instruments: Honeypots and Sinkholes

  • Deception instruments are designed to mislead threat actors, redirecting them from valuable assets to decoys with little to no actual value.
  • Honeypot: A computer located in a poorly secured area that serves as bait. It is intentionally configured with vulnerabilities to attract attacks.
    • Deflection: Redirects attackers away from legitimate, sensitive servers, wasting their time and energy on decoys.
    • Analysis: Allows security personnel to study attacker techniques and motives.
    • Low-interaction Honeypot: Primarily collects basic data, such as attacker IP addresses, via a simple login prompt.
    • High-interaction Honeypot: Contains "honey files" (fake data) to provide a deeper look at attack techniques and what specific information the actors seek.
  • Honeynet: A collection or group of multiple honeypots linked together.
  • Sinkhole: Designed to steer malicious or unwanted traffic away from its target and into a "bottomless pit."
    • DNS Sinkhole: Altering a DNS request to point to a pre-configured IP address controlled by a firewall with a "Deny" rule for all packets.
    • Countermeasures: Extremely useful in mitigating Distributed Denial of Service (DDoS) attacks. Packets can be dropped silently or saved for forensic examination.

Intrusion Detection and Prevention Systems (IDS/IPS)

  • Intrusion Detection System (IDS): Specifically designed to detect an attack as it is occurring and alert administrators.
  • Intrusion Prevention System (IPS): Goes a step further by actively attempting to block or stop the detected attack.
  • Deployment Scenarios:
    • HIDS/HIPS: Host-based systems installed as software directly on an endpoint.
    • NIDS/NIPS: Network-based systems typically situated on routers or firewalls to protect the entire network.
  • Operational Methods:
    • Inline NIDS/NIPS: Connected directly to the network path; data flows through the device, allowing it to block traffic in real-time. This carries a risk of service disruption if false positives occur.
    • Passive NIDS/NIPS: Connected to a switch port to receive a copy of the traffic. It does not sit in the direct data path and can only raise alarms, minimizing the risk of accidental service outages.
  • Encryption Trade-off: NIDS/NIPS and NGFW systems cannot inspect encrypted traffic unless they are provided with the necessary encryption keys.

Monitoring Methods for Intrusion Systems

  • Anomaly-based Monitoring:
    • First establishes a baseline of normal activities (e.g., standard login times, locations, and typical upload/download volumes).
    • Current behavior is compared against the baseline; significant deviations trigger an alarm.
  • Signature-based Monitoring:
    • Searches for well-known attack patterns, or "signatures," similar to how antivirus software functions.
    • Requires a constantly updated database of known threat signatures to be effective.
  • Behavior-based Monitoring:
    • An adaptive approach that continuously analyzes the behavior of processes and programs.
    • Example: A OneDrive notification alerting a user when multiple files are deleted simultaneously.
  • Heuristic Monitoring:
    • Uses experience-based techniques to predict if a program will perform harmful actions if allowed to execute (e.g., "Will this do something harmful?").
    • Example: Immediately stopping or reporting a program that begins scanning all network ports or nodes.

Access Control Lists (ACLs) and VPNs

  • Access Control List (ACL): A set of rules administering the availability of digital assets by granting or denying access permissions.
    • Filesystem ACLs: Dictate who can access specific files and folders on an operating system (e.g., Linux) and what privileges they possess.
    • Networking ACLs: Typically found on routers to filter network traffic. They block vulnerable protocols (e.g., Telnet) and protect against IP spoofing by using explicit "allow" and "deny" statements for untrusted addresses.
  • Virtual Private Network (VPN): Allows authorized users to access a secure private network over an unsecured public network (the Internet).
    • Encryption: VPNs protect data by encrypting all traffic between the endpoint and the network.
    • Remote Access VPN: A user-to-LAN connection for remote employees.
    • Site-to-Site VPN: Connects multiple physical locations over the Internet.
    • Full Tunnel: Protects the user by sending all traffic through the secure VPN concentrator.
    • Split Tunnel: Routes only sensitive enterprise data through the VPN, while personal traffic (web surfing) goes directly to the Internet to preserve bandwidth.
    • Protocols: The Layer 2 Tunneling Protocol (L2TP) provides the tunnel but lacks native encryption; it is commonly paired with IPsec or SSL/TLS for security.

Data Loss Prevention (DLP)

  • Data Mishandling: Employees often inadvertently risk data by sending confidential info (credit card numbers, source code) to personal emails or incorrect recipients.
  • DLP System: A suite of security tools designed to recognize and manage the handling of critical organizational data.
  • Mechanism:
    • Uses content inspection to monitor access, storage locations, and data destinations.
    • DLP Rules: Created by administrators based on sensitivity and organization policy.
    • DLP Agent: Monitors for policy violations and reports back to a central DLP Server.
    • Actions: Detected violations can result in data being blocked, quarantined, or a supervisor being alerted.
  • Encryption and Tokenization:
    • Encryption: Protects data but can create decryption barriers for legitimate recipients.
    • Tokenization: Used primarily for testing. Sensitive data (like account numbers) is obfuscated into a random string of characters called a token.
    • Token Vault: A secure database where the original data and its corresponding token are stored for retrieval when the actual data is required.