the dark side of android applications - owasp...the dark side of android applications michael...

33
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP Foundation OWASP http://www.owasp.org The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg [email protected] 07.11.2012

Upload: others

Post on 04-Oct-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

Copyright © The OWASP FoundationPermission is granted to copy, distribute and/or modify this document under the terms of the OWASP License.

The OWASP Foundation

OWASP

http://www.owasp.org

The Dark Side of Android Applications

Michael Spreitzenbarth

Lehrstuhl für Informatik 1Universität Erlangen-Nürnberg

[email protected]

Page 2: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP2

Agenda

✓ Aktueller Trend im Bereich Android Malware

✓Malware Analyse-Systeme

✓ Android Werbenetzwerke

✓ Ausblick

Page 3: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Android MalwareAktueller Trend und Überblick

3

Page 4: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Aktueller Trend im Bereich Android Malware

- stark anwachsendes Bedrohungspotential

- Wachstumsraten von mehr als 3.000% [1]

- ca. 15.000 neue bösartige Appsin weniger als 4 Monaten erschienen

- aktuell über 150 Malware-Familien bekannt

4

Page 5: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Malware Studie

- Analyse von über 300.000 Apps- Google Play und Third-Party Märkte

5

Page 6: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP6

- über 8.000 bösartige Apps gefunden

- zu 152 Familien gruppiert

- hauptsächlich Fraud- und Spyware

Malware Studie - Ergebnisse

Page 7: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

- 57% stehlen persöhnliche Daten wie IMEI, GPS-Koordinaten, Adressbucheinträge, usw...

- 45% versenden Premium-SMS

- 20% verbinden sich zu C&C-Servern (Botnets)

- ca. 10% kommen inkl. Root-Exploit

7

Malware Studie - Ergebnisse

Page 8: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

BeispielAndroid.FakeRegSMS

8

Page 9: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP9

FakeRegSMS

Page 10: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

i f ( k < 0) throw new IOException ( ”Chank tEXt not found in png” ) ;

10

FakeRegSMS

Page 11: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

FakeRegSMS

11

Verschlüsseltes Code-Fragment im App-Icon

Page 12: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASPX

FakeRegSMS

Entschlüsselung des Code-Fragmentes mit dem key aus dem Quellcode der App

Page 13: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Entschlüsseltes Codefragment:

420 1004851XX? requestNo1 maxRequestNoautocostLimit150 costLimitPeriod8640 smsDelay15 sms-Data!l5872600885697126387416947526760l4P?=

12

FakeRegSMS

Page 14: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

FakeRegSMS

13

Log-Eintrag des Telefons

Page 15: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

FakeRegSMS

- erstmals Ende 2011 gefunden

- versendet Premium-SMS im Hintergrund

- setzt Steganographie zum Verschleiern ein

- versteckte Codefragmente im App-Icon

14

Page 16: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Android Analyse-SystemeAndrubis & Mobile-Sandbox

15

Page 17: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Andrubis [2]

- setzt auf DroidBox [7] für Android 2.2

- statische Analyse mit Hilfe von Androguard [8]

- Überwachung von Netzwerkverkehr

- Überwachung der Aufrufe von nativen Bibliotheken

16

Page 18: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Mobile-Sandbox [3]

- setzt auf modifiziertes DroidBox [7]

- unterstützt Android 2.3.7 und Android 4.1

- statische Analyse mit Hilfe von Code-Review

- Überwachung von Netzwerkverkehr

- Überwachung von nativen Bibliotheken mit ltrace

- Anbindung an VirusTotal [9]17

Page 19: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Statische Analyse

- betrachtet Permissions und Intents

- häufig Code-Review um potentiell gefährliche Methoden oder Funktions-Aufrufe zu finden

- erkennt über-/unterprivilegierte Apps

- setzt häufig auf Muster- und Signaturerkennung

18

Page 20: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Dynamische Analyse

- setzt auf Taint-Tracking

- interagiert mit der App in einer abgeschotteten Umgebung = Sandbox

- überwacht Daten, die das Gerät verlassen

- basiert meist auf TaintDroid [4]

19

Page 21: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Android WerbenetzwerkeÜberblick und Gefahren

20

Page 22: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Überblick über bekannte Werbenetzwerke

21

[5]

Page 23: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

mOcean

- Zugriff auf aktuelle Ortsdaten

- Zugriff auf Kamera, Kalender und SD-Karte

- darf SMS versenden und Anrufe tätigen

22

Page 24: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Probleme durch Werbenetzwerke

- oft sehr aggressiv und datenhungrig

- verwenden viele Permissions

- sammeln persönliche Daten und senden diese an Werbenetz-Betreiber

23

Page 25: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Folgen für Entwickler

=> dadurch entsteht Verhalten welches oft identisch zu bekannter Spyware ist

24

=> App läuft Gefahr als Malware klassifiziert zu werden

Page 26: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

ZusammenfassungSchutzmaßnahmen und Ausblick

25

Page 27: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Infektionswege

- meist durch Third-Party Märkte undkompromittierte Webseiten

- legitime Apps mit Malware neu gepackt

- bösartige Updates legitimer Apps durch gestohlene Zertifikate

- übliche Phishing-Techniken26

Page 28: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Schutzmaßnahmen für den Nutzer

- nach Möglichkeit nur Apps aus dem Google PlayMarkt installieren

- AV-Lösung einsetzen

- vorsichtiger Umgang mit NFC und QR-Codes

27

Page 29: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Schutzmaßnahmen für den Entwickler

- Vorsicht bei dem Einbinden von Werbenetzwerken

- Permissions sparsam verwenden

- Google-Richtlinien zu Obfuscation beachten

28

Page 30: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Ausblick

- Obfuscation kommt so langsam auch bei Android- erschwert die statische Analyse

- Malware tarnt sich immer besser- voll funktionsfähige Apps mit bösartigem Verhalten im

Hintergrund- Versand von Premium-SMS nur in geringer Menge

- Werbenetzwerke sammeln immer mehr persönliche Daten- zusätzliches Generieren von Einnahmen

29

Page 31: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Quellen[1] Juniper Networks Inc.

2011 Mobile Threat Report

[2] International Secure System Labs http://anubis.iseclab.org

[3] Universität Erlangen-Nürnberg http://www.mobile-sandbox.com

[4] W. Enck et al. Taintdroid: An information-flow tracking system for realtime privacy monitoring on smartphones

[5] R. Stevens et al. Investigating User Privacy in Android Ad Libraries

[6] A. Desnos et al. Droidbox: An Android Application sAndbox for dynamic Analysis

X

Page 32: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

OWASP

Quellen

[7] Droidbox http://code.google.com/p/droidbox/

[8] Androguard http://code.google.com/p/androguard/

[9] VirusTotal API https://www.virustotal.com/documentation/public-api/

X

Page 33: The Dark Side of Android Applications - OWASP...The Dark Side of Android Applications Michael Spreitzenbarth Lehrstuhl für Informatik 1 Universität Erlangen-Nürnberg 07.11.2012

Copyright © The OWASP FoundationPermission is granted to copy, distribute and/or modify this document under the terms of the OWASP License.

The OWASP Foundation

OWASP

http://www.owasp.org

Vielen Dank für Ihre Aufmerksamkeit!

Michael Spreitzenbarth

Lehrstuhl für Informatik 1Universität Erlangen-Nürnberg

[email protected]://twitter.com/m_spreitz

07.11.2012