Skip to content

Szymon Chadam: Elektroniczny, ale czy bezpieczny? Hackowanie nowego mObywatela 2.0 | CONFidence

Szymon Chadam

CommunityCONFidence40 minOpen on YouTube ↗

Security researchers examine technical aspects of Szymon Chadam: Elektroniczny, ale czy bezpieczny? Hackowanie nowego mObywatela 2.0 | CONFidence.

Summary

### Overview Szymon Chadam, an IT security consultant at Securing, presents a technical analysis and practical security assessment of Poland's government digital ID application, mObywatel 2.0. Conducted pro bono in August 2023, the research evaluated both the real-world operational security of mObywatel verification across various high-risk organizations and the underlying technical architecture handling onboarding and cryptographic verification. All vulnerabilities identified during the audit were responsibly reported and promptly patched by the Centralny Ośrodek Informatyki (COI).

### Key Topics - **Verification Methods vs. Practical Realities**: The speaker highlights three tiers of identity verification defined for mObywatel: visual verification (checking dynamic UI elements like moving flags, clocks, or gyroscope-responsive eagles), functional verification (requesting user interactions within the app to counter screen recordings), and cryptographic verification (scanning a dynamic QR code between two devices). Field tests across four high-risk sectors (a medical clinic, airport gate, telecom provider, and bank) revealed that only the bank enforced cryptographic verification, while the others accepted basic visual checks, enabling potential identity impersonation, medical record theft, or SIM swap fraud. - **Visual Impersonation via Tools (mHacker)**: Using an app called mHacker alongside the official mObywatel application, the speaker demonstrated real-time tampering of displayed credentials (name, PESEL, photo) without restarting the app. This technique is actively leveraged in red team scenarios to bypass lobby security and obtain temporary employee badges. - **Technical Architecture & Data Flows**: The onboarding process ties into a trusted third party (such as a bank) that securely communicates with COI servers. The user receives a digitally signed "personal container" (a JSON payload with personal data and a COI digital signature) and a user-specific certificate used for signing authentication transactions.

### Technical Details - **QR Code Phishing & Missing Integrity**: Analysis of the QR code exchange revealed no cryptographic signature over the QR code metadata. An attacker could craft custom QR codes to spoof the verifier's identity (e.g., claiming to be the police) and pad newline characters to conceal requested credential scopes from victims, mimicking benign prompts. - **Excessive Data Exposure & Cryptographic Replay/Bypass**: During standard cryptographic verification, COI servers returned an excessive payload to the verifier—specifically, 50% of the victim's onboarding data, including their full personal container with COI's signature. Crucially, the server-side business logic failed to bind the personal container to the user certificate signing the session. This allowed an attacker (User B) to take a victim's intercepted personal container (User A), sign it with User B's own certificate, and successfully pass cryptographic verification as User A. - **Persistence and Revocation Weaknesses**: The extracted personal container was valid for five years. Furthermore, revoking the document within the app merely removed the certificate from the local device, leaving the container itself signed and accepted on the backend during the test period.

### Takeaways - **Responsible Disclosure**: Disclosed in August 2023 initially via CERT/NASK and then directly to COI, the logic flaw was mitigated within two to three days by COI's engineering team ahead of the statutory September 1, 2023 mandate for banking adoption. - **Defense-in-Depth for Organizations & Users**: Relying on visual or functional inspection of mobile ID screens is fundamentally insecure. Organizations must mandate cryptographic QR verification and train staff never to accept screen presentations. Institutions integrating digital identity systems should thoroughly assess and test verification logic against replay and spoofing vectors.

Related talks