-

   rss_rss_hh_new

 - e-mail

 

 -

 LiveInternet.ru:
: 17.03.2011
:
:
: 51

:


Android-:

, 12 2017 . 10:09 +


: etnyk, CC BY-NC-ND 2.0

. , . , , , . Android- 'o Android API . Android 75%. , Google Play, 2016 65 [1].

: 2015 2,3 [3]. , 60% Android- , [6]. , , . Google Play Google Bouncer. Android (, [8], ). : 2015 Android [2] 40 . , , Android .

Android , . , . , , . . . , .
, . Android, Android.

1. Android


Android Linux , Google. Android Java. Android 1.5 Android NDK, ++ [4]. APK, ZIP- . APK- :

  • ;
  • , ( .so);
  • ;
  • DEX-;
  • .

Android 4.4 : Dalvik VM ART. , APK- , ART. 5.0 ART Dalvik VM.

Java- Dalvik VM Android Java VM. -, Java- - Dalvik, - HotSpot. Dalvik , RISC-, , . Dalvik . Android 2.2 Dalvik JIT-, Java- [5]. Java Apache Harmony . Java- DEX (Dalvik Executable), - Dalvik. JAR. , , Java- JNI. , DexClassLoader.

2.


Android Zygote. Android-, Android, . Android :

  1. fork Zygote (. . 1).
  2. ( open).
  3. (classes.dex) . IPC.
  4. mmap .
  5. ( - Dalvik ART [7]).

Android user/group ID, . , . 4.3 SELinux [10].


. 1. Android

, : , ; . Android. . . , , , , . , , , , . , . Android 6 Marshmallow : , , [11].

Android- main() - . , Intent.

Activity . , Activity . Activity Activity, Intent. Activity , , .

Service [9] . Activity - , , , , , . Service -, . Service, , RPC (Remote Procedure Call), .

Content provider , . Content provider URI SQL (Select, Insert, Delete).

Broadcast receiver .

, Android, [2, 12, 13], [2]. , : , ; Android; -, (. 2.7 2.8 ). .

2.1. Linux


, , Linux, Android. , , . , Android, . ; . [14, 15, 16, 64]. , ashmem Android [62].

2.2.


Android. , , . , 2016 Foxconn [63]. , [17], , 65 85% , . , , Android, [18, 19].

2.3.


Android- JNI. , (, ++ ) [20]. Android , Linux, , , (. , . 2.4). , Android. , .

2.4.


, . , Android . /dev/Binder Android. , , XML- . , [12, 21, 22, 23, 24, 25], . , , ICC. , . , , , . , , . , , .

2.5.


- . , , . , Skype . , , [26]. [27] - . . , SQL- XSS. , Java - , - Java, , . , Mobile OWASP-10. [28, 29].

2.6.


, Android, . , Stagefright MMS-, Android, 2.2 [30]. MediaServer, Android c 2.3 5.1 [31]. [13] Dalvik: , , .

2.7. -


Android- . Android- Java, [32, 33]. , [34], Bouncer, , . . , Android Google Play , Google-. , Google , Google Play , . - , . , [35].

2.8.


, Android, . . Wi-Fi Direct [36], NFC [37], Bluetooth [38], adb [39]. [13] , , adb.

3. Android-


, Android-, Android-. [40, 41, 42, 2]. : , (). [2] Android-. .


:

  • , , Activity, Broadcast receivers. .
  • - . , , .
  • , - Dalvik.

Apktool [43]. , APK/JAR-, - smali. apktool - Dalvik smali/backsmali [44]. - Dalvik Dedexer [45].

Radare2 [46] , , Android-.
Androguard [47]. Java. APK-, . .

, . , , , . , , . ( , ) . , . Android , Java Reflection API . Android-, [48, 49]. 50.


. , Android.



. 2. Android

Android Android ( QEMU), Android. , Android, . Android :

  • ,
  • ,
  • ,
  • .

, :

  • . , .
  • . , strace . .
  • (). Java- Dalvik, JNI, .

, .

4. Android


[40, 41, 42, 2] 40 Android-, Android . [34, 60, 61], . Google Play Google Bouncer, , .

Android, . , .



. 3. , Android , Android . , . , :

  • ,
  • ,
  • ,
  • ,
  • Java- ,
  • .

:

1.


Android . . 2.2, 65 85% , . , . Android GoldFish.

2.


[34, 61], . , QEMU , . . , .

3.


[34, 61], , , , , , GPS, , . , , , . . .

4. Java-


Android- , - Dalvik, . DroidScope [57] CopperDroid [58, 59]. . , , Java-, . Java .

5.


CopperDroid [58] Android-, . , Binder, . , CopperDroid, Android, Android ART .

6.


[[57], 61], , IMEI, IMSI . , . ApkAnalyzer [65].

7. Android


, Android, Dalvik. , ART. Java, .

8.


, , TaintDroid [56]. [60] . : 1) TaintDroid , 2) TaintDroid Dalvik JNI. [60] .

9. , (concolic execution )


[51] , . , . , , [52, 53, 54, 55]. , , . , - . , Android, DexClassLoader JNI.


Android , , . , , , , , iOS.

, , . Android , , .

, Android. , Google : (, Google, ). , Android CyanogenMod ( LineageOS), . , Google Play. RCE ( ) , , . Android, , .

: (@melon)


:


  1. statista.com/statistics/281106/number-of-android-app-downloads-from-google-play
  2. Tan D. J. J. et al. Securing Android: A Survey, Taxonomy, and Challenges // ACM Computing Surveys (CSUR). 2015. Vol. 47. 4. P. 58.
  3. file.gdatasoftware.com/web/en/documents/whitepaper/G_DATA_Mobile_Malware_Report_H1_2016_EN.pdf
  4. developer.android.com/ndk/guides/stable_apis.html
  5. Dalvik VM Internals // sites.google.com/site/io/dalvik-vm-internals
  6. securityweek.com/overwhelming-majority-android-devices-dont-have-latest-security-patches
  7. Google I/O 2014 The ART runtime // youtube.com/watch?v=EBlTzQsUoOw
  8. media.defcon.org/DEF%20CON%2024/DEF%20CON%2024%20presentations/DEFCON-24-Huber-Rasthofer-Smartphone-Antivirus-And-Security-Applications-Under-Fire.pdf
  9. developer.android.com/guide/components/services.html
  10. source.android.com/devices/tech/security/selinux
  11. developer.android.com/preview/features/runtime-permissions.html
  12. Enck W., Ongtang M., McDaniel P. Understanding android security // IEEE security & privacy. 2009. 1. P. 5057.
  13. Shabtai A., Mimran D., Elovici Y. Evaluation of Security Solutions for Android Systems // arXiv preprint arXiv:1502.04870. 2015.
  14. Hei X., Du X., Lin S. Two vulnerabilities in Android OS kernel // Communications (ICC), 2013 IEEE International Conference on. IEEE, 2013. P. 61236127.
  15. forum.xda-developers.com/showthread.php?t=2048511
  16. Zhou X. et al. Identity, location, disease and more: Inferring your secrets from android public resources // Proceedings of the 2013 ACM SIGSAC conference on Computer & communications security. ACM, 2013. P. 10171028.
  17. Wu L. et al. The impact of vendor customizations on android security // Proceedings of the 2013 ACM SIGSAC conference on Computer & communications security. ACM, 2013. P. 623634.
  18. en.wikipedia.org/wiki/Stagefright_(bug)
  19. Zhou X. et al. The peril of fragmentation: Security hazards in android device driver customizations // Security and Privacy (SP), 2014 IEEE Symposium on. IEEE, 2014. P. 409423.
  20. Sun M., Tan G. NativeGuard: Protecting android applications from third-party native libraries // Proceedings of the 2014 ACM conference on Security and privacy in wireless & mobile networks. ACM, 2014. P. 165176.
  21. Octeau D. et al. Effective inter-component communication mapping in android with epicc: An essential step towards holistic security analysis // USENIX Security 2013.
  22. Chin E. et al. Analyzing inter-application communication in Android // Proceedings of the 9th international conference on Mobile systems, applications, and services. ACM, 2011.
  23. Felt A. P. et al. Permission Re-Delegation: Attacks and Defenses // USENIX Security Symposium. 2011.
  24. Bugiel S. et al. Xmandroid: A new android evolution to mitigate privilege escalation attacks // Technische Universit"at Darmstadt, Technical Report TR-2011-04.
  25. Bugiel S. et al. Towards Taming Privilege-Escalation Attacks on Android // NDSS. 2012.
  26. cvedetails.com/cve/CVE-2011-1717
  27. Fahl S. et al. Why Eve and Mallory love Android: An analysis of Android SSL (in) security // Proceedings of the 2012 ACM conference on Computer and communications security. ACM, 2012. P. 5061.
  28. owasp.org/index.php/Projects/OWASP_Mobile_Security_Project_-_Top_Ten_Mobile_Risks
  29. Lu L. et al. Chex: statically vetting android apps for component hijacking vulnerabilities //Proceedings of the 2012 ACM conference on Computer and communications security. ACM, 2012. P. 229240.
  30. kb.cert.org/vuls/id/924951
  31. CVE-2015-3842 // cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-3842
  32. Zhou Y. et al. Hey, You, Get Off of My Market: Detecting Malicious Apps in Official and Alternative Android Markets // NDSS. 2012.
  33. Nolan G. Decompiling android. Apress, 2012.
  34. Petsas T. et al. Rage against the virtual machine: hindering dynamic analysis of android malware // Proceedings of the Seventh European Workshop on System Security. ACM, 2014. P. 5.
  35. Android Security Underpinnings // youtube.com/watch?v=NS46492qyJ8
  36. coresecurity.com/advisories/android-wifi-direct-denial-service
  37. securityaffairs.co/wordpress/37667/hacking/nfc-attack-credit-card.html
  38. zerodayinitiative.com/advisories/ZDI-15-092/
  39. securityfocus.com/archive/1/535980/30/150/threaded
  40. Neuner S. et al. Enter sandbox: Android sandbox comparison // arXiv preprint arXiv:1410.7749. 2014.
  41. Hoffmann J. From Mobile to Security: Towards Secure Smartphones: . 2014.
  42. Faruki P. et al. Android Security: A Survey of Issues, Malware Penetration and Defenses.
  43. ibotpeaches.github.io/Apktool
  44. github.com/JesusFreke/smali
  45. dedexer.sourceforge.net
  46. radare.org/r
  47. github.com/androguard/androguard
  48. dexprotector.com
  49. guardsquare.com/dexguard
  50. PANDORA applies non-deterministic obfuscation randomly to Android, Schulz P. Code protection in android // Insititute of Computer Science, Rheinische Friedrich-Wilhelms-Universit"at Bonn, Germany. 2012.
  51. Sch"utte J., Fedler R., Titze D. Condroid: Targeted dynamic analysis of android applications // in review. 2014.
  52. Sen K. DART: Directed Automated Random Testing // Haifa Verification Conference. 2009. Vol. 6405. P. 4.
  53. Sen K., Marinov D., Agha G. CUTE: a concolic unit testing engine for C. ACM, 2005. Vol. 30. 5. P. 263272.
  54. Godefroid P. Random testing for security: blackbox vs. whitebox fuzzing // Proceedings of the 2nd international workshop on Random testing: co-located with the 22nd IEEE/ACM International Conference on Automated Software Engineering (ASE 2007). ACM, 2007. P. 1.
  55. Jayaraman K. et al. jFuzz: A Concolic Whitebox Fuzzer for Java // NASA Formal Methods. 2009. P. 121125.
  56. Enck W. et al. TaintDroid: an information-flow tracking system for realtime privacy monitoring in smartphones // ACM Transactions on Computer Systems (TOCS). 2014. Vol. 32. 2. P. 5.
  57. Yan L. K., Yin H. DroidScope: Seamlessly Reconstructing the OS and Dalvik Semantic Views for Dynamic Android Malware Analysis // USENIX Security Symposium. 2012. P. 569584.
  58. Tam K. et al. CopperDroid: Automatic Reconstruction of Android Malware Behaviors // Proc. of the Symposium on Network and Distributed System Security (NDSS). 2015.
  59. copperdroid.isg.rhul.ac.uk/copperdroid
  60. Sarwar G. et al. On the Effectiveness of Dynamic Taint Analysis for Protecting against Private Information Leaks on Android-based Devices // SECRYPT. 2013. P. 461468.
  61. Jing Y. et al. Morpheus: automatically generating heuristics to detect Android emulators // Proceedings of the 30th Annual Computer Security Applications Conference. ACM, 2014. P. 216225.
  62. googleprojectzero.blogspot.ru/2016/12/bitunmap-attacking-android-ashmem.html
  63. bbqand0days.com/Pork-Explosion-Unleashed
  64. powerofcommunity.net/poc2016/x82.pdf
  65. apk-analyzer.net
  66. www.phdays.ru/program/fast-track/45984
Original source: habrahabr.ru (comments, light).

https://habrahabr.ru/post/332904/

:  

: [1] []
 

:
: 

: ( )

:

  URL