nopcon '16 android kernel vulnerabilities

15
Hacki ng wit h sty le

Upload: abdsec

Post on 21-Jan-2017

428 views

Category:

Technology


4 download

TRANSCRIPT

Page 1: Nopcon '16 Android Kernel Vulnerabilities

Hacking

with

style

Page 2: Nopcon '16 Android Kernel Vulnerabilities

‘94

‘97

‘03

‘14

‘16

‘12

Who am I ?

Page 3: Nopcon '16 Android Kernel Vulnerabilities

Is it ?!

Page 4: Nopcon '16 Android Kernel Vulnerabilities

11 days later..

Page 5: Nopcon '16 Android Kernel Vulnerabilities

White WhiteLocal

Root

Remote

Root

Remote Root

Which Root ?

{XDA}

{Finch}

{Zerodium}

Page 6: Nopcon '16 Android Kernel Vulnerabilities

Howto Root ? Finch Style

• Qualcomm CVE-2015-0570• Broadcom CVE-2016-0801 *• MediaTek CVE-2016-2453

Needed • Find the execution path• Prepare PoC

Page 7: Nopcon '16 Android Kernel Vulnerabilities

CVE-2016-0801 Execution Path

• char devname[100];• wl_validate_wps_ie()• wl_cfg80211_add_set_beacon()• struct wl_cfg80211_ops = {• .set_beacon =

wl_cfg80211_add_set_beacon• .add_beacon =

wl_cfg80211_add_set_beacon

Page 8: Nopcon '16 Android Kernel Vulnerabilities

PoC • Probe Respone Packet

CVE-2016-0801

Page 9: Nopcon '16 Android Kernel Vulnerabilities

PoC • Probe Respone Packet

CVE-2016-0801

Page 10: Nopcon '16 Android Kernel Vulnerabilities

CVE-2016-0801 Result

• Nexus 5 , Samsung S5, Note5, … ???• DO NOT forget to check IF-ELSE blocks!• wl_cfg80211.c line #7728#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0))

.set_beacon = wl_cfg80211_add_set_beacon,

.add_beacon = wl_cfg80211_add_set_beacon,#else

.change_beacon = wl_cfg80211_change_beacon,

.start_ap = wl_cfg80211_start_ap,

.stop_ap = wl_cfg80211_stop_ap,#endif

Page 11: Nopcon '16 Android Kernel Vulnerabilities

drivers/net/wireless/bcmdhd/wl_cfg80211.c • wl_cfg80211_change_beacon()

CVE-2016-0801

Page 12: Nopcon '16 Android Kernel Vulnerabilities

OthersQualcomm Adreno GPU MSM Driver Heap Overflow • No CVE assigned• (mis)security t = min_t(int, group-

>reg_count, count);• buf = kmalloc(t * sizeof(unsigned int),

GFP_KERNEL);• Bug added June 2014 Bug patched July 2015

(!)• Samsung S5 Avea inTouch

Page 13: Nopcon '16 Android Kernel Vulnerabilities

OthersQualcomm MSM Debugfs Arbitrary Write• CVE-2016-2443• /sys/kernel/debug/mddi/reg -rw-r--r-- root root• Root ≠ Root• SELinux context

Page 14: Nopcon '16 Android Kernel Vulnerabilities

Nopcon Specials

• Ebook about KASLR (Turkish)

• WPS Probe Response Packet Generator (Github)

(CVE-2016-0801 - PoC)

• Links? Follow @abd_sec

Page 15: Nopcon '16 Android Kernel Vulnerabilities

Thanks !---------

Questions ?

@abd_sec@kyabd