An EV charger sits at the meeting point of three trust domains, the
vehicle, the charge point operator backend, and the energy grid, and
a flaw in any one of them can move money, energy, or personal data.
ISO 15118 handles vehicle to charger authentication, OCPP handles
charger to backend management, and both have certificate, identity,
and authorization checks that fail quietly when misconfigured. This
sub-skill covers authorized testing of that chain on your own
charger and vehicle, or a lab charger, with no testing against
public infrastructure you do not operate.
Quick Workflow
- Map the charging chain on the lab setup, vehicle, charger,
backend, and any energy management system in between.
- Capture a full charging session, from plug-in through
authorization to stop and billing record.
- Review the ISO 15118 handshake, certificate chain, and which
payment or contract credentials the charger accepts.
- Review the OCPP connection, charger identity, authentication,
and which messages the backend accepts from the charger.
- Test authorization boundaries, one account or charger acting on
another account session or another charger identity.
- Test session handling, stopping, resuming, and billing after
disconnects, since billing abuse hides in edge transitions.
- Check the charger itself, open ports, debug interfaces, and
physical access to its network and storage.
- Report each finding with the trust boundary it crosses and the
billing, energy, or privacy impact it enables.
1. Capture and review an ISO 15118 session
The handshake is where certificate trust is decided, so capture it
in full before any active testing. Note the certificate chain
presented, the contract or payment method selected, and whether the
charger falls back to a weaker method when the strong one fails.
# Capture charging communication on the lab charger network segment
# Restrict the capture to the lab charger and lab vehicle addresses.
sudo tcpdump -i eth0 -w charging_session.pcap \
host 192.168.30.10 or host 192.168.30.20
# List TLS handshakes and certificate exchanges in the capture
tshark -r charging_session.pcap -Y tls.handshake -T fields \
-e ip.src -e tls.handshake.type | sort | uniq -c
# ISO 15118 review checklist, answered from the capture and charger docs
checks = {
"certificate_chain_validates": "yes, no, or unknown",
"expired_or_revoked_cert_rejected": "yes, no, or unknown",
"fallback_to_unauthenticated_charging": "yes, no, or unknown",
"contract_certificate_bound_to_vehicle": "yes, no, or unknown",
"payment_data_in_cleartext": "yes, no, or unknown",
}
for question, answer in checks.items():
print(f"{question}: {answer}")
2. OCPP backend authentication and authorization tests
A charger authenticates to its backend with an identity and a
secret, and the backend must not trust a charger identity it has
not issued. Test with lab chargers only, checking whether one lab
charger can impersonate another, start sessions for another
account, or read another charger configuration.
# Enumerate the lab OCPP endpoint surface from the charger config
# Use the lab backend address only, never a production operator.
sudo nmap -sV -p 443,8080,8443 192.168.30.5
# Confirm the OCPP connection uses TLS and which version is offered
python3 -c "import ssl; print(ssl.OPENSSL_VERSION)"
# OCPP authorization test cases, run against the lab backend only
# Each case uses lab accounts and lab charger identities.
test_cases = [
"charger A authenticates with charger B identity",
"account A stops account B charging session",
"account A reads account B charging history",
"charger requests a firmware update from an untrusted source",
"charger accepts a remote start for a session it did not create",
]
for case in test_cases:
print(f"test case: {case} - record accepted, rejected, or error")
3. Session, billing, and load management abuse checks
Billing records are built from meter values the charger reports,
so check whether the backend validates them, and whether a charger
can report values that understate energy delivered. Load management
is the grid-facing risk, so check whether one charger can request
power beyond its allocated limit.
# Session edge test procedure on the lab charger
# 1. Start a session, disconnect mid-charge, reconnect, and compare
# the billed energy with the metered energy.
# 2. Stop a session from the backend, then from the charger, and
# confirm only one billing record is created.
# 3. Request maximum power from two lab chargers at once and check
# the load limit is enforced per site, not per charger.
echo "session edge tests ready - record metered vs billed per run"
# Billing reconciliation check on lab session records
# Metered energy comes from the charger meter, billed from the backend.
sessions = [
{"id": "lab-001", "metered_kwh": 22.4, "billed_kwh": 22.4},
{"id": "lab-002", "metered_kwh": 18.1, "billed_kwh": 18.1},
]
for session in sessions:
delta = abs(session["metered_kwh"] - session["billed_kwh"])
status = "MATCH" if delta < 0.1 else "MISMATCH - investigate"
print(f"{session['id']} delta {delta:.2f} kWh - {status}")
Edge cases
- Certificate provisioning: a lab vehicle without a valid contract
certificate will fall back or fail, and that behaviour must be
distinguished from a production misconfiguration before it is
reported as a finding.
- OCPP version differences: OCPP 1.6 and 2.0.1 differ in security
profiles, so a check that passes on one version may be
meaningless on the other, and the version under test is recorded.
- Offline charging: chargers that lose backend connectivity may
authorize locally and sync later, so billing and authorization
findings need an offline and an online run each.
- Shared chargers: a charger used by many drivers mixes session
data, so authorization tests need distinct lab accounts, or a
cross-account result may be a test artefact.
- Grid signals: load management responses depend on site limits
and grid signals that a lab may not reproduce, so load findings
are scoped to the lab configuration that produced them.
- Physical access: a publicly sited charger is physically exposed,
so network findings must be read together with what an attacker
with hands on the charger can reach.
Key references
- ISO 15118, road vehicles vehicle to grid communication interface,
for Plug and Charge, certificate handling, and session setup.
- Open Charge Point Protocol (OCPP) specifications, for charger to
backend messaging, security profiles, and firmware management.
- ISO 21434, road vehicles cybersecurity engineering, for threat
analysis and risk assessment framing of charging findings.
- The parent skill telematics-security, for backend API review and
remote command tracing that the OCPP backend assessment builds on.
1---2name: ev-charging-security3parent: telematics-security4description: Use when assessing electric vehicle charging security on a charger, vehicle, and backend you own or are authorized to test. Covers ISO 15118 Plug and Charge certificate handling, OCPP backend authentication and authorization, charging session hijack and billing abuse checks, charger firmware and physical exposure, and load management abuse. Also use when a charging deployment needs its vehicle to grid communication reviewed before rollout.5version: 1.0.06domain: automotive7lifecycle: stable8last_verified: '2026-10-27'9requires: [telematics-security]10extends: []11relates: [automotive-ethernet, automotive-threat-model, ecu-firmware]12tools:13 - name: Python14 version: '3.12'15 - name: Wireshark16 version: '4.4'17 - name: nmap18 version: '7.98'19metadata:20 source: https://skillmd.com/skills/mizazhaider-ceh/ev-charging-security21---2223An EV charger sits at the meeting point of three trust domains, the24vehicle, the charge point operator backend, and the energy grid, and25a flaw in any one of them can move money, energy, or personal data.26ISO 15118 handles vehicle to charger authentication, OCPP handles27charger to backend management, and both have certificate, identity,28and authorization checks that fail quietly when misconfigured. This29sub-skill covers authorized testing of that chain on your own30charger and vehicle, or a lab charger, with no testing against31public infrastructure you do not operate.3233## Quick Workflow34351. Map the charging chain on the lab setup, vehicle, charger,36 backend, and any energy management system in between.372. Capture a full charging session, from plug-in through38 authorization to stop and billing record.393. Review the ISO 15118 handshake, certificate chain, and which40 payment or contract credentials the charger accepts.414. Review the OCPP connection, charger identity, authentication,42 and which messages the backend accepts from the charger.435. Test authorization boundaries, one account or charger acting on44 another account session or another charger identity.456. Test session handling, stopping, resuming, and billing after46 disconnects, since billing abuse hides in edge transitions.477. Check the charger itself, open ports, debug interfaces, and48 physical access to its network and storage.498. Report each finding with the trust boundary it crosses and the50 billing, energy, or privacy impact it enables.5152## 1. Capture and review an ISO 15118 session5354The handshake is where certificate trust is decided, so capture it55in full before any active testing. Note the certificate chain56presented, the contract or payment method selected, and whether the57charger falls back to a weaker method when the strong one fails.5859```bash60# Capture charging communication on the lab charger network segment61# Restrict the capture to the lab charger and lab vehicle addresses.62sudo tcpdump -i eth0 -w charging_session.pcap \63 host 192.168.30.10 or host 192.168.30.2064# List TLS handshakes and certificate exchanges in the capture65tshark -r charging_session.pcap -Y tls.handshake -T fields \66 -e ip.src -e tls.handshake.type | sort | uniq -c67```6869```python70# ISO 15118 review checklist, answered from the capture and charger docs71checks = {72 "certificate_chain_validates": "yes, no, or unknown",73 "expired_or_revoked_cert_rejected": "yes, no, or unknown",74 "fallback_to_unauthenticated_charging": "yes, no, or unknown",75 "contract_certificate_bound_to_vehicle": "yes, no, or unknown",76 "payment_data_in_cleartext": "yes, no, or unknown",77}78for question, answer in checks.items():79 print(f"{question}: {answer}")80```8182## 2. OCPP backend authentication and authorization tests8384A charger authenticates to its backend with an identity and a85secret, and the backend must not trust a charger identity it has86not issued. Test with lab chargers only, checking whether one lab87charger can impersonate another, start sessions for another88account, or read another charger configuration.8990```bash91# Enumerate the lab OCPP endpoint surface from the charger config92# Use the lab backend address only, never a production operator.93sudo nmap -sV -p 443,8080,8443 192.168.30.594# Confirm the OCPP connection uses TLS and which version is offered95python3 -c "import ssl; print(ssl.OPENSSL_VERSION)"96```9798```python99# OCPP authorization test cases, run against the lab backend only100# Each case uses lab accounts and lab charger identities.101test_cases = [102 "charger A authenticates with charger B identity",103 "account A stops account B charging session",104 "account A reads account B charging history",105 "charger requests a firmware update from an untrusted source",106 "charger accepts a remote start for a session it did not create",107]108for case in test_cases:109 print(f"test case: {case} - record accepted, rejected, or error")110```111112## 3. Session, billing, and load management abuse checks113114Billing records are built from meter values the charger reports,115so check whether the backend validates them, and whether a charger116can report values that understate energy delivered. Load management117is the grid-facing risk, so check whether one charger can request118power beyond its allocated limit.119120```bash121# Session edge test procedure on the lab charger122# 1. Start a session, disconnect mid-charge, reconnect, and compare123# the billed energy with the metered energy.124# 2. Stop a session from the backend, then from the charger, and125# confirm only one billing record is created.126# 3. Request maximum power from two lab chargers at once and check127# the load limit is enforced per site, not per charger.128echo "session edge tests ready - record metered vs billed per run"129```130131```python132# Billing reconciliation check on lab session records133# Metered energy comes from the charger meter, billed from the backend.134sessions = [135 {"id": "lab-001", "metered_kwh": 22.4, "billed_kwh": 22.4},136 {"id": "lab-002", "metered_kwh": 18.1, "billed_kwh": 18.1},137]138for session in sessions:139 delta = abs(session["metered_kwh"] - session["billed_kwh"])140 status = "MATCH" if delta < 0.1 else "MISMATCH - investigate"141 print(f"{session['id']} delta {delta:.2f} kWh - {status}")142```143144## Edge cases145146- Certificate provisioning: a lab vehicle without a valid contract147 certificate will fall back or fail, and that behaviour must be148 distinguished from a production misconfiguration before it is149 reported as a finding.150- OCPP version differences: OCPP 1.6 and 2.0.1 differ in security151 profiles, so a check that passes on one version may be152 meaningless on the other, and the version under test is recorded.153- Offline charging: chargers that lose backend connectivity may154 authorize locally and sync later, so billing and authorization155 findings need an offline and an online run each.156- Shared chargers: a charger used by many drivers mixes session157 data, so authorization tests need distinct lab accounts, or a158 cross-account result may be a test artefact.159- Grid signals: load management responses depend on site limits160 and grid signals that a lab may not reproduce, so load findings161 are scoped to the lab configuration that produced them.162- Physical access: a publicly sited charger is physically exposed,163 so network findings must be read together with what an attacker164 with hands on the charger can reach.165166## Key references167168- ISO 15118, road vehicles vehicle to grid communication interface,169 for Plug and Charge, certificate handling, and session setup.170- Open Charge Point Protocol (OCPP) specifications, for charger to171 backend messaging, security profiles, and firmware management.172- ISO 21434, road vehicles cybersecurity engineering, for threat173 analysis and risk assessment framing of charging findings.174- The parent skill telematics-security, for backend API review and175 remote command tracing that the OCPP backend assessment builds on.