SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
with skype
Playing
rk
4knahs slacking @wo

Monkey taken from : http://www.websimians.com/

For educational purposes only!
I do not support the use of any of the mentioned
techniques for illegal activities..
lame

Disclaimer

Your viewing of these slides signifies your acceptance of the following Terms of Usage/Disclaimer. If
you do not accept these terms, you should discontinue viewing this site.
You may use this knowledge for background, informational purposes only. You agree to use the information provided solely for
your own noncommercial use and benefit, and only when in compliance with the terms of use of the application itself.
These slides are educational only. The creator of the slides has no intention to disrupt any skype service or incentivate the use of
the presented techniques. Therefore any information here should be regarded as educational and not to be practiced or
distributed.

The choice of application is merely due to its popularity and the challenge it presents. Although the writer of these slides only
makes available a small subset of the altered code which is not enough to reverse engineer the behavior of the application or to
distribute it as a new app, you should not use it to replicate its work.

For any concerns regarding the availability of these slides please feel free to contact me and I shall take them out.
Used tools
●
●
●

apktool - for decompiling/compiling apk
jarsigner - for signing apk
xposed - for intercepting runtime methods

Dalvik opcodes : http://pallergabor.uw.hu/androidblog/dalvik_opcodes.html
Quick tutorial
Altering smali and recompile:
●
●
●

java -jar apktool.jar d -f -r Skype2.apk
java -jar apktool.jar b -f Skype2 satan.apk
jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore ~/.
android/debug.keystore -storepass android -signedjar satan-sign.apk
satan.apk androiddebugkey
g
on and Tamperin
Obfuscati
Note that not all the smali files contain the original class and method names,
this is often because apps use the android ProGuard (http://developer.
android.com/tools/help/proguard.html) .
Fortunately it only removes unused stuff and attributes semantically obscure
names.
Other techniques can be used though to detect interception of methods
(probably expensive to verify on runtime), tampering of files (comparing hash
of stuff), etc. One commercial example is http://www.saikoa.
com/comparison_proguard_dexguard
smali packages
Skype
After decompiling the .dex files, the smali
folder should contain:

Lets investigate each of them in detail :)
ali/roboguice
sm
Framework for easing android
development, we can ignore it :)
“RoboGuice 2 smoothes out some of the wrinkles in your
Android development experience and makes things simple and
fun. Do you always forget to check for null when you
getIntent().getExtras()? RoboGuice 2 will help you. Think
casting findViewById() to a TextView shouldn’t be necessary?
RoboGuice 2 is on it. (...)” - https://github.
com/roboguice/roboguice
smali/android
Contains only a subfolder named support (v4
and v7). Most probably the android support
library:
“The Android Support Library package is a set of code libraries that provide backward-compatible
versions of Android framework APIs as well as features that are only available through the library
APIs. Each Support Library is backward-compatible to a specific Android API level. This design means
that your applications can use the libraries' features and still be compatible with devices running
Android 1.6 (API level 4) and up.” - http://developer.android.com/tools/support-library/index.html

Ignore! :D
smali/net
Contains hockeyapp:
“HockeyApp is the best way to collect live crash reports,
get feedback from your users, distribute your betas, and
analyze your test coverage.” - http://hockeyapp.
net/features/

I love ignore! <3
smali/javax
Contains javax.inject:
“This package specifies a means for obtaining objects in such a way as to
maximize reusability, testability and maintainability compared to traditional
approaches such as constructors, factories, and service locators (e.g., JNDI).
This process, known as dependency injection, is beneficial to most nontrivial
applications.” - http://docs.oracle.com/javaee/6/api/javax/inject/packagesummary.html

Wonder what.. ignore..
smali/com
This folder contains all the cool folders:
●
●
●
●

flurry - ads & analytics - http://www.flurry.com/
jess - rule engine for java - http://herzberg.ca.sandia.gov/
qik - mobile video sharing and capturing - http://qik.com/info/overview
google:
○ inject - again inject, is used by guice (http://code.google.com/p/google-guice/)

○

●
●

android - contains the GCM code
microsoft - microsoft advertising
skype - most of the application logic

(http://developer.android.com/google/gcm/index.html)
reting smali
Interp
A cool way to infer the application behavior is to actually
run it and observe its execution flow. Lets try it for skype
ads :)
adb shell "su -c 'cat data/data/de.robv.android.xposed.installer/log/debug.log'" | grep 'com.skype.android.ads'

Xposed can intercept methods during runtime!
reting smali
Interp
Execution within com.skype.android.ads goes something
like this (not necessarily this order):
● SkypeAdManager()
● SkypeAdTrackingManager - interacts with com.
microsoft.advertising
● SkypeAdPlacer - probably ad placing methods.
interacts with scroll
Both Ad Tracking and Placer are invoked by AdManager :D So lets look at
AdManager!
ypeAdManager
Sk
There are actually 3 SkypeAdManager classes in com/skype/android/ads. A
quick look at their superclasses tells:
●
●

●

SkypeAdManager.smali - class
that implements AdManager
SkypeAdManager$1.smali Broadcast receiver
(innerclass)
SkypeAdManager$2.smali Broadcast receiver
(innerclass)
ypeAdManager
Sk
So what intents are
these broadcast
receivers
intercepting?
Clearly this one is receiving
information on the
connectivity state!
What would happen if we
tampered with the
connectivity? :P

end of function
ypeAdManager
Sk
So what intents are these broadcast receivers intercepting?
Print intent type during
runtime..

This one calls a(SkypeAdManager,Intent) on SkypeAdManager
w to kill adds?
Ho
We can do lots of tricks we could perform in order to do this:
●

Alter the SkypeAdManager files to NOOP:
○ Using Xposed module to detect method and cancel.
○ Alter the smali files in order to avoid the display of ads.
■ Less elegant way would to say its always offline.
■ Pretend to have premium account

●

Discover who is instantiating SkypeAdManager and avoid it from the
source :D
○ comment some smali line -> needs recompiling and signing
○ intercept method on Xposed -> harder but cleaner
o creates it?
Wh
Looking at the execution flow, the AdManager is only created once:

And grepping the smali files for “SkypeAdManager” gives only one class outside of android ads
folder:
Why SkypeModule? Remember the package guice? That thing to ease the use of factories in java…
well, a guice module is generally the class that binds the specific classes.
SkypeModule
Skype binds all Ad classes within
a nice try catch.
Lets try to comment all ad
related stuff and run to see how
it goes.
In Xposed, we would have to
replicate the method without the
try part or by throwing this
exception
st experiment
Fir
By commenting everything within the try and recompiling, signing and
installing this what happens:
Lets clean this

Unfortunately, it is not resilient, as expected, the bound classes are used in
multiple places.
ental cleanup
Increm
Lets start (smartly) commenting all
com.skype.android.ads entries in
AccountAgent (without breaking
functionality) :)
Methods with commented code:
●
●
●
●
●
●

initializeAdComponent(Lcom/skype/Account;)V
handleSubscriptionChange()V
handleSkypeoutBalanceChange()V
onLogout()V
handleSkypeoutBalanceChange()V
handleSubscriptionChange()V

Useless methods...

If we would either fake connection or
change to premium there would be no ads
sting findings
Intere
With what data are the ads initialized?

A bit more research and we would find the rest of the arguments :)
# loop!

Greping for
com/skype/android/ads
would be faster but is nice to
see skype crash looping :D

Methods changed: onEvent(Lcom/skype/android/gen/ConversationListener$OnPropertyChange;)V

Methods changed: onPageScrolled(IFI)V ; onPause()V ; OnResume()V

Methods changed: done(Lcom/skype/async/AsyncResult;)V ; onViewCreated(Landroid/view/View;Landroid/os/Bundle;)V

Methods changed: onViewCreated(Landroid/view/View;Landroid/os/Bundle;)V
works!!...???
It
Now Skype works! :D
...but we get again a crash
during phone calls…
Methods changed: handleVideoOrientationChange(Landroid/content/res/Configuration;)V
onResume()V
Lets clear all!
So before reattempting to run, lets check if we cleaned all:

Just missing HubSection smali and we should be done!
Best for last
Ofc the last is always the toughest. It is some spaghetti logic to circumvent.
Since we don’t want to change the method signatures lets just replace all the
ads arguments with null and treat them correctly in the respective
constructors:

---> Methods altered : <clinit>()V,
<init>(Ljava/lang/String;IILcom/skype/android/analytics/AnalyticsEvent;Lcom/skype/android/ads/AdPlacement;)V
Done!
Congrats! We have a fully functional (not to be
distributed or used) skype app without ads :)
Now go on and delete it! :P
Smali files here :
http://tinyurl.com/nl3hn67
(pass: 4knahs - this link will autodestruct in 30 days)

A sometimes interesting website:
www.aknahs.pt

Weitere ähnliche Inhalte

Was ist angesagt?

Null Mumbai Meet_Android Reverse Engineering by Samrat Das
Null Mumbai Meet_Android Reverse Engineering by Samrat DasNull Mumbai Meet_Android Reverse Engineering by Samrat Das
Null Mumbai Meet_Android Reverse Engineering by Samrat Dasnullowaspmumbai
 
Improving DroidBox
Improving DroidBoxImproving DroidBox
Improving DroidBoxKelwin Yang
 
LinkedIn - Disassembling Dalvik Bytecode
LinkedIn - Disassembling Dalvik BytecodeLinkedIn - Disassembling Dalvik Bytecode
LinkedIn - Disassembling Dalvik BytecodeAlain Leon
 
OpenDaylight Developer Experience 2.0
 OpenDaylight Developer Experience 2.0 OpenDaylight Developer Experience 2.0
OpenDaylight Developer Experience 2.0Michael Vorburger
 
Beginners guide-to-reverse-engineering-android-apps-pau-oliva-fora-viaforensi...
Beginners guide-to-reverse-engineering-android-apps-pau-oliva-fora-viaforensi...Beginners guide-to-reverse-engineering-android-apps-pau-oliva-fora-viaforensi...
Beginners guide-to-reverse-engineering-android-apps-pau-oliva-fora-viaforensi...viaForensics
 
Writing Android Libraries
Writing Android LibrariesWriting Android Libraries
Writing Android Librariesemanuelez
 
Android Native Development Kit
Android Native Development KitAndroid Native Development Kit
Android Native Development KitPeter R. Egli
 
Introduction to Dynamic Analysis of Android Application
Introduction to Dynamic Analysis of Android ApplicationIntroduction to Dynamic Analysis of Android Application
Introduction to Dynamic Analysis of Android ApplicationKelwin Yang
 
.Net Hijacking to Defend PowerShell BSidesSF2017
.Net Hijacking to Defend PowerShell BSidesSF2017 .Net Hijacking to Defend PowerShell BSidesSF2017
.Net Hijacking to Defend PowerShell BSidesSF2017 Amanda Rousseau
 
ProbeDroid - Crafting Your Own Dynamic Instrument Tool on Android for App Beh...
ProbeDroid - Crafting Your Own Dynamic Instrument Tool on Android for App Beh...ProbeDroid - Crafting Your Own Dynamic Instrument Tool on Android for App Beh...
ProbeDroid - Crafting Your Own Dynamic Instrument Tool on Android for App Beh...ZongXian Shen
 
Why the Dark Side should use Swift and a SOLID Architecture
Why the Dark Side should use Swift and a SOLID ArchitectureWhy the Dark Side should use Swift and a SOLID Architecture
Why the Dark Side should use Swift and a SOLID ArchitectureJorge Ortiz
 
Gwt and JSR 269's Pluggable Annotation Processing API
Gwt and JSR 269's Pluggable Annotation Processing APIGwt and JSR 269's Pluggable Annotation Processing API
Gwt and JSR 269's Pluggable Annotation Processing APIArnaud Tournier
 
Introduction to the Android NDK
Introduction to the Android NDKIntroduction to the Android NDK
Introduction to the Android NDKSebastian Mauer
 
FRIDA 101 Android
FRIDA 101 AndroidFRIDA 101 Android
FRIDA 101 AndroidTony Thomas
 
NDK Programming in Android
NDK Programming in AndroidNDK Programming in Android
NDK Programming in AndroidArvind Devaraj
 
DBI-Assisted Android Application Reverse Engineering
DBI-Assisted Android Application Reverse EngineeringDBI-Assisted Android Application Reverse Engineering
DBI-Assisted Android Application Reverse EngineeringSahil Dhar
 
Who Needs Thumbs? Reverse Engineering Scramble With Friends
Who Needs Thumbs? Reverse Engineering Scramble With FriendsWho Needs Thumbs? Reverse Engineering Scramble With Friends
Who Needs Thumbs? Reverse Engineering Scramble With FriendsApkudo
 
Maven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patternsMaven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patternselliando dias
 

Was ist angesagt? (20)

Null Mumbai Meet_Android Reverse Engineering by Samrat Das
Null Mumbai Meet_Android Reverse Engineering by Samrat DasNull Mumbai Meet_Android Reverse Engineering by Samrat Das
Null Mumbai Meet_Android Reverse Engineering by Samrat Das
 
Improving DroidBox
Improving DroidBoxImproving DroidBox
Improving DroidBox
 
LinkedIn - Disassembling Dalvik Bytecode
LinkedIn - Disassembling Dalvik BytecodeLinkedIn - Disassembling Dalvik Bytecode
LinkedIn - Disassembling Dalvik Bytecode
 
OpenDaylight Developer Experience 2.0
 OpenDaylight Developer Experience 2.0 OpenDaylight Developer Experience 2.0
OpenDaylight Developer Experience 2.0
 
Beginners guide-to-reverse-engineering-android-apps-pau-oliva-fora-viaforensi...
Beginners guide-to-reverse-engineering-android-apps-pau-oliva-fora-viaforensi...Beginners guide-to-reverse-engineering-android-apps-pau-oliva-fora-viaforensi...
Beginners guide-to-reverse-engineering-android-apps-pau-oliva-fora-viaforensi...
 
Writing Android Libraries
Writing Android LibrariesWriting Android Libraries
Writing Android Libraries
 
Android Native Development Kit
Android Native Development KitAndroid Native Development Kit
Android Native Development Kit
 
Introduction to Dynamic Analysis of Android Application
Introduction to Dynamic Analysis of Android ApplicationIntroduction to Dynamic Analysis of Android Application
Introduction to Dynamic Analysis of Android Application
 
.Net Hijacking to Defend PowerShell BSidesSF2017
.Net Hijacking to Defend PowerShell BSidesSF2017 .Net Hijacking to Defend PowerShell BSidesSF2017
.Net Hijacking to Defend PowerShell BSidesSF2017
 
ProbeDroid - Crafting Your Own Dynamic Instrument Tool on Android for App Beh...
ProbeDroid - Crafting Your Own Dynamic Instrument Tool on Android for App Beh...ProbeDroid - Crafting Your Own Dynamic Instrument Tool on Android for App Beh...
ProbeDroid - Crafting Your Own Dynamic Instrument Tool on Android for App Beh...
 
Adobe Flex4
Adobe Flex4 Adobe Flex4
Adobe Flex4
 
Why the Dark Side should use Swift and a SOLID Architecture
Why the Dark Side should use Swift and a SOLID ArchitectureWhy the Dark Side should use Swift and a SOLID Architecture
Why the Dark Side should use Swift and a SOLID Architecture
 
Breaking iOS Apps using Cycript
Breaking iOS Apps using CycriptBreaking iOS Apps using Cycript
Breaking iOS Apps using Cycript
 
Gwt and JSR 269's Pluggable Annotation Processing API
Gwt and JSR 269's Pluggable Annotation Processing APIGwt and JSR 269's Pluggable Annotation Processing API
Gwt and JSR 269's Pluggable Annotation Processing API
 
Introduction to the Android NDK
Introduction to the Android NDKIntroduction to the Android NDK
Introduction to the Android NDK
 
FRIDA 101 Android
FRIDA 101 AndroidFRIDA 101 Android
FRIDA 101 Android
 
NDK Programming in Android
NDK Programming in AndroidNDK Programming in Android
NDK Programming in Android
 
DBI-Assisted Android Application Reverse Engineering
DBI-Assisted Android Application Reverse EngineeringDBI-Assisted Android Application Reverse Engineering
DBI-Assisted Android Application Reverse Engineering
 
Who Needs Thumbs? Reverse Engineering Scramble With Friends
Who Needs Thumbs? Reverse Engineering Scramble With FriendsWho Needs Thumbs? Reverse Engineering Scramble With Friends
Who Needs Thumbs? Reverse Engineering Scramble With Friends
 
Maven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patternsMaven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patterns
 

Andere mochten auch

DIFFDroid_Anto_Joseph_HIP_2016
DIFFDroid_Anto_Joseph_HIP_2016DIFFDroid_Anto_Joseph_HIP_2016
DIFFDroid_Anto_Joseph_HIP_2016Anthony Jose
 
IEEE Day 2013 - Reverse Engineering an Android Application
IEEE Day 2013 - Reverse Engineering an Android ApplicationIEEE Day 2013 - Reverse Engineering an Android Application
IEEE Day 2013 - Reverse Engineering an Android ApplicationRufatet Babakishiyev
 
Owasp advanced mobile-application-code-review-techniques-v0.2
Owasp advanced mobile-application-code-review-techniques-v0.2Owasp advanced mobile-application-code-review-techniques-v0.2
Owasp advanced mobile-application-code-review-techniques-v0.2drewz lin
 
Hacking your Droid (Aditya Gupta)
Hacking your Droid (Aditya Gupta)Hacking your Droid (Aditya Gupta)
Hacking your Droid (Aditya Gupta)ClubHack
 
Measuring User Experience: Case Study Student Centered e-Learning Environment
Measuring User Experience: Case Study Student Centered e-Learning EnvironmentMeasuring User Experience: Case Study Student Centered e-Learning Environment
Measuring User Experience: Case Study Student Centered e-Learning EnvironmentWorld Information Architecture Day 2016
 
Let's talk about jni
Let's talk about jniLet's talk about jni
Let's talk about jniYongqiang Li
 
Reverse Engineering .NET and Java
Reverse Engineering .NET and JavaReverse Engineering .NET and Java
Reverse Engineering .NET and JavaJoe Kuemerle
 
IOS Security Basics - NULL/ OWASP/G4H Meet
IOS Security Basics - NULL/ OWASP/G4H MeetIOS Security Basics - NULL/ OWASP/G4H Meet
IOS Security Basics - NULL/ OWASP/G4H MeetAnthony Jose
 
How to reverse engineer Android applications—using a popular word game as an ...
How to reverse engineer Android applications—using a popular word game as an ...How to reverse engineer Android applications—using a popular word game as an ...
How to reverse engineer Android applications—using a popular word game as an ...Christoph Matthies
 
Android internals 05 - Dalvik VM (rev_1.1)
Android internals 05 - Dalvik VM (rev_1.1)Android internals 05 - Dalvik VM (rev_1.1)
Android internals 05 - Dalvik VM (rev_1.1)Egor Elizarov
 
Understanding the Dalvik bytecode with the Dedexer tool
Understanding the Dalvik bytecode with the Dedexer toolUnderstanding the Dalvik bytecode with the Dedexer tool
Understanding the Dalvik bytecode with the Dedexer toolGabor Paller
 
Learning by hacking - android application hacking tutorial
Learning by hacking - android application hacking tutorialLearning by hacking - android application hacking tutorial
Learning by hacking - android application hacking tutorialLandice Fu
 
Observation Powerpoint
Observation PowerpointObservation Powerpoint
Observation Powerpointjadaniels
 

Andere mochten auch (20)

DIFFDroid_Anto_Joseph_HIP_2016
DIFFDroid_Anto_Joseph_HIP_2016DIFFDroid_Anto_Joseph_HIP_2016
DIFFDroid_Anto_Joseph_HIP_2016
 
IEEE Day 2013 - Reverse Engineering an Android Application
IEEE Day 2013 - Reverse Engineering an Android ApplicationIEEE Day 2013 - Reverse Engineering an Android Application
IEEE Day 2013 - Reverse Engineering an Android Application
 
Owasp advanced mobile-application-code-review-techniques-v0.2
Owasp advanced mobile-application-code-review-techniques-v0.2Owasp advanced mobile-application-code-review-techniques-v0.2
Owasp advanced mobile-application-code-review-techniques-v0.2
 
Interaction with scele
Interaction with sceleInteraction with scele
Interaction with scele
 
Smali语法
Smali语法Smali语法
Smali语法
 
Hacking your Droid (Aditya Gupta)
Hacking your Droid (Aditya Gupta)Hacking your Droid (Aditya Gupta)
Hacking your Droid (Aditya Gupta)
 
Measuring User Experience: Case Study Student Centered e-Learning Environment
Measuring User Experience: Case Study Student Centered e-Learning EnvironmentMeasuring User Experience: Case Study Student Centered e-Learning Environment
Measuring User Experience: Case Study Student Centered e-Learning Environment
 
Toward Reverse Engineering of VBA Based Excel Spreadsheets Applications
Toward Reverse Engineering of VBA Based Excel Spreadsheets ApplicationsToward Reverse Engineering of VBA Based Excel Spreadsheets Applications
Toward Reverse Engineering of VBA Based Excel Spreadsheets Applications
 
Let's talk about jni
Let's talk about jniLet's talk about jni
Let's talk about jni
 
Reverse Engineering .NET and Java
Reverse Engineering .NET and JavaReverse Engineering .NET and Java
Reverse Engineering .NET and Java
 
IOS Security Basics - NULL/ OWASP/G4H Meet
IOS Security Basics - NULL/ OWASP/G4H MeetIOS Security Basics - NULL/ OWASP/G4H Meet
IOS Security Basics - NULL/ OWASP/G4H Meet
 
How to reverse engineer Android applications—using a popular word game as an ...
How to reverse engineer Android applications—using a popular word game as an ...How to reverse engineer Android applications—using a popular word game as an ...
How to reverse engineer Android applications—using a popular word game as an ...
 
Android internals 05 - Dalvik VM (rev_1.1)
Android internals 05 - Dalvik VM (rev_1.1)Android internals 05 - Dalvik VM (rev_1.1)
Android internals 05 - Dalvik VM (rev_1.1)
 
Understanding the Dalvik bytecode with the Dedexer tool
Understanding the Dalvik bytecode with the Dedexer toolUnderstanding the Dalvik bytecode with the Dedexer tool
Understanding the Dalvik bytecode with the Dedexer tool
 
Practice of Android Reverse Engineering
Practice of Android Reverse EngineeringPractice of Android Reverse Engineering
Practice of Android Reverse Engineering
 
Learning by hacking - android application hacking tutorial
Learning by hacking - android application hacking tutorialLearning by hacking - android application hacking tutorial
Learning by hacking - android application hacking tutorial
 
Dancing with dalvik
Dancing with dalvikDancing with dalvik
Dancing with dalvik
 
Understanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual MachineUnderstanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual Machine
 
Observation Powerpoint
Observation PowerpointObservation Powerpoint
Observation Powerpoint
 
Observation method
Observation methodObservation method
Observation method
 

Ähnlich wie Android reverse engineering - Analyzing skype

Dive into Angular, part 5: Experience
Dive into Angular, part 5: ExperienceDive into Angular, part 5: Experience
Dive into Angular, part 5: ExperienceOleksii Prohonnyi
 
PHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in phpPHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in phpAhmed Abdou
 
Top 7 Angular Best Practices to Organize Your Angular App
Top 7 Angular Best Practices to Organize Your Angular AppTop 7 Angular Best Practices to Organize Your Angular App
Top 7 Angular Best Practices to Organize Your Angular AppKaty Slemon
 
Fuel for a great web experience
Fuel for a great web experienceFuel for a great web experience
Fuel for a great web experienceChristian Heilmann
 
Advanced deployment scenarios (netcoreconf)
Advanced deployment scenarios (netcoreconf)Advanced deployment scenarios (netcoreconf)
Advanced deployment scenarios (netcoreconf)Sergio Navarro Pino
 
Pwning mobile apps without root or jailbreak
Pwning mobile apps without root or jailbreakPwning mobile apps without root or jailbreak
Pwning mobile apps without root or jailbreakAbraham Aranguren
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakayaMbakaya Kwatukha
 
Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016Shubham Gupta
 
Google Glass Mirror API Setup
Google Glass Mirror API SetupGoogle Glass Mirror API Setup
Google Glass Mirror API SetupDiana Michelle
 
AppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileAppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileOleg Gryb
 
Pain Driven Development by Alexandr Sugak
Pain Driven Development by Alexandr SugakPain Driven Development by Alexandr Sugak
Pain Driven Development by Alexandr SugakSigma Software
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in DjangoLakshman Prasad
 
DevOps: The New Face Of Application Development - Global Azure Bootcamp
DevOps: The New Face Of Application Development - Global Azure BootcampDevOps: The New Face Of Application Development - Global Azure Bootcamp
DevOps: The New Face Of Application Development - Global Azure BootcampRichard Harbridge
 
I can be apple and so can you
I can be apple and so can youI can be apple and so can you
I can be apple and so can youShakacon
 
Intro To Django
Intro To DjangoIntro To Django
Intro To DjangoUdi Bauman
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsJim Jeffers
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & DebuggingIvano Malavolta
 

Ähnlich wie Android reverse engineering - Analyzing skype (20)

Dive into Angular, part 5: Experience
Dive into Angular, part 5: ExperienceDive into Angular, part 5: Experience
Dive into Angular, part 5: Experience
 
PHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in phpPHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in php
 
Top 7 Angular Best Practices to Organize Your Angular App
Top 7 Angular Best Practices to Organize Your Angular AppTop 7 Angular Best Practices to Organize Your Angular App
Top 7 Angular Best Practices to Organize Your Angular App
 
Fuel for a great web experience
Fuel for a great web experienceFuel for a great web experience
Fuel for a great web experience
 
Advanced deployment scenarios (netcoreconf)
Advanced deployment scenarios (netcoreconf)Advanced deployment scenarios (netcoreconf)
Advanced deployment scenarios (netcoreconf)
 
Pwning mobile apps without root or jailbreak
Pwning mobile apps without root or jailbreakPwning mobile apps without root or jailbreak
Pwning mobile apps without root or jailbreak
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
 
Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016
 
Google Glass Mirror API Setup
Google Glass Mirror API SetupGoogle Glass Mirror API Setup
Google Glass Mirror API Setup
 
AppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileAppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security Agile
 
Advanced deployment scenarios
Advanced deployment scenariosAdvanced deployment scenarios
Advanced deployment scenarios
 
Pain Driven Development by Alexandr Sugak
Pain Driven Development by Alexandr SugakPain Driven Development by Alexandr Sugak
Pain Driven Development by Alexandr Sugak
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
 
DevOps: The New Face Of Application Development - Global Azure Bootcamp
DevOps: The New Face Of Application Development - Global Azure BootcampDevOps: The New Face Of Application Development - Global Azure Bootcamp
DevOps: The New Face Of Application Development - Global Azure Bootcamp
 
I can be apple and so can you
I can be apple and so can youI can be apple and so can you
I can be apple and so can you
 
Introduce Django
Introduce DjangoIntroduce Django
Introduce Django
 
Intro To Django
Intro To DjangoIntro To Django
Intro To Django
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in Rails
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & Debugging
 
React django
React djangoReact django
React django
 

Mehr von Mário Almeida

Empirical Study of Android Alarm Usage for Application Scheduling
Empirical Study of Android Alarm Usage for Application SchedulingEmpirical Study of Android Alarm Usage for Application Scheduling
Empirical Study of Android Alarm Usage for Application SchedulingMário Almeida
 
High-Availability of YARN (MRv2)
High-Availability of YARN (MRv2)High-Availability of YARN (MRv2)
High-Availability of YARN (MRv2)Mário Almeida
 
Flume impact of reliability on scalability
Flume impact of reliability on scalabilityFlume impact of reliability on scalability
Flume impact of reliability on scalabilityMário Almeida
 
Dimemas and Multi-Level Cache Simulations
Dimemas and Multi-Level Cache SimulationsDimemas and Multi-Level Cache Simulations
Dimemas and Multi-Level Cache SimulationsMário Almeida
 
Self-Adapting, Energy-Conserving Distributed File Systems
Self-Adapting, Energy-Conserving Distributed File SystemsSelf-Adapting, Energy-Conserving Distributed File Systems
Self-Adapting, Energy-Conserving Distributed File SystemsMário Almeida
 
Smith waterman algorithm parallelization
Smith waterman algorithm parallelizationSmith waterman algorithm parallelization
Smith waterman algorithm parallelizationMário Almeida
 
Man-In-The-Browser attacks
Man-In-The-Browser attacksMan-In-The-Browser attacks
Man-In-The-Browser attacksMário Almeida
 
Flume-based Independent News Aggregator
Flume-based Independent News AggregatorFlume-based Independent News Aggregator
Flume-based Independent News AggregatorMário Almeida
 
Exploiting Availability Prediction in Distributed Systems
Exploiting Availability Prediction in Distributed SystemsExploiting Availability Prediction in Distributed Systems
Exploiting Availability Prediction in Distributed SystemsMário Almeida
 
High Availability of Services in Wide-Area Shared Computing Networks
High Availability of Services in Wide-Area Shared Computing NetworksHigh Availability of Services in Wide-Area Shared Computing Networks
High Availability of Services in Wide-Area Shared Computing NetworksMário Almeida
 
Instrumenting parsecs raytrace
Instrumenting parsecs raytraceInstrumenting parsecs raytrace
Instrumenting parsecs raytraceMário Almeida
 
Architecting a cloud scale identity fabric
Architecting a cloud scale identity fabricArchitecting a cloud scale identity fabric
Architecting a cloud scale identity fabricMário Almeida
 

Mehr von Mário Almeida (14)

Empirical Study of Android Alarm Usage for Application Scheduling
Empirical Study of Android Alarm Usage for Application SchedulingEmpirical Study of Android Alarm Usage for Application Scheduling
Empirical Study of Android Alarm Usage for Application Scheduling
 
Spark
SparkSpark
Spark
 
High-Availability of YARN (MRv2)
High-Availability of YARN (MRv2)High-Availability of YARN (MRv2)
High-Availability of YARN (MRv2)
 
Flume impact of reliability on scalability
Flume impact of reliability on scalabilityFlume impact of reliability on scalability
Flume impact of reliability on scalability
 
Dimemas and Multi-Level Cache Simulations
Dimemas and Multi-Level Cache SimulationsDimemas and Multi-Level Cache Simulations
Dimemas and Multi-Level Cache Simulations
 
Self-Adapting, Energy-Conserving Distributed File Systems
Self-Adapting, Energy-Conserving Distributed File SystemsSelf-Adapting, Energy-Conserving Distributed File Systems
Self-Adapting, Energy-Conserving Distributed File Systems
 
Smith waterman algorithm parallelization
Smith waterman algorithm parallelizationSmith waterman algorithm parallelization
Smith waterman algorithm parallelization
 
Man-In-The-Browser attacks
Man-In-The-Browser attacksMan-In-The-Browser attacks
Man-In-The-Browser attacks
 
Flume-based Independent News Aggregator
Flume-based Independent News AggregatorFlume-based Independent News Aggregator
Flume-based Independent News Aggregator
 
Exploiting Availability Prediction in Distributed Systems
Exploiting Availability Prediction in Distributed SystemsExploiting Availability Prediction in Distributed Systems
Exploiting Availability Prediction in Distributed Systems
 
High Availability of Services in Wide-Area Shared Computing Networks
High Availability of Services in Wide-Area Shared Computing NetworksHigh Availability of Services in Wide-Area Shared Computing Networks
High Availability of Services in Wide-Area Shared Computing Networks
 
Instrumenting parsecs raytrace
Instrumenting parsecs raytraceInstrumenting parsecs raytrace
Instrumenting parsecs raytrace
 
Architecting a cloud scale identity fabric
Architecting a cloud scale identity fabricArchitecting a cloud scale identity fabric
Architecting a cloud scale identity fabric
 
SOAP vs REST
SOAP vs RESTSOAP vs REST
SOAP vs REST
 

Kürzlich hochgeladen

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Kürzlich hochgeladen (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

Android reverse engineering - Analyzing skype

  • 1. with skype Playing rk 4knahs slacking @wo Monkey taken from : http://www.websimians.com/ For educational purposes only! I do not support the use of any of the mentioned techniques for illegal activities..
  • 2. lame Disclaimer Your viewing of these slides signifies your acceptance of the following Terms of Usage/Disclaimer. If you do not accept these terms, you should discontinue viewing this site. You may use this knowledge for background, informational purposes only. You agree to use the information provided solely for your own noncommercial use and benefit, and only when in compliance with the terms of use of the application itself. These slides are educational only. The creator of the slides has no intention to disrupt any skype service or incentivate the use of the presented techniques. Therefore any information here should be regarded as educational and not to be practiced or distributed. The choice of application is merely due to its popularity and the challenge it presents. Although the writer of these slides only makes available a small subset of the altered code which is not enough to reverse engineer the behavior of the application or to distribute it as a new app, you should not use it to replicate its work. For any concerns regarding the availability of these slides please feel free to contact me and I shall take them out.
  • 3. Used tools ● ● ● apktool - for decompiling/compiling apk jarsigner - for signing apk xposed - for intercepting runtime methods Dalvik opcodes : http://pallergabor.uw.hu/androidblog/dalvik_opcodes.html
  • 4. Quick tutorial Altering smali and recompile: ● ● ● java -jar apktool.jar d -f -r Skype2.apk java -jar apktool.jar b -f Skype2 satan.apk jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore ~/. android/debug.keystore -storepass android -signedjar satan-sign.apk satan.apk androiddebugkey
  • 5. g on and Tamperin Obfuscati Note that not all the smali files contain the original class and method names, this is often because apps use the android ProGuard (http://developer. android.com/tools/help/proguard.html) . Fortunately it only removes unused stuff and attributes semantically obscure names. Other techniques can be used though to detect interception of methods (probably expensive to verify on runtime), tampering of files (comparing hash of stuff), etc. One commercial example is http://www.saikoa. com/comparison_proguard_dexguard
  • 6. smali packages Skype After decompiling the .dex files, the smali folder should contain: Lets investigate each of them in detail :)
  • 7. ali/roboguice sm Framework for easing android development, we can ignore it :) “RoboGuice 2 smoothes out some of the wrinkles in your Android development experience and makes things simple and fun. Do you always forget to check for null when you getIntent().getExtras()? RoboGuice 2 will help you. Think casting findViewById() to a TextView shouldn’t be necessary? RoboGuice 2 is on it. (...)” - https://github. com/roboguice/roboguice
  • 8. smali/android Contains only a subfolder named support (v4 and v7). Most probably the android support library: “The Android Support Library package is a set of code libraries that provide backward-compatible versions of Android framework APIs as well as features that are only available through the library APIs. Each Support Library is backward-compatible to a specific Android API level. This design means that your applications can use the libraries' features and still be compatible with devices running Android 1.6 (API level 4) and up.” - http://developer.android.com/tools/support-library/index.html Ignore! :D
  • 9. smali/net Contains hockeyapp: “HockeyApp is the best way to collect live crash reports, get feedback from your users, distribute your betas, and analyze your test coverage.” - http://hockeyapp. net/features/ I love ignore! <3
  • 10. smali/javax Contains javax.inject: “This package specifies a means for obtaining objects in such a way as to maximize reusability, testability and maintainability compared to traditional approaches such as constructors, factories, and service locators (e.g., JNDI). This process, known as dependency injection, is beneficial to most nontrivial applications.” - http://docs.oracle.com/javaee/6/api/javax/inject/packagesummary.html Wonder what.. ignore..
  • 11. smali/com This folder contains all the cool folders: ● ● ● ● flurry - ads & analytics - http://www.flurry.com/ jess - rule engine for java - http://herzberg.ca.sandia.gov/ qik - mobile video sharing and capturing - http://qik.com/info/overview google: ○ inject - again inject, is used by guice (http://code.google.com/p/google-guice/) ○ ● ● android - contains the GCM code microsoft - microsoft advertising skype - most of the application logic (http://developer.android.com/google/gcm/index.html)
  • 12. reting smali Interp A cool way to infer the application behavior is to actually run it and observe its execution flow. Lets try it for skype ads :) adb shell "su -c 'cat data/data/de.robv.android.xposed.installer/log/debug.log'" | grep 'com.skype.android.ads' Xposed can intercept methods during runtime!
  • 13. reting smali Interp Execution within com.skype.android.ads goes something like this (not necessarily this order): ● SkypeAdManager() ● SkypeAdTrackingManager - interacts with com. microsoft.advertising ● SkypeAdPlacer - probably ad placing methods. interacts with scroll Both Ad Tracking and Placer are invoked by AdManager :D So lets look at AdManager!
  • 14. ypeAdManager Sk There are actually 3 SkypeAdManager classes in com/skype/android/ads. A quick look at their superclasses tells: ● ● ● SkypeAdManager.smali - class that implements AdManager SkypeAdManager$1.smali Broadcast receiver (innerclass) SkypeAdManager$2.smali Broadcast receiver (innerclass)
  • 15. ypeAdManager Sk So what intents are these broadcast receivers intercepting? Clearly this one is receiving information on the connectivity state! What would happen if we tampered with the connectivity? :P end of function
  • 16. ypeAdManager Sk So what intents are these broadcast receivers intercepting? Print intent type during runtime.. This one calls a(SkypeAdManager,Intent) on SkypeAdManager
  • 17. w to kill adds? Ho We can do lots of tricks we could perform in order to do this: ● Alter the SkypeAdManager files to NOOP: ○ Using Xposed module to detect method and cancel. ○ Alter the smali files in order to avoid the display of ads. ■ Less elegant way would to say its always offline. ■ Pretend to have premium account ● Discover who is instantiating SkypeAdManager and avoid it from the source :D ○ comment some smali line -> needs recompiling and signing ○ intercept method on Xposed -> harder but cleaner
  • 18. o creates it? Wh Looking at the execution flow, the AdManager is only created once: And grepping the smali files for “SkypeAdManager” gives only one class outside of android ads folder: Why SkypeModule? Remember the package guice? That thing to ease the use of factories in java… well, a guice module is generally the class that binds the specific classes.
  • 19. SkypeModule Skype binds all Ad classes within a nice try catch. Lets try to comment all ad related stuff and run to see how it goes. In Xposed, we would have to replicate the method without the try part or by throwing this exception
  • 20. st experiment Fir By commenting everything within the try and recompiling, signing and installing this what happens: Lets clean this Unfortunately, it is not resilient, as expected, the bound classes are used in multiple places.
  • 21. ental cleanup Increm Lets start (smartly) commenting all com.skype.android.ads entries in AccountAgent (without breaking functionality) :) Methods with commented code: ● ● ● ● ● ● initializeAdComponent(Lcom/skype/Account;)V handleSubscriptionChange()V handleSkypeoutBalanceChange()V onLogout()V handleSkypeoutBalanceChange()V handleSubscriptionChange()V Useless methods... If we would either fake connection or change to premium there would be no ads
  • 22. sting findings Intere With what data are the ads initialized? A bit more research and we would find the rest of the arguments :)
  • 23. # loop! Greping for com/skype/android/ads would be faster but is nice to see skype crash looping :D Methods changed: onEvent(Lcom/skype/android/gen/ConversationListener$OnPropertyChange;)V Methods changed: onPageScrolled(IFI)V ; onPause()V ; OnResume()V Methods changed: done(Lcom/skype/async/AsyncResult;)V ; onViewCreated(Landroid/view/View;Landroid/os/Bundle;)V Methods changed: onViewCreated(Landroid/view/View;Landroid/os/Bundle;)V
  • 24. works!!...??? It Now Skype works! :D ...but we get again a crash during phone calls… Methods changed: handleVideoOrientationChange(Landroid/content/res/Configuration;)V onResume()V
  • 25. Lets clear all! So before reattempting to run, lets check if we cleaned all: Just missing HubSection smali and we should be done!
  • 26. Best for last Ofc the last is always the toughest. It is some spaghetti logic to circumvent. Since we don’t want to change the method signatures lets just replace all the ads arguments with null and treat them correctly in the respective constructors: ---> Methods altered : <clinit>()V, <init>(Ljava/lang/String;IILcom/skype/android/analytics/AnalyticsEvent;Lcom/skype/android/ads/AdPlacement;)V
  • 27. Done! Congrats! We have a fully functional (not to be distributed or used) skype app without ads :) Now go on and delete it! :P Smali files here : http://tinyurl.com/nl3hn67 (pass: 4knahs - this link will autodestruct in 30 days) A sometimes interesting website: www.aknahs.pt