Skip to content

Forensic logging

What Forensic Logging Is

Forensic logging is the practice of collecting, preserving, and securing system logs so they can be used to reconstruct events after an incident — especially cybersecurity incidents, fraud disputes, safety events, or major outages. The goal is to answer: what happened, when, how, and who/what initiated it, with evidence that is trustworthy.

In EV charging, forensic logging supports investigations involving chargers, CPMS backends, roaming, payments, and device management.

Why Forensic Logging Matters in EV Charging

Charging networks are distributed, connected, and commercial. Forensic logs help:
– Investigate suspected tampering, unauthorized commands, or credential compromise
– Resolve billing disputes (session start/stop, meter values, tariff applied)
– Understand widespread outages (configuration push, firmware rollout, cloud failure)
– Meet enterprise and regulatory expectations for auditability and incident response
– Improve future reliability by identifying root causes and blast radius

What Should Be Logged (Typical Scope)

Good forensic logging covers both security events and operational events:

Identity and Access Events

– Device authentication events (mTLS handshake, cert ID, accept/deny)
– Admin logins, role changes, privilege grants
– Driver authentication attempts (RFID/app/roaming token), failures and reasons
– API key usage and token issuance/revocation

Command and Configuration Events

– Remote commands: start/stop, availability changes, resets
– Configuration changes (desired state updates) with who/what made the change
– Firmware updates: version, rollout group, success/failure, rollback actions

Charging Session and Metering Events

– Session start/stop timestamps, charger connector ID
– Meter values (start/end, periodic samples if stored), reconciliation steps
– Tariff and pricing rules applied (including dynamic tariff version)
– Errors and interruptions (power loss, EV disconnect, safety trip)

Device and Network Events

– Heartbeats, connectivity drops, IP changes, SIM/APN events
– Fault codes, safety trips (RCD, overtemp), breaker-related events
– Hardware diagnostics (temperatures, internal power supply status)

Backend and Integration Events

– CPMS service health, database errors, message queue failures
– Roaming/OCPI events, CDR exchange status, settlement errors
– Payment provider events (auth, capture, refunds, declines)

Key Properties of Good Forensic Logs

For logs to be usable in investigations, they must be:
Time-synced (NTP; consistent timestamps across devices/services)
Tamper-evident (append-only storage, hashing, immutable retention where possible)
Complete and correlated (shared IDs: charger ID, session ID, user ID, request ID)
Access-controlled (RBAC, least privilege)
Retained appropriately (enough time for disputes and audits, but not excessive)
Privacy-aware (minimize PII, protect sensitive fields, comply with policy)

Chain of Custody (Practical)

When an incident occurs, forensic logging practices often require:
– Preserving relevant logs immediately (snapshot/lock retention)
– Documenting who accessed or exported logs and when
– Keeping original copies intact and working on copies for analysis
– Recording steps taken during investigation for auditability

Common Pitfalls

– Logs without consistent timestamps (impossible to build a timeline)
– Missing “who did what” for admin actions and configuration changes
– Overwriting logs too quickly (retention too short)
– Storing logs in systems users/admins can alter without audit trails
– Too much raw data without correlation IDs (hard to join events)
– Capturing excessive personal data (privacy and compliance risk)

Incident response
Disaster recovery planning
Device authentication
Secure update pipeline
Diagnostics
Audit logs
Charge Detail Records (CDRs)