The core of preventing Man-in-the-Middle (MITM) attacks lies in the triple mechanism of "two-way authentication + certificate pinning + channel encryption"—the OCPP 2.0.1 motherboard minimizes the attack surface through TLS 1.3, X.509 certificate chains, and certificate pinning, while the 1.6J motherboard, due to its single-directional verification or plaintext transmission, carries significant exposure risks.
1、 Attack Scenario: How MITM Hijacks Charging Piles
Typical attack paths include three categories
In the context of DNS hijacking, attackers tamper with routers or local DNS settings to redirect ocpp.server.com to a malicious IP, causing the charging station to connect to a forged platform.
In an ARP spoofing scenario, the attacker within the local area network forges the gateway's MAC address, intercepts the traffic between the host and the platform, and forwards it without either party being aware.
Certificate forgery scenarios are more covert, where attackers impersonate platforms using self-signed certificates. If the server does not verify the certificate chain, it will establish an encrypted connection and steal data.
2、 Defense Mechanisms: The Complete Solution of OCPP 2.0.1
Bidirectional TLS 1.3 (mTLS)
Traditional HTTPS only verifies the server certificate from the client side, while OCPP 2.0.1 mandates mutual authentication.
The private key of the桩侧 certificate is stored in a secure chip (ATECC608/SE050) and cannot be exported;
The platform certificate is issued by an authoritative CA, with the root certificate pre-installed on the dongle side.
During the handshake phase, both parties exchange certificates. If any step fails, the connection is terminated, preventing the attacker from impersonating either party.
Certificate Pinning
The firmware embeds the platform certificate public key fingerprint (SHA-256). During connection, it compares the server certificate with the pre-stored fingerprint. If there is a mismatch, it immediately triggers an alarm and enters offline protection mode.
Even if an attacker holds other certificates issued by a legitimate CA, they will still be rejected due to fingerprint mismatches, thereby blocking certificate chain attacks.
Channel Encryption and Perfect Forward Secrecy
TLS 1.3 mandates AES-256-GCM or ChaCha20-Poly1305 encryption, employs ECDHE for key exchange, and generates independent ephemeral keys for each session.
Even if the private key is leaked long-term, historical sessions remain undecryptable, achieving perfect forward secrecy (PFS).
3、 Inherent Defects of OCPP 1.6J
The 1.6J version exhibits severe fragmentation in security policies. Some implementations use TLS 1.2 but only support one-way authentication, where the stub does not verify the platform certificate, allowing attackers to establish connections with self-signed certificates.
Early versions even used plaintext WebSocket transmission, exposing data directly.
The absence of a security incident reporting mechanism results in no detection, reporting, or mitigation of attacks when they occur.
4、 Motherboard level reinforcement measures
On the hardware level, the secure chip stores private keys, physically tamper proof, and the private keys never leave the chip for life.
At the firmware level, BOOT three-level signature verification is used to prevent malicious firmware from bypassing certificate verification.
At the network level, the firewall whitelist only opens OCPP ports and disables ICMP response anti scanning.
At the operational level, the certificate validity period is monitored, and an automatic update request is made 30 days before expiration. If it expires, the machine will be shut down.
5、 One sentence summary
OCPP 2.0.1 motherboard anti MITM relies on mutual TLS 1.3 authentication, certificate fixation to lock trust anchors, and PFS encryption to ensure historical security - a three-layer overlay. Even if attackers control DNS, forge certificates, and intercept traffic, they cannot establish a trusted connection. If the 1.6J motherboard is not upgraded, it is equivalent to running naked and will be forcibly phased out after 2026.
The communication charging pile motherboard produced by Xincheng Technology is of high quality and beautiful price. Welcome to inquire and purchase!
Contact:SHEN ZHEN X-CHENG Technology Co.,Ltd
Phone:18025316892
Tel:0755-21010929
Email:shutao.chen@x-cheng.com
Address:Room B911, Zhantao Technology Building, Longhua District, Shenzhen