In-‑depth ¡crypto ¡a9acks ¡ It ¡always ¡takes ¡two ¡bugs ¡ Karsten ¡Nohl ¡<nohl@srlabs.de> ¡ SRLabs ¡Template ¡v11 ¡
Agenda ¡ § A ¡risk ¡perspec*ve ¡on ¡cryptography ¡ § Breaking ¡silence ¡– ¡ ¡ Algebraic ¡a9acks ¡on ¡RFIDs ¡ § Ciphering ¡the ¡predictable ¡– ¡ ¡ Rainbows ¡against ¡mobile ¡crypto ¡ 2 ¡
Risks ¡summarize ¡hacker, ¡research, ¡and ¡corporate ¡viewpoints ¡ Research ¡perspec*ve ¡ Vulnerability ¡ Risk ¡ Infosec ¡perspec*ve ¡ Probability ¡ Damage ¡ Risk ¡ 3 ¡
Risks ¡summarize ¡hacker, ¡research, ¡and ¡corporate ¡viewpoints ¡ Hacker ¡view ¡ Research ¡view ¡ IncenRve ¡ Vulnerability ¡ Infosec ¡ Probability ¡ Damage ¡ Risk ¡ view ¡ 4 ¡
Agenda ¡ § A ¡risk ¡perspecRve ¡on ¡cryptography ¡ § Breaking ¡silence ¡– ¡ ¡ Algebraic ¡a<acks ¡on ¡RFIDs ¡ § Ciphering ¡the ¡predictable ¡– ¡ ¡ Rainbows ¡against ¡mobile ¡crypto ¡ 5 ¡
Mifare ¡Classic ¡RFID ¡tags ¡try ¡to ¡hide ¡secret ¡cipher ¡in ¡silicon ¡die ¡ 6 ¡
7 ¡
Reverse-‑engineering ¡is ¡supported ¡by ¡ degate ¡soXware ¡ 8 ¡
degate ¡outputs ¡synthesizable ¡code ¡that ¡can ¡be ¡visualized ¡and ¡ emulated ¡with ¡standard ¡chip ¡design ¡tools ¡ 31 − OAI dronf dronf 1 − B − ~C 1+3 pass 21 − OAI MUXINV 2+4 fasel NOR( a, dronf dronf 22 − OA (bcde)) 9 ¡
Mifare ¡reader ¡is ¡authenRcated ¡first ¡ Mutual ¡authen*ca*on ¡a9ests ¡knowledge ¡of ¡ k ¡ Mifare ¡RFID ¡tag ¡ Reader ¡ rand ¡ enc k (rand’ ¡|| ¡checksum) ¡ enc k (rand’’ ¡|| ¡checksum) ¡ Original ¡a9ack: ¡Compute ¡secret ¡key ¡from ¡one ¡ captured ¡mutual ¡authenRcaRon, ¡within ¡seconds ¡ 10 ¡
Mifare ¡RFIDs ¡are ¡insecure ¡based ¡on ¡two ¡bugs ¡ Result ¡ Risk ¡ 1 ¡ Clone ¡your ¡own ¡cards ¡ at ¡ Mifare ¡cards ¡use ¡an ¡easily ¡ legit ¡reader ¡(and ¡ breakable ¡stream ¡cipher ¡ maybe ¡others’, ¡too) ¡ 2 ¡ The ¡cards ¡disclose ¡ Clone ¡others’ ¡cards ¡just ¡ encrypted ¡texts ¡to ¡a ¡ siBng ¡next ¡to ¡them ¡ rogue ¡reader ¡ 11 ¡
Immobilizers ¡are ¡the ¡first ¡applicaRon ¡of ¡IT ¡security ¡to ¡cars ¡ Chip ¡ 12 ¡
Immobilizers ¡are ¡simple ¡challenge-‑response ¡tokens ¡ Car ¡key ¡with ¡ Car ¡ Antenna ¡ immobilizer ¡ controller ¡ (someRmes ¡ trans-‑ (ECU) ¡ incl. ¡immo-‑ ponder ¡ ¡ bilizer ¡chip) ¡ ¡ Challenge : ¡Random ¡number ¡ Car ¡start ¡ Response : ¡EncrypRon ¡of ¡random ¡# ¡ Counter-‑ challenge : ¡Second ¡random ¡# ¡ Response : ¡Both ¡random ¡numbers ¡ AddiRonal ¡ encrypted ¡together ¡ immobilizer ¡ funcRonality ¡ Write ¡to ¡transponder, ¡etc. ¡ 13 ¡
Three ¡technologies ¡dominate ¡the ¡immobilizer ¡market ¡ Advanced ¡EM ¡Micro ¡ Market ¡share ¡ NXP ¡ Hitag ¡AES ¡ (# ¡of ¡vehicle ¡brands) ¡ TI ¡DST ¡80 ¡ TI ¡ DST ¡40 ¡ 40 ¡bit ¡block ¡cipher ¡ Philips/NXP ¡ Hitag ¡2 ¡ 48 ¡bit ¡stream ¡cipher ¡ EM ¡Micro ¡ Megamos ¡ 96 ¡bit ¡stream ¡cipher ¡ 1997 ¡ 1999 ¡ 2001 ¡ 2003 ¡ 2005 ¡ 2007 ¡ 2009 ¡ 2011 ¡ 14
Immobilizer ¡vicRm ¡1: ¡DST40 ¡keys ¡are ¡vulnerable ¡to ¡brute-‑force ¡ Serious ¡FPGA ¡ compuRng ¡ power ¡takes ¡ one ¡hour ¡to ¡ find ¡secret ¡ DST40 ¡key ¡ 15 ¡
The ¡crux ¡of ¡most ¡weak ¡ciphers ¡is ¡too ¡little ¡non-‑linearity ¡ § 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 ¡ tmp = x[12]^x[15]^x[16]^x[17]; � for (i=17:-1:1) x[i]=x[i-1]; � x[0] = tmp; � 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 ¡
Recommend
More recommend