Computer Networking › Section H · Security in computer networks › Topic H.1

What network security means

Every packet you send crosses links and routers that belong to strangers. Before studying the tools that protect traffic, it helps to pin down exactly what "secure" should mean and what an intruder on the path is able to do.

Talking safely over a path you do not control

Earlier sections followed packets hop by hop through access networks, ISPs and routers. None of those devices is under the control of the two people communicating, and any of them, or anyone tapping a link between them, might be hostile. Security writing describes this with a fixed cast. Alice and Bob want to communicate; Trudy is the intruder who can see and interfere with what passes between them (other books call her Eve). Alice and Bob need not be people. They can be a browser and a web server, two routers exchanging routes, two mail servers, or a DNS resolver and the server it queries.

Four properties of secure communication

Confidentiality means only Alice and Bob can understand the content, so anything Trudy captures must be unreadable to her; this is the job of encryption. Message integrity means any change to a message in transit, accidental or deliberate, is detected. End-point authentication means each side can confirm the other is who it claims to be, which is hard when neither can see the other. Operational security means protecting an organisation's whole network, its hosts and its services from attack, which keeps them available. These match the confidentiality, integrity and availability goals in "Cybersecurity: attacks and defences" in Computer Science, with authentication made explicit.

What an intruder can do

Trudy's abilities fall into two groups. A passive attacker only listens: she sniffs packets on a shared link and records them, perhaps to analyse later. Even when the content is encrypted she may learn a lot from traffic analysis, the pattern of who talks to whom, when, and how much. An active attacker interferes: she modifies, inserts or deletes messages, replays an old message as if it were new, impersonates another party by forging addresses, takes over a session in progress, or floods a server so that real users are denied service. "Networks under attack" introduced sniffing, spoofing and denial of service; this section is about the defences.

Why the network's own checks are not enough

Several protocols already check messages, but none was designed against an intelligent opponent. The Internet checksum and the cyclic redundancy check catch random bit errors, yet anyone who alters a segment can simply compute a new checksum that matches. The source address in an IP datagram is whatever the sender writes there, so it proves nothing about who sent it. TCP sequence numbers keep data in order but are not secret. Defending against Trudy needs checks that she cannot recompute or forge, and that requires a secret she does not know. This is where cryptography comes in.

Worked example: naming the property at risk

For each incident, decide which property is attacked and whether Trudy is passive or active. 1. On a café network, Trudy captures a password sent to a site that uses plain HTTP: confidentiality, passive, since she only listened. 2. Trudy sends a forged DNS reply so that a user's browser connects to her lookalike server: end-point authentication, active, since the user reaches the wrong party. 3. A compromised router changes a few bytes of a software download and fixes the checksum: message integrity, active. 4. A worm on one laptop scans a company's internal addresses for unpatched machines: operational security, active. Check: each answer names what was lost, not merely how.

Who needs secure communication

The obvious users are people: shoppers sending card numbers, patients reading test results, friends exchanging messages. The less obvious ones are the network's own systems. If Trudy can forge DNS answers, she can send everyone who uses a resolver to the wrong address. If she can inject false routing announcements, she can divert traffic for whole blocks of addresses through her own network or make it vanish. If she can tamper with network management messages, she can reconfigure routers. Attacks on this infrastructure harm many users at once, which is why routing, naming and management protocols also need authentication and integrity.

Security at every layer

This section follows the course's top-down order. "Principles of cryptography", "Message integrity and digital signatures" and "End-point authentication" build the tools. "Securing e-mail" applies them in one application. "Securing TCP connections: TLS" protects any application that runs over TCP. "IPsec and virtual private networks" protects every datagram between two hosts or gateways. "Securing wireless LANs and cellular networks" protects the first, most exposed hop. "Operational security: firewalls and intrusion detection" guards an organisation's border. Layers protect different stretches of the path, so real systems often use several at once: a Wi-Fi link encrypted with WPA3 can carry a TLS connection inside a VPN tunnel.

Worked example: threat-modelling an online purchase

Priya buys a book from a shop's website on public Wi-Fi. 1. Assets: her card number and password, and the order details. 2. Adversaries: an eavesdropper on the Wi-Fi, a fake site posing as the shop, and a router on the path that might alter traffic. 3. Properties needed: confidentiality for the card number, integrity for the order, authentication of the shop to Priya and of Priya to the shop, and availability of the site. 4. Defences: TLS encrypts and protects the traffic; the shop's certificate authenticates the server; a password plus a second factor authenticates Priya; the shop's firewall and monitoring protect its servers. Check: every adversary meets at least one defence.

Cryptography is the foundation

Encryption is the obvious use of cryptography, but the same mathematics also gives integrity checks Trudy cannot forge and ways to prove identity without revealing a secret. All of it rests on keys. Following Kerckhoffs's principle, introduced in "Cybersecurity: encryption and authentication", the algorithms are public and only the keys are secret, so protecting, distributing and replacing keys is half the work. Security is also never absolute. Defenders weigh how likely an attack is and how much harm it would do against the cost of each defence, and they remember that people can be tricked even when the cryptography is perfect.

Common mistakes to avoid

First, equating security with encryption: an encrypted message can still be altered, replayed or sent to an impostor. Second, trusting a source IP address or a checksum as proof of origin or integrity; both can be forged. Third, assuming encryption hides everything; traffic analysis still reveals who talks to whom, when and how much. Fourth, forgetting availability: a flooded server is insecure even if no data leaks. Fifth, thinking only people need secure communication; routers, DNS servers and management systems do too. Sixth, thinking one layer of protection covers the whole path.

Key takeaways

Alice and Bob communicate over a path where an intruder, Trudy, may listen or interfere. Secure communication needs confidentiality, message integrity, end-point authentication and operational security, which keeps networks available. Passive attackers eavesdrop and analyse traffic; active attackers modify, insert, delete, replay, impersonate, hijack and deny service. Ordinary checksums and addresses resist accidents, not opponents, so defences need secrets: cryptography. Infrastructure such as DNS and routing needs protection as much as users do, and security can be added at the application, transport, network and link layers.

Flashcards

Flashcard

Alice, Bob and Trudy

Two communicating parties and an intruder on the path

They may be hosts, routers or servers, not just people.

Test your understanding

Question 1 of 5

Trudy sits on a café network and records every packet a user sends, without changing any of them. What kind of attack is this?

Question 2 of 5

Why can't the Internet checksum protect a software download against a malicious router?

Question 3 of 5

A forged DNS reply sends a user's browser to a server that imitates their bank. Which property is most directly defeated?

Question 4 of 5

A company encrypts all its traffic. Which information can a passive eavesdropper on its link still learn?

Question 5 of 5

Why does network infrastructure such as routing and DNS need authentication and integrity protection?

← Previous topicNext topic →