61
Analysis of Android In-App Advertisement Kits Karine de Pontev` es, Axelle Apvrille Virus Bulletin, October 2013

Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Analysis of Android In-AppAdvertisement Kits

Karine de Ponteves, Axelle Apvrille

Virus Bulletin, October 2013

Page 2: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Online advertising model

Ad networkAdvertisers

Merchants

Ad provider

PublishersPublishers

Affiliates

User User User

BUY MY ORANGES!

Pay to disseminate adsBUY MY ORANGES!

Pay to display ads

BUY MY ORANGES!BUY MY ORANGES!

BUY MY ORANGES!

BUY MY ORANGES!

BUY MY ORANGES!

Virus Bulletin 2013 - A. Apvrille 2/26

Page 3: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Online advertising model

Ad networkAdvertisers

Merchants

Ad provider

PublishersPublishers

Affiliates

User User User

BUY MY ORANGES!

Pay to disseminate adsBUY MY ORANGES!

Pay to display ads

BUY MY ORANGES!BUY MY ORANGES!

BUY MY ORANGES!

BUY MY ORANGES!

BUY MY ORANGES!

Virus Bulletin 2013 - A. Apvrille 2/26

Page 4: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Online advertising model

Ad networkAdvertisers

Merchants

Ad provider

PublishersPublishers

Affiliates

User User User

BUY MY ORANGES!

Pay to disseminate adsBUY MY ORANGES!

Pay to display ads

BUY MY ORANGES!BUY MY ORANGES!

BUY MY ORANGES!

BUY MY ORANGES!

BUY MY ORANGES!

Virus Bulletin 2013 - A. Apvrille 2/26

Page 5: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Online advertising model

Ad networkAdvertisers

Merchants

Ad provider

PublishersPublishers

Affiliates

User User User

BUY MY ORANGES!

Pay to disseminate ads

BUY MY ORANGES!

Pay to display ads

BUY MY ORANGES!BUY MY ORANGES!

BUY MY ORANGES!

BUY MY ORANGES!

BUY MY ORANGES!

Virus Bulletin 2013 - A. Apvrille 2/26

Page 6: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Online advertising model

Ad networkAdvertisers

Merchants

Ad provider

PublishersPublishers

Affiliates

User User User

BUY MY ORANGES!

Pay to disseminate ads

BUY MY ORANGES!

Pay to display ads

BUY MY ORANGES!BUY MY ORANGES!

BUY MY ORANGES!

BUY MY ORANGES!

BUY MY ORANGES!

Virus Bulletin 2013 - A. Apvrille 2/26

Page 7: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

What you are going to learn in this talk

All Your Privacy Are Belong To Us

They have built a huge meta-datadatabase + correlate data

Adkits hide their behaviour

They don’t want us to know whatthey’re doing

Put our phones at risk

Expose security holesCareless with our data

Virus Bulletin 2013 - A. Apvrille 3/26

Page 8: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

What you are going to learn in this talk

All Your Privacy Are Belong To Us

They have built a huge meta-datadatabase + correlate data

Adkits hide their behaviour

They don’t want us to know whatthey’re doing

Put our phones at risk

Expose security holesCareless with our data

Virus Bulletin 2013 - A. Apvrille 3/26

Page 9: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

What you are going to learn in this talk

All Your Privacy Are Belong To Us

They have built a huge meta-datadatabase + correlate data

Adkits hide their behaviour

They don’t want us to know whatthey’re doing

Put our phones at risk

Expose security holesCareless with our data

Virus Bulletin 2013 - A. Apvrille 3/26

Page 10: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Our methodology

120,000 Android malware

inspect DEX, identify those with ≥ 1 adkit

AirpushAdmob ... Zestadz

Reverse Reverse Reverse

Virus Bulletin 2013 - A. Apvrille 4/26

Page 11: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Our methodology

120,000 Android malware

inspect DEX, identify those with ≥ 1 adkit

AirpushAdmob ... Zestadz

Reverse Reverse Reverse

Virus Bulletin 2013 - A. Apvrille 4/26

Page 12: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Our methodology

120,000 Android malware

inspect DEX, identify those with ≥ 1 adkit

AirpushAdmob ... Zestadz

Reverse Reverse Reverse

Virus Bulletin 2013 - A. Apvrille 4/26

Page 13: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Our methodology

120,000 Android malware

inspect DEX, identify those with ≥ 1 adkit

AirpushAdmob ... Zestadz

Reverse Reverse Reverse

Virus Bulletin 2013 - A. Apvrille 4/26

Page 14: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

What are they collecting? Guess...

Adkits collect... Obvious

Country

Gender

Age

Virus Bulletin 2013 - A. Apvrille 5/26

Page 15: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

What are they collecting? Guess...

Adkits collect... Obvious

Country

Gender

Age

Virus Bulletin 2013 - A. Apvrille 5/26

Page 16: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

What are they collecting? Guess...

Adkits collect... Obvious

Country

Gender

Age

Virus Bulletin 2013 - A. Apvrille 5/26

Page 17: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

What are they collecting? Guess...

Adkits collect... Obvious

Country

Gender

Age

Virus Bulletin 2013 - A. Apvrille 5/26

Page 18: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Sensitive fields

Adkits collect...

Obvious

Sensitive

PoliticsSexual

orientationor datinggender

Maritalstatus

Religion

FacebookID

GPScoordsHave

you gotchildren?

Income

Searchkeywords

Virus Bulletin 2013 - A. Apvrille 6/26

Page 19: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Sensitive fields

Adkits collect...

Obvious

Sensitive

PoliticsSexual

orientationor datinggender

Maritalstatus

Religion

FacebookID

GPScoordsHave

you gotchildren?

Income

Searchkeywords

Virus Bulletin 2013 - A. Apvrille 6/26

Page 20: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Sensitive fields

Adkits collect...

Obvious

Sensitive

PoliticsSexual

orientationor datinggender

Maritalstatus

Religion

FacebookID

GPScoordsHave

you gotchildren?

Income

Searchkeywords

Virus Bulletin 2013 - A. Apvrille 6/26

Page 21: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Sensitive fields

Adkits collect...

Obvious

Sensitive

PoliticsSexual

orientationor datinggender

Maritalstatus

Religion

FacebookID

GPScoordsHave

you gotchildren?

Income

Searchkeywords

Virus Bulletin 2013 - A. Apvrille 6/26

Page 22: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Sensitive fields

Adkits collect...

Obvious

Sensitive

PoliticsSexual

orientationor datinggender

Maritalstatus

Religion

FacebookID

GPScoordsHave

you gotchildren?

Income

Searchkeywords

Virus Bulletin 2013 - A. Apvrille 6/26

Page 23: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Sensitive fields

Adkits collect...

Obvious

Sensitive

PoliticsSexual

orientationor datinggender

Maritalstatus

Religion

FacebookID

GPScoordsHave

you gotchildren?

Income

Searchkeywords

Virus Bulletin 2013 - A. Apvrille 6/26

Page 24: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Sensitive fields

Adkits collect...

Obvious

Sensitive

PoliticsSexual

orientationor datinggender

Maritalstatus

Religion

FacebookID

GPScoordsHave

you gotchildren?

Income

Searchkeywords

Virus Bulletin 2013 - A. Apvrille 6/26

Page 25: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Sensitive fields

Adkits collect...

Obvious

Sensitive

PoliticsSexual

orientationor datinggender

Maritalstatus

Religion

FacebookID

GPScoordsHave

you gotchildren?

Income

Searchkeywords

Virus Bulletin 2013 - A. Apvrille 6/26

Page 26: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Sensitive fields

Adkits collect...

Obvious

Sensitive

PoliticsSexual

orientationor datinggender

Maritalstatus

Religion

FacebookID

GPScoordsHave

you gotchildren?

Income

Searchkeywords

Virus Bulletin 2013 - A. Apvrille 6/26

Page 27: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Sensitive fields

Adkits collect...

Obvious

Sensitive

PoliticsSexual

orientationor datinggender

Maritalstatus

Religion

FacebookID

GPScoordsHave

you gotchildren?

Income

Searchkeywords

Virus Bulletin 2013 - A. Apvrille 6/26

Page 28: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

More than 50 fields!

Adkits collect...

Obvious

Sensitive

Other fieldsIP address

Emailaddresses

Accelerometer

Android ID

Birthdate

City

Company

Cell ID

Devicemodel

Education

Ethnicity

First name

Last name

IMEI

IMSI

MCC

MNC

Interests

Kernelversion

LAC

LanguageMACaddress

Network/SIMoperator

OS versionor name

packageversionor name

phonenumber

presenceof an

accelerom-eter

presenceof a GPS

presenceof a

memorycard

ro.serialno

rootedindicator

SDKversion

SIM serialnumber

state

streetaddress

timezone

twitterID

UUID

zip code orarea code

Virus Bulletin 2013 - A. Apvrille 7/26

Page 29: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

More than 50 fields!

Adkits collect...

Obvious

Sensitive

Other fieldsIP address

Emailaddresses

Accelerometer

Android ID

Birthdate

City

Company

Cell ID

Devicemodel

Education

Ethnicity

First name

Last name

IMEI

IMSI

MCC

MNC

Interests

Kernelversion

LAC

LanguageMACaddress

Network/SIMoperator

OS versionor name

packageversionor name

phonenumber

presenceof an

accelerom-eter

presenceof a GPS

presenceof a

memorycard

ro.serialno

rootedindicator

SDKversion

SIM serialnumber

state

streetaddress

timezone

twitterID

UUID

zip code orarea code

Virus Bulletin 2013 - A. Apvrille 7/26

Page 30: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

More than 50 fields!

Adkits collect...

Obvious

Sensitive

Other fieldsIP address

Emailaddresses

Accelerometer

Android ID

Birthdate

City

Company

Cell ID

Devicemodel

Education

Ethnicity

First name

Last name

IMEI

IMSI

MCC

MNC

Interests

Kernelversion

LAC

LanguageMACaddress

Network/SIMoperator

OS versionor name

packageversionor name

phonenumber

presenceof an

accelerom-eter

presenceof a GPS

presenceof a

memorycard

ro.serialno

rootedindicator

SDKversion

SIM serialnumber

state

streetaddress

timezone

twitterID

UUID

zip code orarea code

Virus Bulletin 2013 - A. Apvrille 7/26

Page 31: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

More than 50 fields!

Adkits collect...

Obvious

Sensitive

Other fieldsIP address

Emailaddresses

Accelerometer

Android ID

Birthdate

City

Company

Cell ID

Devicemodel

Education

Ethnicity

First name

Last name

IMEI

IMSI

MCC

MNC

Interests

Kernelversion

LAC

LanguageMACaddress

Network/SIMoperator

OS versionor name

packageversionor name

phonenumber

presenceof an

accelerom-eter

presenceof a GPS

presenceof a

memorycard

ro.serialno

rootedindicator

SDKversion

SIM serialnumber

state

streetaddress

timezone

twitterID

UUID

zip code orarea code

Virus Bulletin 2013 - A. Apvrille 7/26

Page 32: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

More than 50 fields!

Adkits collect...

Obvious

Sensitive

Other fieldsIP address

Emailaddresses

Accelerometer

Android ID

Birthdate

City

Company

Cell ID

Devicemodel

Education

Ethnicity

First name

Last name

IMEI

IMSI

MCC

MNC

Interests

Kernelversion

LAC

LanguageMACaddress

Network/SIMoperator

OS versionor name

packageversionor name

phonenumber

presenceof an

accelerom-eter

presenceof a GPS

presenceof a

memorycard

ro.serialno

rootedindicator

SDKversion

SIM serialnumber

state

streetaddress

timezone

twitterID

UUID

zip code orarea code

Virus Bulletin 2013 - A. Apvrille 7/26

Page 33: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

More than 50 fields!

Adkits collect...

Obvious

Sensitive

Other fieldsIP address

Emailaddresses

Accelerometer

Android ID

Birthdate

City

Company

Cell ID

Devicemodel

Education

Ethnicity

First name

Last name

IMEI

IMSI

MCC

MNC

Interests

Kernelversion

LAC

LanguageMACaddress

Network/SIMoperator

OS versionor name

packageversionor name

phonenumber

presenceof an

accelerom-eter

presenceof a GPS

presenceof a

memorycard

ro.serialno

rootedindicator

SDKversion

SIM serialnumber

state

streetaddress

timezone

twitterID

UUID

zip code orarea code

Virus Bulletin 2013 - A. Apvrille 7/26

Page 34: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

More than 50 fields!

Adkits collect...

Obvious

Sensitive

Other fieldsIP address

Emailaddresses

Accelerometer

Android ID

Birthdate

City

Company

Cell ID

Devicemodel

Education

Ethnicity

First name

Last name

IMEI

IMSI

MCC

MNC

Interests

Kernelversion

LAC

LanguageMACaddress

Network/SIMoperator

OS versionor name

packageversionor name

phonenumber

presenceof an

accelerom-eter

presenceof a GPS

presenceof a

memorycard

ro.serialno

rootedindicator

SDKversion

SIM serialnumber

state

streetaddress

timezone

twitterID

UUID

zip code orarea code

Virus Bulletin 2013 - A. Apvrille 7/26

Page 35: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Where do they get those fields from?

People provide the information

I Yes, but in a given context

I Not fully aware info can be re-used

I User profiling. Matching data in differentdb

Virus Bulletin 2013 - A. Apvrille 8/26

Page 36: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Information sharing and user profiling

Adkit servers

Foo Bar

age=

15

User #1

location=France

French Game Ad

age=

70

Golf resort

Virus Bulletin 2013 - A. Apvrille 9/26

Page 37: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Information sharing and user profiling

Adkit servers

Foo Bar

age=

15

User #1

location=France

French Game Ad

age=

70

Golf resort

Virus Bulletin 2013 - A. Apvrille 9/26

Page 38: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Information sharing and user profiling

Adkit servers

Foo Bar

age=

15

User #1

location=France

French Game Ad

age=

70

Golf resort

Virus Bulletin 2013 - A. Apvrille 9/26

Page 39: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Information sharing and user profiling

Adkit servers

Foo Bar

age=

15

User #1

location=France

French Game Ad

age=

70

Golf resort

Virus Bulletin 2013 - A. Apvrille 9/26

Page 40: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Information sharing and user profiling

Adkit servers

Foo Bar

age=

15

User #1

location=France

French Game Ad

age=

70

Golf resort

Virus Bulletin 2013 - A. Apvrille 9/26

Page 41: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Information sharing and user profiling

Adkit servers

Foo Bar

age=

15

User #1

location=France

French Game Ad

age=

70

Golf resort

Virus Bulletin 2013 - A. Apvrille 9/26

Page 42: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Information sharing and user profiling

Adkit servers

Foo Bar

age=

15

User #1

location=France

French Game Ad

age=

70

Golf resort

Virus Bulletin 2013 - A. Apvrille 9/26

Page 43: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Age 15, located in France – advertisement screenshot

Virus Bulletin 2013 - A. Apvrille 10/26

Page 44: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Other sources of information

Adkits retrieve information without explicit consent

Example 1. Inexplicit permission

I READ PHONE STATE: ”Allows read only access to phonestate.”

I Admogo, Adwo, Leadbolt, Pontiflex, Smaato (etc)

I use it to retrieve your phone number (getLine1Number())

Virus Bulletin 2013 - A. Apvrille 11/26

Page 45: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Other sources of information (2)

Example 2. Non-existent permission

I Mobclick 4.0.1 SDK checks if the device is rooted or not.

I No corresponding permission in Android

I Info is sent in clear text (jb=BOOLEAN)

Virus Bulletin 2013 - A. Apvrille 12/26

Page 46: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Level of details: amusing or shocking?

Swinger?! Is it your business?

Millennial Media 3.6.3:if ((this.marital == "single") ||

(this.marital == "married") ||

(this.marital == "divorced") ||

(this.marital == "swinger") ||

(this.marital == "relationship")

|| (this.marital == "engaged"))

str = str + "&marital="

+ this.marital;

+ it is sent in cleartext...

Quattro Wireless SDK 2.1:55 or 80, it’s just the same,you’re a dinosaur!

I 12-17

I 18-24

I 25-34

I 35-49

I 50-54

I ≥55

Virus Bulletin 2013 - A. Apvrille 13/26

Page 47: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

GPS coordinates leaking

50% use GPS coords

Most send them in clear text:

I AdYip 1.0

I LeadBolt 1.3

I MobFox SDK 1.2

I MoPub 1.6.0 and 4.0

I Wooboo SDK 1.1 ...

Ximad v2.2 posts GPS coords in HTTPS :)

Example:

http://ads.mobclix.com?p=android...&ll=LATITUDE,LONGITUDE..

Virus Bulletin 2013 - A. Apvrille 14/26

Page 48: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Google Ad’s attempt to secure our GPS coordinates

Encrypting GPS coordinates

v1[1] = on.valueOf(((long) (p9.getLatitude() * ...

v1[2] = on.valueOf(((long) (p9.getLongitude() * ...

v1[3] = on.valueOf(((long) (p9.getAccuracy() * ...

com.google.ads.util.AdUtil.b(String.format("..."))

... with a hard-coded key

v0 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5..."

v3 = new byte[16];

v3 = {10, 55, 144, 209, 250, 7, ... }; // KEY !!!

v0.init(1, new javax.crypto.spec.SecretKeySpec(v3, "AES..."

v1 = v0.getIV();

v0 = v0.doFinal(p6.getBytes());

Virus Bulletin 2013 - A. Apvrille 15/26

Page 49: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Code obfuscation in adkits

Approx. 40% use obfuscation

Airpush seen to obfuscate its namespace:com.klYv.TsrC111182

Reprehensible when deliberate to hide reprehensibleactivity

I deleting logs. In Mobclick Agent 2.1.1:private static String d(

android.content.Context p12) {

...

Runtime.getRuntime().exec("logcat -c");

...

}

I using reflection to hide retrieval of accountemails

Virus Bulletin 2013 - A. Apvrille 16/26

Page 50: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Pontiflex hiding email retrieval via reflection?

Operational emails are worthy

v5 = Class.forName("android.accounts.AccountManager");

...

v16 = v5.getMethod("get", v21);

...

v19 = v16.invoke(v5, v23);

...

v15 = v19.getClass().getMethod("getAccounts", v0);

Use of reflection is deliberate

Could have been retrieved directly (without reflection)

AccountManager mgr = AccountManager.get(this);

Account[] accts = mgr.getAccounts();

Virus Bulletin 2013 - A. Apvrille 17/26

Page 51: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Unexplained behaviour: suspicious?

Detect Android emulatorsI AdsMOGO SDK 1.0.3: test IMEI = 000000000000000

I Google Ads 4.3.1: Build.BOARD = unknown,

Build.DEVICE = generic, Build.BRAND = unknown

I Mobfox 1.4: android id = 0000000000000000 or9774d56d682e549c

I Chartboost 2.0.1: Build.PRODUCT = sdk

Detect rooted devices

public boolean isDeviceRooted() { ..

if (this.rooted == -1) {

Runtime.getRuntime().exec("su");

this.rooted = 1;

...

} // Mobclix 4.0.1

Virus Bulletin 2013 - A. Apvrille 18/26

Page 52: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Dangerous behaviour

Inspect this code in Applovin 3.4.4...

v2 = new java.io.File(p9.getDir("al_sdk", 0), v1);

...

this.d = new SdkClassLoader(v2,

p9.getDir("al_outdex", 0),

SdkBootstrap.getClassLoader());

}

I Retrieving files al sdk and al outdex

I Calling SdkClassLoader with those + class loader

Virus Bulletin 2013 - A. Apvrille 19/26

Page 53: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

DexClassLoader

SdkClassLoader class calls DexClassLoader

package com.applovin.sdk.bootstrap;

import android.util.Log;

import dalvik.system.DexClassLoader;

import java.io.File;

public class SdkClassLoader

extends DexClassLoader {

..

I Loads the .dex without triggering a formal install

I Invisible to the end-user

I Potential security hole if adkit servers are compromised

I Hide one’s behaviour?

I Also noticed in Android/Plankton (Startapp/Plankton) byGrace et al.

Virus Bulletin 2013 - A. Apvrille 20/26

Page 54: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Conclusion for Stats lovers

1 malware in 3 contains adkits1 adkit in 2 uses GPS coordinates(nearly) 1 adkit in 2 retrieves your Android IDLess than 20% care to hash or encrypt identifiersAdkits seen to collect ≥ 50 fields40% use some form of obfuscation

Virus Bulletin 2013 - A. Apvrille 21/26

Page 55: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Are adkits free?

”73% apps are free” [Leontiadis, HotMobile’12]

Adkits ... Free ... as in beer?

No!

I Cost of data flow

I 65% of energy consumed in gamingapp is for ad modules [Pathak et al.,EuroSys’11]

I Indirect consumption

or Free ... as in speech?

No!!! → Loss of privacy

Virus Bulletin 2013 - A. Apvrille 22/26

Page 56: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

The dangers of mobile ads

Mobile phones carry personal data + camera, microphone, GPS...

Ad Server (located in the US?)

John DoeAged 32, Married, lives in San Francisco

Eats too much pizza, hates cats

Bought a scarf for Barbara

Now reading ”The Pillars of the Earth”

NSAPatriot Act

Cyber-criminal

Spear phishingSMShing

Rogue affiliates..

Compromised Ad Server

Virus Bulletin 2013 - A. Apvrille 23/26

Page 57: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

The dangers of mobile ads

Mobile phones carry personal data + camera, microphone, GPS...

Ad Server (located in the US?)

John DoeAged 32, Married, lives in San Francisco

Eats too much pizza, hates cats

Bought a scarf for Barbara

Now reading ”The Pillars of the Earth”

NSAPatriot Act

Cyber-criminal

Spear phishingSMShing

Rogue affiliates..

Compromised Ad Server

Virus Bulletin 2013 - A. Apvrille 23/26

Page 58: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

The dangers of mobile ads

Mobile phones carry personal data + camera, microphone, GPS...

Ad Server (located in the US?)

John DoeAged 32, Married, lives in San Francisco

Eats too much pizza, hates cats

Bought a scarf for Barbara

Now reading ”The Pillars of the Earth”

NSAPatriot Act

Cyber-criminal

Spear phishingSMShing

Rogue affiliates..

Compromised Ad Server

Virus Bulletin 2013 - A. Apvrille 23/26

Page 59: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Are advertisements bad?

Ads are everywhere

I Since the 19th century[Wikipedia]

I Paper, streets, TV, radio, PC...

IntrusionI Untargeted ads are okay

I Targeted ads are borderlineTV, radio...

I Mobile ads go one step further:retrieve our personal data

Virus Bulletin 2013 - A. Apvrille 24/26

Page 60: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Conclusion

Adware or Malware?

Where’s the limit?

What can we do?I Separate permissions for apps and

adkits

I Opt-in/Opt-out mandatory for alladkits

I Move to non-targeted ads? thendetect all privacy leaking adkits asmalware

I Promote ad-less apps?

I Auto-destructible data would be great:)

Virus Bulletin 2013 - A. Apvrille 25/26

Page 61: Analysis of Android In-App Advertisement Kits · 2016-05-26 · Analysis of Android In-App Advertisement Kits Karine de Pontev es, Axelle Apvrille Virus Bulletin, October 2013. Online

Thank You !

FortiGuard Labs

Follow us on twitter: @FortiGuardLabsor on our blog http://blog.fortinet.com

Me

twitter: @cryptaxe-mail: aapvrille at fortinet dot com

Are those PowerPoint slides? No way! It’s LATEX+ TikZ + Beamer + Lobster

Virus Bulletin 2013 - A. Apvrille 26/26