IoT & Smart Electrical Systems

Chapter 12
Cybersecurity, Privacy, Safety, and Resilience

Bachelors Program in Electrical Engineering
IoT & Smart Electrical Systems   •   Bachelor

Cybersecurity, Privacy, Safety, and Resilience

Introduction

IoT and smart electrical systems connect sensors, embedded controllers, gateways, cloud platforms, mobile applications, and physical equipment. This connectivity improves energy efficiency, predictive maintenance, demand response, automation, and operational visibility. It also creates pathways through which an attacker may manipulate measurements, interrupt service, expose personal information, or cause unsafe physical behavior.

Cybersecurity in these systems cannot be treated as an information-technology add-on. A compromised relay, inverter, protection controller, building-management gateway, or electric-vehicle charger can affect physical processes. Consequently, security engineering must be integrated with privacy, functional safety, reliability, and operational resilience.

This chapter presents a practical, layered approach to identifying threats, evaluating risk, selecting controls, and responding to incidents across device, network, platform, and application layers.

Learning Objectives

After completing this chapter, students should be able to:

  1. Identify assets, trust boundaries, threats, vulnerabilities, and consequences in an IoT electrical system.
  2. Perform a qualitative and quantitative risk assessment.
  3. Explain identity, authentication, authorization, encryption, secure boot, key management, and secure updating.
  4. Design segmentation, monitoring, incident-response, privacy, safety, and resilience controls.
  5. Evaluate a smart electrical system using a defense-in-depth architecture.
  6. Discuss professional, ethical, regulatory, and supply-chain responsibilities.

1. Security Context of Smart Electrical Systems

A conventional IT breach may expose files or interrupt an application. In a smart electrical system, the consequences can include incorrect switching, loss of protection, equipment damage, unsafe voltage or temperature, service interruption, or cascading operational effects. The principal security objectives are therefore broader than confidentiality, integrity, and availability.

  • Confidentiality: only authorized parties can access information.
  • Integrity: measurements, commands, firmware, configurations, and logs remain accurate and unaltered.
  • Availability: required services remain accessible within specified performance limits.
  • Authenticity: communicating entities and data sources are genuine.
  • Accountability: actions can be attributed to users, devices, or services.
  • Safety: security failures do not create unacceptable hazards to people or equipment.
  • Resilience: the system can resist, absorb, recover from, and adapt to disruption.

Security objectives must be prioritized according to the process. For a protection relay, integrity and timely availability may dominate confidentiality. For a residential energy monitor, privacy may be especially important because load data can reveal occupancy and behavior.

Important Terminology

An asset is something requiring protection, such as a controller, credential, measurement, firmware image, or safety function. A threat is a possible cause of harm. A vulnerability is a weakness that can be exploited. An attack vector is the route used to exploit a weakness. A control is a technical, organizational, or physical safeguard. A trust boundary is a point where assumptions about identity, authority, or security change. An impact is the consequence of a successful event.

2. Threat Modeling Across Four Layers

Threat modeling is a structured process for asking what can go wrong, how it could happen, and how the consequences can be reduced. It should begin during system design and be revisited after major changes.

2.1 Device Layer

The device layer contains sensors, actuators, meters, programmable logic controllers, inverters, protection devices, and embedded operating systems. Typical threats include:

  • extraction of firmware or cryptographic keys;
  • insecure debug ports such as exposed JTAG or UART;
  • malicious or counterfeit firmware;
  • physical tampering and replacement;
  • sensor spoofing, calibration manipulation, and replayed measurements;
  • default, shared, or hard-coded passwords;
  • resource exhaustion in constrained devices.

Controls include secure hardware elements, unique device identity, locked debug interfaces, signed firmware, secure boot, tamper evidence, input validation, watchdogs, safe-state behavior, and authenticated commands.

2.2 Network Layer

The network layer includes field buses, wireless links, local-area networks, cellular connections, and wide-area backhaul. Threats include eavesdropping, man-in-the-middle attacks, denial of service, routing manipulation, protocol abuse, and lateral movement between systems.

Controls include mutually authenticated encrypted channels, network segmentation, firewalls, allow-lists, rate limiting, secure protocol configurations, intrusion detection, and strict separation between corporate IT, operational technology, and safety networks.

2.3 Platform Layer

The platform layer includes gateways, message brokers, identity services, device registries, data stores, firmware repositories, cloud infrastructure, and analytics engines. Threats include excessive privileges, insecure APIs, vulnerable dependencies, exposed storage, weak tenant isolation, supply-chain compromise, and unauthorized administrative access.

Controls include hardened configurations, least privilege, secrets management, vulnerability management, signed software packages, backup and recovery, audit logging, strong administrative authentication, and independent security testing.

2.4 Application Layer

The application layer includes dashboards, mobile applications, energy-management logic, billing interfaces, and automated control algorithms. Threats include broken access control, command injection, insecure application programming interfaces, privacy leakage, malicious automation rules, and misleading displays.

Controls include secure software development, input validation, authorization at every sensitive operation, code review, dependency scanning, penetration testing, transaction logging, user notification, and fail-safe command limits.

2.5 Threat-Modeling Workflow

A practical workflow is:

  1. Define system purpose, operating modes, and safety constraints.
  2. Inventory assets and classify their criticality.
  3. Draw data flows and mark trust boundaries.
  4. Identify threat actors, including criminals, insiders, competitors, careless users, and nation-state groups where relevant.
  5. Enumerate threats using categories such as spoofing, tampering, repudiation, information disclosure, denial of service, and elevation of privilege.
  6. Estimate likelihood and impact.
  7. Select controls and assign accountable owners.
  8. Validate controls through testing and exercises.
  9. Record residual risk and approval decisions.

A data-flow diagram should show sensors, controllers, gateways, brokers, cloud services, users, maintenance paths, and safety functions. Maintenance laptops and vendor remote-access channels deserve particular attention because they often cross several trust boundaries.

3. Risk Assessment

Risk assessment converts identified threats into prioritized engineering decisions. A simple qualitative model assigns likelihood and impact ratings, for example from 1 to 5. The product is useful for ranking but is not a measured probability.

R = L × I

Here, R is the risk score, L is the likelihood rating, and I is the impact rating. The scale must be defined by the organization; multiplication is appropriate only as a screening method when the rating scales are reasonably comparable. It does not imply that risk is physically measured in score units.

For a more quantitative analysis, expected annual loss can be estimated as:

ALE = P × C

where ALE is annual loss expectancy in currency per year, P is the estimated annual probability of the event, and C is the consequence cost if it occurs. This estimate is highly uncertain and should be accompanied by assumptions and sensitivity analysis.

For availability, if a service operates for total time T and is unavailable for downtime D, its observed availability is:

A = (T − D) / T

Both T and D must use the same time unit, and planned maintenance must be treated consistently with the service-level definition. Availability alone does not demonstrate safety or integrity.

Worked Risk Example

A remotely accessible feeder-monitoring gateway has a likelihood rating of 3 and an impact rating of 5 on a defined five-point scale. Its initial screening score is R = 3 × 5 = 15. The organization classifies scores of 12 or more as high priority. It therefore requires immediate treatment. Proposed controls are mutual authentication, removal of shared accounts, network isolation, signed updates, and continuous logging. After implementation, the team reassesses likelihood as 1 and impact as 5. The residual score is R = 1 × 5 = 5. The impact remains high because a successful compromise would still be serious; controls have reduced likelihood rather than consequence.

Risk acceptance should be explicit. A low numerical score must not override a legal requirement, a safety constraint, or a credible catastrophic scenario.

4. Identity, Authentication, and Authorization

Identity

Every device, human user, service, and administrator should have a distinct identity. Device identity may be represented by a certificate and private key provisioned during manufacturing or enrollment. Shared identities prevent reliable accountability and make revocation difficult.

Authentication

Authentication establishes that an entity is who it claims to be. Suitable mechanisms include:

  • passwords protected by strong storage and multifactor authentication;
  • cryptographic certificates;
  • hardware-backed keys;
  • one-time credentials during commissioning;
  • mutual authentication between gateways and cloud services.

Authentication is not authorization. A valid identity may still lack permission to perform a particular action.

Authorization

Authorization determines what an authenticated identity may do. Least privilege grants only the permissions required for a task. Role-based access control assigns permissions to roles such as operator, technician, auditor, and system administrator. Attribute-based decisions may additionally consider device location, time, operating state, or command sensitivity.

A safety-critical command should require stronger controls than a read-only temperature query. Authorization should be checked at the service boundary, not only in the user interface. Emergency access must be time-limited, logged, justified, and reviewed.

5. Encryption and Key Management

Encryption protects confidentiality, but it must be combined with integrity and authentication. Authenticated encryption provides ciphertext confidentiality and an integrity check under a secret key. Transport encryption protects communication in transit; storage encryption protects data at rest; neither protects data after an authorized application has decrypted it.

Key management includes generation, distribution, storage, rotation, backup, revocation, recovery, and destruction. Keys should be generated using approved cryptographic random sources and protected in hardware-backed storage where feasible. Private keys should not be embedded in source code or copied across a fleet.

A practical lifecycle is:

  1. Generate a unique key or key pair.
  2. Bind the public identity to an approved device record.
  3. Establish authenticated channels during enrollment.
  4. Rotate keys according to risk and compromise indicators.
  5. Revoke identities when devices are retired, lost, or compromised.
  6. Preserve only the minimum key history needed for lawful recovery and audit.

Cryptographic algorithms and key lengths should follow current standards and organizational policy rather than improvised designs. Cryptography cannot compensate for compromised endpoints, poor authorization, or exposed keys.

6. Secure Boot, Firmware, and Updates

Secure boot creates a chain of trust. A hardware root of trust verifies a bootloader; the bootloader verifies the operating system; the operating system verifies authorized applications or firmware. Each verification uses a digital signature and a trusted public key. Verification establishes origin and integrity; it does not prove that the software is free of vulnerabilities.

Secure updating requires:

  • signed firmware and authenticated update servers;
  • version and anti-rollback controls;
  • atomic installation or a known-good fallback image;
  • encrypted or integrity-protected distribution when appropriate;
  • recovery procedures for interrupted updates;
  • asset inventory and update-status reporting;
  • vulnerability disclosure and patch decision processes.

Updates to operational electrical equipment require testing against timing, protection, interoperability, and safety requirements. A patch that improves cybersecurity but disables a protection function is not an acceptable engineering outcome.

7. Segmentation, Monitoring, and Detection

Segmentation limits blast radius. A typical architecture separates field devices, control networks, supervisory systems, enterprise IT, guest networks, and external services. Communication between zones should pass through controlled conduits with explicit rules. Segmentation is not achieved merely by assigning different IP subnets; routing, firewall policy, identity, and monitoring must enforce the separation.

Monitoring should collect relevant events such as failed logins, certificate errors, configuration changes, firmware changes, unusual command rates, unexpected destinations, and safety trips. Logs require accurate time synchronization, access control, integrity protection, retention rules, and sufficient context for investigation.

Detection systems should be tuned to operational realities. An alert indicating an unusual inverter command may be more valuable than a generic port scan. Baselines should account for maintenance windows, seasonal demand, and automated control cycles. Artificial intelligence can assist anomaly detection and triage, but it may produce false positives, miss novel attacks, or be manipulated by poisoned data. Human review remains essential for high-consequence actions.

8. Incident Response and Recovery

An incident-response capability should define preparation, detection and analysis, containment, eradication, recovery, and lessons learned. Plans must identify decision authority, technical contacts, safety escalation paths, evidence-handling procedures, communications, and regulatory notification requirements.

Containment in operational technology must be coordinated with process safety. Disconnecting a gateway may stop an attack but could also remove visibility or control. The preferred action may be controlled isolation, transition to local manual operation, rate limiting, or a safe operating mode.

Recovery includes restoring trustworthy firmware, rotating credentials, validating configurations, checking safety functions, and monitoring for recurrence. Backups must be protected from the same compromise as production systems and periodically tested. An incident is not closed merely because service has resumed; root causes and residual exposures must be addressed.

9. Privacy by Design

Smart meters, occupancy sensors, electric-vehicle chargers, and home assistants can reveal presence, routines, appliance use, and economic behavior. Privacy engineering begins with purpose limitation: collect only data necessary for a defined function.

Core principles include:

  • data minimization;
  • transparent notice and meaningful consent where required;
  • access, correction, retention, and deletion policies;
  • pseudonymization or aggregation where individual identity is unnecessary;
  • encryption and access control;
  • separation of operational data from analytics identities;
  • privacy impact assessment before deployment;
  • protection of children and vulnerable users.

Aggregated data is not automatically anonymous. Repeated high-resolution measurements can sometimes be linked with external information to re-identify individuals. Engineers should therefore evaluate inference risk, not only direct identifiers.

Privacy responsibilities may arise from data-protection legislation, sector regulations, contractual duties, and professional codes. Organizations should document the lawful purpose, data controller and processor responsibilities, retention period, breach process, and cross-border transfer arrangements applicable to the deployment.

10. Safety and Resilience

Security and functional safety are related but distinct. Safety asks whether a system avoids unacceptable harm under specified hazards and failures. Security asks whether intentional or accidental actions compromise the system. A cyberattack can become a safety hazard, so hazard analysis and threat modeling should inform each other.

Safety controls include independent interlocks, limit checks, emergency shutdown, watchdog timers, redundant sensing, fail-safe states, manual override, and separation of safety instrumentation from ordinary control logic. A fail-safe state must be defined by the physical process: opening a switch, closing a valve, reducing power, or maintaining service may be appropriate in different systems.

Resilience includes resistance, absorption, recovery, and adaptation. Design measures include redundant communications, local autonomy during cloud outage, geographically separated backups, spare equipment, diverse suppliers, black-start or restart procedures where relevant, and regular exercises.

A resilience strategy should answer four questions:

  1. What functions must continue during loss of connectivity?
  2. What can safely degrade, and for how long?
  3. How is trustworthy operation restored?
  4. How are lessons incorporated into future design?

11. Case Study: Connected Campus Microgrid

The following is an illustrative case, not a report of a real installation.

Background

A university campus operates photovoltaic inverters, battery storage, smart meters, building controllers, and a supervisory energy-management platform. A vendor provides remote maintenance through a cloud gateway.

Problem

An assessment discovers that several controllers use shared technician credentials, the maintenance network can reach building-control devices, firmware updates are performed manually, and meter data is retained indefinitely. A compromised vendor account could issue battery commands or expose occupancy patterns.

Analysis

The team maps assets and trust boundaries. High-consequence assets are battery controls, protection settings, gateway identities, and emergency operating logic. Threats include credential theft, lateral movement, malicious firmware, command replay, and privacy leakage. The battery controller receives a high impact rating because unsafe charging or discharging could damage equipment or create fire risk.

Approach and Solution

The university establishes unique certificates for gateways and individual accounts for technicians, with multifactor authentication and time-limited vendor access. A jump host mediates remote maintenance. Firewalls separate the corporate, building-control, battery, and safety networks. Battery commands require authorization based on role and operating state, and rate and limit checks are enforced locally.

Firmware is signed, version-controlled, tested in a staging environment, and installed with rollback capability. Logs from authentication, configuration, firmware, and high-consequence commands are sent to a protected monitoring service. Meter data is aggregated for most research uses, and retention periods are defined. The campus conducts a cloud-outage exercise in which local controllers maintain safe operation while supervisory optimization is unavailable.

Outcome

The changes reduce the likelihood of unauthorized control, limit lateral movement, improve attribution, and reduce unnecessary personal-data retention. The system remains operable in degraded local mode. Residual risks include supplier compromise, zero-day vulnerabilities, and physical tampering, which are addressed through contractual requirements, monitoring, inspection, and periodic reassessment.

Learning Points

Security is strongest when identity, segmentation, local safety controls, privacy, update management, and recovery planning are designed together. A cloud dashboard alone is not a secure control architecture.

12. Governance, Standards, and Professional Practice

Organizations should maintain asset inventories, security requirements, system owners, risk registers, change-control records, incident plans, supplier assessments, and evidence of testing. Procurement documents should require vulnerability disclosure, update support, secure development practices, end-of-life notices, component provenance, and incident notification.

Relevant guidance may include the NIST Cybersecurity Framework, NIST guidance for IoT device cybersecurity, IEC 62443 for industrial automation and control systems, ISO/IEC 27001 for information-security management, ISO/IEC 27701 for privacy information management, and applicable electrical, safety, and data-protection regulations. These frameworks support disciplined practice but do not replace engineering judgment or local legal advice.

Professional engineers have duties to protect the public, communicate residual risk honestly, avoid concealed backdoors, report serious vulnerabilities responsibly, and preserve evidence. Security controls should be proportionate and usable; excessively burdensome procedures often lead to unsafe workarounds.

Challenges and Limitations

No control eliminates risk. Legacy equipment may lack secure boot or modern authentication. Constrained devices may have limited memory and power. Patching can interrupt service or invalidate certification. Supply chains may obscure component provenance. Monitoring produces incomplete evidence, and risk estimates contain uncertainty. Privacy protections may conflict with the need for detailed operational data during emergencies.

These limitations justify layered controls, explicit assumptions, compensating measures, lifecycle planning, and continual reassessment. Security is a socio-technical property: technology, people, procedures, suppliers, and governance all influence outcomes.

Best-Practice Checklist

  • Maintain a current asset and data-flow inventory.
  • Classify functions by safety, integrity, availability, and privacy consequence.
  • Give every human, device, and service a unique identity.
  • Apply least privilege and multifactor authentication to administration.
  • Use authenticated encryption and protected key storage.
  • Enable secure boot, signed updates, rollback, and vulnerability management.
  • Segment IT, operational, safety, and guest environments.
  • Monitor meaningful security and process events.
  • Test incident response, backups, local autonomy, and safe recovery.
  • Minimize personal data and define retention and access policies.
  • Reassess suppliers, firmware, configurations, and threats throughout the lifecycle.

Chapter Summary

Cybersecurity in IoT and smart electrical systems must protect information, control integrity, service availability, physical safety, privacy, and continuity. Threat modeling begins with assets, data flows, trust boundaries, actors, vulnerabilities, and consequences across device, network, platform, and application layers. Risk can be screened with R = L × I and, where evidence permits, estimated through expected loss models.

Effective defense in depth combines unique identity, strong authentication, least-privilege authorization, authenticated encryption, sound key management, secure boot, signed updates, segmentation, monitoring, and tested incident response. Privacy by design limits collection and retention while controlling inference and unauthorized access. Safety requires independent limits, interlocks, and defined safe states; resilience requires local autonomy, redundancy, protected backups, recovery procedures, and exercises. Sound governance, supply-chain oversight, ethical conduct, and continual reassessment complete the engineering approach.

Key Terms

Asset: A system element or information requiring protection.

Authentication: Verification of an entity’s claimed identity.

Authorization: Determination of permitted actions after authentication.

Availability: Accessibility of a service when required.

Defense in depth: Use of multiple complementary protective layers.

Firmware: Software stored in or closely associated with a device.

Integrity: Protection against unauthorized or accidental alteration.

Key management: Generation, protection, distribution, rotation, and destruction of cryptographic keys.

Least privilege: Granting only the permissions necessary for a task.

Privacy by design: Integrating privacy protections throughout system design and operation.

Resilience: Ability to resist, absorb, recover from, and adapt to disruption.

Risk: The combination of likelihood and consequence of an unwanted event.

Secure boot: Verification of authorized software before execution.

Segmentation: Separation of systems into controlled security zones.

Threat: A potential cause of harm.

Trust boundary: A point where security assumptions change.

Vulnerability: A weakness that can be exploited.

Zero trust: A security approach that continuously verifies access rather than inherently trusting network location.

Review Questions

Short Answer Questions

  1. Distinguish authentication from authorization.
  2. Why is segmentation valuable in an IoT electrical system?
  3. State two purposes of secure boot.
  4. What is meant by privacy by design?
  5. Why must incident response consider functional safety?

Long Answer Questions

  1. Explain a threat-modeling workflow for a smart-building control system.
  2. Compare device-, network-, platform-, and application-layer threats and controls.
  3. Describe a complete cryptographic key lifecycle for connected field devices.
  4. Explain how secure updating can be implemented without creating unacceptable operational risk.
  5. Discuss the relationship between cybersecurity, safety, privacy, and resilience.

Analytical / Application Questions

  1. A gateway has likelihood rating 4 and impact rating 4. Calculate its screening risk score and propose three controls that could reduce likelihood without changing impact.
  2. Design trust zones and communication rules for a campus microgrid containing corporate IT, building controllers, battery storage, protection equipment, and a cloud platform.
  3. During a cyber incident, cloud control is unavailable and a battery controller shows abnormal commands. Develop a containment and recovery sequence that preserves safety and provides evidence for investigation.

Multiple Choice Questions with Answers

Question 1

Which property ensures that a command has not been altered during transmission?

A. Confidentiality

B. Integrity

C. Availability

D. Usability

Correct Answer: B. Integrity

Question 2

A device certificate is primarily used to establish what?

A. Physical temperature

B. Device identity

C. Network bandwidth

D. Battery capacity

Correct Answer: B. Device identity

Question 3

If likelihood is rated 3 and impact is rated 4, what is the screening risk score using R = L × I?

A. 7

B. 12

C. 16

D. 34

Correct Answer: B. 12

Question 4

Which control most directly limits lateral movement after a device compromise?

A. Network segmentation

B. Data aggregation

C. Longer log retention

D. Screen brightness reduction

Correct Answer: A. Network segmentation

Question 5

What does secure boot verify before software execution?

A. That the battery is fully charged

B. That authorized software is being loaded

C. That the user has read the privacy notice

D. That the network has maximum bandwidth

Correct Answer: B. That authorized software is being loaded

Question 6

Which practice best supports accountability?

A. Shared administrator credentials

B. Anonymous maintenance access

C. Unique identities and protected audit logs

D. Disabling time synchronization

Correct Answer: C. Unique identities and protected audit logs

Question 7

What is the principal purpose of least-privilege authorization?

A. To give every user complete access

B. To minimize permissions and potential misuse

C. To eliminate the need for authentication

D. To prevent all software updates

Correct Answer: B. To minimize permissions and potential misuse

Question 8

Which statement about encryption is correct?

A. Encryption removes the need for authorization

B. Encryption guarantees software has no vulnerabilities

C. Authenticated encryption can provide confidentiality and integrity

D. Encryption makes backups unnecessary

Correct Answer: C. Authenticated encryption can provide confidentiality and integrity

Question 9

Which privacy measure reduces unnecessary exposure of personal information?

A. Indefinite retention of raw data

B. Data minimization and defined retention periods

C. Shared access for all employees

D. Disabling access reviews

Correct Answer: B. Data minimization and defined retention periods

Question 10

Why should a smart electrical system support local safe operation during cloud outage?

A. To increase dependence on remote services

B. To preserve essential function and safety during degraded connectivity

C. To eliminate all monitoring

D. To avoid maintaining device identities

Correct Answer: B. To preserve essential function and safety during degraded connectivity

IoT & Smart Electrical Systems
Chapter 12 of 15