• No results found

Why Eve and Mallory Love Android An Analysis of Android SSL (In)Security

N/A
N/A
Protected

Academic year: 2021

Share "Why Eve and Mallory Love Android An Analysis of Android SSL (In)Security"

Copied!
23
0
0

Loading.... (view fulltext now)

Full text

(1)

Why Eve and Mallory Love Android

An Analysis of Android SSL (In)Security

Sascha Fahl, 20.11.2012 Sascha  Fahl   Marian  Harbach   Thomas  Muders   Lars  Baumgärtner   Bernd  Freisleben   Ma:hew  Smith  

(2)

Seite 2

Some  Android  Facts  

§  330  million  devices  (as  of  Q1  2012)  

§  930,000  acGvaGons  per  day  (as  of  Q1  2012)  

§  450,000  apps  (as  of  June  2012)  

64%   Market  Share  (Q2  2012)   Android   iOS   RIM   Symbian   Windows  Phone   Sascha Fahl, 20.11.2012

(3)

Seite 3

Appifica2on  

§  There’s  an  App  for  Everything  

(4)

Seite 4

What  do  Most  Apps  Have  in  Common?  

SSL  

 

(Secure  Sockets  Layer  protocol)   (Transport  Layer  Security  (TLS)  protocol)  

They  share  data  over  the  Internet  

Most  of  them  secure  transfer  of  sensiGve  data  using  

(5)

Seite 5

SSL  Usage  on  Android  

The  default  Android  API  implements    

correct  cerGficate  validaGon.  

What could possibly go wrong?

(6)

Seite 6

SSL  Usage  on  Android  

A  server  needs  a  

cerGficate  that  was  signed  

by  a  trusted  CerGficate  

Authority    

~130  pre-­‐installed  CAs  

For  non-­‐trusted  

cerGficates  a  custom  

workaround  is  needed  

(7)

Seite 7

What  about  using  a  non-­‐trusted  cer2ficate?  

Q: Does anyone know how to accept a self signed

cert in Java on the Android? A code sample would be perfect.

A: Use the EasyX509TrustManager library hosted on

code.google.com.

Q: I am getting an error of

„javax.net.ssl.SSLException: Not trusted server

certificate“. I want to simply allow any certificate to work, regardless whether it is or is not in the

Android key chain. I have spent 40 hours

researching and trying to figure out a workaround for this issue.

A: Look at this tutorial [...]

stackoverflow.com

(8)

Seite 8

Our  Analysis  

§  downloaded  13,500  popular  and  free  Apps  from  Google’s  Play  

Market  

§  built  MalloDroid  which  is  an  androguard  extension  to  analyze  

possible  SSL  problems  in  Android  Apps  

§  broken  TrustManager  implementaGons  

§  accept  all  Hostnames  

Webserver Eve/Mallory

(9)

Seite 9

Sta2c  Code  Analysis  Results  

§

92,8  %  Apps  use  INTERNET  permission  

§

91,7  %  of  networking  API  calls  HTTP(S)  related  

§

0,8  %  exclusively  HTTPS  URLs  

§

46,2  %  mix  HTTP  and  HTTPS  

§

17,28  %  of  all  Apps  that  use  HTTPS  include  code  that  

fails  during  SSL  cerGficate  validaGon  

§

1074  include  criGcal  code  

§

790  accept  all  cerGficates  

§

284  accept  all  hostnames  

Sascha Fahl, 20.11.2012
(10)

Seite 10

TrustManager  Implementa2ons  

§

22  different  TrustManager  implementaGons  

TrustManager DummyTrustManager AcceptAllTrustManager OpenTrustManager SimpleTrustManager NonValidatingTrustManager FakeTrustManager EasyX509TrustManager NaiveTrustManager

§

and  all  turn  effecGve  cerGficate  validaGon  off  

Sascha Fahl, 20.11.2012
(11)

Seite 11

Manual  App  Tes2ng  Results  

§

cherry-­‐picked  100  Apps  

§

21  Apps  trust  all  cerGficates  

§

20  Apps  accept  all  hostnames  

What  we  found:  

(12)

Seite 12

Manual  App  Tes2ng  Results  

What  we  found:  

39 – 185 million affected installs!

(13)

Seite 13

One  Example  

Zoner  AV  

§

Awarded  best  free  AnG-­‐

Virus  App  for  Android  by  

av-­‐test.org  

§

AnG-­‐Virus  App  for  Android  

(14)

Seite 14

Zoner  AV  

§  Virus  signature  updates  via  HTTPS  GET  

§  No  check  for  the  virus  update’s  authenGcity!  

§  The  good  thing:  It  uses  SSL  

§  Unfortunately:  The  wrong  way  

static&final!HostnameVerifier!DO_NOT_VERIFY!=!new!HostnameVerifier()!!!! {!!!!!! ! public&boolean!verify(String!paramString,!SSLSession!paramSSLSession)!!!!!! ! {!!!!!!!! ! !!!!return&true;!!!!!! ! }!! };! Sascha Fahl, 20.11.2012

(15)

Seite 15

Zoner  AV  

§  We  did  the  following  

(16)

Seite 16

More  Examples  

§  Remote  Control  App  

 

§  Remote  Code  InjecGon  

   

§  Unlocking  Rental  Cars  

(17)

Seite 17

§  Usability    

How  Do  (Good)  Apps  React  to  MITMAs?    

Flickr Facebook

§  Technically  

(18)

Seite 18

Browser  Warning  Messages  

• 

All  do  SSL  cerGficate  validaGon  

correctly…  

…  and  warn  the  user  if  something  

goes  wrong….  

 

All  do  SSL  cerGficate  validaGon  

correctly…  

…  and  warn  the  user  if  something  

goes  wrong….  

 

 

 

(19)

Seite 19

SSL  Warning  Messages  –  Android  Stock  Browser  

• 

All  do  SSL  cerGficate  validaGon  

correctly…  

…  and  warn  the  user  if  something  

goes  wrong….  

 

(20)

Seite 20

Online  Survey  

…  and  warn  the  user  if  something  

goes  wrong….  

 

–  To  find  out  if  the  Browser’s  warning  messages  help  the   users  

•  presented  an  SSL  warning  message  

–  To  see  if  users  know  when  they  are  surfing  on  an  SSL   protected  website  

•  half  of  the  parGcipants  HTTP  

•  half  of  the  parGcipants  HTTPS    

(21)

Seite 21

•  47.5%  of  non-­‐IT  experts  believed  they  were  using   a  secure  Internet  connecGon...  although  it  was   plain  HTTP.  

•  ...  34.7  %  of  IT  experts  thought  so  too.  

•  ~50%  had  not  seen  an  SSL  warning  message  on  their  phone   before.  

•  The  risk  users  were  warned  against  was  rated  with  2.86  (sd=.94)   on  a  scale  between  1  (low  risk)  and  5  (high  risk)  

•  Overall,  a  considerable  amount  of  parGcipants  struggled  to   judge  connecGon  security  accurately.  

Online  Survey  -­‐  Results  

•     745  parGcipants  

(22)

Seite 22

•  Integrate  SSL  cerGficate  validaGon  tesGng   into  the  development  process  

•  Inform  the  user  

•  INTERNET_SSL  and  INTERNET_PLAIN  permission  

•  global  SSL  warning  message  

Our  Recommenda2ons  

(23)

Seite 23 Sascha Fahl, 20.11.2012

References

Related documents

• Examine agricultural policies including farm subsidies and production practices as related to consumer issues and healthier food choices.. • Involve leaders in government and

Impact of long-term care facility residence on the antibiotic resistance of urinary tract Escherichia coli and

Electric Vehicle Scenarios and a Roadmap for India Figure 2.1: Driving Range, Charging Time, and Price of E4Ws for Indian and Global Models.. Data Source: 18 commercially

In this study, we examined variability in JME- based feeding rates using the following biological assumptions: (1) Feeding rates will increase with body mass to serve

Running high pressure of coolant through center of your diamond drill/bit by using a water swivel adapter is highly recommended for drilling material over 1" (25.4mm)

As of late 2017, it is estimated that in order to generate one new block on the Bitcoin network, a node must complete 2 60 hashes, requiring high amount of energy (Kiayias,

In addition, auctions can also be used to adjust the system in case of differences between the forecast made by distribution companies and demand ( Leilão de Ajuste ),

Most of the large and medium firms participating in this program are hiring second-year students to participate as summer associates in a structured “Summer Program.” A