from zygote to morula for0fying weakened aslr on android
play

From Zygote to Morula: For0fying Weakened ASLR on Android - PowerPoint PPT Presentation

From Zygote to Morula: For0fying Weakened ASLR on Android Byoungyoung Lee Long Lu Tielei Wang Taesoo Kim Wenke Lee Georgia Tech,


  1. From ¡Zygote ¡to ¡Morula: ¡ ¡ For0fying ¡Weakened ¡ASLR ¡on ¡Android ¡ Byoungyoung ¡Lee α ¡ Long ¡Lu β ¡ Tielei ¡Wang α ¡ Taesoo ¡Kim γ ¡ Wenke ¡Lee α ¡ ¡ α Georgia ¡Tech, ¡ β Stony ¡Brook ¡University, ¡ γ MIT ¡ ¡ In ¡embryology, ¡the ¡ morula ¡is ¡produced ¡by ¡the ¡rapid ¡division ¡of ¡the ¡ zygote ¡cell. ¡ In ¡Android, ¡each ¡applica0on ¡process ¡is ¡a ¡fork ¡of ¡the ¡ Zygote ¡process. ¡ 1 ¡

  2. Security ¡Hardening ¡Efforts ¡on ¡Mobile ¡ Address ¡Space ¡Layout ¡ Permission ¡Model ¡ Randomiza0on ¡(ASLR) ¡ Data ¡Execu0on ¡Preven0on ¡ App ¡code ¡signing ¡ (DEP) ¡ Underlying ¡Opera4ng ¡System ¡ Mobile ¡Pla:orm ¡ 2 ¡

  3. Security ¡Hardening ¡Efforts ¡on ¡Mobile ¡ Address ¡Space ¡Layout ¡ Permission ¡Model ¡ Randomiza0on ¡(ASLR) ¡ Data ¡Execu0on ¡Preven0on ¡ App ¡code ¡signing ¡ (DEP) ¡ Underlying ¡Opera4ng ¡System ¡ Mobile ¡Pla:orm ¡ 3 ¡

  4. Address ¡Space ¡Layout ¡Randomiza0on ¡ (ASLR) ¡ • Mo0va0on ¡ • Knowing ¡the ¡address ¡is ¡prerequisite ¡for ¡many ¡aZacks ¡ • Making ¡predic0on ¡of ¡the ¡memory ¡address ¡difficult ¡ – Individual ¡memory ¡layouts ¡for ¡each ¡process ¡ • Implemented ¡in ¡all ¡major ¡OSes ¡ 4 ¡

  5. History ¡of ¡ASLR ¡adop0on ¡in ¡Android ¡ • Why ¡ASLR ¡on ¡Android? ¡ – Prevent ¡exploita0ons ¡on ¡na0ve ¡code ¡in ¡apps ¡ • Adopted ¡incrementally ¡ – Performance ¡concerns ¡on ¡early ¡Android ¡devices ¡ ¡ ¡ ¡(enabling ¡PIE ¡ è ¡loading ¡latency ¡/ ¡memory ¡overheads) ¡ – Android ¡4.1 ¡implemented ¡full ¡ASLR ¡enforcements ¡ 5 ¡

  6. 6 ¡

  7. (actual) ¡ASLR ¡enforcements ¡in ¡Android ¡ related ¡to ¡performance ¡priori4zed ¡design ¡

  8. Performance ¡Priori0zed ¡Designs ¡of ¡Android ¡ • Mul0-­‑layered ¡architectures ¡ – Android ¡Applica0ons ¡run ¡on ¡Dalvik ¡VM ¡ – with ¡addi0onal ¡run0me ¡libraries ¡ è ¡Slow ¡app ¡launch ¡0me ¡ Applica0on ¡ Android ¡Run0me ¡Library ¡ Dalvik ¡VM ¡ 8 ¡

  9. Zygote: ¡the ¡process ¡crea0on ¡module ¡ Applica0on ¡ Android ¡Run0me ¡Library ¡ fork() ¡ Dalvik ¡VM ¡ Android ¡Run0me ¡Library ¡ Dalvik ¡VM ¡ fork() ¡ Applica0on ¡ the ¡Zygote ¡process ¡ : ¡a ¡template ¡process ¡hos4ng ¡apps ¡ ¡ Android ¡Run0me ¡Library ¡ Fast ¡app ¡launch ¡4me! ¡ Dalvik ¡VM ¡ 9 ¡

  10. Zygote: ¡the ¡process ¡crea0on ¡module ¡ Applica0on ¡ Android ¡Run0me ¡Library ¡ ¡ fork() ¡ Dalvik ¡VM ¡ Android ¡Run0me ¡Library ¡ ¡ Applica0on ¡ Dalvik ¡VM ¡ fork() ¡ Android ¡Run0me ¡Library ¡ ¡ Sharing ¡address ¡layout ¡ Dalvik ¡VM ¡ 10 ¡

  11. Zygote ¡weakens ¡ASLR ¡effec0veness ¡ ① ¡request ¡ ¡ Zygote ¡ ¡ ¡ ¡ ¡ ¡new ¡app ¡ AM ¡ ② ¡fork() ¡ browser ¡ ③ specialize ¡ Shared ¡libraries ¡ • All ¡apps ¡have ¡the ¡same ¡memory ¡layouts ¡ – For ¡shared ¡libraries ¡loaded ¡by ¡the ¡Zygote ¡process ¡ è Weakens ¡Android ¡ASLR ¡security ¡ 11 ¡

  12. AZacking ¡the ¡ASLR ¡weakness ¡ ¡ by ¡Zygote ¡ • Challenges ¡to ¡develop ¡fully ¡working ¡exploits ¡(with ¡ideal ¡ ASLR) ¡ – Exploit ¡the ¡ Informa4on ¡leak ¡ vulnerability ¡ – Exploit ¡the ¡ control-­‑flow ¡hijack ¡ vulnerability ¡ è ¡should ¡be ¡achieved ¡in ¡ the ¡same ¡app ! ¡ 12 ¡

  13. AZacking ¡the ¡ASLR ¡weakness ¡ ¡ by ¡Zygote ¡ • How ¡Zygote’s ¡ASLR ¡weakness ¡helps ¡aZackers ¡ – Remote ¡Coordinated ¡ANacks ¡ • Informa0on ¡leak ¡in ¡Chrome ¡+ ¡control-­‑flow ¡hijack ¡in ¡VLC ¡ • Reduce ¡the ¡vulnerability ¡searching ¡spaces ¡ – Local ¡Trojan ¡ANacks ¡ • Obtain ¡the ¡memory ¡layout ¡by ¡having ¡the ¡trojan ¡app ¡installed ¡ 13 ¡

  14. AZacking ¡weakened ¡ASLR ¡: ¡ Remote ¡Coordinated ¡AZack ¡ Chrome ¡ Malicious ¡JavaScript ¡ è Exploit ¡the ¡informa4on ¡leak ¡vulnerability ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡(CVE-­‑2013-­‑0912) ¡ ① ¡ ② ¡ URI ¡Intent ¡ ③ ¡ ④ ¡ ¡ ANacker’s ¡ web ¡server ¡ Cra_ed ¡video ¡file ¡ è Exploit ¡the ¡control-­‑flow ¡hijack ¡vulnerability ¡ VLC ¡player ¡ with ¡leaked ¡memory ¡layout ¡informa4on ¡ Vic4m’s ¡Android ¡ 14 ¡

  15. AZacking ¡weakened ¡ASLR ¡: ¡ Local ¡Trojan ¡AZack ¡ • Zero-­‑permissioned ¡trojan ¡app ¡ – Asks ¡(almost) ¡no ¡permissions ¡to ¡the ¡system ¡ – Scanning ¡memory ¡spaces ¡using ¡the ¡na0ve ¡code ¡ – Layout ¡informa0on ¡can ¡be ¡exported ¡ • Intent ¡ • Internet ¡ • Once ¡the ¡trojan ¡app ¡is ¡installed, ¡ASLR ¡can ¡be ¡easily ¡ bypassed ¡ 15 ¡

  16. Intui0ve ¡(but ¡imprac0cal) ¡Solu0ons ¡ Applica0on ¡ fork() ¡ Android ¡Run0me ¡Library ¡ Android ¡Run0me ¡Library ¡ & ¡exec() ¡ ¡ ¡ Dalvik ¡VM ¡ Dalvik ¡VM ¡ – fork() ¡& ¡exec() ¡ • Execute ¡and ¡ini0alize ¡all ¡components ¡from ¡the ¡scratch ¡ – Too ¡slow ¡to ¡be ¡used ¡in ¡prac0ce ¡ • App ¡launch ¡0me: ¡ ¡427% ¡slowdown ¡ 16 ¡

  17. Morula: ¡Fast ¡Process ¡Crea0on ¡ ¡ without ¡Weakening ¡ASLR ¡ ¡ • Maintain ¡a ¡Morula ¡instance ¡pool ¡ – An ¡instance ¡is ¡prepared ¡(fork() ¡and ¡exec()) ¡when ¡the ¡ device ¡is ¡idle ¡ – Pull ¡out ¡the ¡instance ¡to ¡create ¡an ¡app ¡later ¡ 17 ¡

  18. Morula: ¡Fast ¡Process ¡Crea0on ¡ ¡ without ¡Weakening ¡ASLR ¡ ¡ Android ¡Run0me ¡Library ¡ Applica0on ¡ ¡ Dalvik ¡VM ¡ Android ¡Run0me ¡Library ¡ ¡ … ¡ Dalvik ¡VM ¡ Android ¡Run0me ¡Library ¡ ¡ S4ll ¡fast ¡enough ¡& ¡ Dalvik ¡VM ¡ ASLR ¡is ¡securely ¡enforced ¡ Pool ¡of ¡Morula ¡instances ¡ 18 ¡

  19. Morula: ¡Fast ¡Process ¡Crea0on ¡ ¡ without ¡Weakening ¡ASLR ¡ ¡ Prepara4on ¡phase ¡ – Prepare ¡a ¡Morula ¡instance ¡when ¡the ¡device ¡is ¡idle ¡ ① ¡request ¡ ¡ ¡ ¡ ¡ ¡ ¡prepare ¡ Zygote ¡ ¡ ¡ ¡ ¡ ¡when ¡idle ¡ AM ¡ ② ¡fork() ¡ … ¡ ¡& ¡exec() ¡ Morula ¡ Morula ¡ ③ ¡ cold-­‑init ¡ Shared ¡libraries ¡ 19 ¡

  20. Morula: ¡Fast ¡Process ¡Crea0on ¡ ¡ without ¡Weakening ¡ASLR ¡ ¡ Transi4on ¡phase ¡ – Transform ¡the ¡instance ¡into ¡the ¡target ¡applica0on ¡ ① ¡request ¡ ¡ Zygote ¡ ¡ ¡ ¡ ¡ ¡new ¡app ¡ AM ¡ ② ¡send ¡ … ¡ app ¡info ¡ Morula ¡ browser ¡ ③ specialize ¡ Shared ¡libraries ¡ 20 ¡

  21. Evalua0ons ¡ • Implemented ¡Morula ¡in ¡Android ¡4.2 ¡ – 548 ¡Loc ¡in ¡Java ¡ – 197 ¡LoC ¡in ¡C ¡ • Evaluated ¡on ¡Galaxy ¡Nexus ¡ – Dual-­‑core ¡1.2 ¡GHz ¡CPU, ¡1GB ¡RAM ¡ ¡ 21 ¡

  22. Applica0on ¡Launch ¡Delays ¡ Zygote Fork & exec Morula Morula ¡is ¡0.7% ¡faster ¡than ¡Zygote ¡on ¡average ¡ è Trade-­‑offs ¡between ¡ ¡ ¡ ¡ ¡ ¡fork() ¡in ¡Zygote ¡VS ¡extra ¡communica0ons ¡in ¡Morula ¡ ¡ 22 ¡

  23. Memory ¡Use ¡Overheads ¡ Zygote Fork & exec Morula Morula ¡uses ¡13.7MB ¡(85%) ¡more ¡memory ¡per ¡app ¡ è ¡ Mostly ¡from ¡individual ¡DalvikVM ¡heaps ¡ è 23 ¡

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