Home Foren Trezor Wallet Sicherheitsrelevante Auswirkungen der Extraktion des sicheren Elements

Ansicht von 2 Antwort-Themen
  • Autor
    Beiträge
    • #3373136
      root_s2yse8vt
      Administrator
      Up
      0
      Down
      ::

      Ich bin neu bei Secure Elements (SE) und bin dabei, die Feinheiten zu verstehen. Auf der SE-Informationsseite habe ich gelernt, dass bei Eingabe einer PIN ein Geheimnis zurückgegeben wird. Ich bin jedoch neugierig, was passiert, wenn ich den Flash-Speicher des SE und der MCU entferne, sie auf einer Platine platziere und versuche, sie mit roher Gewalt zu knacken? Da der SE in erster Linie als Speicher ohne eingebaute Logik zur Einführung von Verzögerungen fungiert, könnte dies eine Sicherheitslücke darstellen?

      Dies ist die Erklärung von Coldcard zum Vergleich:

      Wir finden es ziemlich beängstigend, dass einige Bitcoin-Wallets ihre wertvollsten Geheimnisse dem Hauptmikroprozessor anvertrauen. Stattdessen verwendet Coldcard ein **Secure Element**, um Ihre Bitcoin zu schützen.
      >
      Konkret verwendet die Coldcard (Mk3) [Microchip’s ATECC608A](https://www.microchip.com/wwwproducts/en/ATECC608A), um das wichtige Hauptgeheimnis zu speichern: die 24-Wort-Seed-Phrase für Ihre BIP32/BIP39-Geldbörse.
      >
      >Dieser kleine Chip ist sehr leistungsfähig. Die Kommunikation wird durch komplexe Herausforderungen und SHA-256-Antworten gesteuert, die Wiederholungen und Abhören verhindern. Das sichere Element erzwingt *kryptografisch*, dass der Angreifer die PIN kennen muss, um auf die Geheimnisse zuzugreifen. Ein Angreifer kann keine Kombinationen erzwingen oder eine frühere Anmeldesequenz wiederholen. Dies gilt selbst dann, wenn er den Chip von der Platine entfernt oder die Firmware im Hauptmikroprozessor vollständig ausgetauscht hat. Selbst wenn das sichere Element aus dem System entfernt würde und alle Geheimnisse des Hauptmikroprozessors vollständig bekannt wären, hätte der Angreifer nur **13 Versuche**, bevor sich das sichere Element selbst zerstört! (Keine Sorge, dieser Zähler wird jedes Mal zurückgesetzt, wenn Sie sich korrekt anmelden).
      >
      Selbst wenn es einen kritischen Sicherheitsfehler im sicheren Element gäbe, der die darin enthaltenen Geheimnisse vollständig offenlegen würde, wäre Ihr Bitcoin immer noch sicher, weil wir den Inhalt des sicheren Elements mit einem Einmal-Pad verschlüsseln, das nur dem Hauptmikro bekannt ist.
      Weitere Einzelheiten finden Sie in diesem [white paper](https://github.com/Coldcard/firmware/blob/master/docs/pin-entry.md) und der [complete source code is available](https://github.com/Coldcard/firmware).

    • #3373137
      brianddk
      Gast
      Up
      0
      Down
      ::

      The Optiga SE has [public documentation][a], which I assume was one of the reasons Trezor chose it. The pin is feed into the Optiga and a secret comes out. It’s the job of the Optiga to be hardened to war-dialing and brute-forcing, but I’ve never worked with it, so I can attest.

      Best advice would be to just [read the spec][a] and see what hardening they have in place.

      [a]: https://www.infineon.com/cms/en/product/security-smart-card-solutions/optiga-embedded-security-solutions/optiga-trust/optiga-trust-m-sls32aia/

    • #3373138
      matejcik
      Gast
      Up
      0
      Down
      ::

      > remove (…) MCU’s flash memory

      So first off, you can’t actually do this. The memory is on-die. Even if you break out your scalpels and microdrills, you run a very high risk of destroying the memory instead, and if you succeed against all odds, you would still need to make some sort of custom substrate to “plug in” the memory.

      (See also: it took several years for attackers to find a good glitching sequence for the STM32F2 used in Trezor One, that reliably allows you to read out the memory. So no, you can’t just “remove the memory”. That’s not done.)

      You _can_ of course remove the Secure Element and talk to it. You won’t get anything interesting that way either.

      Step one, you can’t just start sending PIN codes to it and hope for a result. What’s sent into the chip is not the raw PIN, it’s some sort of hash over the PIN and some data from the MCU memory. So you would first need to read out the MCU memory, which is _possible_ via the Kraken hack, but not at all trivial.

      Step two, with that you still only got 16 tries, after which the SE will reject any further attempts. (i’m not sure if CC’s ATECC actually “bricks itself” after 13 tries, maybe it does, but in any case the Optiga doesn’t have that functionality… what the Optiga does instead is return an error for attempt 17 and up without actually trying to do the operation)

      Step three, the Optiga actually has some sort of built-in rate limiter that kicks in after a little while and throttles you to one operation per something like 5 seconds. And one PIN try isn’t a single operation, it’s actually a sequence of about four different operations of different types (so that even if one part of the chip is broken, the other parts hopefully hold up).

      And finally, step four, if you _do_ successfully extract the Optiga secret, it’s just an encryption key to the MCU storage, so you still need the contents of the MCU memory.

      (Although if you went step-by-step, you _already have_ contents of the MCU memory so it doesn’t matter that much. It’s more in case you somehow trick the SE into giving you the secret without going through steps 1 through 3)

      I’m not sure if the communication between the MCU and the SE is encrypted or not. I don’t think it matters: an attacker who can record the MCU-SE communication can just as easily record contents of the display, which will just tell them the right PIN.

Ansicht von 2 Antwort-Themen
  • Du musst angemeldet sein, um auf dieses Thema antworten zu können.