SlideShare a Scribd company logo
1 of 45
Download to read offline
Beating up on Android
  [Practical Android Attacks]




                  Bas Alberts + Massimiliano Oldani
                                     Immunity Inc.
Who are we?
●   Massimiliano Oldani
    ● Senior Security Researcher, Immunity, Inc.
    ● max@immunityinc.com


●   Bas Alberts
    ●   Senior Security Researcher, Immunity, Inc.
    ●   bas@immunityinc.com
Why pick on Android?
●   Starting to out-sell the iPhone
●   Decentralized maintenance
    ●   Carriers are responsible for updates (slooooow)
                                              slooooow
●   Solid SDK and NDK
●   Source Code available (for the most part)
●   Free and usable bugs from public repositories
●   Familiar (enough) architecture
●   Prevent Skynet from getting online
Android Versions
      Platform            API Level            Distribution

      Android 1.5         3                    3.0%

      Android 1.6         4                    4.8%

      Android 2.1         7                    29.0%

      Android 2.2         8                    61.3%

      Android 2.3         9                    0.7%

      Android 2.3.3       10                   1.0%

      Android 3.0         11                   0.2%


  http://developer.android.com/resources/dashboard/platform-versions.html
Attack Surface
●   Remote: gain access
     ●   Browser
         –   WebKit
     ●   Phone
         –   Telephony stack
●   Local: elevate privileges
     ●   Kernel
         –   Device drivers
     ●   Userland
         –   Zygote, ADBd, udev, etc.
●   ARM architecture (Linux EABI)
The Familiar
●   Linux permission model
●   Linux Kernel
●   udev
●   WebKit
●   OpenGL
●   SQLite
●   ARM Architecture
The unfamiliar
●   Binder IPC
●   ADB (Android Debug Bridge)
●   Ashmem (Anonymous Shared Memory)
●   Vendor specific device drivers
●   Android specific device drivers
●   Telephony stack
●   Bionic libc (not POSIX compliant)
●   Custom dynamic linker
●   Dalvik VM
●   Zygote
It is a Linux, sort of
●   Kinda
●   Android specific kernel features
    ●   Binder IPC (drivers/misc/binder.c)
                    drivers/misc/binder.c
    ●   Ashmem (mm/ashmem.c)
                mm/ashmem.c
    ●   Pmem (drivers/misc/pmem.c)
              drivers/misc/pmem.c
    ●   Logger (drivers/misc/logger.c)
                drivers/misc/logger.c
    ●   And much more …
        –   http://elinux.org/Android_Kernel_Features
Android Security Model
●   Privilege separation
    ●   Every application has its own uid:gid
    ●   Distinct system components have their own uid:gid
●   Privilege management
    ●   Zygote process parenting
    ●   No setuid files
●   Application permissions
    ●   Application Manifest based whitelist
    ●   Manually accepted by user on install
Hardware protection
●   ARM TrustZone
    ●   Used to provide tamper free data transactions
    ●   Not used by any Android vendor that we know of
●   ARM eXecute-Never (NX bit)
    ●   Used to enforce memory executable permissions
    ●   Not used up until Android 2.3 (updated: 07/17/2011)
         –   Executable stack
         –   Executable heap
    ●   Since 2.3 noexec build flags enabled and enforced
        on hardware that supports it (e.g. Nexus S)
         –   Thanks to Nick Kravelich @ Google for pointing this out
Software protection
●   Android randomize_va_space is set to 1
    ●   1: Conservative (stack, mmap base, VDSO, PIE) … no heap base (brk) randomization
                                                 PIE
          –   Regardless: Applications are fork()'d from Zygote anyways, and inherit its ASL
    ●   2: Full (stack, mmap base, VDSO, PIE, brk)
                                              brk

●   Most .so are pre-linked with Apriori (hardcoded load address in an 8
    byte “PRE “ record at the end of .so) and can not be relocated
    ●   Ret2libc convenience
●   Android's Dynamic Linker does not support runtime relocation
●   ASLR: Android Speed Loathes Randomization
    ASLR
    ●   Google + Stanford: new protection schemes based around rebasing pre-linked libraries during Android device updates

          –    http://bojinov.org/professional/wisec2011-mobileaslr-paper.pdf

●   DLMalloc based heap with the associated pointer protection schemes
●   ProPolice/SSP enabled GCC for native code
Application protection
●   Applications can be self signed
     ●   No Certificate Authority in place to verify application
         publishers
●   Jon Oberheide showed how Google can
    remotely pull/push apps from/to devices
    through the GTalkService
     ●   REMOVE_ASSET Intent
     ●   INSTALL_ASSET Intent
     ●   Recent examples include the 50 or so malicious apps that
         were pulled from the Android market
●   http://jon.oberheide.org/blog/2010/06/25/remote-kill-and-install-on-google-android/
Android Sandboxing
●   Based completely on privilege separation
    ●   Enforced by Linux Kernel
●   Dalvik VM is NOT a sandbox in itself
    ●   Any application can run native code
    ●   That means any application can touch the Kernel
        directly (syscalls, ioctls, etc.)
●   Fine grained Permission/Capability model
    ●   Per installed Application (Manifest)
                                   Manifest
    ●   Per URI (Intent permission flags)
                                   flags
Dalvik … it's not Java
●   Applications are written in Java
●   Applications are built as Dalvik Bytecode (.dex)
●   You don't really care … buuut ...
    ●   Register based, not stack based
    ●   Designed specifically for Android architecture
    ●   Bla bla bla
    ●   Please don't sue Google for having an optimized
        JVM
●   You do care when auditing Apps
    ●   dex2jar, smali, dedexer, ...
Android Properties
●   The property service
    ●   Manages a system wide configuration registry not
        unlike the Windows registry
    ●   Property key:value string pairs are stored in a
        shared memory segment: the property space
    ●   Applications retrieve system critical properties
        through the property space
         –   e.g. ro.secure property decides whether or not the ADB
             (Android Debug Bridge) daemon should run as root
                ●   If adbd runs as root (ro.secure == 0), an adb shell drops you to a
                    root prompt and the device is now essentially jailbroken
    ●   NDK: property_get(), property_set() (libcutils)
    ●   Shell: getprop, setprop
Zygote Process Management
●   Zygote is the Dalvik VM master process
    responsible for starting and managing all
    subsequent Dalvik based Components and
    their associated privileges
     ●   Preloads all the commonly needed libraries + Dalvik VM and
         fork()'s itself to instantiate new Application processes
●   Listens on a socket for messages that indicate
    which applications to start and how to start
    them (frameworks/base/core/java/com/android/internal/os/ZygoteConnection.java)
●   Because all Applications are fork()'d from
    Zygote, they inherit the same ASL as Zygote
Application Components
●   Activities
     ●    Present a screen with a user interface
     ●    Can be shared/started across applications
●   Services
     ●    Backgrounded capability with no user interface
     ●    Activities can bind to services to interact with them
●   Content Providers
     ●    Manage (stores, retrieves, provides) Application data
     ●    Data can be on a file system, in an SQLite DB, on the Web, etc.
●   Broadcast Receivers
     ●    Responds to system-wide broadcast announcements (Intents)
     ●    Screen turned off, Incoming SMS, etc.
●   For more detail visit: http://http://developer.android.com/guide/topics/fundamentals.html
Android Jailbreaking
●   Legal under the DMCA
    ●   Large community of people interested in
        jailbreaking phones (not just the usual suspects
        from the exploit dev scene)
●   Some of the more interesting public attacks
    against Android come from Sebastian Krahmer
    of Team 743C (formerly of Team 7350)
●   Focus mostly on Android specific components
    for obtaining local root privileges
    ●   Exception: Khramer's udev attacks
743C original attacks
●   Let's examine some public exploits
    ● KillingInTheNameOf


    ● Exploid


    ● RageAgainstTheCage


    ● Zimperlich
KillingInTheNameOf
●   Affected Android <= 2.2
●   Remapped Android property space to writable
    ●   Vulnerability in Ashmem implementation
    ●   Any user can remap shared memory belonging to
        init which contains the property space, with
        PROT_READ|PROT_WRITE permissions
●   Toggled ro.secure property to 0
    ●   ADB Daemon now runs as root
    ●   Physical local root through ADB shell
Exploid
●   Affected Android <= 2.1
    ●   As well as regular Linux installs with a vuln udev
●   Udev < 1.4.1 did not verify origin of NETLINK
    udev event messages
    ●   Sent a NETLINK udev event message that tricked
        udev into running an arbitrary binary as root when
        triggering a hotplug event
    ●   On Android the udev code lives inside of the init
        daemon which runs as root
●   Original bug (CVE-2009-1185) died in 2009 but resurfaced in
    very similar fashion in the Google udev implementation
    (updated: 17/07/2011)
RageAgainstTheCage
●   Affected Android <= 2.2
●   Setuid() return values not checked in ADBd
    ●   ADBd initially runs as root and setuid()'s to uid shell
    ●   If NPROC resource limit is reached for uid shell,
        setuid() from uid root to uid shell will fail
    ●   If setuid() fails, ADBd continues running as root
    ●   If ADBd runs as root, ADB shell also runs as root
                        root
●   Fork()'s processes as shell user until NPROC is reached
    ●   Restart ADBd (bringing uid shell to NPROC-1) and fork()
                                               NPROC-1
        again (as uid shell) right before ADBd (as uid root) tries to
        setuid() back to uid shell, setuid() fails, Rage wins
                                             fails
ZimperLich
●   Affected Android <= 2.2
●   Pretty much the same exploit theory as
    RageAgainstTheCage only this time abusing
    missing setuid() return value checks in Zygote
●   Triggered through Dalvik Application
    components who's privileges are managed by
    Zygote with setuid() calls
●   More convenient because it doesn't require a
    uid shell prompt
Practicality of jailbreaks
●   Practical jailbreak use for an attacker
    ●   Physical access required? Not that interesting for
        an attacker
                                 Jailbreaks   Practical
    ●   Zygote vs. Adbd
●   Our initial access to the device is generally
    established remotely
    ●   Through the browser
    ●   Through a malicious market Application
    ●   Through an attack against the Telephony Stack
    ●   Through an attack against the SMS/MMS handling
Establishing access
●   The most interesting target by far is the Android
    Browser
    ●   Public vulnerabilities available in WebKit
    ●   Slow to non-existent carrier patch cycles
    ●   No effective ASLR + executable heap makes
        remote exploitation reliable
        –   ARM: care about I/D cache syncing payload-wise
●   Second most interesting target is the Android
    Market
    ●   Easy to publish malicious Applications
●   Turn that order around if you can obtain INSTALL_ASSET capabilities :)
Elevating privileges
●   What can we touch as the browser?
    ●   The Kernel
    ●   Privileged System Services through Binder IPC (RPC)
    ●   Zygote
●   The entire Android local security model rises
    and falls with the (in)security of the Kernel
    ●   Audit Focus … from easy to hard
         –   Vendor specific Linux Kernel components
         –   Android specific Linux Kernel components
         –   Mainline Linux Kernel
               ●   No 0day needed mostly … just porting efforts of public vulns
               ●   Stale enough to bypass mmap_min_addr for NULL deref?
Hacking Dave … demo ...
●   Using a public WebKit vulnerability (CVE-2010-1807)
●   Using a private vendor specific bug that we can
    use from the context of the browser to pop root
    ●   Sorry we do not kill bugs ... but rest easy it only
        affects Android 2.1 with a very vendor specific
        configuration
    ●   Already plenty of jailbreaks out there for 2.1, but we
        needed one that worked practically from the context
        of the browser
●   Target: up-to-date T-Mobile 3G Android phone
Hacking Dave … lessons
●   Reasonably competent (ahum) attackers with
                            ahum
    no specific background in Android hacking can
    go from zero to owning Immunity's CEO in the
    span of about a week
●   Things that helped speed up the process
    ●   Prior knowledge of Linux Kernel internals
    ●   Prior knowledge of use-after-free WebKit attacks
    ●   Prior knowledge of ARM architecture
    ●   Prior knowledge of @daveaitel's Twitter obsession
                           @daveaitel
    ●   Team work (Thanks Matias + Agustin!)
                                   Agustin
uid=0
Got root, now what?
●   /data/system/accounts.db
●   /data/data/com.android.providers.telephony/databases/mmssms.db
●   If you suck as much at SQL as we do, use SQLiteBrowser to grab
    auth tokens
    ●   http://sqlitebrowser.sourceforge.net
●   To do useful things with oauth tokens use oauth2 for Python
    ●   https://github.com/simplegeo/python-oauth2
●   You also get ClientLogin auth tokens for most google data services
    ●   Such as: cp, cl, l2h, mail, youtube
    ●   curl –header “Authorization: GoogleLogin auth=....”
Fun with oauth
●   Twitter jacking is a crucial element of public
    humiliation, recycling oauth access keys and
    humiliation
    secrets for Twitter is easy
●   Consumer key and consumer secret are unique
    to every Twitter application
●   Because you are using an access key and
    access secret that was negotiated through the
    official Twitter Android App, your Tweets look
                             App
    like they came from “Twitter for Android”
Backdooring options
●   Application level
    ●   With full Manifest permissions
         –   Register broadcast receivers for Intents that do something interesting
               ●   Snoop SMS
               ●   Redirect calls
               ●   Make calls for $
●   With remote root on the phone, just copy your APK to /system/app/ to
    have it installed (with any Manifest permissions you want)
    ●   Or just run 'pm install -t yourapp.apk'
                                   yourapp.apk
●   Remotely triggered Intents make it easy to communicate with your
    backdoor App even when it is not running, it just has to be installed
    ●   BroadcastReceivers for the win
●   No Launch Activity in Manifest: no entry in the home Application listing
Backdooring options (cont.)
●   System level
    ●   Android Userland
         –   Modify one of the userland daemons that run as root
         –   Roll out a customized System Service manager that loads a backdoor
             service that you can talk to from apps through Binder IPC
               ●   Simplified: Roll out an app that registers a broadcast receiver for
                   backdoor-app intents, and has a suid-root worker bin on the system to
                   handle the requests (or a Kernel Trojan API available to it)
    ●   Linux Kernel
         –   Runtime patching through /dev/mem or /dev/kmem
         –   LKM
         –   Downside: you lose all the convenience of the Application API hooks
         –   Keep it simple, supports your userland trojan
Backdoor persistence
●   Can be tricky on certain devices!
    ●   T-Mobile/HTC G2 eMMC storage write-through protection
        makes /system changes non-persistent
    ●   Root + Rootkits are lost on reboots
         –   But Applications with full permissions are not lost
         –   root not essential to persist with an interesting backdoor (SMS snooper, GoldDialer, etc.)
    ●   Radio settings S-OFF/S-ON secure flag controls whether or
        not the the eMMC is write-through protected
Backdoor persistence (cont.)
●   Scott Walker's (scotty2) excellent gfree.c
          Walker
    solution vs. G2's eMMC protection
    ●   Get root through whatever means
    ●   Powercycle eMMC to bring it back up in RW mode through
        LKM (wpthis.c)
             wpthis.c
    ●   Install a MMC block request filter in the kernel that removes
        the write protection on the hidden radio settings partition
        (/dev/block/mmcblk0p7 on the g2)g2
    ●   Patch the security flag to 0 (S-OFF) on the radio settings
        partition
    ●   https://github.com/tmzt/g2root-kmod/tree/master/scotty2
Backdooring … demo ...
●   The Costanza
    ●   A simple example of SMS driven Android backdoor
        –   Shut up, it sounded cool on paper
        –   Took a couple of hours to develop with no prior Android dev
            experience
    ●   Registers an SMS Intent Broadcast Receiver with a
        high priority
        –   We get the SMS before the System App does
        –   We can AbortBroadcast() to drop the SMS from the chain
             ●   C&C SMS won't show up on target phone, but WILL show up in their
                 billing overview
    ●   Simple execute and HTTP POST capabilities
    ●   SMS snooping
Conclusions
●   Android is a Linux Frankenstein with an
    interesting attack surface
    ●   You should probably start auditing it
●   Applications can have a lot of power
    ●   You don't always need root
●   Developing Android Application level backdoors
    is easy thanks to a convenient API and a very
    solid SDK
●   Get going whilst the getting is still good!
Questions?
References
●   Jon Oberheide, “Android Hax”, Summercon 2010
    ●   http://jon.oberheide.org/files/summercon10-androidhax-jonoberheide.pdf

●   Android Developer's Guide
    ●   http://developer.android.com/guide/index.html

●   Sebastian Krahmer, 734C
    ●   http://c-skills.blogspot.com/

●   Hristo Bojinov, “Mobile ASLR”, 2011
    ●   http://bojinov.org/professional/wisec2011-mobileaslr-paper.pdf

●   Scott Walker, Gfree source
    ●   https://github.com/tmzt/g2root-kmod/tree/master/scotty2

More Related Content

What's hot

Kasza smashing the_jars
Kasza smashing the_jarsKasza smashing the_jars
Kasza smashing the_jarsPacSecJP
 
Linux as a gaming platform - Errata
Linux as a gaming platform - ErrataLinux as a gaming platform - Errata
Linux as a gaming platform - ErrataLeszek Godlewski
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System ServerOpersys inc.
 
Reverse Engineering the TomTom Runner pt. 2
Reverse Engineering the TomTom Runner pt. 2Reverse Engineering the TomTom Runner pt. 2
Reverse Engineering the TomTom Runner pt. 2Luis Grangeia
 
One Year of Porting - Post-mortem of two Linux/SteamOS launches
One Year of Porting - Post-mortem of two Linux/SteamOS launchesOne Year of Porting - Post-mortem of two Linux/SteamOS launches
One Year of Porting - Post-mortem of two Linux/SteamOS launchesLeszek Godlewski
 
Why kernelspace sucks?
Why kernelspace sucks?Why kernelspace sucks?
Why kernelspace sucks?OpenFest team
 
DEF CON 27- JISKA FABIAN - vacuum cleaning security
DEF CON 27- JISKA FABIAN - vacuum cleaning securityDEF CON 27- JISKA FABIAN - vacuum cleaning security
DEF CON 27- JISKA FABIAN - vacuum cleaning securityFelipe Prado
 
Применение виртуализации для динамического анализа
Применение виртуализации для динамического анализаПрименение виртуализации для динамического анализа
Применение виртуализации для динамического анализаPositive Hack Days
 
Advanced Evasion Techniques by Win32/Gapz
Advanced Evasion Techniques by Win32/GapzAdvanced Evasion Techniques by Win32/Gapz
Advanced Evasion Techniques by Win32/GapzAlex Matrosov
 
Linux as a gaming platform, ideology aside
Linux as a gaming platform, ideology asideLinux as a gaming platform, ideology aside
Linux as a gaming platform, ideology asideLeszek Godlewski
 
Pentester++
Pentester++Pentester++
Pentester++CTruncer
 
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013midnite_runr
 
Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Opersys inc.
 
Security research over Windows #defcon china
Security research over Windows #defcon chinaSecurity research over Windows #defcon china
Security research over Windows #defcon chinaPeter Hlavaty
 
A Battle Against the Industry - Beating Antivirus for Meterpreter and More
A Battle Against the Industry - Beating Antivirus for Meterpreter and MoreA Battle Against the Industry - Beating Antivirus for Meterpreter and More
A Battle Against the Industry - Beating Antivirus for Meterpreter and MoreCTruncer
 

What's hot (20)

Kasza smashing the_jars
Kasza smashing the_jarsKasza smashing the_jars
Kasza smashing the_jars
 
Porting Android
Porting AndroidPorting Android
Porting Android
 
Porting Android
Porting AndroidPorting Android
Porting Android
 
OpenGL (ES) debugging
OpenGL (ES) debuggingOpenGL (ES) debugging
OpenGL (ES) debugging
 
Linux as a gaming platform - Errata
Linux as a gaming platform - ErrataLinux as a gaming platform - Errata
Linux as a gaming platform - Errata
 
Gamedev-grade debugging
Gamedev-grade debuggingGamedev-grade debugging
Gamedev-grade debugging
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System Server
 
Reverse Engineering the TomTom Runner pt. 2
Reverse Engineering the TomTom Runner pt. 2Reverse Engineering the TomTom Runner pt. 2
Reverse Engineering the TomTom Runner pt. 2
 
One Year of Porting - Post-mortem of two Linux/SteamOS launches
One Year of Porting - Post-mortem of two Linux/SteamOS launchesOne Year of Porting - Post-mortem of two Linux/SteamOS launches
One Year of Porting - Post-mortem of two Linux/SteamOS launches
 
Why kernelspace sucks?
Why kernelspace sucks?Why kernelspace sucks?
Why kernelspace sucks?
 
DEF CON 27- JISKA FABIAN - vacuum cleaning security
DEF CON 27- JISKA FABIAN - vacuum cleaning securityDEF CON 27- JISKA FABIAN - vacuum cleaning security
DEF CON 27- JISKA FABIAN - vacuum cleaning security
 
Применение виртуализации для динамического анализа
Применение виртуализации для динамического анализаПрименение виртуализации для динамического анализа
Применение виртуализации для динамического анализа
 
Advanced Evasion Techniques by Win32/Gapz
Advanced Evasion Techniques by Win32/GapzAdvanced Evasion Techniques by Win32/Gapz
Advanced Evasion Techniques by Win32/Gapz
 
Linux as a gaming platform, ideology aside
Linux as a gaming platform, ideology asideLinux as a gaming platform, ideology aside
Linux as a gaming platform, ideology aside
 
Pentester++
Pentester++Pentester++
Pentester++
 
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
 
Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013
 
Code Injection in Windows
Code Injection in WindowsCode Injection in Windows
Code Injection in Windows
 
Security research over Windows #defcon china
Security research over Windows #defcon chinaSecurity research over Windows #defcon china
Security research over Windows #defcon china
 
A Battle Against the Industry - Beating Antivirus for Meterpreter and More
A Battle Against the Industry - Beating Antivirus for Meterpreter and MoreA Battle Against the Industry - Beating Antivirus for Meterpreter and More
A Battle Against the Industry - Beating Antivirus for Meterpreter and More
 

Viewers also liked

Ασφάλεια Android - Βασικές αρχές, αδυναμίες και λύσεις
Ασφάλεια Android - Βασικές αρχές, αδυναμίες και λύσειςΑσφάλεια Android - Βασικές αρχές, αδυναμίες και λύσεις
Ασφάλεια Android - Βασικές αρχές, αδυναμίες και λύσειςSpyros Eleftheriadis
 
Android village @nullcon 2012
Android village @nullcon 2012 Android village @nullcon 2012
Android village @nullcon 2012 hakersinfo
 
Android Hacking
Android HackingAndroid Hacking
Android Hackingantitree
 
Final ppt of e business
Final ppt of e businessFinal ppt of e business
Final ppt of e businessAbhishek Raj
 
Introduction to Cyber Security
Introduction to Cyber SecurityIntroduction to Cyber Security
Introduction to Cyber SecurityStephen Lahanas
 
Introduction To Ethical Hacking
Introduction To Ethical HackingIntroduction To Ethical Hacking
Introduction To Ethical HackingNeel Kamal
 
Disaster management with case study
Disaster management with case studyDisaster management with case study
Disaster management with case studyAkash Rana
 
Cybercrime.ppt
Cybercrime.pptCybercrime.ppt
Cybercrime.pptAeman Khan
 
Cyber crime and security ppt
Cyber crime and security pptCyber crime and security ppt
Cyber crime and security pptLipsita Behera
 

Viewers also liked (15)

Ασφάλεια Android - Βασικές αρχές, αδυναμίες και λύσεις
Ασφάλεια Android - Βασικές αρχές, αδυναμίες και λύσειςΑσφάλεια Android - Βασικές αρχές, αδυναμίες και λύσεις
Ασφάλεια Android - Βασικές αρχές, αδυναμίες και λύσεις
 
Android village @nullcon 2012
Android village @nullcon 2012 Android village @nullcon 2012
Android village @nullcon 2012
 
Ethical Hacking
Ethical HackingEthical Hacking
Ethical Hacking
 
Android Hacking
Android HackingAndroid Hacking
Android Hacking
 
Mobile Hacking
Mobile HackingMobile Hacking
Mobile Hacking
 
Final ppt of e business
Final ppt of e businessFinal ppt of e business
Final ppt of e business
 
E-business
E-businessE-business
E-business
 
E business ppt
E business pptE business ppt
E business ppt
 
Introduction to Cyber Security
Introduction to Cyber SecurityIntroduction to Cyber Security
Introduction to Cyber Security
 
Introduction To Ethical Hacking
Introduction To Ethical HackingIntroduction To Ethical Hacking
Introduction To Ethical Hacking
 
Disaster management with case study
Disaster management with case studyDisaster management with case study
Disaster management with case study
 
Hacking ppt
Hacking pptHacking ppt
Hacking ppt
 
Cybercrime.ppt
Cybercrime.pptCybercrime.ppt
Cybercrime.ppt
 
Android ppt
Android ppt Android ppt
Android ppt
 
Cyber crime and security ppt
Cyber crime and security pptCyber crime and security ppt
Cyber crime and security ppt
 

Similar to Android Attacks

Begining Android Development
Begining Android DevelopmentBegining Android Development
Begining Android DevelopmentHayi Nukman
 
Workshop su Android Kernel Hacking
Workshop su Android Kernel HackingWorkshop su Android Kernel Hacking
Workshop su Android Kernel HackingDeveler S.r.l.
 
Androidoverview 100405150711-phpapp01
Androidoverview 100405150711-phpapp01Androidoverview 100405150711-phpapp01
Androidoverview 100405150711-phpapp01Santosh Sh
 
Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Opersys inc.
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux DevelopersOpersys inc.
 
Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Opersys inc.
 
Q4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsQ4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsLinaro
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Androidnatdefreitas
 
Leveraging Android's Linux Heritage
Leveraging Android's Linux HeritageLeveraging Android's Linux Heritage
Leveraging Android's Linux HeritageOpersys inc.
 
ios-mobile-app-development-intro
ios-mobile-app-development-introios-mobile-app-development-intro
ios-mobile-app-development-introRemesh Govind M
 
Is Android the New Embedded Linux? at AnDevCon IV
Is Android the New Embedded Linux? at AnDevCon IVIs Android the New Embedded Linux? at AnDevCon IV
Is Android the New Embedded Linux? at AnDevCon IVOpersys inc.
 
Droidcon uk2012 androvm
Droidcon uk2012 androvmDroidcon uk2012 androvm
Droidcon uk2012 androvmdfages
 
Android Development in a Nutshell
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a NutshellAleix Solé
 
Mobile Application Development powerpoint
Mobile Application Development powerpointMobile Application Development powerpoint
Mobile Application Development powerpointJohnLagman3
 
Android Security, From the Ground Up
Android Security, From the Ground UpAndroid Security, From the Ground Up
Android Security, From the Ground UpOpersys inc.
 
Android workshop material
Android workshop materialAndroid workshop material
Android workshop materialReza Yogaswara
 
Android - Application Framework
Android - Application FrameworkAndroid - Application Framework
Android - Application FrameworkYong Heui Cho
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_authlzongren
 

Similar to Android Attacks (20)

Begining Android Development
Begining Android DevelopmentBegining Android Development
Begining Android Development
 
Workshop su Android Kernel Hacking
Workshop su Android Kernel HackingWorkshop su Android Kernel Hacking
Workshop su Android Kernel Hacking
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Androidoverview 100405150711-phpapp01
Androidoverview 100405150711-phpapp01Androidoverview 100405150711-phpapp01
Androidoverview 100405150711-phpapp01
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux Developers
 
Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013
 
Q4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsQ4.11: Porting Android to new Platforms
Q4.11: Porting Android to new Platforms
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
 
Leveraging Android's Linux Heritage
Leveraging Android's Linux HeritageLeveraging Android's Linux Heritage
Leveraging Android's Linux Heritage
 
ios-mobile-app-development-intro
ios-mobile-app-development-introios-mobile-app-development-intro
ios-mobile-app-development-intro
 
Is Android the New Embedded Linux? at AnDevCon IV
Is Android the New Embedded Linux? at AnDevCon IVIs Android the New Embedded Linux? at AnDevCon IV
Is Android the New Embedded Linux? at AnDevCon IV
 
Droidcon uk2012 androvm
Droidcon uk2012 androvmDroidcon uk2012 androvm
Droidcon uk2012 androvm
 
Android Development in a Nutshell
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a Nutshell
 
Mobile Application Development powerpoint
Mobile Application Development powerpointMobile Application Development powerpoint
Mobile Application Development powerpoint
 
Android Security, From the Ground Up
Android Security, From the Ground UpAndroid Security, From the Ground Up
Android Security, From the Ground Up
 
Android workshop material
Android workshop materialAndroid workshop material
Android workshop material
 
Android - Application Framework
Android - Application FrameworkAndroid - Application Framework
Android - Application Framework
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 

More from Michael Scovetta

Peter Norvig - NYC Machine Learning 2013
Peter Norvig - NYC Machine Learning 2013Peter Norvig - NYC Machine Learning 2013
Peter Norvig - NYC Machine Learning 2013Michael Scovetta
 
Modern Kernel Pool Exploitation: Attacks and Techniques
Modern Kernel Pool Exploitation: Attacks and TechniquesModern Kernel Pool Exploitation: Attacks and Techniques
Modern Kernel Pool Exploitation: Attacks and TechniquesMichael Scovetta
 
DEFCON 18- These Aren't the Permissions You're Looking For
DEFCON 18- These Aren't the Permissions You're Looking ForDEFCON 18- These Aren't the Permissions You're Looking For
DEFCON 18- These Aren't the Permissions You're Looking ForMichael Scovetta
 
Systematic Detection of Capability Leaks in Stock Android Smartphones
Systematic Detection of Capability Leaks in Stock Android SmartphonesSystematic Detection of Capability Leaks in Stock Android Smartphones
Systematic Detection of Capability Leaks in Stock Android SmartphonesMichael Scovetta
 
Consumer Password Worst Practices
Consumer Password Worst PracticesConsumer Password Worst Practices
Consumer Password Worst PracticesMichael Scovetta
 
A collection of examples of 64 bit errors in real programs
A collection of examples of 64 bit errors in real programsA collection of examples of 64 bit errors in real programs
A collection of examples of 64 bit errors in real programsMichael Scovetta
 
If You Don't Like the Game, Hack the Playbook... (Zatko)
If You Don't Like the Game, Hack the Playbook... (Zatko)If You Don't Like the Game, Hack the Playbook... (Zatko)
If You Don't Like the Game, Hack the Playbook... (Zatko)Michael Scovetta
 
Scaling Cyberwarfare (Roelker)
Scaling Cyberwarfare (Roelker)Scaling Cyberwarfare (Roelker)
Scaling Cyberwarfare (Roelker)Michael Scovetta
 
High Assurance Systems (Fisher)
High Assurance Systems (Fisher)High Assurance Systems (Fisher)
High Assurance Systems (Fisher)Michael Scovetta
 
PROCEED and Crowd-Sourced Formal Verification
PROCEED and Crowd-Sourced Formal VerificationPROCEED and Crowd-Sourced Formal Verification
PROCEED and Crowd-Sourced Formal VerificationMichael Scovetta
 
National Cyber Range (Ranka)
National Cyber Range (Ranka)National Cyber Range (Ranka)
National Cyber Range (Ranka)Michael Scovetta
 
Beyond Passwords (Guidorizzi)
Beyond Passwords (Guidorizzi)Beyond Passwords (Guidorizzi)
Beyond Passwords (Guidorizzi)Michael Scovetta
 
Scalable Cyber Deception (Ragsdale)
Scalable Cyber Deception (Ragsdale)Scalable Cyber Deception (Ragsdale)
Scalable Cyber Deception (Ragsdale)Michael Scovetta
 
Anomaly Detection at Multiple Scales (Waltzman)
Anomaly Detection at Multiple Scales (Waltzman)Anomaly Detection at Multiple Scales (Waltzman)
Anomaly Detection at Multiple Scales (Waltzman)Michael Scovetta
 
Secure Computer Systems (Shrobe)
Secure Computer Systems (Shrobe)Secure Computer Systems (Shrobe)
Secure Computer Systems (Shrobe)Michael Scovetta
 

More from Michael Scovetta (20)

Peter Norvig - NYC Machine Learning 2013
Peter Norvig - NYC Machine Learning 2013Peter Norvig - NYC Machine Learning 2013
Peter Norvig - NYC Machine Learning 2013
 
Strategic Surprise
Strategic SurpriseStrategic Surprise
Strategic Surprise
 
Stackjacking
StackjackingStackjacking
Stackjacking
 
Modern Kernel Pool Exploitation: Attacks and Techniques
Modern Kernel Pool Exploitation: Attacks and TechniquesModern Kernel Pool Exploitation: Attacks and Techniques
Modern Kernel Pool Exploitation: Attacks and Techniques
 
Attacking the WebKit Heap
Attacking the WebKit HeapAttacking the WebKit Heap
Attacking the WebKit Heap
 
Smooth CoffeeScript
Smooth CoffeeScriptSmooth CoffeeScript
Smooth CoffeeScript
 
DEFCON 18- These Aren't the Permissions You're Looking For
DEFCON 18- These Aren't the Permissions You're Looking ForDEFCON 18- These Aren't the Permissions You're Looking For
DEFCON 18- These Aren't the Permissions You're Looking For
 
Systematic Detection of Capability Leaks in Stock Android Smartphones
Systematic Detection of Capability Leaks in Stock Android SmartphonesSystematic Detection of Capability Leaks in Stock Android Smartphones
Systematic Detection of Capability Leaks in Stock Android Smartphones
 
Consumer Password Worst Practices
Consumer Password Worst PracticesConsumer Password Worst Practices
Consumer Password Worst Practices
 
HTML5 Web Security
HTML5 Web SecurityHTML5 Web Security
HTML5 Web Security
 
A collection of examples of 64 bit errors in real programs
A collection of examples of 64 bit errors in real programsA collection of examples of 64 bit errors in real programs
A collection of examples of 64 bit errors in real programs
 
If You Don't Like the Game, Hack the Playbook... (Zatko)
If You Don't Like the Game, Hack the Playbook... (Zatko)If You Don't Like the Game, Hack the Playbook... (Zatko)
If You Don't Like the Game, Hack the Playbook... (Zatko)
 
Scaling Cyberwarfare (Roelker)
Scaling Cyberwarfare (Roelker)Scaling Cyberwarfare (Roelker)
Scaling Cyberwarfare (Roelker)
 
High Assurance Systems (Fisher)
High Assurance Systems (Fisher)High Assurance Systems (Fisher)
High Assurance Systems (Fisher)
 
PROCEED and Crowd-Sourced Formal Verification
PROCEED and Crowd-Sourced Formal VerificationPROCEED and Crowd-Sourced Formal Verification
PROCEED and Crowd-Sourced Formal Verification
 
National Cyber Range (Ranka)
National Cyber Range (Ranka)National Cyber Range (Ranka)
National Cyber Range (Ranka)
 
Beyond Passwords (Guidorizzi)
Beyond Passwords (Guidorizzi)Beyond Passwords (Guidorizzi)
Beyond Passwords (Guidorizzi)
 
Scalable Cyber Deception (Ragsdale)
Scalable Cyber Deception (Ragsdale)Scalable Cyber Deception (Ragsdale)
Scalable Cyber Deception (Ragsdale)
 
Anomaly Detection at Multiple Scales (Waltzman)
Anomaly Detection at Multiple Scales (Waltzman)Anomaly Detection at Multiple Scales (Waltzman)
Anomaly Detection at Multiple Scales (Waltzman)
 
Secure Computer Systems (Shrobe)
Secure Computer Systems (Shrobe)Secure Computer Systems (Shrobe)
Secure Computer Systems (Shrobe)
 

Recently uploaded

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 

Recently uploaded (20)

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 

Android Attacks

  • 1. Beating up on Android [Practical Android Attacks] Bas Alberts + Massimiliano Oldani Immunity Inc.
  • 2. Who are we? ● Massimiliano Oldani ● Senior Security Researcher, Immunity, Inc. ● max@immunityinc.com ● Bas Alberts ● Senior Security Researcher, Immunity, Inc. ● bas@immunityinc.com
  • 3. Why pick on Android? ● Starting to out-sell the iPhone ● Decentralized maintenance ● Carriers are responsible for updates (slooooow) slooooow ● Solid SDK and NDK ● Source Code available (for the most part) ● Free and usable bugs from public repositories ● Familiar (enough) architecture ● Prevent Skynet from getting online
  • 4. Android Versions Platform API Level Distribution Android 1.5 3 3.0% Android 1.6 4 4.8% Android 2.1 7 29.0% Android 2.2 8 61.3% Android 2.3 9 0.7% Android 2.3.3 10 1.0% Android 3.0 11 0.2% http://developer.android.com/resources/dashboard/platform-versions.html
  • 5.
  • 6. Attack Surface ● Remote: gain access ● Browser – WebKit ● Phone – Telephony stack ● Local: elevate privileges ● Kernel – Device drivers ● Userland – Zygote, ADBd, udev, etc. ● ARM architecture (Linux EABI)
  • 7.
  • 8. The Familiar ● Linux permission model ● Linux Kernel ● udev ● WebKit ● OpenGL ● SQLite ● ARM Architecture
  • 9. The unfamiliar ● Binder IPC ● ADB (Android Debug Bridge) ● Ashmem (Anonymous Shared Memory) ● Vendor specific device drivers ● Android specific device drivers ● Telephony stack ● Bionic libc (not POSIX compliant) ● Custom dynamic linker ● Dalvik VM ● Zygote
  • 10. It is a Linux, sort of ● Kinda ● Android specific kernel features ● Binder IPC (drivers/misc/binder.c) drivers/misc/binder.c ● Ashmem (mm/ashmem.c) mm/ashmem.c ● Pmem (drivers/misc/pmem.c) drivers/misc/pmem.c ● Logger (drivers/misc/logger.c) drivers/misc/logger.c ● And much more … – http://elinux.org/Android_Kernel_Features
  • 11. Android Security Model ● Privilege separation ● Every application has its own uid:gid ● Distinct system components have their own uid:gid ● Privilege management ● Zygote process parenting ● No setuid files ● Application permissions ● Application Manifest based whitelist ● Manually accepted by user on install
  • 12. Hardware protection ● ARM TrustZone ● Used to provide tamper free data transactions ● Not used by any Android vendor that we know of ● ARM eXecute-Never (NX bit) ● Used to enforce memory executable permissions ● Not used up until Android 2.3 (updated: 07/17/2011) – Executable stack – Executable heap ● Since 2.3 noexec build flags enabled and enforced on hardware that supports it (e.g. Nexus S) – Thanks to Nick Kravelich @ Google for pointing this out
  • 13. Software protection ● Android randomize_va_space is set to 1 ● 1: Conservative (stack, mmap base, VDSO, PIE) … no heap base (brk) randomization PIE – Regardless: Applications are fork()'d from Zygote anyways, and inherit its ASL ● 2: Full (stack, mmap base, VDSO, PIE, brk) brk ● Most .so are pre-linked with Apriori (hardcoded load address in an 8 byte “PRE “ record at the end of .so) and can not be relocated ● Ret2libc convenience ● Android's Dynamic Linker does not support runtime relocation ● ASLR: Android Speed Loathes Randomization ASLR ● Google + Stanford: new protection schemes based around rebasing pre-linked libraries during Android device updates – http://bojinov.org/professional/wisec2011-mobileaslr-paper.pdf ● DLMalloc based heap with the associated pointer protection schemes ● ProPolice/SSP enabled GCC for native code
  • 14. Application protection ● Applications can be self signed ● No Certificate Authority in place to verify application publishers ● Jon Oberheide showed how Google can remotely pull/push apps from/to devices through the GTalkService ● REMOVE_ASSET Intent ● INSTALL_ASSET Intent ● Recent examples include the 50 or so malicious apps that were pulled from the Android market ● http://jon.oberheide.org/blog/2010/06/25/remote-kill-and-install-on-google-android/
  • 15. Android Sandboxing ● Based completely on privilege separation ● Enforced by Linux Kernel ● Dalvik VM is NOT a sandbox in itself ● Any application can run native code ● That means any application can touch the Kernel directly (syscalls, ioctls, etc.) ● Fine grained Permission/Capability model ● Per installed Application (Manifest) Manifest ● Per URI (Intent permission flags) flags
  • 16. Dalvik … it's not Java ● Applications are written in Java ● Applications are built as Dalvik Bytecode (.dex) ● You don't really care … buuut ... ● Register based, not stack based ● Designed specifically for Android architecture ● Bla bla bla ● Please don't sue Google for having an optimized JVM ● You do care when auditing Apps ● dex2jar, smali, dedexer, ...
  • 17. Android Properties ● The property service ● Manages a system wide configuration registry not unlike the Windows registry ● Property key:value string pairs are stored in a shared memory segment: the property space ● Applications retrieve system critical properties through the property space – e.g. ro.secure property decides whether or not the ADB (Android Debug Bridge) daemon should run as root ● If adbd runs as root (ro.secure == 0), an adb shell drops you to a root prompt and the device is now essentially jailbroken ● NDK: property_get(), property_set() (libcutils) ● Shell: getprop, setprop
  • 18. Zygote Process Management ● Zygote is the Dalvik VM master process responsible for starting and managing all subsequent Dalvik based Components and their associated privileges ● Preloads all the commonly needed libraries + Dalvik VM and fork()'s itself to instantiate new Application processes ● Listens on a socket for messages that indicate which applications to start and how to start them (frameworks/base/core/java/com/android/internal/os/ZygoteConnection.java) ● Because all Applications are fork()'d from Zygote, they inherit the same ASL as Zygote
  • 19. Application Components ● Activities ● Present a screen with a user interface ● Can be shared/started across applications ● Services ● Backgrounded capability with no user interface ● Activities can bind to services to interact with them ● Content Providers ● Manage (stores, retrieves, provides) Application data ● Data can be on a file system, in an SQLite DB, on the Web, etc. ● Broadcast Receivers ● Responds to system-wide broadcast announcements (Intents) ● Screen turned off, Incoming SMS, etc. ● For more detail visit: http://http://developer.android.com/guide/topics/fundamentals.html
  • 20. Android Jailbreaking ● Legal under the DMCA ● Large community of people interested in jailbreaking phones (not just the usual suspects from the exploit dev scene) ● Some of the more interesting public attacks against Android come from Sebastian Krahmer of Team 743C (formerly of Team 7350) ● Focus mostly on Android specific components for obtaining local root privileges ● Exception: Khramer's udev attacks
  • 21. 743C original attacks ● Let's examine some public exploits ● KillingInTheNameOf ● Exploid ● RageAgainstTheCage ● Zimperlich
  • 22. KillingInTheNameOf ● Affected Android <= 2.2 ● Remapped Android property space to writable ● Vulnerability in Ashmem implementation ● Any user can remap shared memory belonging to init which contains the property space, with PROT_READ|PROT_WRITE permissions ● Toggled ro.secure property to 0 ● ADB Daemon now runs as root ● Physical local root through ADB shell
  • 23. Exploid ● Affected Android <= 2.1 ● As well as regular Linux installs with a vuln udev ● Udev < 1.4.1 did not verify origin of NETLINK udev event messages ● Sent a NETLINK udev event message that tricked udev into running an arbitrary binary as root when triggering a hotplug event ● On Android the udev code lives inside of the init daemon which runs as root ● Original bug (CVE-2009-1185) died in 2009 but resurfaced in very similar fashion in the Google udev implementation (updated: 17/07/2011)
  • 24. RageAgainstTheCage ● Affected Android <= 2.2 ● Setuid() return values not checked in ADBd ● ADBd initially runs as root and setuid()'s to uid shell ● If NPROC resource limit is reached for uid shell, setuid() from uid root to uid shell will fail ● If setuid() fails, ADBd continues running as root ● If ADBd runs as root, ADB shell also runs as root root ● Fork()'s processes as shell user until NPROC is reached ● Restart ADBd (bringing uid shell to NPROC-1) and fork() NPROC-1 again (as uid shell) right before ADBd (as uid root) tries to setuid() back to uid shell, setuid() fails, Rage wins fails
  • 25. ZimperLich ● Affected Android <= 2.2 ● Pretty much the same exploit theory as RageAgainstTheCage only this time abusing missing setuid() return value checks in Zygote ● Triggered through Dalvik Application components who's privileges are managed by Zygote with setuid() calls ● More convenient because it doesn't require a uid shell prompt
  • 26. Practicality of jailbreaks ● Practical jailbreak use for an attacker ● Physical access required? Not that interesting for an attacker Jailbreaks Practical ● Zygote vs. Adbd ● Our initial access to the device is generally established remotely ● Through the browser ● Through a malicious market Application ● Through an attack against the Telephony Stack ● Through an attack against the SMS/MMS handling
  • 27. Establishing access ● The most interesting target by far is the Android Browser ● Public vulnerabilities available in WebKit ● Slow to non-existent carrier patch cycles ● No effective ASLR + executable heap makes remote exploitation reliable – ARM: care about I/D cache syncing payload-wise ● Second most interesting target is the Android Market ● Easy to publish malicious Applications ● Turn that order around if you can obtain INSTALL_ASSET capabilities :)
  • 28. Elevating privileges ● What can we touch as the browser? ● The Kernel ● Privileged System Services through Binder IPC (RPC) ● Zygote ● The entire Android local security model rises and falls with the (in)security of the Kernel ● Audit Focus … from easy to hard – Vendor specific Linux Kernel components – Android specific Linux Kernel components – Mainline Linux Kernel ● No 0day needed mostly … just porting efforts of public vulns ● Stale enough to bypass mmap_min_addr for NULL deref?
  • 29. Hacking Dave … demo ... ● Using a public WebKit vulnerability (CVE-2010-1807) ● Using a private vendor specific bug that we can use from the context of the browser to pop root ● Sorry we do not kill bugs ... but rest easy it only affects Android 2.1 with a very vendor specific configuration ● Already plenty of jailbreaks out there for 2.1, but we needed one that worked practically from the context of the browser ● Target: up-to-date T-Mobile 3G Android phone
  • 30. Hacking Dave … lessons ● Reasonably competent (ahum) attackers with ahum no specific background in Android hacking can go from zero to owning Immunity's CEO in the span of about a week ● Things that helped speed up the process ● Prior knowledge of Linux Kernel internals ● Prior knowledge of use-after-free WebKit attacks ● Prior knowledge of ARM architecture ● Prior knowledge of @daveaitel's Twitter obsession @daveaitel ● Team work (Thanks Matias + Agustin!) Agustin
  • 31. uid=0
  • 32. Got root, now what? ● /data/system/accounts.db ● /data/data/com.android.providers.telephony/databases/mmssms.db ● If you suck as much at SQL as we do, use SQLiteBrowser to grab auth tokens ● http://sqlitebrowser.sourceforge.net ● To do useful things with oauth tokens use oauth2 for Python ● https://github.com/simplegeo/python-oauth2 ● You also get ClientLogin auth tokens for most google data services ● Such as: cp, cl, l2h, mail, youtube ● curl –header “Authorization: GoogleLogin auth=....”
  • 33.
  • 34.
  • 35. Fun with oauth ● Twitter jacking is a crucial element of public humiliation, recycling oauth access keys and humiliation secrets for Twitter is easy ● Consumer key and consumer secret are unique to every Twitter application ● Because you are using an access key and access secret that was negotiated through the official Twitter Android App, your Tweets look App like they came from “Twitter for Android”
  • 36.
  • 37. Backdooring options ● Application level ● With full Manifest permissions – Register broadcast receivers for Intents that do something interesting ● Snoop SMS ● Redirect calls ● Make calls for $ ● With remote root on the phone, just copy your APK to /system/app/ to have it installed (with any Manifest permissions you want) ● Or just run 'pm install -t yourapp.apk' yourapp.apk ● Remotely triggered Intents make it easy to communicate with your backdoor App even when it is not running, it just has to be installed ● BroadcastReceivers for the win ● No Launch Activity in Manifest: no entry in the home Application listing
  • 38. Backdooring options (cont.) ● System level ● Android Userland – Modify one of the userland daemons that run as root – Roll out a customized System Service manager that loads a backdoor service that you can talk to from apps through Binder IPC ● Simplified: Roll out an app that registers a broadcast receiver for backdoor-app intents, and has a suid-root worker bin on the system to handle the requests (or a Kernel Trojan API available to it) ● Linux Kernel – Runtime patching through /dev/mem or /dev/kmem – LKM – Downside: you lose all the convenience of the Application API hooks – Keep it simple, supports your userland trojan
  • 39. Backdoor persistence ● Can be tricky on certain devices! ● T-Mobile/HTC G2 eMMC storage write-through protection makes /system changes non-persistent ● Root + Rootkits are lost on reboots – But Applications with full permissions are not lost – root not essential to persist with an interesting backdoor (SMS snooper, GoldDialer, etc.) ● Radio settings S-OFF/S-ON secure flag controls whether or not the the eMMC is write-through protected
  • 40. Backdoor persistence (cont.) ● Scott Walker's (scotty2) excellent gfree.c Walker solution vs. G2's eMMC protection ● Get root through whatever means ● Powercycle eMMC to bring it back up in RW mode through LKM (wpthis.c) wpthis.c ● Install a MMC block request filter in the kernel that removes the write protection on the hidden radio settings partition (/dev/block/mmcblk0p7 on the g2)g2 ● Patch the security flag to 0 (S-OFF) on the radio settings partition ● https://github.com/tmzt/g2root-kmod/tree/master/scotty2
  • 41. Backdooring … demo ... ● The Costanza ● A simple example of SMS driven Android backdoor – Shut up, it sounded cool on paper – Took a couple of hours to develop with no prior Android dev experience ● Registers an SMS Intent Broadcast Receiver with a high priority – We get the SMS before the System App does – We can AbortBroadcast() to drop the SMS from the chain ● C&C SMS won't show up on target phone, but WILL show up in their billing overview ● Simple execute and HTTP POST capabilities ● SMS snooping
  • 42.
  • 43. Conclusions ● Android is a Linux Frankenstein with an interesting attack surface ● You should probably start auditing it ● Applications can have a lot of power ● You don't always need root ● Developing Android Application level backdoors is easy thanks to a convenient API and a very solid SDK ● Get going whilst the getting is still good!
  • 45. References ● Jon Oberheide, “Android Hax”, Summercon 2010 ● http://jon.oberheide.org/files/summercon10-androidhax-jonoberheide.pdf ● Android Developer's Guide ● http://developer.android.com/guide/index.html ● Sebastian Krahmer, 734C ● http://c-skills.blogspot.com/ ● Hristo Bojinov, “Mobile ASLR”, 2011 ● http://bojinov.org/professional/wisec2011-mobileaslr-paper.pdf ● Scott Walker, Gfree source ● https://github.com/tmzt/g2root-kmod/tree/master/scotty2