roo2ng sim cards
play

Roo2ng SIM cards The SRLabs Team SRLabs Template v12 - PowerPoint PPT Presentation

Roo2ng SIM cards The SRLabs Team SRLabs Template v12 SIM cards are fully programmable computer systems Applica'ons on modern SIM card Smartcard with


  1. Roo2ng ¡SIM ¡cards ¡ The ¡SRLabs ¡Team ¡ SRLabs ¡Template ¡v12 ¡

  2. SIM ¡cards ¡are ¡fully ¡programmable ¡computer ¡systems ¡ Applica'ons ¡on ¡modern ¡SIM ¡card ¡ Smartcard ¡with ¡real-­‑2me ¡opera2ng ¡system ¡ Basic ¡func'ons ¡ Simple ¡file ¡system ¡ Java ¡virtual ¡machine ¡ § Iden2fica2on ¡(IMSI) ¡ § Address ¡book ¡ Custom ¡Java ¡apps ¡ ¡ § Authen2ca2on ¡(Ki ¡& ¡ § SMS ¡messages ¡ § Roaming ¡mgmt ¡ Hash ¡func2on) ¡ § Session ¡keys ¡ § Payment ¡ § Tracking ¡ 2 ¡

  3. SIM ¡security ¡involves ¡many ¡layers ¡from ¡smartcards ¡to ¡cryptography ¡ and ¡Java ¡process ¡separa2on ¡ SIM ¡card ¡includes ¡various ¡protec'on ¡mechanisms ¡ B ¡ Applica'on ¡separa'on: ¡ ¡ User ¡authen'ca'on ¡ Java ¡VM ¡sand ¡boxing ¡ by ¡simple ¡comparison ¡ PIN/PUK ¡ numbers ¡ Individual ¡protec2on ¡ … ¡ logic ¡for ¡banking ¡ SIM ¡authen'ca'on ¡ applets, ¡iden2fica2on ¡ by ¡cryptographic ¡hash ¡func2on ¡ applets, ¡etc. ¡ (oLen ¡Comp128 ¡in ¡GSM; ¡ ¡ Ki ¡ Milenage ¡in ¡3G/4G) ¡ ¡ ¡ ¡Secure ¡Java ¡deployment ¡ A ¡ using ¡DES/3DES/AES ¡ OTA ¡ signature ¡+ ¡encryp2on ¡ keys ¡ Storage ¡protec'on ¡ Java ¡crypto ¡API: ¡DES/3DES/AES; ¡ through ¡proprietary ¡smartcard ¡ some2mes ¡RSA ¡ security ¡mechanisms ¡ 3 ¡

  4. Agenda ¡ SIM ¡card ¡background ¡ § GeDng ¡on ¡to ¡the ¡SIM ¡ A ¡ B ¡ § Stealing ¡SIM ¡secrets ¡ 4 ¡

  5. OTA ¡security ¡level ¡is ¡chosen ¡by ¡server ¡while ¡SIM ¡ ILLUSTRATIVE ¡ enforces ¡mandatory ¡minimum ¡level ¡ Binary ¡SMS ¡communica'on ¡ SIM ¡card ¡ stores ¡mul2ple ¡ ¡ OTA ¡server ¡ Target ¡app ¡/ ¡key ¡set ¡# ¡ key ¡sets, ¡possibly ¡with ¡ ¡ ini2ates ¡ Command ¡ – ¡ Used ¡ Reque-­‑ different ¡protec2on ¡levels ¡ remote ¡ possibly ¡ security ¡ sted ¡ transac2on ¡ Key ¡set ¡3 ¡ encrypted ¡ level ¡ security ¡ and/or ¡ level ¡ Key ¡set ¡2 ¡ signed ¡ Key ¡set ¡1 ¡ Man-­‑ ¡ datory ¡ DES ¡ 3DES ¡ AES ¡ Response ¡ protected ¡ Encry-­‑ ¡ ¡ ¡ according ¡to ¡request, ¡ p2on ¡ but ¡not ¡below ¡minimum ¡ Signa-­‑ ¡ level ¡stored ¡on ¡card ¡ ü ture ¡ 5 ¡

  6. OTA ¡error ¡handling ¡is ¡underspecified, ¡possibly ¡opening ¡acack ¡ surface ¡ Binary ¡SMS ¡communica'on ¡ SIM ¡ card ¡ ¡ AOacker ¡ Command ¡ with ¡ Use: ¡DES ¡ Request: ¡DES ¡ with ¡DES ¡ ¡ probes ¡cards ¡ wrong ¡signature ¡ signature ¡ signature ¡ key ¡ ¡ to ¡gain ¡ (prevalence ¡of ¡DES ¡ material ¡for ¡ keys ¡varies ¡between ¡ DES ¡key ¡ Response ¡to ¡mal-­‑signed ¡request ¡differs ¡by ¡card ¡type ¡ operators; ¡can ¡be ¡up ¡ cracking ¡ ¡ to ¡100%) ¡ a. (25%* ¡ ¡ (No ¡response) ¡ of ¡cards) ¡ Some2mes ¡ b. (50%*) ¡ Error ¡message ¡ with ¡all-­‑zeros ¡ signatures ¡ DES ¡ c. (25%*) ¡ Error ¡message ¡ signature ¡ Data ¡useable ¡for ¡key ¡cracking ¡ 6 ¡ ¡* ¡Es2mated ¡from ¡rela2vely ¡small ¡and ¡geographically ¡skewed ¡measurement ¡set ¡

  7. OTA ¡DES ¡do ¡not ¡withstand ¡key ¡cracking ¡ Challenge: ¡ Derive ¡56 ¡bit ¡DES ¡key ¡from ¡OTA ¡response ¡signature ¡ Cracking ¡strategies ¡ Investment ¡ Cracking ¡'me ¡ EUR ¡1.000 ¡ 6 ¡months ¡ Be ¡pa'ent ¡ Brute ¡force ¡on ¡GPU ¡ EUR ¡50.000 ¡ 1 ¡day ¡ Throw ¡money ¡at ¡it ¡ Brute ¡force ¡on ¡FPGA ¡cluster ¡ EUR ¡1.500 ¡+ ¡ ¡ 1 ¡minute ¡ ¡ Ride ¡the ¡rainbow ¡ 1 ¡year ¡pre-­‑computa2on ¡ (but ¡<100% ¡success ¡rate) ¡ Time-­‑memory ¡trade-­‑off ¡ using ¡large ¡hard ¡disks ¡& ¡GPU ¡ Only ¡possible ¡when ¡OTA ¡ response ¡is ¡fully ¡predictable ¡ 7 ¡

  8. Acacker ¡SMS ¡asks ¡for ¡DES-­‑signed ¡SMS ¡response ¡with ¡fully ¡ predictable ¡content ¡ Acack-­‑specific ¡features ¡ Command ¡packet ¡ is ¡sent ¡by ¡the ¡acacker ¡to ¡provoke ¡response ¡ UDHI ¡ PID ¡ DCS ¡ UDH ¡ CPL ¡ CH L ¡ SPI ¡ KIc ¡ KID ¡ TAR ¡ CNTR ¡ PCNTR ¡ CC ¡ Data ¡ 1 ¡ 127 ¡ 246 ¡ 027000 ¡ Packet ¡ Header ¡ § No ¡ciphering ¡ No ¡ DES ¡ App ¡ 01 ¡ Padding ¡ Rand. ¡ Generic ¡ length ¡ length ¡ § Sign ¡ cipher ¡ signature ¡ counter ¡ invalid ¡ command ¡ § PoR ¡request ¡ Packet ¡details: ¡ 0 ¡ 0 ¡ 0 ¡ 1 ¡ 0 ¡ 0 ¡ 1 ¡ 0 ¡ 0 ¡ 0 ¡ 1 ¡ 0 ¡ 1 ¡ 0 ¡ 0 ¡ 1 ¡ § No ¡ciphering ¡ § Do ¡not ¡cipher ¡PoR ¡ § Cryptographic ¡ § Sign ¡PoR ¡ checksum ¡ § Send ¡PoR ¡in ¡any ¡case ¡ Response ¡packet ¡ No ¡ may ¡offer ¡acack ¡surface ¡ response ¡ –or ¡– ¡ UDH ¡ RPL ¡ RHL ¡ TAR ¡ CNTR ¡ PCNTR ¡ Status ¡Code ¡ CC ¡ Data ¡ 027100 ¡ Packet ¡ ¡ Header ¡ App ¡ 01 ¡ Padding ¡ Status ¡Code ¡ Crypto-­‑ Response ¡ length ¡ length ¡ counter ¡ Checksum ¡ Signature ¡over ¡predictable ¡data ¡useable ¡ for ¡rainbow ¡table ¡key ¡cracking ¡ 8 ¡

  9. Pre-­‑computa2on ¡tables ¡store ¡DES ¡code ¡book ¡in ¡condensed ¡form ¡ K ¡ K ¡ K ¡ E233 ¡ 2F06 ¡ 503A ¡ OCFE ¡ K ¡ K ¡ K ¡ DB18 ¡ B951 ¡ CAF3 ¡ 77CF ¡ K ¡ K ¡ K ¡ Collision ¡ 22CB ¡ A8F3 ¡ CAF3 ¡ 77CF ¡ K ¡ K ¡ K ¡ 87A4 ¡ 49A6 ¡ 118F ¡ B33F ¡ The ¡uncondensed ¡code ¡book ¡is ¡petabytes ¡in ¡size. ¡Tables ¡provide ¡a ¡ trade-­‑off: ¡ Longer ¡chains ¡:= ¡ ¡less ¡storage, ¡but ¡also ¡longer ¡acack ¡2me ¡ 9 ¡

  10. Table ¡op2miza2on: ¡Rainbow ¡tables ¡mi2gate ¡the ¡effect ¡of ¡collisions ¡ K 1 ¡ K 2 ¡ K 3 ¡ E233 ¡ 44B2 ¡ BBA8 ¡ 1B22 ¡ Collision ¡ K 1 ¡ K 2 ¡ K 3 ¡ DB18 ¡ ODE3 ¡ 44B2 ¡ 5DE2 ¡ K 1 ¡ K 2 ¡ K 3 ¡ 22CB ¡ 6C7A ¡ 55D2 ¡ 922A ¡ K 1 ¡ K 2 ¡ K 3 ¡ 87A4 ¡ 11F6 ¡ 362E ¡ C7D5 ¡ Rainbow ¡tables ¡have ¡no ¡mergers, ¡but ¡an ¡exponen2ally ¡higher ¡acack ¡2me ¡ 10 ¡ Source:c ’ t ¡

  11. Video ¡and ¡live ¡demo: ¡Remotely ¡cracking ¡OTA ¡key ¡ 11 ¡ Video ¡source: ¡hcp://www.heise.de/security/ar2kel/DES-­‑Hack-­‑exponiert-­‑Millionen-­‑SIM-­‑Karten-­‑1920898.html ¡ ¡

  12. OTA ¡acacks ¡extend ¡beyond ¡DES ¡signatures ¡ Many ¡mobile ¡operators ¡responded ¡to ¡the ¡looming ¡SIM ¡hacking ¡risk ¡considerate ¡and ¡faster ¡than ¡ we ¡could ¡have ¡wished ¡for ¡others ¡(too?) ¡quickly ¡concluded ¡they ¡were ¡not ¡affected ¡ Recent ¡operator ¡statements ¡ Does ¡it ¡make ¡sense? ¡ § No. ¡ Encryp2ng ¡a ¡known ¡plaintext ¡with ¡DES ¡is ¡as ¡bad ¡ We ¡use ¡encryp2on ¡instead ¡of ¡signa-­‑ as ¡signing ¡it. ¡Even ¡when ¡both ¡are ¡required, ¡the ¡ tures; ¡the ¡acack ¡does ¡not ¡apply ¡here ¡ acack ¡s2ll ¡applies ¡(but ¡needs ¡two ¡rainbow ¡tables) ¡ ¡ § No. ¡ virtually ¡all ¡SIMs ¡are ¡Java ¡cards. ¡Even ¡if ¡you ¡are ¡ not ¡using ¡those ¡capabili2es, ¡an ¡acacker ¡may ¡(and ¡ We ¡don’t ¡even ¡use ¡OTA ¡ will ¡probably ¡find ¡that ¡you ¡never ¡cared ¡to ¡update ¡ the ¡keys ¡of ¡this ¡virtual ¡waste ¡land) ¡ ¡ § Maybe. ¡ 3DES ¡is ¡good, ¡but ¡have ¡you ¡… ¡ – … ¡made ¡sure ¡to ¡use ¡full ¡entropy ¡112/168 ¡bit ¡keys ¡ We ¡only ¡use ¡3DES ¡ instead ¡of ¡mul2ple ¡copies ¡of ¡a ¡56 ¡bit ¡key? ¡ – … ¡changed ¡all ¡the ¡standard ¡keys? ¡ – … ¡heard ¡of ¡ downgrade ¡a*acks ? ¡ 12 ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend