IoT Security

Chapter 8
Network and Communication Security

Diploma in IOT
IoT Security   •   Diploma

Network and Communication Security

Introduction

IoT devices rarely operate in isolation. Sensors, actuators, gateways, cloud platforms, mobile applications, and enterprise systems exchange data through wired and wireless networks. These communications may carry safety commands, personal information, industrial measurements, or credentials. Consequently, a secure IoT system must protect not only the device and application but also the communication path between them.

Network and communication security seeks to preserve confidentiality, integrity, availability, authenticity, and accountability. In practice, this means preventing unauthorised listening, modification, replay, impersonation, denial of service, and unauthorised network access. IoT security is particularly challenging because devices may have limited processing power, long operating lifetimes, constrained bandwidth, insecure physical locations, and heterogeneous communication technologies.

This chapter examines common IoT communication technologies and protocols, security mechanisms, network segmentation, and intrusion prevention. The emphasis is on selecting controls appropriate to the risk, device capability, and operational environment.

Learning Objectives

By the end of this chapter, a learner should be able to:

  1. Explain the security requirements of IoT communication.
  2. Compare the security characteristics of Wi-Fi, Bluetooth LE, Zigbee, RFID, NFC, LPWAN, and cellular networks.
  3. Distinguish MQTT, CoAP, TLS, and DTLS and select suitable protection mechanisms.
  4. Design basic network segmentation for an IoT deployment.
  5. Describe intrusion detection and intrusion prevention approaches.
  6. Analyse a practical IoT communication-security problem and recommend controls.

1. Communication Security Foundations

A communication system has at least a sender, a communication channel, and a receiver. The channel may be a copper cable, fibre link, radio frequency, or public network. Security controls are normally applied at several layers:

  • Physical layer: cable protection, radio shielding, tamper resistance, and controlled access to network equipment.
  • Link layer: frame authentication, encryption, wireless association controls, and media access protection.
  • Network layer: IP filtering, routing controls, virtual LANs, and firewalls.
  • Transport layer: secure channels such as TLS and DTLS.
  • Application layer: authentication, authorisation, message validation, topic permissions, and replay protection.

The five principal security objectives are:

ObjectiveMeaning in IoT communicationTypical control
ConfidentialityPrevent unauthorised disclosureEncryption
IntegrityDetect or prevent unauthorised alterationMessage authentication code or digital signature
AvailabilityKeep communication usableRedundancy, rate limiting, filtering
AuthenticityEstablish the identity of an endpointCertificates, pre-shared keys, secure bootstrapping
AccountabilityAssociate actions with devices or usersLogs, identities, timestamps

Encryption alone does not prove who sent a message. Likewise, authentication does not necessarily conceal its contents. Secure designs combine cryptographic protection with identity management, access control, monitoring, and sound configuration.

Threats to IoT Communication

Important threats include:

  • Eavesdropping: observing unencrypted traffic.
  • Man-in-the-middle attack: intercepting and possibly altering communication between legitimate endpoints.
  • Replay attack: retransmitting a previously valid message, such as an old unlock command.
  • Spoofing: pretending to be a trusted device, gateway, or broker.
  • Jamming: deliberately interfering with radio communication.
  • Packet injection: introducing unauthorised packets into a protocol exchange.
  • Downgrade attack: forcing endpoints to use an older or weaker security mode.
  • Denial of service: exhausting bandwidth, memory, connections, or battery power.
  • Rogue access point or gateway: providing a fraudulent network entry point.

Threat analysis should consider both the probability and impact of an event. A battery-powered sensor in a public place may face physical capture and radio attacks, while a factory controller may face network intrusion and safety consequences.

2. Wired and Wireless Protection

Wired Networks

Ethernet is often considered safer than wireless communication because an attacker generally needs physical or logical access to the network. However, wired networks remain vulnerable to unauthorised ports, rogue devices, ARP spoofing, VLAN misconfiguration, exposed switches, and compromised gateways.

Useful controls include:

  • 802.1X network access control using device or user authentication.
  • Port security and disabling unused switch ports.
  • MAC address controls as a supplementary measure, not a sole identity mechanism.
  • VLAN separation and firewall enforcement between VLANs.
  • Secure management protocols such as SSH and HTTPS rather than Telnet or HTTP.
  • Network access control that checks device posture where feasible.
  • Physical protection of cabinets, patch panels, and gateway equipment.

A wired connection should still use application or transport encryption when data crosses an untrusted segment. Physical access control does not replace cryptographic protection.

Wireless Networks

Wireless signals extend beyond walls and can be captured without a direct cable connection. Security therefore requires strong association controls, encryption, correct key management, and monitoring for rogue devices.

For Wi-Fi, modern deployments should prefer WPA3 where supported. WPA2 with AES-based protection remains common in legacy environments, but obsolete protocols such as WEP should not be used. Enterprise Wi-Fi commonly uses 802.1X and an authentication server, while personal or home networks use a shared passphrase. A shared passphrase is difficult to manage securely when many devices or contractors require access.

Recommended Wi-Fi practices include:

  • Use strong, unique credentials and change default administrator passwords.
  • Separate IoT devices from employee and guest networks.
  • Disable insecure legacy modes and unnecessary services.
  • Use protected management frames where supported.
  • Monitor for rogue access points and unusual association behaviour.
  • Avoid treating a hidden network name as a security control.

3. IoT Wireless Technologies

Bluetooth Low Energy

Bluetooth Low Energy (BLE) is designed for low-power short-range communication. It is widely used by wearables, locks, medical sensors, and commissioning applications. BLE security includes pairing, bonding, encryption, and device authentication, but the result depends heavily on the selected association method.

“Just Works” pairing is convenient but does not provide strong protection against a man-in-the-middle attacker during pairing. Passkey entry and numeric comparison provide stronger assurance when users can verify information. Out-of-band pairing can use another trusted channel, such as NFC, to authenticate the exchange.

Security recommendations include using authenticated pairing where possible, protecting stored bonding keys, limiting discoverability, validating device roles, and updating firmware. BLE advertisements should not be assumed confidential merely because the connection later becomes encrypted.

Zigbee

Zigbee is used in home automation, building systems, and sensor networks. It commonly uses AES-128-based cryptographic protection. The network key protects network traffic, while link keys can provide more direct device-to-device protection. The trust centre has an important role in admitting devices and distributing keys.

Risks include insecure commissioning, exposure of network keys, weak installation codes, and unauthorised joining. A secure deployment should restrict joining to controlled commissioning periods, use strong installation credentials, protect the trust centre, and remove or quarantine lost devices.

RFID

Radio-frequency identification (RFID) uses tags and readers to identify objects. Some tags are passive and have very limited computational capability. Basic RFID may provide little or no confidentiality, making cloning, skimming, and tracking possible.

Controls may include cryptographically capable tags, mutual authentication, protected readers, access control, and privacy-preserving identifiers. The required security depends on whether the tag merely identifies inventory or authorises a high-value action.

NFC

Near-field communication (NFC) operates over a very short distance and is used for contactless payments, access cards, and device commissioning. Short range reduces casual interception but does not eliminate relay attacks, malicious tags, or unauthorised reading. Sensitive NFC applications should use secure elements, transaction cryptography, mutual authentication, and application-level validation.

LPWAN

Low-power wide-area networks (LPWANs), including technologies such as LoRaWAN and NB-IoT, support small messages over long distances with low energy consumption. Their constraints include limited payload size, low data rates, duty-cycle restrictions in some regions, and battery dependence.

LoRaWAN separates network-session and application-session protection in its architecture. Correct key provisioning and protection are essential; knowledge of a network identifier is not equivalent to possession of a secret key. Devices should use secure activation procedures, protected counters, replay detection, and carefully managed keys.

LPWAN availability can be affected by jamming, gateway failure, regional interference, and capacity constraints. Critical control functions should not depend on a single low-bandwidth link.

Cellular IoT

Cellular IoT technologies, including LTE-M and NB-IoT, benefit from operator-managed authentication and licensed spectrum. Nevertheless, the device, subscriber identity, private APN, cloud endpoint, and application must all be secured. Cellular connectivity does not automatically protect data after it leaves the operator network.

Organisations should use private routing where appropriate, restrict inbound access, authenticate devices at the application layer, monitor data usage, and manage SIM or eSIM lifecycle events. Lost devices and terminated subscriptions must be revoked promptly.

4. MQTT and CoAP Security

MQTT

MQTT is a lightweight publish–subscribe protocol. A client publishes messages to a broker under a topic, and subscribers receive messages for authorised topics. This architecture simplifies many-to-many communication but makes the broker a critical trust and availability point.

MQTT security should include:

  • TLS for confidentiality and channel integrity.
  • Client authentication using certificates, credentials, or another strong mechanism.
  • Authorisation rules restricting which clients may publish or subscribe to each topic.
  • Protection against wildcard subscription abuse.
  • Broker hardening, logging, rate limits, and connection limits.
  • Careful handling of retained messages and last-will messages.

An MQTT username and password sent without TLS can be intercepted. TLS also requires certificate validation; simply enabling encryption without validating the broker identity remains vulnerable to impersonation.

CoAP

Constrained Application Protocol (CoAP) is designed for resource-constrained devices and commonly uses UDP. It supports request–response interaction and can be used with proxies and gateways. CoAP security is commonly provided by DTLS, while Object Security for Constrained RESTful Environments (OSCORE) can protect messages end-to-end across certain intermediaries.

Because UDP does not establish a connection in the same way as TCP, deployments must consider spoofed requests, amplification, retransmission, and resource exhaustion. Rate limits, message-size restrictions, token validation, DTLS, and application-level authorisation are important.

5. TLS and DTLS

TLS protects application traffic over reliable transports such as TCP. DTLS adapts similar security concepts to datagram transports such as UDP. Both can provide confidentiality, integrity, endpoint authentication, and protection against tampering, assuming correct configuration and certificate validation.

A simplified secure-channel sequence is:

  1. Client and server negotiate supported protocol versions and cryptographic algorithms.
  2. The server proves its identity, usually with a certificate.
  3. The parties establish shared session keys.
  4. Application data is encrypted and authenticated.
  5. The connection is closed or rekeyed according to protocol rules.

Modern deployments should disable obsolete protocol versions and weak algorithms, validate certificate chains and names, protect private keys, and plan certificate renewal before expiry. Mutual TLS is useful when both the client and server must authenticate. It increases administrative complexity because every device needs a managed identity and certificate lifecycle.

DTLS must additionally handle packet loss, reordering, retransmission, and possible amplification. It should not be treated as identical to TLS in operational behaviour.

6. Key Management and Device Identity

Cryptography is only as strong as its key management. IoT deployments should answer the following questions:

  • How is each device uniquely identified?
  • How are initial keys installed securely?
  • Where are private keys stored?
  • How are keys rotated and revoked?
  • What happens when a device is lost, sold, compromised, or decommissioned?
  • Can one compromised device decrypt another device’s traffic?

Per-device credentials are preferable to a single fleet-wide password. A hardware security element or trusted execution environment can protect private keys from ordinary application software. Secure provisioning should occur through a controlled manufacturing or commissioning process, not through publicly documented default credentials.

Key rotation limits the consequences of compromise. However, rotation must account for intermittent connectivity, clock errors, constrained devices, and recovery procedures. A design that rotates keys but cannot recover a disconnected device may create an availability failure.

Replay resistance commonly uses a nonce, sequence number, timestamp, or freshness challenge. A receiver must verify freshness and maintain sufficient state. A timestamp alone is insufficient if clocks are unsynchronised or an attacker can alter time information.

7. Segmentation and Zero-Trust Principles

Segmentation limits the movement of an attacker after an initial compromise. A practical IoT architecture may include:

  • A device network for sensors and actuators.
  • A gateway or broker network.
  • An administration network.
  • A user or enterprise network.
  • A guest network.
  • A management and monitoring network.

Traffic between zones should be explicitly allowed according to a documented policy. For example, a temperature sensor may be permitted to send data to a gateway, but it should not initiate connections to office laptops or database servers. Default-deny rules are preferable to broad “internal network” trust.

Segmentation can be implemented using VLANs, separate routing domains, firewalls, software-defined networking, private cellular networks, and application-layer policy. VLANs alone are not sufficient if routing between them is unrestricted.

Zero-trust principles complement segmentation. Each request is authenticated and authorised according to identity, device state, context, and resource policy rather than trusted solely because it originates inside a network. In constrained environments, full zero-trust implementation may be impractical, but per-device credentials, least privilege, encrypted channels, and continuous monitoring remain valuable.

8. Intrusion Detection and Prevention

An intrusion detection system (IDS) identifies suspicious activity and generates alerts. An intrusion prevention system (IPS) can block, rate-limit, quarantine, or otherwise disrupt suspected malicious activity. Controls may be:

  • Signature-based: detect known patterns.
  • Anomaly-based: identify deviations from a learned baseline.
  • Protocol-aware: validate MQTT, CoAP, DNS, or industrial protocol behaviour.
  • Network-based: inspect traffic at gateways and switches.
  • Host-based: monitor device processes, logs, and configuration.

IoT monitoring should establish normal communication baselines, including destinations, ports, message rates, payload sizes, and operating times. A sensor that suddenly scans the network or contacts an unfamiliar country may indicate compromise. However, anomaly detection can generate false positives when devices have legitimate firmware updates or seasonal behaviour.

Prevention must be proportionate. Automatically blocking a safety controller may create a physical hazard. For critical systems, designs should use safe failure modes, staged response, human approval for high-impact actions, and tested recovery procedures.

9. Applied Case: Smart Building Environmental Control

Background

This illustrative case concerns a university building with wireless temperature, humidity, occupancy, and air-quality sensors. Controllers operate ventilation and heating equipment. Data is sent through a gateway to an MQTT broker and then to an energy-management platform.

Problem

The original installation used a shared Wi-Fi password, common administrator credentials, unencrypted MQTT connections, and unrestricted access from the sensor network to the corporate network. A compromised sensor could therefore be used to scan office systems or inject false environmental data.

Analysis

The most significant risks were credential reuse, lack of device-level identity, broker impersonation, lateral movement, and unsafe actuator commands. Availability was also important because loss of ventilation control could affect occupant safety and equipment operation.

Approach and Solution

The redesigned architecture used:

  1. A dedicated IoT VLAN for sensors and controllers.
  2. A separate gateway and broker zone protected by firewalls.
  3. Per-device certificates stored in protected hardware where supported.
  4. Mutual TLS between gateways and the broker.
  5. MQTT topic authorisation so sensors could publish only to assigned topics and could not issue control commands.
  6. Secure Wi-Fi association and a separate commissioning network.
  7. Firmware signing, scheduled updates, and removal of default credentials.
  8. Monitoring for abnormal message rates, new destinations, and failed authentication.
  9. Manual approval and safety interlocks for high-impact actuator commands.
  10. Backup local control so ventilation continued during cloud or broker outage.

Outcome

The redesign reduced the consequences of a compromised sensor, improved traceability, and made broker impersonation substantially more difficult. It also preserved availability by preventing cloud dependence from becoming a single point of failure.

Learning Points

Security was achieved through layered controls rather than a single encryption setting. Segmentation limited movement, certificates established identity, MQTT authorisation restricted actions, monitoring supported detection, and local fallback protected physical operations.

10. Challenges, Governance, and Best Practice

IoT security involves trade-offs. Strong cryptography consumes processing power and energy; certificate management introduces operational work; inspection may conflict with privacy; and aggressive filtering may interfere with legitimate updates. Designers should document these trade-offs rather than silently accepting risk.

Privacy is especially important for occupancy, location, health, and behavioural data. Data minimisation, purpose limitation, access control, retention limits, and transparency should be applied. Regulatory duties vary by jurisdiction and sector, but organisations should consider data-protection law, radio-spectrum rules, product-security requirements, safety obligations, and breach reporting requirements.

Artificial intelligence can assist with traffic baselining and anomaly detection, but it should not be treated as an infallible security authority. Training data may be incomplete, adversaries may manipulate inputs, and unexplained automated blocking may create operational risk. Human oversight and conventional controls remain necessary.

A professional implementation should include:

  • Asset inventory and communication-flow diagrams.
  • Secure defaults and removal of unnecessary services.
  • Unique identities and least-privilege permissions.
  • Strong encryption with certificate or key lifecycle management.
  • Segmentation and default-deny firewall policies.
  • Secure update and rollback procedures.
  • Continuous logging, time synchronisation, and alert handling.
  • Regular vulnerability assessment and penetration testing.
  • Incident-response procedures, including device isolation and credential revocation.
  • Secure decommissioning and data destruction.

Chapter Summary

IoT communication security protects data and commands as they move among devices, gateways, brokers, networks, and cloud services. Effective protection requires confidentiality, integrity, authenticity, availability, and accountability. Wired networks need port, access, segmentation, and management controls; wireless networks additionally require secure association, radio-aware monitoring, and protection against rogue devices and jamming.

Wi-Fi, BLE, Zigbee, RFID, NFC, LPWAN, and cellular technologies have different capabilities and risks. MQTT provides publish–subscribe communication and depends heavily on broker authentication and topic authorisation. CoAP supports constrained request–response communication and commonly uses DTLS or OSCORE. TLS and DTLS protect channels when certificates, algorithms, versions, and keys are correctly managed.

Per-device identity, secure provisioning, key rotation, replay protection, segmentation, intrusion detection, and carefully governed prevention form a layered defence. The smart-building case demonstrates that security must also preserve safe physical operation and local availability.

Key Terms

Authentication: Verification of an entity’s identity.

Authorisation: Determination of what an authenticated entity may do.

BLE: Bluetooth Low Energy, a short-range, low-power wireless technology.

Broker: An intermediary that receives and distributes MQTT messages.

Confidentiality: Protection against unauthorised disclosure.

DTLS: Datagram Transport Layer Security for datagram protocols such as UDP.

IDS: Intrusion Detection System that identifies suspicious activity.

IPS: Intrusion Prevention System that can block or disrupt suspicious activity.

LPWAN: Low-power wide-area network for long-range, low-data-rate communication.

MQTT: Lightweight publish–subscribe messaging protocol.

NFC: Near-field communication for short-distance wireless exchanges.

Replay attack: Reuse of a previously valid message or transaction.

Segmentation: Division of a network into controlled security zones.

TLS: Transport Layer Security for protecting application communication.

VLAN: Virtual local area network used to logically separate traffic.

Zigbee: Low-power wireless networking technology used in automation and sensing.

Zero trust: A security approach that does not grant implicit trust based solely on network location.

Mutual TLS: TLS in which both communicating endpoints authenticate using certificates.

Review Questions

Short Answer Questions

  1. What are the five principal objectives of communication security?
  2. Why is a shared fleet-wide IoT password dangerous?
  3. What is the function of an MQTT broker?
  4. State one difference between TLS and DTLS.
  5. Why is network segmentation useful after a device compromise?

Long Answer Questions

  1. Compare the security considerations of Wi-Fi, BLE, Zigbee, RFID, NFC, LPWAN, and cellular IoT.
  2. Explain how MQTT can be secured using TLS, authentication, and topic-level authorisation.
  3. Describe a suitable key-management lifecycle for a large IoT deployment.
  4. Explain the roles and limitations of intrusion detection and intrusion prevention in IoT networks.
  5. Discuss how zero-trust principles can be applied to a constrained IoT environment.

Analytical / Application Questions

  1. A factory sensor network uses one shared Wi-Fi password and allows all devices to connect directly to the corporate LAN. Analyse the risks and propose a segmented replacement architecture.
  2. An IoT lock accepts a previously captured “unlock” packet. Identify the vulnerability and design a replay-resistant message exchange.
  3. A building’s automated ventilation system loses cloud connectivity during a security incident. Recommend communication, monitoring, and fail-safe measures that preserve both security and safe operation.

Multiple Choice Questions with Answers

Question 1

Which security objective prevents unauthorised alteration of an IoT message?

A. Confidentiality

B. Integrity

C. Availability

D. Accountability

Correct Answer: B. Integrity

Question 2

Which MQTT control restricts a client to approved topics?

A. Topic-level authorisation

B. Radio frequency hopping

C. VLAN tagging alone

D. Packet fragmentation

Correct Answer: A. Topic-level authorisation

Question 3

What is the main weakness of BLE “Just Works” pairing?

A. It cannot use encryption after pairing

B. It provides weak protection against man-in-the-middle attacks during pairing

C. It requires a wired connection

D. It works only with cellular networks

Correct Answer: B. It provides weak protection against man-in-the-middle attacks during pairing

Question 4

Which protocol is designed for constrained request–response communication and commonly uses UDP?

A. MQTT

B. CoAP

C. SMTP

D. FTP

Correct Answer: B. CoAP

Question 5

What is the principal purpose of DTLS?

A. To protect datagram-based communication

B. To replace all routing protocols

C. To assign Wi-Fi channels

D. To store device firmware

Correct Answer: A. To protect datagram-based communication

Question 6

Why are per-device credentials preferable to one fleet-wide password?

A. They eliminate the need for encryption

B. They allow a compromised device to access every device

C. They support individual accountability and selective revocation

D. They guarantee unlimited battery life

Correct Answer: C. They support individual accountability and selective revocation

Question 7

Which design best limits lateral movement after a sensor is compromised?

A. Place every device on the corporate LAN

B. Use unrestricted internal routing

C. Use segmentation with explicit firewall rules

D. Hide the Wi-Fi network name

Correct Answer: C. Use segmentation with explicit firewall rules

Question 8

What does an intrusion prevention system do in addition to detection?

A. It can block or disrupt suspicious activity

B. It manufactures cryptographic keys automatically in all cases

C. It replaces device firmware

D. It guarantees that no false positives occur

Correct Answer: A. It can block or disrupt suspicious activity

Question 9

Which attack involves retransmitting an old valid command?

A. Jamming

B. Replay

C. Eavesdropping

D. Credential rotation

Correct Answer: B. Replay

Question 10

Why must a TLS client validate the server certificate?

A. To verify the identity of the server and reduce impersonation risk

B. To increase radio transmission power

C. To disable encryption

D. To divide a network into VLANs

Correct Answer: A. To verify the identity of the server and reduce impersonation risk

IoT Security
Chapter 8 of 15