Potential Risks for Smart Cards Firmware martin.kakona@i.cz S.ICZ Security and Protection of Information Brno 2005
Measuring Arrangement
Filtering
Real SIM Begin End Life Verify
Real Attack Life Difference Difference Life Life Difference
The Sample of Source Code private void PulsePIN(APDU apdu, byte[ ] pbuffer) { byte byteRead =(byte)(apdu.setIncomingAndReceive()); byte BlockPWD [ ]={(byte)0x00}; byte BlockPWDLen = 1; MyPin.check(pbuffer, ISO7816.OFFSET_CDATA, byteRead); }
The Result 1x private void PulsePIN(APDU apdu, byte[ ] pbuffer) { byte byteRead =(byte)(apdu.setIncomingAndReceive()); byte BlockPWD [ ]={(byte)0x00}; byte BlockPWDLen = 1; MyPin.check(pbuffer, ISO7816.OFFSET_CDATA, byteRead); } 2x 3x
Another Sample of Program private void PulsePIN(APDU apdu, byte[ ] pbuffer) { byte byteRead =(byte)(apdu.setIncomingAndReceive()); byte BlockPWD [ ]={(byte)0x00}; byte BlockPWDLen = 1; // Good PIN MyPin.check(BlockPWD, (byte)0x01020304, BlockPWDLen); // Try PIN if (!MyPin.check(pbuffer, ISO7816.OFFSET_CDATA, byteRead)) short tries = MyPin.getTriesRemaining(); // send error counter in APDU back ISOException.throwIt( (short) (SW_PIN_FAILED + tries)); }
Bad X Good PIN
Public Phone Card
Conclusion Inexpensive Noninvasive Attacks Complexity X Security Side channels program tracing MyPin.check(pbuffer, ISO7816.OFFSET_CDATA, byteRead);