SLIDE 1 SRLabs ¡Template ¡v11 ¡
In-‑depth ¡crypto ¡a9acks ¡ It ¡always ¡takes ¡two ¡bugs ¡
Karsten ¡Nohl ¡<nohl@srlabs.de> ¡
SLIDE 2
Agenda ¡
2 ¡
§ A ¡risk ¡perspec*ve ¡on ¡cryptography ¡ § Breaking ¡silence ¡– ¡ ¡ Algebraic ¡a9acks ¡on ¡RFIDs ¡ § Ciphering ¡the ¡predictable ¡– ¡ ¡ Rainbows ¡against ¡mobile ¡crypto ¡
SLIDE 3
Risks ¡summarize ¡hacker, ¡research, ¡and ¡corporate ¡viewpoints ¡
3 ¡
Research ¡perspec*ve ¡ Damage ¡ Probability ¡ Risk ¡ Risk ¡ Vulnerability ¡ Infosec ¡perspec*ve ¡
SLIDE 4
Risks ¡summarize ¡hacker, ¡research, ¡and ¡corporate ¡viewpoints ¡
4 ¡
Hacker ¡view ¡ Research ¡view ¡ Infosec ¡ view ¡ Damage ¡ Probability ¡ Risk ¡ IncenRve ¡ Vulnerability ¡
SLIDE 5
Agenda ¡
5 ¡
§ A ¡risk ¡perspecRve ¡on ¡cryptography ¡ § Breaking ¡silence ¡– ¡ ¡ Algebraic ¡a<acks ¡on ¡RFIDs ¡ § Ciphering ¡the ¡predictable ¡– ¡ ¡ Rainbows ¡against ¡mobile ¡crypto ¡
SLIDE 6
Mifare ¡Classic ¡RFID ¡tags ¡try ¡to ¡hide ¡secret ¡cipher ¡in ¡silicon ¡die ¡
6 ¡
SLIDE 7
7 ¡
SLIDE 8
Reverse-‑engineering ¡is ¡supported ¡by ¡degate ¡soXware ¡
8 ¡
SLIDE 9 degate ¡outputs ¡synthesizable ¡code ¡that ¡can ¡be ¡visualized ¡and ¡ emulated ¡with ¡standard ¡chip ¡design ¡tools ¡
9 ¡
31−OAI fasel dronf dronf dronf dronf 1− 1+3 2+4 pass NOR( a, 22−OA (bcde)) B − ~C MUXINV 21−OAI
SLIDE 10
Mifare ¡reader ¡is ¡authenRcated ¡first ¡
10 ¡
Reader ¡ Mifare ¡RFID ¡tag ¡ Mutual ¡authen*ca*on ¡a9ests ¡knowledge ¡of ¡k ¡ rand ¡ enck(rand’ ¡|| ¡checksum) ¡ enck(rand’’ ¡|| ¡checksum) ¡ Original ¡a9ack: ¡Compute ¡secret ¡key ¡from ¡one ¡ captured ¡mutual ¡authenRcaRon, ¡within ¡seconds ¡
SLIDE 11
Mifare ¡RFIDs ¡are ¡insecure ¡based ¡on ¡two ¡bugs ¡
11 ¡
Clone ¡your ¡own ¡cards ¡at ¡ legit ¡reader ¡(and ¡ maybe ¡others’, ¡too) ¡ Mifare ¡cards ¡use ¡an ¡easily ¡ breakable ¡stream ¡cipher ¡ Clone ¡others’ ¡cards ¡just ¡ siBng ¡next ¡to ¡them ¡ The ¡cards ¡disclose ¡ encrypted ¡texts ¡to ¡a ¡ rogue ¡reader ¡ Result ¡ Risk ¡ 1 ¡ 2 ¡
SLIDE 12
Immobilizers ¡are ¡the ¡first ¡applicaRon ¡of ¡IT ¡security ¡to ¡cars ¡
12 ¡
Chip ¡
SLIDE 13 Immobilizers ¡are ¡simple ¡challenge-‑response ¡tokens ¡
13 ¡
Car ¡ controller ¡ (ECU) ¡ ¡ Antenna ¡ (someRmes ¡
bilizer ¡chip) ¡ Car ¡key ¡with ¡ immobilizer ¡ trans-‑ ponder ¡ ¡ Challenge: ¡Random ¡number ¡ Response: ¡EncrypRon ¡of ¡random ¡# ¡ Counter-‑challenge: ¡Second ¡random ¡# ¡ Response: ¡Both ¡random ¡numbers ¡ encrypted ¡together ¡ Write ¡to ¡transponder, ¡etc. ¡ Car ¡start ¡ AddiRonal ¡ immobilizer ¡ funcRonality ¡
SLIDE 14
Three ¡technologies ¡dominate ¡the ¡immobilizer ¡market ¡
14
1997 ¡ 1999 ¡ 2001 ¡ 2003 ¡ 2005 ¡ 2007 ¡ 2009 ¡ 2011 ¡ Market ¡share ¡ (# ¡of ¡vehicle ¡brands) ¡ Advanced ¡EM ¡Micro ¡ NXP ¡Hitag ¡AES ¡ TI ¡DST ¡40 ¡ Philips/NXP ¡Hitag ¡2 ¡ EM ¡Micro ¡Megamos ¡ TI ¡DST ¡80 ¡ 40 ¡bit ¡block ¡cipher ¡ 48 ¡bit ¡stream ¡cipher ¡ 96 ¡bit ¡stream ¡cipher ¡
SLIDE 15 Immobilizer ¡vicRm ¡1: ¡DST40 ¡keys ¡are ¡vulnerable ¡to ¡brute-‑force ¡
15 ¡
Serious ¡FPGA ¡ compuRng ¡ power ¡takes ¡
find ¡secret ¡ DST40 ¡key ¡
SLIDE 16 The ¡crux ¡of ¡most ¡weak ¡ciphers ¡is ¡too ¡little ¡non-‑linearity ¡
tmp = x[12]^x[15]^x[16]^x[17]; for (i=17:-1:1) x[i]=x[i-1]; x[0] = tmp;
§ Algebraic ¡weaknesses ¡in ¡proprietary ¡ciphers ¡are ¡often ¡caused ¡by ¡insufficient ¡ non-‑linearity ¡ § At ¡the ¡heart ¡of ¡the ¡problem: ¡LFSRs ¡ ¡ ¡(linear ¡feedback ¡shift ¡register) ¡
0 ¡ 12 ¡ 15 ¡ 16 ¡ 17 ¡
Weak ¡ciphers ¡can ¡be ¡broken ¡in ¡three ¡straightforward ¡steps: ¡ 1. Describe ¡weak ¡parts ¡of ¡cipher ¡as ¡system ¡of ¡equations ¡
- Easiest ¡way: ¡Rewrite ¡source-‑code ¡to ¡work ¡on ¡symbols ¡instead ¡of ¡data ¡
- A5/2, ¡for ¡example, ¡can ¡be ¡described ¡in ¡656 ¡quadratic ¡variables ¡
2. Brute-‑Force ¡through ¡complex ¡parts: ¡Guess-‑and-‑Determine ¡ ¡attack. ¡ 3. Solve ¡system ¡of ¡equations: ¡ ¡MiniSAT is ¡your ¡friend ¡
16 ¡
SLIDE 17 BEGIN
guess
guess s[104] **115 s[63] **121 s[74] **123 s[103] **125 s[79] **126
guess s[103] **99 s[79] **107 s[74] **111 s[63] **113 s[78] **114
guess
**95 s[63] **97 s[79] **98
guess s[100] **87 s[79] **91 s[63] **93 s[74] **94
guess
guess s[99] **79 s[74] **83 s[63] **85 s[79] **86
guess s[96] **72 s[63] **75 s[79] **77 s[74] **78
guess
guess
guess
**68 s[63] **70 s[74] **71
guess
guess
guess
guess
guess
guess
guess
guess
guess
guess
guess s[79] **64 s[74] **66 s[65] **67
guess
guess
guess
guess
guess
guess s[78] **60 s[63] **62 s[65] **63
guess s[77] **58 s[74] **59
guess s[76] **57 s[63] calc_s[28]
calc_s[17] s[72] calc_s[30] s[74] calc_s[93]
calc_s[2]
calc_s[100]
calc_s[80] s[76] s[77] s[78] s[102] s[79] s[100] s[60] s[93] calc_s[102]
calc_s[28] s[65] calc_s[17]
calc_s[30] s[74] calc_s[93] s[77] s[78] s[79] s[60] s[93] s[102] s[100] calc_s[31]
guess
calc_s[31] s[65] calc_s[30]
calc_s[93] s[74]
s[79] s[78] s[93] s[60] calc_s[17] s[72] calc_s[31]
calc_s[30]
calc_s[93] s[75] calc_s[99] s[76] calc_s[28] s[78] s[79] s[60] s[103] s[99] s[93] s[102] s[100] calc_s[103]
guess s[74] **61 s[76] calc_s[28]
guess
calc_s[31]
calc_s[103]
calc_s[30] s[74] s[63] s[99] s[60]
s[79] s[103] calc_s[99] s[72] calc_s[31] s[75] calc_s[103] s[65] calc_s[30] s[64] calc_s[4] s[62] calc_s[96] s[61] calc_s[80] s[77] calc_s[93] s[63] s[79]
s[93] s[60] s[99] s[103] calc_s[17]
calc_s[28]
guess
calc_s[30]
calc_s[17] s[62] calc_s[2]
calc_s[31]
calc_s[104] s[75] calc_s[96] s[65]
s[79] s[85]
s[96] s[104] s[60] calc_s[85] s[72] calc_s[30] s[77] calc_s[17]
calc_s[2] s[74] calc_s[31] s[79] s[85] s[60] s[93] s[96] s[104] s[99] s[103] s[102] s[100] calc_s[93]
guess s[63] **65 s[72] calc_s[31]
guess s[76] calc_s[28] s[75] calc_s[100] s[78] calc_s[103]
calc_s[99] s[64] calc_s[4] s[63] s[74] s[60]
s[99] s[103] s[100] calc_s[3]
calc_s[28]
calc_s[100]
calc_s[103]
calc_s[99] s[64] calc_s[4] s[62] calc_s[96] s[77] calc_s[17] s[74]
s[60] s[96] s[99] s[103] s[100] calc_s[2]
calc_s[31]
guess s[78] calc_s[30]
calc_s[99] s[76] calc_s[100]
calc_s[4]
calc_s[28]
calc_s[10] s[77] calc_s[104] s[65]
s[60]
s[100] s[99] calc_s[3]
calc_s[30]
calc_s[99] s[76] calc_s[100] s[64] calc_s[4]
calc_s[28]
s[96] s[103] s[100] s[99] s[60] calc_s[103]
guess s[74] **69 s[76] calc_s[28]
guess
**61
calc_s[31]
calc_s[100] s[93] **60 s[65] calc_s[30] s[74] s[63] s[60] s[79] s[103] s[100] s[99] calc_s[103] s[72] calc_s[31] s[75] calc_s[100] s[62] calc_s[96] s[78] calc_s[103]
calc_s[27]
calc_s[102]
calc_s[2] s[61] calc_s[19] s[63] s[96] s[102] s[103] s[60] s[100] s[99] calc_s[7]
calc_s[28]
guess
calc_s[31] s[75] calc_s[100] s[62] calc_s[96]
calc_s[103]
calc_s[27]
calc_s[102] s[74]
s[60] s[79] s[103] s[96] s[100] calc_s[8] s[72] calc_s[31]
calc_s[100] s[62] calc_s[96]
calc_s[103] s[68] calc_s[27]
calc_s[102] s[65] calc_s[2] s[61] calc_s[19] s[96] s[99] s[102] s[103] s[100] s[60] calc_s[20]
guess s[74] **73 s[79] **74 s[76] calc_s[28]
guess
**65 s[74] s[63] s[60] s[103] s[100] s[99] **69
guess s[72] calc_s[31] s[75] calc_s[100]
calc_s[96] s[78] calc_s[103] s[68] calc_s[27] s[77] calc_s[102]
calc_s[2]
calc_s[19] s[79]
s[60] s[63] s[102] s[103]
s[100] calc_s[7] s[65] **67
calc_s[31]
calc_s[100]
calc_s[30] s[77] calc_s[17] s[62] calc_s[2] s[64] calc_s[4] s[63] s[99] s[100] s[60] s[102] s[103] calc_s[23]
calc_s[28] s[74] **76
guess
guess
calc_s[31] s[75] calc_s[100]
calc_s[96]
calc_s[103] s[68] calc_s[27] s[77] calc_s[102] s[74] s[79]
s[60] s[103]
s[100] calc_s[8] s[72] calc_s[31]
calc_s[100]
calc_s[96]
calc_s[103]
calc_s[27] s[77] calc_s[102] s[65] calc_s[2]
calc_s[19] s[79]
s[60] s[102] s[103]
s[100] calc_s[20]
guess s[72] calc_s[31]
calc_s[100]
calc_s[96]
calc_s[103]
calc_s[27]
calc_s[102] s[74]
s[60]
s[103]
s[100] calc_s[8] s[65] **67
calc_s[31] s[75] calc_s[100]
calc_s[30] s[99] s[100] s[60] s[103] s[102] calc_s[99]
guess s[63] **81 s[79] **82
guess s[79] **80 s[76] calc_s[28]
guess
calc_s[31]
calc_s[100] s[78] calc_s[103]
calc_s[30]
calc_s[3] s[77] calc_s[17] s[62] calc_s[2] s[79] s[63] s[60] s[74] s[103] s[100] calc_s[4] s[72] calc_s[31] s[75] calc_s[100] s[78] calc_s[103] s[65] calc_s[30]
calc_s[3] s[77] calc_s[17]
calc_s[2] s[63] s[74] s[60] s[103] s[100] calc_s[23]
calc_s[28]
guess
**76 s[79] s[74] s[60] s[103] s[100] **71
**78 s[72] calc_s[31]
calc_s[100] s[62] calc_s[96]
calc_s[103] s[68] calc_s[27] s[77] calc_s[102] s[74] s[100] s[103] s[60] calc_s[8]
guess s[79] **84 s[76] calc_s[28]
guess
**74 s[72] calc_s[31] s[75] calc_s[100] s[62] calc_s[96] s[78] calc_s[103]
calc_s[27]
calc_s[102]
calc_s[2] s[61] calc_s[19] s[79] s[63] s[60] s[102] s[103] s[100] calc_s[7]
calc_s[31]
calc_s[100] s[78] calc_s[103]
calc_s[30] s[63] s[100] s[103] s[60] s[102] calc_s[99]
calc_s[28]
guess
**77 s[72] calc_s[31]
calc_s[100] s[62] calc_s[96]
calc_s[103] s[68] calc_s[27]
calc_s[102] s[65] calc_s[2] s[61] calc_s[19] s[79] s[100] s[102] s[103] s[60] calc_s[20]
calc_s[31] s[75] calc_s[100]
calc_s[103] s[65] calc_s[30]
calc_s[3]
calc_s[17] s[62] calc_s[2] s[100] s[102] s[103] s[60] calc_s[4]
guess s[63] **89 s[74] **90
guess s[74] **88 s[76] calc_s[28]
guess
calc_s[31] s[75] calc_s[100]
calc_s[103] s[65] calc_s[30]
calc_s[3]
calc_s[99]
calc_s[17] s[62] calc_s[2] s[74] s[63] s[79] s[60] s[103]
calc_s[4] s[72] calc_s[31]
calc_s[100]
calc_s[103]
calc_s[30] s[64] calc_s[3] s[99] calc_s[99] s[77] calc_s[17]
calc_s[2] s[63] s[79] s[60] s[103]
calc_s[23]
calc_s[28]
guess
calc_s[31]
calc_s[100] s[78] calc_s[103]
calc_s[30] s[64] calc_s[3] s[99] calc_s[99]
calc_s[17] s[62] calc_s[2] s[74] s[79] s[60] s[103]
calc_s[4] s[72] calc_s[31] s[75] calc_s[100] s[78] calc_s[103] s[65] calc_s[30]
calc_s[3]
calc_s[99] s[77] calc_s[17]
calc_s[2] s[79]
s[103] s[60] calc_s[23]
guess s[74] **92 s[76] calc_s[28]
guess s[72] calc_s[31]
calc_s[100]
calc_s[103]
calc_s[30]
calc_s[3]
calc_s[99]
calc_s[17]
calc_s[2] s[68] calc_s[10] s[74] s[63] s[60] s[103]
calc_s[24]
calc_s[31] s[75] calc_s[100]
calc_s[103] s[65] calc_s[30] s[64] calc_s[3] s[99] calc_s[99] s[77] calc_s[17] s[62] calc_s[2] s[63]
s[103] s[60] calc_s[4]
calc_s[28]
guess s[72] calc_s[31] s[75] calc_s[100] s[78] calc_s[103] s[65] calc_s[30] s[64] calc_s[3] s[99] calc_s[99]
calc_s[17]
calc_s[2]
calc_s[10] s[74]
s[103] s[60] calc_s[24]
calc_s[31]
calc_s[100] s[78] calc_s[103]
calc_s[30]
calc_s[3]
calc_s[99] s[77] calc_s[17] s[62] calc_s[2]
s[103] s[60] calc_s[4] s[74] **83 s[79] **96 s[102] **87
guess s[76] calc_s[28]
guess s[72] calc_s[31] s[75] calc_s[100] s[78] calc_s[103] s[65] calc_s[30] s[64] calc_s[3]
calc_s[99]
calc_s[17]
calc_s[2] s[68] calc_s[10] s[79] s[63] s[104] s[60] s[103] calc_s[104]
calc_s[31]
calc_s[100] s[78] calc_s[103]
calc_s[30] s[64] calc_s[3] s[99] **67 s[63] s[103] s[60] s[104] calc_s[99]
calc_s[28]
guess s[72] calc_s[31]
calc_s[100]
calc_s[103]
calc_s[30]
calc_s[3] s[99] calc_s[99]
calc_s[17]
calc_s[2]
calc_s[10] s[79] s[103] s[60] s[104] calc_s[104]
calc_s[31] s[75] calc_s[100]
calc_s[103] s[65] calc_s[30]
calc_s[3] s[99] calc_s[99]
calc_s[17] s[62] calc_s[2] s[103] s[104] s[60] calc_s[4]
guess s[63] **103 s[74] **105 s[78] **106
guess s[74] **101 s[78] **102 s[76] calc_s[28] s[75] **100
guess
calc_s[31]
guess
calc_s[100]
calc_s[103] s[65] calc_s[30] s[64] calc_s[3] s[99] calc_s[99]
calc_s[17] s[62] calc_s[2] s[75] s[74] s[79] s[63] s[60]
calc_s[4] s[100] calc_s[100] s[78] calc_s[103]
calc_s[30] s[64] calc_s[3]
calc_s[99] s[77] calc_s[17] s[62] calc_s[2] s[74] s[63] s[79] s[60]
calc_s[4] s[72] calc_s[31]
guess
calc_s[30] s[75] calc_s[103]
calc_s[3]
calc_s[99] s[77] calc_s[17]
calc_s[2]
calc_s[100]
calc_s[10] s[78] s[63] s[104] s[79] s[60] calc_s[104] s[65] calc_s[30]
calc_s[103]
calc_s[3] s[99] calc_s[99]
calc_s[17]
calc_s[2] s[63] s[79] s[60] s[104] calc_s[23]
calc_s[28] s[78] **104
guess
calc_s[31]
guess s[65] calc_s[30]
calc_s[103]
calc_s[3] s[99] calc_s[99] s[77] calc_s[17] s[62] calc_s[2] s[78] s[74] s[79]
s[60]
calc_s[4]
calc_s[30] s[75] calc_s[103]
calc_s[3]
calc_s[99]
calc_s[17] s[62] calc_s[2] s[74] s[79] s[60]
calc_s[4] s[72] calc_s[31]
guess
calc_s[30] s[75] calc_s[103] s[64] calc_s[3]
calc_s[99]
calc_s[17]
calc_s[2] s[78]
s[60] s[79]
calc_s[23] s[65] calc_s[30]
calc_s[103] s[64] calc_s[3] s[99] calc_s[99] s[77] calc_s[17]
calc_s[2]
calc_s[100] s[68] calc_s[10] s[79] s[104] s[60] calc_s[104]
guess s[63] **109 s[78] **110 s[72] calc_s[31] s[78] **108
guess s[76] calc_s[28]
guess
calc_s[30] s[75] calc_s[103] s[64] calc_s[3] s[99] calc_s[99]
calc_s[17]
calc_s[2] s[78] s[63] s[60]
s[74]
calc_s[23] s[65] calc_s[30]
calc_s[103] s[64] calc_s[3]
calc_s[99] s[77] calc_s[17]
calc_s[2] s[100] calc_s[100]
calc_s[10] s[63] s[74]
s[60]
calc_s[24]
calc_s[28]
guess
calc_s[30] s[75] calc_s[103]
calc_s[3] s[99] calc_s[99] s[77] calc_s[17]
calc_s[2] s[100] calc_s[100] s[68] calc_s[10] s[78] s[74]
s[60]
calc_s[24] s[65] calc_s[30]
calc_s[103]
calc_s[3]
calc_s[99]
calc_s[17]
calc_s[2] s[74]
s[60]
calc_s[23]
calc_s[31] s[78] **112
guess s[76] calc_s[28]
guess s[65] calc_s[30]
calc_s[103]
calc_s[3]
calc_s[99] s[77] calc_s[17] s[62] calc_s[2] s[78] s[63]
s[60]
calc_s[4]
calc_s[30] s[75] calc_s[103]
calc_s[3] s[99] calc_s[99]
calc_s[17] s[62] calc_s[2] s[63]
s[60]
calc_s[4]
calc_s[28]
guess s[65] calc_s[30]
calc_s[103] s[64] calc_s[3]
calc_s[99]
calc_s[17] s[62] calc_s[2] s[78]
s[60]
calc_s[4]
calc_s[30] s[75] calc_s[103] s[64] calc_s[3] s[99] calc_s[99] s[77] calc_s[17] s[62] calc_s[2] s[104] s[60] calc_s[4]
guess s[74] **117 s[103] **119 s[78] **120 s[76] calc_s[28] s[103] **116
guess
guess
**101
calc_s[31]
**95 s[102] **85 s[103] s[74] s[60] s[63] **81
**113 s[74] s[63] s[60] **101
guess s[79] **118
**95 s[102] **85
guess s[72] calc_s[31] s[75] calc_s[100] s[78] calc_s[103] s[65] calc_s[30] s[64] calc_s[3]
calc_s[99]
calc_s[17]
calc_s[2] s[68] calc_s[10] s[79] s[103] s[60] s[63] calc_s[24]
calc_s[31]
calc_s[100] s[78] calc_s[103]
calc_s[30] s[64] calc_s[3] s[99] **67 s[103] s[63] s[60] calc_s[99]
**113 s[72] calc_s[31]
guess
calc_s[30] s[75] calc_s[103]
calc_s[3]
calc_s[99] s[77] calc_s[17]
calc_s[2]
calc_s[100]
calc_s[10] s[78] s[63] s[60] calc_s[24] s[65] calc_s[30]
calc_s[103]
calc_s[3] s[99] calc_s[99]
calc_s[17]
calc_s[2] s[63] s[60] calc_s[23]
calc_s[28] s[103] **122
guess
guess
**95 s[102] **87 s[103] s[74] s[60] **83
**111 s[74] s[60] **105
guess s[79] **124
**95 s[102] **87
guess s[72] calc_s[31]
calc_s[100]
calc_s[103]
calc_s[30]
calc_s[3] s[99] calc_s[99]
calc_s[17]
calc_s[2]
calc_s[10] s[79] s[103] s[60] calc_s[24]
calc_s[31] s[75] calc_s[100]
calc_s[103] s[65] calc_s[30]
calc_s[3] s[99] calc_s[99]
calc_s[17] s[62] calc_s[2] s[103] s[60] calc_s[4]
guess s[78] **106 s[72] calc_s[31] s[65] calc_s[30]
calc_s[103] s[64] calc_s[3] s[99] calc_s[99] s[77] calc_s[17]
calc_s[2]
calc_s[100] s[68] calc_s[10] s[79] s[60] calc_s[24] s[78] **114
calc_s[31]
calc_s[30] s[75] calc_s[103] s[64] calc_s[3] s[99] calc_s[99] s[77] calc_s[17] s[62] calc_s[2] s[60] calc_s[4] node66 s[60] learnt unit clause s[74] learnt unit clause
guess s[103] **134 s[63] **138 s[79] **140 s[78] **141
guess s[63] **130 s[79] **132 s[78] **133
guess s[79] **128 s[78] **129 s[76] calc_s[28] s[78] **127
guess s[72] calc_s[31]
guess
calc_s[30]
calc_s[103]
calc_s[3]
calc_s[99] s[77] calc_s[17] s[62] calc_s[2] s[78] s[79] s[63] s[74] s[103] calc_s[23] s[65] calc_s[30] s[75] calc_s[103]
calc_s[3] s[99] calc_s[99]
calc_s[17] s[62] calc_s[2] s[100] calc_s[100] s[68] calc_s[10] s[85] calc_s[85] s[79] s[63] s[74] s[103] calc_s[25]
calc_s[31]
guess s[65] calc_s[30] s[75] calc_s[103]
calc_s[3]
calc_s[99] s[77] calc_s[17]
calc_s[2] s[78] s[63] s[74] s[103] calc_s[4]
calc_s[30]
calc_s[103]
calc_s[3] s[99] calc_s[99]
calc_s[17]
calc_s[2] s[63] s[103] s[74] calc_s[4]
calc_s[28] s[78] **131
guess s[72] calc_s[31]
guess
calc_s[30]
calc_s[103] s[64] calc_s[3]
calc_s[99]
calc_s[17] s[62] calc_s[2] s[100] calc_s[100]
calc_s[10] s[85] calc_s[85] s[78] s[79] s[74] s[103] calc_s[25] s[65] calc_s[30] s[75] calc_s[103] s[64] calc_s[3] s[99] calc_s[99] s[77] calc_s[17] s[62] calc_s[2] s[79] s[103] s[74] calc_s[23]
calc_s[31]
guess
guess s[65] calc_s[30] s[75] calc_s[103] s[64] calc_s[3]
calc_s[99]
calc_s[17]
calc_s[2] s[78] s[103] s[74] calc_s[4]
calc_s[30]
calc_s[103] s[64] calc_s[3] s[99] calc_s[99] s[77] calc_s[17]
calc_s[2] s[103] s[74] calc_s[4]
guess s[79] **136 s[78] **137 s[76] calc_s[28] s[78] **135
guess s[72] calc_s[31]
guess
calc_s[30] s[75] calc_s[103] s[64] calc_s[3] s[99] calc_s[99] s[77] calc_s[17] s[62] calc_s[2] s[100] calc_s[100]
calc_s[10] s[85] calc_s[85] s[78] s[79] s[74] s[63] calc_s[25] s[65] calc_s[30]
calc_s[103] s[64] calc_s[3]
calc_s[99]
calc_s[17] s[62] calc_s[2] s[79] s[63] s[74] calc_s[23]
calc_s[31]
guess s[65] calc_s[30]
calc_s[103] s[64] calc_s[3] s[99] calc_s[99] s[77] calc_s[17]
calc_s[2] s[78] s[63] s[74] calc_s[4]
calc_s[30] s[75] calc_s[103] s[64] calc_s[3]
calc_s[99]
calc_s[17]
calc_s[2] s[63] s[74] calc_s[4]
calc_s[28] s[78] **139
guess s[72] calc_s[31]
guess
calc_s[30] s[75] calc_s[103]
calc_s[3] s[99] calc_s[99]
calc_s[17] s[62] calc_s[2] s[78] s[79] s[74] calc_s[23] s[65] calc_s[30]
calc_s[103]
calc_s[3]
calc_s[99] s[77] calc_s[17] s[62] calc_s[2] s[100] calc_s[100] s[68] calc_s[10] s[85] calc_s[85] s[79] s[74] calc_s[25]
calc_s[31]
guess s[65] calc_s[30]
calc_s[103]
calc_s[3] s[99] calc_s[99]
calc_s[17]
calc_s[2] s[78] s[74] calc_s[4]
calc_s[30] s[75] calc_s[103]
calc_s[3]
calc_s[99] s[77] calc_s[17]
calc_s[2] s[74] calc_s[4]
guess s[63] **145 s[79] **147 s[78] **148
guess s[79] **143 s[78] **144 s[76] calc_s[28] s[78] **142
guess
calc_s[31]
guess s[65] calc_s[30] s[75] calc_s[103] s[64] calc_s[3] s[99] calc_s[99]
calc_s[17]
calc_s[2] s[78] s[79] s[63] s[103] calc_s[4]
calc_s[30]
calc_s[103] s[64] calc_s[3]
calc_s[99] s[77] calc_s[17]
calc_s[2] s[79] s[63] s[103] calc_s[4] s[72] calc_s[31]
guess
calc_s[30]
calc_s[103] s[64] calc_s[3] s[99] calc_s[99]
calc_s[17] s[62] calc_s[2]
calc_s[100] s[68] calc_s[10]
calc_s[85] s[78] s[63] s[103] calc_s[16] s[65] calc_s[30] s[75] calc_s[103] s[64] calc_s[3]
calc_s[99] s[77] calc_s[17] s[62] calc_s[2] s[63] s[103] calc_s[23]
calc_s[28] s[78] **146
guess
calc_s[31]
guess s[65] calc_s[30] s[75] calc_s[103]
calc_s[3] s[99] calc_s[99] s[77] calc_s[17]
calc_s[2] s[78] s[79] s[103] calc_s[4]
calc_s[30]
calc_s[103]
calc_s[3]
calc_s[99]
calc_s[17]
calc_s[2] s[79] s[103] calc_s[4] s[72] calc_s[31]
guess
calc_s[30]
calc_s[103]
calc_s[3] s[99] calc_s[99] s[77] calc_s[17] s[62] calc_s[2] s[78] s[103] calc_s[23] s[65] calc_s[30] s[75] calc_s[103]
calc_s[3]
calc_s[99]
calc_s[17] s[62] calc_s[2]
calc_s[100]
calc_s[10]
calc_s[85]
calc_s[92]
calc_s[18] s[93] calc_s[93]
calc_s[104]
calc_s[83] s[87] calc_s[87] s[96] calc_s[96]
calc_s[102] s[81] calc_s[81] s[97] calc_s[97]
calc_s[90]
calc_s[98]
calc_s[82]
calc_s[88]
calc_s[84]
calc_s[101] s[80] calc_s[80]
calc_s[94]
calc_s[95] s[89] calc_s[89]
calc_s[91]
calc_s[86] MODEL
Immobilizer ¡vicRm ¡2: ¡Hitag2 ¡is ¡vulnerable ¡to ¡cryptanalysis ¡
17 ¡
SAT ¡solving ¡(“smart ¡brute ¡force”) ¡solves ¡Hitag2 ¡system ¡of ¡equaRons ¡in ¡minutes ¡ Tree ¡of ¡key ¡guesses; ¡ compare ¡to ¡248 ¡guesses ¡ needed ¡for ¡brute ¡force ¡
SLIDE 18 Immobilizer ¡vicRm ¡3: ¡Megamos ¡uses ¡insecure ¡authenRcaRon ¡ protocol ¡
18 ¡
Standard ¡mutual ¡authen*ca*on ¡ requires ¡three ¡messages ¡ Megamos ¡“op*mizes” ¡protocol ¡to ¡
- nly ¡require ¡two ¡messages ¡
Car ¡ Transponder ¡ Challenge ¡ Counter-‑response ¡ Response ¡ Counter-‑challenge ¡ Car ¡ Transponder ¡ Challenge ¡ Response ¡ Counter-‑response ¡ If ¡the ¡key ¡is ¡not ¡present, ¡the ¡protocol ¡ does ¡not ¡disclose ¡any ¡informaRon ¡ Key ¡is ¡not ¡needed ¡to ¡collect ¡breakable ¡ challenge-‑response ¡pairs! ¡
§ Key ¡cloning ¡ § Key ¡cloning ¡ § Car ¡theV ¡with ¡no ¡access ¡to ¡key! ¡
A<ack ¡ surface ¡
SLIDE 19
Megamos ¡immobilizers ¡are ¡insecure ¡based ¡on ¡two ¡bugs ¡
19 ¡
Clone ¡car ¡key ¡you ¡ ¡ already ¡possess ¡ Cipher ¡has ¡insufficient ¡ algebraic ¡complexity ¡ Steal ¡car ¡with ¡no ¡key ¡ Car ¡volunteers ¡ciphertext ¡ 1 ¡ 2 ¡ Result ¡ Risk ¡
SLIDE 20
Agenda ¡
20 ¡
§ A ¡risk ¡perspecRve ¡on ¡cryptography ¡ § Breaking ¡silence ¡– ¡ ¡ Algebraic ¡a9acks ¡on ¡RFIDs ¡ § Ciphering ¡the ¡predictable ¡– ¡ ¡ Rainbows ¡against ¡mobile ¡crypto ¡
SLIDE 21
GSM ¡uses ¡symmetric ¡64-‑bit ¡A5/1 ¡session ¡keys ¡for ¡call ¡privacy ¡
Operator ¡Home ¡ Loca*on ¡Register ¡ Base ¡sta*on ¡ Cell ¡phone ¡ Random ¡ nonce ¡ and ¡ session ¡ key ¡ Random ¡nonce ¡ with ¡session ¡key ¡ CommunicaRon ¡ A5/1-‑encrypted ¡ Operator ¡and ¡ phone ¡share ¡a ¡ master ¡key ¡to ¡de-‑ ¡ rive ¡session ¡keys ¡ Hash ¡ funcRon ¡ Random ¡nonce ¡ Master ¡key ¡ Session ¡key ¡ We ¡want ¡to ¡ crack ¡this ¡key ¡
21 ¡
SLIDE 22
Pre-‑computaRon ¡tables ¡store ¡the ¡computed ¡A5/1 ¡code ¡book ¡in ¡ condensed ¡form ¡
The ¡uncondensed ¡code ¡book ¡is ¡100’s ¡of ¡Petabyte. ¡Tables ¡provide ¡a ¡ trade-‑off: ¡Longer ¡chains ¡:= ¡ ¡a) ¡less ¡storage, ¡b) ¡longer ¡a9ack ¡Rme ¡ Collision ¡ 2F06 ¡ B951 ¡ A8F3 ¡ 49A6 ¡ 503A ¡ CAF3 ¡ CAF3 ¡ 118F ¡ F ¡ F ¡ F ¡ F ¡ F ¡ F ¡ F ¡ F ¡ F ¡ F ¡ F ¡ F ¡ OCFE ¡ 77CF ¡ 77CF ¡ B33F ¡ E233 ¡ DB18 ¡ 22CB ¡ 87A4 ¡
22 ¡
SLIDE 23
Table ¡opRmizaRon ¡1: ¡ ¡ DisRnguished ¡point ¡tables ¡save ¡hard ¡disk ¡lookups ¡
Only ¡one ¡hard ¡disk ¡access ¡needed ¡instead ¡of ¡one ¡for ¡each ¡chain ¡link ¡ B0F0 ¡ 44B2 ¡ BEFO ¡ F415 ¡ 302F ¡ 44B2 ¡ F ¡ F ¡ F ¡ F ¡ F ¡ F ¡ F ¡ F ¡ Collision ¡ 7707 ¡ CA06 ¡ 6100 ¡ A200 ¡ A200 ¡ B400 ¡
23 ¡
SLIDE 24
Table ¡opRmizaRon ¡2: ¡ ¡ Rainbow ¡tables ¡miRgate ¡the ¡effect ¡of ¡collisions ¡
E233 ¡ 44B2 ¡ BBA8 ¡ 1B22 ¡ DB18 ¡ ODE3 ¡ 44B2 ¡ 5DE2 ¡ 22CB ¡ 6C7A ¡ 55D2 ¡ 922A ¡ 87A4 ¡ 11F6 ¡ 362E ¡ C7D5 ¡ F1 ¡ F2 ¡ F3 ¡ F1 ¡ F2 ¡ F3 ¡ F1 ¡ F2 ¡ F3 ¡ F1 ¡ F2 ¡ F3 ¡ Collision ¡ Rainbow ¡tables ¡have ¡no ¡mergers, ¡but ¡quadraRcally ¡growing ¡a9ack ¡Rme ¡
24 ¡
SLIDE 25
GSM ¡calls ¡and ¡SMS ¡are ¡insecure ¡based ¡on ¡two ¡bugs ¡
25 ¡
Key ¡can ¡be ¡brute-‑forced ¡ (in ¡days), ¡but ¡based ¡on ¡ what ¡data? ¡ TransacRons ¡are ¡ encrypted ¡with ¡64 ¡bit ¡ session ¡keys ¡ Session ¡key ¡can ¡be ¡ looked ¡up ¡in ¡rainbow ¡ tables ¡in ¡seconds ¡ Back-‑clockable ¡stream ¡ cipher ¡is ¡used ¡to ¡encrypt ¡ predictable ¡texts ¡ 1 ¡ 2 ¡ Result ¡ Risk ¡
SLIDE 26 SIM ¡cards ¡are ¡managed ¡through ¡OTA ¡protocol, ¡whose ¡error ¡ handling ¡is ¡underspecified ¡
26 ¡
A<acker ¡ probes ¡cards ¡ to ¡gain ¡ material ¡for ¡ DES ¡key ¡ cracking ¡ ¡
¡* ¡EsRmated ¡from ¡a ¡geographically ¡skewed ¡measurement ¡set ¡
SIM ¡card ¡ ¡ with ¡DES ¡ ¡ key ¡ ¡ (prevalence ¡of ¡DES ¡ keys ¡varies ¡between ¡
to ¡100%) ¡ Binary ¡SMS ¡communica*on ¡ Command ¡with ¡ wrong ¡signature ¡ Use: ¡DES ¡ signature ¡ Request: ¡DES ¡ signature ¡ Response ¡to ¡mal-‑signed ¡request ¡differs ¡by ¡card ¡type ¡
- c. (25%*) ¡
- b. (50%*) ¡
- a. (25%* ¡ ¡
- f ¡cards) ¡
(No ¡response) ¡ Error ¡message ¡ DES ¡ signature ¡ Error ¡message ¡ SomeRmes ¡ with ¡all-‑zeros ¡ signatures ¡ Data ¡useable ¡for ¡key ¡cracking ¡
SLIDE 27
Java ¡virus ¡has ¡have ¡access ¡to ¡lots ¡of ¡abusable ¡funcRonality ¡
27 ¡
OTA-‑deployed ¡SIM ¡virus ¡can ¡access ¡SIM ¡Toolkit ¡API ¡ Standard ¡STK ¡func*on ¡ Abuse ¡poten*al ¡ Send ¡SMS ¡ § Premium ¡SMS ¡fraud ¡ Dial ¡phone ¡numbers, ¡send ¡ DTMF ¡tones ¡ § Circumvent ¡caller-‑ID ¡checks ¡ § Mess ¡with ¡voice ¡mail ¡ Send ¡USSD ¡numbers ¡ § Redirect ¡incoming ¡calls; ¡someRmes ¡also ¡SMS ¡ § Abuse ¡USSD-‑based ¡payment ¡schemes ¡ Query ¡phone ¡loca*on ¡and ¡ seBngs ¡ § Track ¡vicRm ¡ Open ¡URL ¡in ¡phone ¡browser ¡ § Phishing ¡ § Malware ¡deployment ¡to ¡phone ¡ § Any ¡other ¡browser-‑based ¡a9ack ¡
SLIDE 28 SIM ¡cards ¡are ¡insecure ¡based ¡on ¡several ¡bugs ¡
28 ¡
Intercept ¡management ¡ SMS ¡locally, ¡break ¡key, ¡ manage ¡card ¡ SIMs ¡are ¡managed ¡using ¡ 56 ¡bit ¡DES ¡keys ¡by ¡some ¡
Remote ¡persistent ¡SIM ¡ infecRon ¡ Same ¡key ¡is ¡used ¡in ¡both ¡ direcRons; ¡some ¡cards ¡ sign ¡error ¡messages ¡ Remote ¡SIM ¡cloning ¡ (Some) ¡SIMs ¡java ¡VM ¡is ¡ exploitable ¡ 1 ¡ 2 ¡ 3 ¡ Result ¡ Risk ¡
SLIDE 29 ¡ ¡ ¡ ¡ ¡For ¡some ¡cards, ¡even ¡3DES ¡keys ¡are ¡crackable ¡
29 ¡
Downgrade ¡a<ack ¡flow ¡ Some ¡SIM ¡ ¡ cards ¡with ¡ ¡ 3DES ¡key ¡ ¡ use ¡lower ¡signature ¡ schemes ¡when ¡ requested ¡(in ¡violaRon ¡
¡* ¡Must ¡be ¡brute-‑forced; ¡Rainbow ¡table ¡a9ack ¡no ¡longer ¡possible ¡
A<acker ¡ Command ¡ Request ¡DES-‑signed ¡ response ¡(KID ¡= ¡1) ¡ ¡ ¡Error ¡ DES-‑signed ¡ Command ¡ Request ¡2-‑key ¡3DES ¡ response ¡ ¡(KID ¡= ¡5) ¡ ¡ ¡Error ¡ 2-‑key ¡3DES-‑signed ¡ Command ¡ Request ¡3-‑key ¡3DES ¡ response ¡ ¡(KID ¡= ¡9) ¡ ¡ ¡Error ¡ 3-‑key ¡3DES-‑signed ¡ 56 ¡ bit ¡ 56 ¡ bit ¡ 56 ¡ bit ¡ Crack ¡first ¡ third ¡of ¡key ¡ Crack ¡ second ¡ third* ¡ Crack ¡ ¡ final ¡ third* ¡ 3-‑key ¡3DES ¡ 2-‑key ¡3DES ¡ DES ¡ 4 ¡
SLIDE 30
Is ¡3G ¡broken ¡yet? ¡
30 ¡
None? ¡3G ¡only ¡encrypts ¡very ¡short ¡ messages ¡ Cipher ¡in ¡3G ¡can ¡be ¡cracked ¡based ¡on ¡ large ¡ciphertext ¡samples ¡ Result ¡ Risk ¡
SLIDE 31
Managing ¡IT ¡security ¡risks ¡should ¡involve ¡three ¡perspecRves ¡
31 ¡
Hacker ¡ IncenRve ¡ Risk ¡ Research ¡ Vulnerability ¡ Damage ¡ Industry ¡
QuesRons? ¡
Karsten ¡Nohl ¡<nohl@srlabs.de> ¡ ¡