SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
Sécurité d'un token hardware
Nicolas RUFF
EADS Innovation Works
nicolas.ruff(à)eads.net
Une cible bien connue de l'ASFWS
Démontage
• 4 pins évidentes: VCC, GND, DATA, CLK
• Des pastilles
• Pas de référence visible
Décapsulation
Décapsulation
• HT49R50A-1
– Un microcontrôleur Holtek, 8 bits, spécialisé pour le
pilotage LCD
• http://www.holtek.com.tw/english/docum/uc/49x50.htm
• http://www.holtek.com.tw/pdf/uc/ht49x50v240.pdf

– Coût unitaire: probablement quelques centimes 
Description du composant
• Les pastilles correspondent probablement à pins de programmation
"in-circuit"
• Le protocole de programmation est référencé "ICP-1A" chez Holtek
– http://www.holtek.com.tw/Chinese/tech/tool/MainPage2.aspx

• … mais apparemment non documenté 
• Il utilise 11 broches
–
–
–
–
–

PA0 – PA6
OSC (OSC1 ou OSC3 ?)
VSS (câblé à OSC)
VDD
VPP (alias RESB ou RESET)
Documentation officielle
Connect the dots
A5
A2
A6
CLK
A3
GND
VSS

VCC
VDD
DATA

A1
A0

A4
(A3)

RES
OSC1

OSC3
Connect the dots
Lecture du composant
• Le programmateur Elnec supporte les
microcontrôleurs Holtek 
Lecture du composant
• … mais le "code protection bit" est à 1
– Seule une zone de données semble lisible
Extraction du code
• Pour extraire le code, il est nécessaire de comprendre le
protocole de programmation
– … mais comment peut-il y avoir autant de données transférées en si
peu de cycles ?
Extraction du code
• Une attaque est-elle possible ?
– http://www.cl.cam.ac.uk/~sps32/mcu_lock.html
✘Effacement du "code protection bit" avec un faisceau
d'UV
• Il faut trouver l'emplacement du fusible
• Le risque d'effacer une partie du code est important

✘Power Glitch / Clock Glitch
• Les MCU Holtek sont relativement résistant contre cette
attaque
Extraction du code
• Si vous voulez m'aider à chercher le fusible …
– http://commons.wikimedia.org/wiki/File:HOLTEK_
HT49R50A-1_A217K0092.jpg
A partir de ce point, tout n'est qu'

HYPOTHÈSES …
• Question(s)
– A quoi servent les pins documentés ?
• Injecter la seed ?
– Une fois que la RAM est alimentée par la pile ?

• Relire la seed ?
– Si oui: #fail …

– Quel est le protocole de communication sur ces pins ?
• Requière l'accès au code du MCU 
– Un brute-force du protocole semble peu réaliste

• Hypothèse(s)
– Le MCU est programmé en usine par les pins non documentés
– Si les pins documentés sont liés à la programmation de la seed
• Il pourrait être possible d'extraire la seed discrètement
– Avec 4 trous de la taille d'une épingle au dos du token

• Il pourrait être possible d'injecter votre propre seed
– Si vous ne faites pas confiance au vendeur
Conclusion
• N'hésitez pas à contribuer

• Si vous voulez des échantillons gratuits,
demandez à Sylvain 
• Si vous voulez fabriquer votre propre token,
cela vous coûtera probablement moins de
5€/unité

Weitere ähnliche Inhalte

Mehr von Cyber Security Alliance

Robots are among us, but who takes responsibility?
Robots are among us, but who takes responsibility?Robots are among us, but who takes responsibility?
Robots are among us, but who takes responsibility?Cyber Security Alliance
 
iOS malware: what's the risk and how to reduce it
iOS malware: what's the risk and how to reduce itiOS malware: what's the risk and how to reduce it
iOS malware: what's the risk and how to reduce itCyber Security Alliance
 
Why huntung IoC fails at protecting against targeted attacks
Why huntung IoC fails at protecting against targeted attacksWhy huntung IoC fails at protecting against targeted attacks
Why huntung IoC fails at protecting against targeted attacksCyber Security Alliance
 
Corporations - the new victims of targeted ransomware
Corporations - the new victims of targeted ransomwareCorporations - the new victims of targeted ransomware
Corporations - the new victims of targeted ransomwareCyber Security Alliance
 
Introducing Man in the Contacts attack to trick encrypted messaging apps
Introducing Man in the Contacts attack to trick encrypted messaging appsIntroducing Man in the Contacts attack to trick encrypted messaging apps
Introducing Man in the Contacts attack to trick encrypted messaging appsCyber Security Alliance
 
Understanding the fundamentals of attacks
Understanding the fundamentals of attacksUnderstanding the fundamentals of attacks
Understanding the fundamentals of attacksCyber Security Alliance
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemCyber Security Alliance
 
Easy public-private-keys-strong-authentication-using-u2 f
Easy public-private-keys-strong-authentication-using-u2 fEasy public-private-keys-strong-authentication-using-u2 f
Easy public-private-keys-strong-authentication-using-u2 fCyber Security Alliance
 
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100Cyber Security Alliance
 
Offline bruteforce attack on wi fi protected setup
Offline bruteforce attack on wi fi protected setupOffline bruteforce attack on wi fi protected setup
Offline bruteforce attack on wi fi protected setupCyber Security Alliance
 
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...Cyber Security Alliance
 
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScriptWarning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScriptCyber Security Alliance
 
Killing any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented featureKilling any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented featureCyber Security Alliance
 

Mehr von Cyber Security Alliance (20)

Bug Bounty @ Swisscom
Bug Bounty @ SwisscomBug Bounty @ Swisscom
Bug Bounty @ Swisscom
 
Robots are among us, but who takes responsibility?
Robots are among us, but who takes responsibility?Robots are among us, but who takes responsibility?
Robots are among us, but who takes responsibility?
 
iOS malware: what's the risk and how to reduce it
iOS malware: what's the risk and how to reduce itiOS malware: what's the risk and how to reduce it
iOS malware: what's the risk and how to reduce it
 
Why huntung IoC fails at protecting against targeted attacks
Why huntung IoC fails at protecting against targeted attacksWhy huntung IoC fails at protecting against targeted attacks
Why huntung IoC fails at protecting against targeted attacks
 
Corporations - the new victims of targeted ransomware
Corporations - the new victims of targeted ransomwareCorporations - the new victims of targeted ransomware
Corporations - the new victims of targeted ransomware
 
Blockchain for Beginners
Blockchain for Beginners Blockchain for Beginners
Blockchain for Beginners
 
Le pentest pour les nuls #cybsec16
Le pentest pour les nuls #cybsec16Le pentest pour les nuls #cybsec16
Le pentest pour les nuls #cybsec16
 
Introducing Man in the Contacts attack to trick encrypted messaging apps
Introducing Man in the Contacts attack to trick encrypted messaging appsIntroducing Man in the Contacts attack to trick encrypted messaging apps
Introducing Man in the Contacts attack to trick encrypted messaging apps
 
Understanding the fundamentals of attacks
Understanding the fundamentals of attacksUnderstanding the fundamentals of attacks
Understanding the fundamentals of attacks
 
Rump : iOS patch diffing
Rump : iOS patch diffingRump : iOS patch diffing
Rump : iOS patch diffing
 
An easy way into your sap systems v3.0
An easy way into your sap systems v3.0An easy way into your sap systems v3.0
An easy way into your sap systems v3.0
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande Modem
 
Easy public-private-keys-strong-authentication-using-u2 f
Easy public-private-keys-strong-authentication-using-u2 fEasy public-private-keys-strong-authentication-using-u2 f
Easy public-private-keys-strong-authentication-using-u2 f
 
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
 
Offline bruteforce attack on wi fi protected setup
Offline bruteforce attack on wi fi protected setupOffline bruteforce attack on wi fi protected setup
Offline bruteforce attack on wi fi protected setup
 
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
 
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScriptWarning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
 
Killing any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented featureKilling any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented feature
 
Rump attaque usb_caralinda_fabrice
Rump attaque usb_caralinda_fabriceRump attaque usb_caralinda_fabrice
Rump attaque usb_caralinda_fabrice
 
Operation emmental appsec
Operation emmental appsecOperation emmental appsec
Operation emmental appsec
 

ASFWS 2013 - Rump Session - Sécurité d’un token OTP Nicolas ruff

  • 1. Sécurité d'un token hardware Nicolas RUFF EADS Innovation Works nicolas.ruff(à)eads.net
  • 2. Une cible bien connue de l'ASFWS
  • 3. Démontage • 4 pins évidentes: VCC, GND, DATA, CLK • Des pastilles • Pas de référence visible
  • 5. Décapsulation • HT49R50A-1 – Un microcontrôleur Holtek, 8 bits, spécialisé pour le pilotage LCD • http://www.holtek.com.tw/english/docum/uc/49x50.htm • http://www.holtek.com.tw/pdf/uc/ht49x50v240.pdf – Coût unitaire: probablement quelques centimes 
  • 6. Description du composant • Les pastilles correspondent probablement à pins de programmation "in-circuit" • Le protocole de programmation est référencé "ICP-1A" chez Holtek – http://www.holtek.com.tw/Chinese/tech/tool/MainPage2.aspx • … mais apparemment non documenté  • Il utilise 11 broches – – – – – PA0 – PA6 OSC (OSC1 ou OSC3 ?) VSS (câblé à OSC) VDD VPP (alias RESB ou RESET)
  • 10. Lecture du composant • Le programmateur Elnec supporte les microcontrôleurs Holtek 
  • 11. Lecture du composant • … mais le "code protection bit" est à 1 – Seule une zone de données semble lisible
  • 12. Extraction du code • Pour extraire le code, il est nécessaire de comprendre le protocole de programmation – … mais comment peut-il y avoir autant de données transférées en si peu de cycles ?
  • 13. Extraction du code • Une attaque est-elle possible ? – http://www.cl.cam.ac.uk/~sps32/mcu_lock.html ✘Effacement du "code protection bit" avec un faisceau d'UV • Il faut trouver l'emplacement du fusible • Le risque d'effacer une partie du code est important ✘Power Glitch / Clock Glitch • Les MCU Holtek sont relativement résistant contre cette attaque
  • 14. Extraction du code • Si vous voulez m'aider à chercher le fusible … – http://commons.wikimedia.org/wiki/File:HOLTEK_ HT49R50A-1_A217K0092.jpg
  • 15. A partir de ce point, tout n'est qu' HYPOTHÈSES …
  • 16. • Question(s) – A quoi servent les pins documentés ? • Injecter la seed ? – Une fois que la RAM est alimentée par la pile ? • Relire la seed ? – Si oui: #fail … – Quel est le protocole de communication sur ces pins ? • Requière l'accès au code du MCU  – Un brute-force du protocole semble peu réaliste • Hypothèse(s) – Le MCU est programmé en usine par les pins non documentés – Si les pins documentés sont liés à la programmation de la seed • Il pourrait être possible d'extraire la seed discrètement – Avec 4 trous de la taille d'une épingle au dos du token • Il pourrait être possible d'injecter votre propre seed – Si vous ne faites pas confiance au vendeur
  • 17. Conclusion • N'hésitez pas à contribuer • Si vous voulez des échantillons gratuits, demandez à Sylvain  • Si vous voulez fabriquer votre propre token, cela vous coûtera probablement moins de 5€/unité