Protecting Advanced Metering Infrastructure
Krzysztof Swaczyński (CEO · secret)
Swiss Cyber Storm 2022 · Day 1 · Scenario
Overview
As the global energy landscape shifts towards sustainable sources, Advanced Metering Infrastructure (AMI) has emerged as a critical component for managing grid efficiency and balancing fluctuating demand with renewable generation. However, this indispensable technology introduces significant cybersecurity risks, as any remotely controllable system inherently presents an attack surface. This talk, delivered by Krzysztof Swaczyński, CEO of "secret" and an expert in OT security, delves into the vulnerabilities and defensive strategies surrounding AMI deployments, drawing from extensive research and real-world project experience with Distribution System Operators (DSOs).

Key moments
- 0:00 Speaker intro, background, and AMI research focus
- 4:40 Mandiant red teaming: how smart meters can be switched off
- 8:30 EU directives and rapid smart meter rollout make security urgent
- 10:40 Key challenges: device security, secret reuse, monitoring, late security
- 13:50 Even certified meters can have zero-days or misconfigurations
- 17:00 Reusing secrets drastically increases attack surface for AMI
- 22:00 Security must proactively engage in business initiatives, not react
Protecting Advanced Metering Infrastructure
Speakers: Krzysztof Swaczyński, CEO, secret
Conference: Swiss Cyber Storm
YouTube: https://www.youtube.com/watch?v=13tqedX63Hg
Overview
As the global energy landscape shifts towards sustainable sources, Advanced Metering Infrastructure (AMI) has emerged as a critical component for managing grid efficiency and balancing fluctuating demand with renewable generation. However, this indispensable technology introduces significant cybersecurity risks, as any remotely controllable system inherently presents an attack surface. This talk, delivered by Krzysztof Swaczyński, CEO of "secret" and an expert in OT security, delves into the vulnerabilities and defensive strategies surrounding AMI deployments, drawing from extensive research and real-world project experience with Distribution System Operators (DSOs).
Swaczyński highlights the urgent need to secure AMI, especially with the impending European Union directive mandating the rollout of smart meters across member states, projecting a market size of over 200 million devices by 2027. The interconnected nature of AMI components creates a "wonderland for potential attackers," making robust cybersecurity measures paramount. This article explores the common pitfalls identified in AMI implementations and provides actionable recommendations for securing this vital infrastructure against sophisticated cyber threats.
Background
▶ Watch: Speaker intro, background, and AMI research focus (0:00)
The potential for cyberattacks against energy grids, specifically targeting metering infrastructure, is not merely theoretical. Swaczyński opens with a compelling, albeit fictitious, scenario from Mark Ellsberg's 2012 novel "Blackout." This story describes a winter 2018 incident in Eastern Germany and Western Poland where DSOs observed localized blackouts caused by extreme fluctuations in energy demand. Forensic analysis revealed coordinated drops in consumption, tracing back to unauthorized disconnect instructions sent to smart meters via a backdoor in their firmware. While fictional, this narrative serves as a stark warning of what is possible.
A more recent and chillingly realistic example comes from a 2021 Mandiant red teaming exercise targeting a North American utility. This exercise successfully demonstrated how an attacker could leverage AMI to cause a blackout. The attack chain began with a phishing campaign delivering a malicious Microsoft Office document containing an auto-executing macro, establishing initial access via a Cobalt Strike Beacon. Attackers then escalated privileges to domain administrator using publicly available offensive tools such as ldapsearch, Mimikatz, and PowerSploit. They utilized Microsoft System Center Configuration Manager (SCCM) to distribute policies and establish command-and-control (C2) capabilities with pre-selected workstations belonging to network administration, firewall management, control engineering, and smart meter operations teams.
From these compromised workstations, the attackers extracted crucial information: RDP credentials for the OT network, AMI solution design documents, OT firewall configurations, and Head End System (HES) credentials (the central server for managing meters). Initial attempts to access the OT network via RDP failed due to additional authentication factors. However, by analyzing the OT firewall configuration, they discovered an open communication path between the IT network and a Microsoft Windows patch management server located in the DMZ. Exploiting vulnerabilities on this host, they gained access to the OT domain controller, where they extracted HES credentials with management access – a critical upgrade from the read-only credentials initially found. With these elevated privileges, they logged into the HES management console and successfully switched off a population of smart meters, simulating a blackout. Swaczyński emphasizes that while this was a controlled red team exercise, "we were just lucky so far" that such an attack hasn't been documented in the wild.
The motivation for widespread AMI deployment is rooted in the need for increased grid efficiency, particularly to manage the inherent fluctuations of renewable energy sources. Granular, real-time data on energy consumption is essential for balancing demand with generation. Recognizing this, the EU has mandated smart meter rollouts, with a deadline of 2027. Switzerland, in particular, has taken a more stringent approach, requiring 80% of metering infrastructure to be smart and explicitly mandating that these devices undergo and pass rigorous security testing. This rapid deployment and the inherent complexity of AMI create a vast and appealing target landscape for cyber adversaries.
Key Findings
▶ Watch: EU directives and rapid smart meter rollout make security urgent (8:30)
Based on their extensive research and project experience, Swaczyński's team identified four pervasive cybersecurity pitfalls within Advanced Metering Infrastructure implementations:
- Questionable Security of Smart Meter Devices: Many devices, even those certified, harbor exploitable vulnerabilities or are deployed with insecure default configurations.
- Replication of Secrets: Distribution System Operators (DSOs) frequently reuse passwords and encryption keys across a large population of smart meters, significantly lowering the bar for attackers once one device is compromised.
- Insufficient Network Segmentation and Monitoring: Smart meter networks often lack adequate segmentation, allowing for lateral movement, and possess limited monitoring capabilities to detect sophisticated cyberattacks efficiently.
- Late or Limited Involvement of Cybersecurity Departments: Security teams are frequently engaged too late in AMI implementation projects, often during testing phases, leading to omitted requirements, costly delays, or the identification of fundamental, unfixable risks.
These findings underscore the critical need for a holistic and proactive approach to AMI security, extending beyond mere compliance and into every stage of the project lifecycle.
Technical Deep Dive
▶ Watch: Even certified meters can have zero-days or misconfigurations (13:50)
The talk provides a deep dive into each of the identified pitfalls, offering technical explanations and practical solutions.
Securing Smart Meter Devices
While device certification is a crucial first step, Swaczyński stresses that it is not a panacea. He commends the Swiss approach as the most comprehensive framework for securing smart meter devices globally. This framework includes:
- A regulatory mandate that only successfully security-tested meters can be installed.
- An industry initiative that has developed standardized procedures for security testing of meters and other AMI components.
- Recognition and space for independent security testing labs.
- Assignment of certification authority to the Federal Office of Metrology and Accreditation (OFMET), providing a rigorous and enforceable mechanism.
Despite such frameworks, Swaczyński's team consistently found vulnerabilities even in certified meters. In one engagement, they identified three zero-day vulnerabilities in a vendor-certified meter during DSO-specific testing. Many smart meters leverage open-source protocol implementations, such as the Gurux DLMS CoSEM stack, which, despite being OEM'd by multiple vendors, can still contain exploitable flaws.
A key issue highlighted is the gap in existing testing methodologies. Standards like the Common Criteria Security Profile for Smart Meters and even the excellent procedures from swissmet define security requirements but often lack detailed guidance on specific tools and tactics for testing. This can lead to a situation where the scope of testing does not align with an organization's actual threat profile. Therefore, DSOs must actively cooperate with vendors and testing labs to understand the precise scope of testing applied and fill any identified gaps with additional, threat-model-driven assessments.
Beyond inherent vulnerabilities, misconfiguration poses another significant risk. Swaczyński recounts an instance where a certified meter, boasting non-volatile memory encryption capabilities, was found in production configuration with unprotected sensitive data in its memory. This data included APN configuration for the meter's mobile modem. An attacker with physical access to the meter could extract this APN configuration, combine it with an often unprotected SIM card from the meter, and connect their own modem to gain unauthorized access to the DSO network. This emphasizes the critical need to test not just the device's capabilities, but its final production configuration before rollout.
Reusing Secrets
The DLMS CoSEM standard specifies that each individual smart meter should have four distinct association passwords and approximately ten different encryption keys for securing communication. For a typical deployment of 30,000 meters, this translates to roughly 120,000 unique passwords and 300,000 unique cryptographic keys – a staggering half-million secrets to manage, not to mention historical key data.
The "cutting corners" pitfall often sees DSOs reusing passwords and keys across large populations of meters. The consequence is severe: if an attacker compromises a single meter and extracts its secrets, the effort required to gain access to other meters in the population using those same reused secrets is drastically reduced.
The DLMS CoSEM standard provides mechanisms for transporting and replacing keys but does not inherently offer a comprehensive Key Management System (KMS) architecture. To mitigate this risk, Swaczyński recommends two key actions:
- Involve an experienced PKI architect in the AMI project to design a robust key management solution.
- Partner with AMI component vendors who have demonstrated experience successfully integrating their HES solutions with a dedicated KMS. This leverages existing expertise and reduces implementation risk.
Network Architecture and Monitoring
Robust network architecture and continuous monitoring are essential for containing attacks and detecting anomalies. Swaczyński outlines several best practices:
- Dedicated APN: For subnets where smart meters connect via 3G/GSM modems, DSOs must use a dedicated APN. His team found instances where "dedicated" APNs still contained smart meters from different DSOs, indicating a failure in proper segregation by network operators.
- Virtual Point-to-Point Communication: To limit an attacker's ability to pivot from one compromised meter to others, establishing virtual point-to-point communication between each meter and the HES is crucial. This is most effectively achieved using tunneling protocols such as GRE (Generic Routing Encapsulation) or IPsec (Internet Protocol Security).
- Intrusion Detection System (IDS): An IDS should be placed at the edge device on the HES side of the network. Critically, this IDS must possess the capability to analyze and understand the DLMS CoSEM protocol to effectively identify suspicious activities related to smart meter communication.
- Device Fingerprinting: Smart meter SIM cards are frequently unsecured without PIN codes. An attacker who gains physical access to a meter, extracts the SIM card, and uses the obtained APN configuration can connect their own modem to the subnet. To detect such unauthorized devices, DSOs should implement device fingerprinting (e.g., identifying characteristic open ports of legitimate meters) and periodically monitor the smart meter subnets for the presence of devices that do not match the expected fingerprint.
Defensive Implications
▶ Watch: Security must proactively engage in business initiatives, not react (22:00)
The insights shared by Krzysztof Swaczyński provide a clear roadmap for defenders to strengthen AMI cybersecurity postures. The primary defensive implications include:
- Go Beyond Certification: DSOs must not solely rely on vendor certifications. Independent, comprehensive security testing tailored to their specific threat models and risk profiles is essential. This includes deep dives into open-source components like the Gurux DLMS CoSEM stack and rigorous testing of final production configurations to catch misconfigurations.
- Prioritize Robust Secret Management: The reuse of secrets is an unacceptable risk. Implementing a dedicated, enterprise-grade Key Management System (KMS) overseen by experienced PKI architects is critical. DSOs should actively seek out AMI vendors with proven experience in integrating their HES solutions with such KMS platforms.
- Architect for Security: Secure network design is non-negotiable. This means ensuring dedicated APNs, implementing virtual point-to-point connections (e.g., GRE or IPsec tunnels) to limit lateral movement, deploying DLMS CoSEM-aware Intrusion Detection Systems (IDS) at network edges, and establishing device fingerprinting and monitoring to detect unauthorized devices.
- Proactive Cybersecurity Engagement: Perhaps the most significant cultural shift required is the early and proactive involvement of cybersecurity departments in all stages of AMI projects, from initial planning and design through deployment and operations. CISOs should actively seek out and engage with business initiatives, even uninvited, to embed security requirements from the outset. This prevents costly delays, rework, or the discovery of fundamental, unmitigable risks late in the project lifecycle.
Key Takeaways
- AMI is a Critical, Growing Attack Surface: The rapid rollout of smart meters, driven by energy efficiency goals and regulatory mandates, creates a vast and interconnected target for cyber adversaries with the potential for grid-disrupting attacks.
- Certification is Not Sufficient: While valuable, device certification alone does not guarantee security. DSOs must conduct independent, threat-model-aligned security testing of both devices and their final production configurations to uncover zero-days and misconfigurations.
- Secret Management is Paramount: The reuse of passwords and encryption keys across meters is a critical vulnerability. Robust Key Management Systems (KMS) and expert PKI architects are essential to manage the immense volume of unique secrets required by the DLMS CoSEM standard.
- Network Security is Foundational: Implementing dedicated APNs, virtual point-to-point tunneling (GRE/IPsec), DLMS CoSEM-aware IDS, and device fingerprinting are crucial network controls for limiting attacker pivoting and detecting anomalous behavior.
- Proactive Security Integration is Non-Negotiable: Cybersecurity teams must engage early and proactively in AMI project lifecycles, embedding security requirements from the design phase to prevent costly delays, mitigate risks, and ensure the integrity of the energy grid.
About the Speaker(s)
Krzysztof Swaczyński is an accomplished professional with a diverse background. He holds an engineering degree with a major in software engineering. His career began as a strategic consultant, where he spent a significant portion of his professional life working for prestigious firms like Ernst & Young and the Boston Consulting Group. In these roles, he advised customers and organizations operating in critical infrastructure domains, including energy, power and utilities, transportation, military, and public administration services. Outside of his corporate life, Swaczyński dedicated himself to becoming a Ninja Warrior, successfully participating in the American Ninja Warrior franchise in Poland. Professionally, he leads an OT security team and has been researching Advanced Metering Infrastructure since 2018, leveraging this expertise to advise DSOs. He is currently the CEO of "secret."
Reviews
Dr. Zero (Offensive Security Researcher) — WEAK
This is a Big Four consulting deck dressed up as an OT threat briefing. Swaczyński leans on fictional novels and other people's red team reports to pad the runtime, only to reveal that utilities reuse passwords and deploy flat networks. If you're a grid executive who just woke from a twenty-year coma, maybe it's useful, but for practitioners it's hollow.
Heather Calloway (CISO) — STRONG ACCEPT
If your organization touches operational technology or massive IoT fleets, this is required viewing for your infrastructure leadership. Swaczyński moves past the generic 'OT is vulnerable' hand-wringing and diagnoses the specific procurement, cryptographic, and architectural failures that actually lead to grid compromise.