security threats and mi0ga0ons for ios developers
play

Security threats and mi0ga0ons for iOS developers Emil - PowerPoint PPT Presentation

Security threats and mi0ga0ons for iOS developers Emil Kvarnhammar www.truesecdev.com Twi=er: @emilkvarnhammar Isnt iOS secure? Q1 2014 : goto fail; Q4


  1. Security ¡threats ¡and ¡mi0ga0ons ¡ for ¡iOS ¡developers ¡ Emil ¡Kvarnhammar ¡ www.truesecdev.com ¡ Twi=er: ¡@emilkvarnhammar ¡

  2. Isn’t ¡iOS ¡secure? ¡

  3. Q1 ¡2014 ¡: ¡goto ¡fail; ¡

  4. Q4 ¡2014 ¡: ¡Wirelurker ¡(Masque ¡a9acks) ¡

  5. Q2 ¡2015 ¡: ¡New ¡Masque ¡A9acks ¡

  6. Q3 ¡2015 ¡: ¡AirDrop ¡vulnerability ¡

  7. Q3 ¡2015 ¡: ¡Xcode ¡Ghost ¡

  8. Xcode ¡Ghost ¡

  9. From ¡an ¡a=acker’s ¡point ¡of ¡view ¡

  10. What’s ¡of ¡interest? ¡ • ExtracMng ¡app ¡data ¡ – Creden0als, ¡Documents, ¡Email ¡etc. ¡ • Execute ¡code ¡ – Impersonate ¡legi0mate ¡apps ¡ – Steal ¡app ¡data ¡ – Phishing ¡(creden0als, ¡credit ¡card ¡details ¡etc.) ¡ – Command ¡& ¡Control ¡(botnets ¡etc.) ¡

  11. What ¡are ¡the ¡security ¡mechanisms? ¡

  12. What ¡are ¡the ¡security ¡mechanisms? ¡ 1. ¡App ¡store ¡review ¡

  13. What ¡are ¡the ¡security ¡mechanisms? ¡ 2. ¡Mandatory ¡code ¡signing ¡

  14. Used ¡to ¡bypass ¡app ¡store ¡review! ¡

  15. What ¡are ¡the ¡security ¡mechanisms? ¡ 3. ¡Sandboxing ¡

  16. Sandboxing ¡ • Enforced ¡by ¡plaXorm ¡ • Break-­‑out ¡vulnerabili0es ¡in ¡almost ¡all ¡versions ¡ – Used ¡by ¡jailbreaks ¡ – App ¡store ¡is ¡an ¡extra ¡safety ¡net ¡ • Cross-­‑app ¡access ¡ – Extensions ¡ – Custom ¡URI ¡scheme ¡

  17. What ¡are ¡the ¡security ¡mechanisms? ¡ 4. ¡Data ¡protec0on ¡(at ¡rest) ¡

  18. Data ¡protec0on ¡ • Default ¡encryp0on ¡since ¡iOS ¡8 ¡(if ¡passcode ¡set) ¡ – NSFileProtec0onComplete* ¡flags ¡ • A=acks ¡ – Backups ¡(iCloud ¡or ¡iTunes) ¡ – Jailbreak ¡ – Masque ¡a=acks ¡

  19. Preven0ng ¡backup ¡of ¡file ¡ BOOL ¡success ¡= ¡[URL ¡setResourceValue: ¡[NSNumber ¡numberWithBool: ¡YES] ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡forKey: ¡NSURLIsExcludedFromBackupKey ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡error: ¡&error]; ¡ h=ps://developer.apple.com/library/ios/qa/qa1719/_index.html ¡

  20. Keychain ¡items ¡ Use ¡*ThisDeviceOnly ¡access ¡keys ¡ ¡ Example: ¡kSecA=rAccessibleAperFirstUnlockThisDeviceOnly ¡ ¡

  21. What ¡are ¡the ¡security ¡mechanisms? ¡ 5. ¡App ¡Transport ¡Security ¡

  22. SSL/TLS ¡ AuthenMcity ¡ ConfidenMality ¡ Integrity ¡ Cert ¡is ¡validated ¡against ¡ trusted ¡CA ¡certs ¡in ¡client ¡ Client ¡ Server ¡ Client ¡Hello ¡ Server ¡Hello, ¡Cer0ficate ¡etc. ¡ Client ¡Key ¡Exchange ¡etc. ¡ Change ¡Cipher ¡Spec ¡ Applica0on ¡data ¡

  23. App ¡Transport ¡Security ¡ • Enforces ¡best ¡prac0ces ¡for ¡server ¡connec0ons ¡ – h=ps ¡only ¡ – Only ¡trusted ¡cer0ficates ¡ – TLS ¡version ¡1.2, ¡with ¡forward ¡secrecy ¡ ¡ ¡ ] ¡ ¡ ¡ ! t Developers ¡must ¡explicitly ¡opt-­‑out ¡ u o -­‑ t p o ¡ t ’ n o D ¡ ¡ [

  24. More ¡regarding ¡SSL/TLS… ¡ • Cert ¡pinning ¡is ¡recommended ¡ – Validate ¡cer0ficate ¡chain ¡ – Validate ¡that ¡cert ¡corresponds ¡to ¡host ¡name ¡ • If ¡you ¡use ¡AFNetworking… ¡ – Your ¡app ¡might ¡be ¡vulnerable ¡to ¡MiTM ¡a=tacks ¡ – Update ¡to ¡latest ¡version ¡

  25. Time ¡for ¡demos… ¡

  26. Masque ¡a=acks ¡ • App ¡Masque ¡ • URL ¡Masque ¡ • Extension ¡Masque ¡ • …and ¡more ¡ ¡ h=ps://www.fireeye.com/blog/threat-­‑research/2015/06/three_new_masquea=.html ¡

  27. Injec0ng ¡code ¡in ¡Xcode ¡ • Steal ¡Apple ¡ID ¡developer ¡account ¡ • Inject ¡code ¡in ¡apps ¡

  28. Summary ¡

  29. Summary ¡ • Several ¡great ¡security ¡mechanisms ¡in ¡iOS ¡ • …but ¡also ¡vulnerabili0es ¡ – Apps ¡can ¡be ¡replaced ¡ – App ¡data ¡can ¡be ¡stolen ¡ • A=ackers ¡a=ack ¡your ¡developer ¡machines ¡ – Patch ¡ – Encrypt ¡ – Be ¡careful ¡what ¡“tools” ¡you ¡are ¡downloading ¡

  30. Full ¡day ¡about ¡security ¡for ¡developers: ¡ h=p://oredev.org/2015/security-­‑day ¡ Emil ¡Kvarnhammar ¡ www.truesecdev.com ¡ Twi=er: ¡@emilkvarnhammar ¡

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