1. Home
  2. Explore
  3. Computer Science
  4. Network Security Fundamentals

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Network Security Fundamentals

Network Architecture, Operations, Attacks, and Security Hardening

1. Networks and Their Structure

A network is a group of connected devices that communicate and share resources. Devices may include computers, phones, printers, servers, and smart appliances. They connect through physical cables or wireless links, and they use addresses and identifiers to locate one another.

Local and wide area networks

  • A Local Area Network (LAN) connects devices across a relatively small area, such as a home, school, or office. A home Wi-Fi network is a common example.

  • A Wide Area Network (WAN) connects networks across a larger geographic area, such as a city, country, or continent. The internet is a large WAN.

A LAN can connect to the internet, allowing its devices to communicate with devices on remote networks. For example, employees in offices in different countries can exchange information over a WAN.

Common network devices

  • Hub: Broadcasts received information to every device connected to it. Because traffic is sent to all devices rather than only its intended recipient, hubs are less secure and less efficient than switches.

  • Switch: Connects devices within a network and forwards data to the intended destination. A switch learns which devices are associated with its ports and uses that information to direct traffic, improving performance and reducing unnecessary exposure.

  • Router: Connects different networks and forwards data between them. It reads destination addressing information and sends traffic toward the appropriate network. A receiving router can then forward the data to its destination device.

  • Modem: Connects a router or local network to an internet service provider’s network, enabling internet access. In a typical journey to a remote device, data passes from the sending device to its router, through a modem and the internet, and then through the destination network’s modem and router.

Many operations traditionally performed by physical network devices can also be performed by virtualization tools—software that provides network functions. Cloud providers offer virtual network services that can reduce equipment costs and make it easier to scale resources.


2. Cloud Networks

Cloud computing is the use of remote servers, applications, and network services hosted over the internet rather than solely on an organization’s local physical devices.

A cloud network is a collection of remote servers or computers that stores data and resources in a data center accessible over the internet. Cloud networks differ from traditional on-premises networks because the organization does not necessarily house and manage the servers at its own physical location. Services hosted in the cloud can often be accessed from many geographic locations.

Cloud providers may supply:

  • On-demand data storage and processing power, often paid for according to use.

  • Hosting and maintenance for applications.

  • Business and web analytics, such as tools for monitoring traffic and sales.

Cloud services can lower costs and simplify network operations, but they introduce security responsibilities. Organizations still need to protect their data, identities, applications, and configurations. Cloud security may combine traditional network-based protections with identity-based security, which verifies who or what is making a request as well as where the network traffic originates.


3. Data Packets and Network Performance

Communication across a network occurs when data moves from one point to another. The data is divided into units called data packets.

A packet typically contains:

  • Header: Information needed to deliver and process the packet, such as source and destination addresses and protocol information.

  • Body: The actual data or message being transmitted.

  • Footer: Information that can indicate the end of the packet and help the receiving device process it.

A packet can be compared to a mailed letter: the envelope carries address information, while the letter inside carries the message. Network addresses direct the packet; its body contains the information being sent.

Bandwidth and speed

  • Bandwidth is the amount of data a device or connection can receive over a period of time. It can be calculated as:

Bandwidth=quantity of datatime in seconds\text{Bandwidth}=\frac{\text{quantity of data}}{\text{time in seconds}}Bandwidth=time in secondsquantity of data​
  • Speed describes the rate at which data packets are received or downloaded.

Unusual changes in bandwidth or speed can indicate a network problem or attack. For example, an unexpected surge in traffic may be associated with an attempt to overwhelm a network.

Packet sniffing

Packet sniffing is the capture and inspection of data packets as they travel across a network. Security professionals may use it to troubleshoot network issues or investigate incidents. Attackers may use it to observe traffic they are not authorized to access, search for sensitive information, or manipulate packets.


4. TCP/IP and Network Communication

The TCP/IP model is a framework for understanding how data is organized and transmitted across networks. TCP/IP stands for Transmission Control Protocol/Internet Protocol. It provides a common way to describe network communication and to identify where problems may occur.

TCP and IP

  • Transmission Control Protocol (TCP) establishes a connection between two devices and organizes data so it can be transmitted. It helps ensure that data reaches the intended destination and supports reliable communication.

  • Internet Protocol (IP) provides standards for addressing and routing packets between devices and networks. IP addresses identify network locations so that packets can be directed appropriately.

TCP and IP perform related but different functions: TCP supports the connection and reliable handling of data, while IP supports addressing and routing.

Ports

A port is a software-based location on a device’s operating system that helps organize incoming and outgoing network traffic. Ports separate traffic according to the service or application involved. Port numbers help the receiving device determine how to process data.

Common examples include:

  • Port 25: Commonly associated with email.

  • Port 443: Commonly used for secure web communications.

  • Port 20: Associated with large file transfers in the example material.

Controlling which ports are allowed is a security measure because unnecessary open ports can provide additional paths for unwanted communication.

The four TCP/IP layers

The TCP/IP model has four layers. Each describes a different part of network communication.

  1. Network access layer

    • Covers how data packets are created and transmitted across a local network.

    • Includes network hardware, physical connections, and devices such as switches that direct data locally.

  2. Internet layer

    • Handles IP addressing and the movement of packets between networks.

    • Helps determine whether traffic stays on a LAN or must be sent to a remote network.

  3. Transport layer

    • Controls the flow of traffic between devices.

    • Includes connection-status information and error-control functions that help ensure data moves correctly.

  4. Application layer

    • Covers how applications and services use network communication.

    • Examples include email services and file transfers.

The layers give security professionals a way to describe where network activity or a problem occurs.


5. IP Addresses and MAC Addresses

IP addresses

An Internet Protocol address, or IP address, identifies a device’s location for network communication. It functions like a mailing address: packets use it to identify where they are coming from and where they need to go.

There are two main IP versions:

  • IPv4: Written as four numbers separated by periods. Each number contains one to three digits. The growth of the internet led to concern that the available IPv4 addresses would be exhausted.

  • IPv6: Developed to provide many more addresses. It is represented by a longer address than IPv4 and supports a much larger number of connected devices.

IP addresses can be public or private:

  • Public IP address: Assigned by an internet service provider and used for communication over the internet. Devices on one local network commonly share the same public-facing address.

  • Private IP address: Used for communication among devices within a local network. These addresses are not generally visible to devices on the public internet.

MAC addresses

A Media Access Control (MAC) address is an identifier assigned to a physical network device. Switches use MAC addresses to direct local network traffic.

When a switch receives a packet, it can read the destination MAC address, associate it with a switch port, and use a MAC address table to forward the packet to the appropriate device. The table functions like an address book for the switch.

IP and MAC addresses serve different purposes: IP addresses support communication across networks, while MAC addresses help identify devices for local network delivery.


6. Network Protocols

A network protocol is a set of rules that devices use to determine how communication is structured and delivered. Protocols define matters such as the order of communication, the format of data, and the actions a receiving device should take.

A single activity—such as loading a website—can involve several protocols:

  1. TCP establishes a connection between the client and server. A TCP handshake verifies communication and establishes the connection before data is exchanged.

  2. DNS translates a human-readable domain name into an IP address so the client can locate the intended server.

  3. ARP helps determine the MAC address of the next device or router on the local path. This supports delivery across the local network.

  4. HTTPS supports secure communication between a web browser and a website server. It uses encryption associated with TLS to protect data in transit.

Protocols work together: DNS helps locate the server, TCP establishes communication, local delivery protocols help move packets through the network, and HTTPS protects web communication.

Wireless networking: IEEE 802.11 and WPA

IEEE 802.11 is a family of standards commonly known as Wi-Fi. It defines communication for wireless LANs and is maintained by the Institute of Electrical and Electronics Engineers.

Wireless security protocols have developed over time:

  • WPA (Wi-Fi Protected Access) was introduced to secure wireless connections.

  • WPA2 and WPA3 are later versions with further security improvements, including stronger encryption.

Organizations should use secure, current wireless protocols and avoid relying on outdated ones.


7. Firewalls

A firewall is a network security device or program that monitors traffic entering or leaving a network and allows or blocks it according to security rules. Rules are generally based on an organization’s security policy.

A firewall may use port filtering to allow or block communication on particular ports. For example, a rule could permit traffic needed for secure web communication while denying unneeded traffic.

Types of firewalls

  • Hardware firewall: A physical device that inspects packets before they enter or leave a network.

  • Software firewall: A program installed on a computer or server. On a computer, it analyzes traffic to that computer; on a server, it can help protect connected devices. Software firewalls can cost less than separate hardware but use some of the device’s processing resources.

  • Cloud-based firewall: A software firewall hosted by a cloud service provider. Organizations configure its rules through the provider’s interface. It can filter incoming traffic before it reaches an on-site network and can protect cloud-based assets and processes. A cloud provider may offer this as Firewall as a Service (FaaS).

Stateful and stateless firewalls

  • Stateful firewall: Tracks information about network traffic and connections. It can assess traffic characteristics and behavior to identify suspicious activity, rather than treating each packet only according to an isolated fixed rule.

  • Stateless firewall: Applies predefined rules to packets without retaining or analyzing connection information. It accepts or rejects traffic according to its configuration but does not identify suspicious trends as a stateful firewall can.

Because stateful firewalls track connection information and can make decisions based on traffic behavior, they generally provide more context-aware protection than stateless firewalls.

Next-Generation Firewalls

A Next-Generation Firewall (NGFW) offers capabilities beyond basic stateful inspection. It can inspect incoming and outgoing traffic, perform deep packet inspection, and provide intrusion-protection functions. Some NGFWs connect to cloud-based threat intelligence services so their protections can be updated in response to emerging threats.


8. Virtual Private Networks

A Virtual Private Network (VPN) helps protect network communication over a public network such as the internet. A VPN can conceal a user’s public-facing IP address and virtual location from the destination service and encrypt data while it travels.

A VPN commonly uses two related processes:

  • Encryption makes transmitted information unreadable to parties that do not have the required cryptographic key.

  • Encapsulation wraps protected data inside other packets so that network devices can still route it toward its destination.

Encapsulation is useful because routing devices need addressing information to move packets. The VPN protects the original data while providing an outer packet that can be used for delivery. VPN services also create an encrypted tunnel between a device and a VPN server.

VPNs can improve privacy and confidentiality, particularly on public networks. They do not eliminate every security risk, so other protections—such as secure websites and safe device practices—remain important.


9. Network Segmentation and Security Zones

Network segmentation divides a network into separate parts, each with its own access permissions and security rules. Segmentation can limit who can reach particular resources and help prevent an incident in one part of a network from spreading to others.

Examples include:

  • Separating a hotel’s public guest Wi-Fi from its encrypted staff network.

  • Creating separate subnets for university students and faculty.

  • Separating departments, such as marketing and finance, within an organization.

A subnet is a subdivided part of a larger network. Subnets support separation of users, devices, and resources.

Security zones

Organizations commonly distinguish between two broad types of zones:

  • Uncontrolled zone: A network outside the organization’s control, such as the public internet.

  • Controlled zone: A network or subnet managed to protect the organization’s internal systems from uncontrolled networks.

The controlled environment may include several layers:

  1. Demilitarized Zone (DMZ)

    • An outer network area that hosts public-facing services.

    • May contain web, proxy, DNS, email, or file servers that need to communicate with external users.

    • Acts as a perimeter between the internet and more protected internal systems.

  2. Internal network

    • Contains private servers and data used by the organization.

    • Is more protected than the DMZ.

  3. Restricted zone

    • Holds highly confidential information.

    • Is accessible only to employees or systems with specific privileges.

A DMZ is ideally placed between firewalls: one filters traffic between the internet and the DMZ, and another filters traffic between the DMZ and internal network. An additional firewall can protect a restricted zone. This layered design makes it harder for an attack that reaches one zone to spread into more sensitive areas.

Firewall rules can control which IP addresses and ports are allowed to reach each zone. For instance, an organization might permit only the traffic required for secure web access to a public web server in the DMZ.


10. Proxy Servers

A proxy server is an intermediary that receives a client’s request and forwards it to another server. It sits between users or external networks and the systems with which they communicate.

Proxy servers can:

  • Filter incoming or outgoing traffic.

  • Hide the private network’s IP address behind a different public-facing address.

  • Restrict access to unsafe or unauthorized websites.

  • Cache frequently requested information in temporary memory, reducing repeated contact with internal servers.

Types of proxy servers

  • Forward proxy: Controls a user’s access to the internet. It receives outgoing requests, evaluates whether they are allowed, and forwards approved requests to their destinations. It can also help conceal the user’s IP address.

  • Reverse proxy: Controls external access to an organization’s internal servers. It receives requests from outside parties, evaluates them, and forwards approved traffic to internal servers. This helps protect internal server addresses from direct exposure.

  • Email proxy: Filters email, including spam, and can check whether a sender’s address has been forged. This can reduce exposure to phishing messages that impersonate trusted people.


11. Network Attacks and Their Impact

Networks face attacks because communication creates opportunities for malicious actors to exploit vulnerable devices, weak controls, or exposed data. Common attack methods include malware, denial-of-service attacks, packet sniffing, and IP spoofing.

Successful attacks can:

  • Expose confidential or valuable information.

  • Damage an organization’s reputation and customer relationships.

  • Interrupt business operations.

  • Require significant time and money to investigate and recover from.

  • Leave systems vulnerable to further attacks.

The severity of an incident can depend not only on the amount of traffic involved but also on how a device processes a particular request.


12. Denial-of-Service Attacks

A Denial-of-Service (DoS) attack attempts to make a network, server, or service unavailable by overwhelming it or disrupting its ability to respond to legitimate users. The target may become slow, stop responding, or crash.

A Distributed Denial-of-Service (DDoS) attack uses multiple devices or servers, often in different locations, to send unwanted traffic to a target. Because the traffic comes from many sources, it can be especially difficult to manage.

DoS attacks can target different parts of a network. Overloading a server, router, or another critical device may disrupt service even if the rest of the network remains operational.

Common network-level DoS attacks

SYN flood

A SYN flood abuses the process used to establish a TCP connection:

  1. A client sends a SYN request to begin a connection.

  2. The server replies with a SYN/ACK and reserves resources while waiting for the final acknowledgment.

  3. The client sends an ACK, completing the handshake.

An attacker sends many SYN requests but does not complete the handshakes. The server can use up available connection resources while waiting for acknowledgments, making it difficult to accept legitimate connections.

ICMP flood

The Internet Control Message Protocol (ICMP) is used by devices to communicate information about network status and transmission errors. An ICMP flood repeatedly sends ICMP packets to a target. The target may consume resources responding to the requests, using up bandwidth and disrupting normal operations.

Ping of death

A ping of death attack sends an oversized ICMP packet that exceeds the maximum size allowed for a correctly formed packet. A vulnerable system may fail while processing the packet.

These attacks differ in their mechanics: SYN floods exploit connection setup, ICMP floods generate large numbers of requests, and ping-of-death attacks exploit the handling of an oversized packet.


13. Packet Sniffing Attacks

Packet sniffing becomes malicious when an attacker captures or manipulates traffic without authorization. Since packet headers can contain addressing information and packet bodies may contain sensitive information, intercepted traffic can reveal personal, financial, or organizational data.

An attacker may position themselves between two communicating devices, observe the packets passing through, and search for valuable information. In some cases, the attacker may also alter the packet contents, such as changing information in a financial transaction.

Passive and active sniffing

  • Passive packet sniffing: The attacker reads packets in transit but does not alter them. On a hub-based network, traffic may be visible to connected devices because the hub broadcasts it broadly.

  • Active packet sniffing: The attacker manipulates packets or influences where they go. This may include redirecting traffic or changing information inside a packet.

Defenses against malicious sniffing

  • Use a VPN to encrypt data in transit, making captured traffic more difficult to read.

  • Use HTTPS for web communication. HTTPS uses TLS encryption to protect data exchanged between a browser and a server.

  • Avoid unprotected public Wi-Fi when possible. If it must be used, a VPN can provide an additional layer of protection.

  • Use secure network configurations that limit unnecessary exposure of traffic.

Encryption may not prevent an attacker from capturing packets, but it can make the information in those packets unreadable.


14. IP Spoofing and Related Attacks

IP spoofing occurs when an attacker changes a packet’s source IP address to impersonate an authorized system. The attacker may use this false source address to communicate with a target or attempt to bypass firewall rules.

On-path attacks

An on-path attack occurs when an attacker places themselves between two communicating devices, such as a browser and a web server. The attacker can intercept or alter data in transit. By observing packet information, the attacker may learn the devices’ IP and MAC addresses and attempt to impersonate one of them.

Replay attacks

A replay attack occurs when an attacker captures a valid data packet and delays or retransmits it later. Replaying the packet may disrupt a connection or make a request appear to come from an authorized user.

Smurf attacks

A Smurf attack combines IP spoofing with a denial-of-service technique. The attacker spoofs an authorized user’s IP address and sends packets in a way that causes a large volume of traffic to be directed toward the spoofed address. The resulting traffic can overwhelm a target computer or network.

Defenses against IP spoofing

  • Encrypt network communications to protect the contents of transmitted data.

  • Configure firewalls to reject suspicious source addresses. For example, an organization can reject incoming internet traffic that claims to originate from the organization’s own private network, because such traffic should not be arriving from outside.

  • Monitor traffic and configure filtering rules to prevent unauthorized or impossible address combinations.


15. Security Hardening

Security hardening is the process of strengthening a system to reduce its vulnerabilities and attack surface. The attack surface is the collection of points, services, devices, and permissions that an attacker might exploit.

Reducing the attack surface is like securing the doors and windows of a building: fewer exposed entry points make unauthorized access harder. Hardening can apply to hardware, operating systems, applications, databases, networks, and cloud infrastructure. Physical security—such as controlled access, cameras, or security guards—can also be part of the overall approach.

Common hardening activities include:

  • Installing software and operating-system updates.

  • Changing configurations to use secure settings.

  • Removing or disabling unused applications, services, and ports.

  • Limiting user access and permissions.

  • Maintaining strong authentication practices.

  • Testing systems to find weaknesses.

  • Creating backups and maintaining accurate inventories.

Fewer unnecessary devices, applications, services, ports, and permissions make systems easier to monitor and reduce the number of opportunities available to attackers.

Penetration testing

A penetration test, or pen test, is a simulated attack designed to identify vulnerabilities in a system, network, website, application, or process. Testers document their findings, and security teams use the results to prioritize fixes and improve protections.


16. Operating-System Hardening

An operating system (OS) is the interface between computer hardware and the user. It manages hardware and provides the environment in which software applications run. Because an insecure device can become a pathway into a larger network, OS security is an important part of network security.

Patch updates

A patch update is a software or OS update that fixes defects or security vulnerabilities. Organizations should apply relevant patches promptly. Once a vendor discloses a vulnerability and releases a fix, attackers may learn what weakness exists in systems that remain unpatched.

Baseline configurations

A baseline configuration, also called a baseline image, is a documented set of approved system specifications used as a reference for future builds, releases, and updates.

A baseline may include settings such as allowed and disallowed network ports. If unusual activity occurs, security teams can compare the current configuration with the baseline to identify unauthorized changes.

Hardware and software disposal

Old hardware should be securely wiped and disposed of so that stored information cannot be recovered by unauthorized people. Unused software should also be removed, because it may contain vulnerabilities or rely on vulnerable components.

Password policies and authentication

A strong password policy may specify:

  • A minimum password length.

  • Required character types, such as uppercase letters, numbers, or symbols.

  • A limit on repeated failed login attempts.

Organizations may also require Multi-Factor Authentication (MFA). MFA requires two or more forms of identity verification, such as:

  • Something a user knows: A password.

  • Something a user has: An ID card or another device.

  • Something a user is: A biometric feature, such as a fingerprint.

Using multiple forms of verification makes access more difficult to obtain through a stolen password alone.


17. Network Hardening

Network hardening focuses on reducing risks in network infrastructure and communication. Some network-hardening activities are performed regularly, while others are configured initially and reviewed or updated as needed.

Regular network-hardening activities

  • Firewall rule maintenance: Reviewing and updating rules to ensure that permitted traffic is still necessary and appropriate.

  • Network log analysis: Examining records of network events to find activity of interest, such as suspicious behavior or vulnerabilities.

  • Patch updates: Updating network devices and related software to address security weaknesses.

  • Server backups: Keeping recoverable copies of important data and systems.

SIEM and network monitoring

A Security Information and Event Management (SIEM) tool collects and analyzes log data from across an organization. It can present information on a single dashboard, sometimes called a single pane of glass, so analysts can monitor critical activities in one place.

A SIEM helps security teams inspect and prioritize events. Its reports may rank vulnerabilities by urgency, with high-priority findings requiring faster mitigation.

Port filtering and least privilege

Port filtering allows or blocks communication according to port numbers. A useful principle is to allow only the ports required for normal operations and block ports that are not needed. This reduces exposure to vulnerabilities associated with unnecessary services.

Network access should also follow least privilege: users should receive access only to the parts of the network and resources required for their roles.

Segmentation and encryption

  • Network segmentation separates departments, systems, or security zones so that an issue in one segment is less likely to spread to the whole organization.

  • Encryption protects data as it moves across the network. Encryption standards specify methods for concealing outgoing data and decrypting incoming data. Highly sensitive data, especially in restricted zones, may require stronger protections.

Networks should use current wireless security protocols and disable outdated protocols where possible.


18. Cloud Network Hardening

Cloud servers and applications require security maintenance even though the cloud service provider hosts the infrastructure. Cloud providers and customer organizations share responsibilities, but the organization still needs to secure its own data, applications, users, and configurations.

Cloud-hardening practices

  • Use a server baseline image as the approved reference configuration for cloud server instances.

  • Compare current cloud systems with the baseline to detect unverified or unauthorized changes.

  • Separate data and applications according to their function and security needs. For example, older applications can be separated from newer ones, and internal systems can be separated from user-facing applications.

  • Maintain and update systems, applications, and configurations just as an organization would in an on-premises environment.

A baseline comparison helps reveal changes that may result from misconfiguration or intrusion. Cloud hosting does not eliminate security responsibilities; secure operations remain necessary in both cloud and traditional networks.


19. Core Principles for Network Security

Effective network security depends on understanding how devices, addresses, protocols, and services work together. Security professionals use this knowledge to locate weaknesses, interpret network activity, and apply appropriate protections.

The main principles include:

  • Understand the architecture: Know how LANs, WANs, devices, servers, and cloud services connect.

  • Control communication: Use protocols, firewall rules, port filtering, and access permissions to limit unnecessary traffic.

  • Protect data in transit: Use encryption, HTTPS, and VPNs where appropriate.

  • Separate systems: Use subnets and security zones to contain problems and protect sensitive resources.

  • Monitor activity: Review logs, use SIEM tools, and investigate abnormal traffic or configurations.

  • Reduce the attack surface: Patch systems, remove unnecessary services, restrict permissions, and conduct penetration testing.

  • Prepare for disruption: Maintain backups and ensure that systems can recover from attacks or failures.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent