what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Android 4.2.x Superuser Unsanitized Environment

Android 4.2.x Superuser Unsanitized Environment
Posted Nov 14, 2013
Authored by Kevin Cernekee

Vulnerable releases of several common Android Superuser packages may allow malicious Android applications to execute arbitrary commands as root without notifying the device owner. This advisoriy documents PATH and BOOTCLASSPATH vulnerabilities.

tags | exploit, arbitrary, root
advisories | CVE-2013-6768, CVE-2013-6774
SHA-256 | 12b763de306db7a0f6da5ae622fa69aa12764251a01b3dfaf8577292ab988109

Android 4.2.x Superuser Unsanitized Environment

Change Mirror Download
Vulnerable releases of several common Android Superuser packages may
allow malicious Android applications to execute arbitrary commands as
root without notifying the device owner:

- ChainsDD Superuser (current releases, including v3.1.3)
- CyanogenMod/ClockWorkMod/Koush Superuser (current releases,
including v1.0.2.1)
- Chainfire SuperSU prior to v1.69

The majority of third-party ROMs include one of these packages.

On a rooted Android <= 4.2.x device, /system/xbin/su is a setuid root
binary which performs a number of privilege checks in order to
determine whether the operation requested by the caller should be
allowed. In the course of its normal duties, and prior to making the
allow/deny decision, /system/xbin/su invokes external programs under a
privileged UID, typically root (0) or system (1000):

- /system/bin/log, to record activity to logcat
- /system/bin/am, to send intents to the Superuser Java app
- /system/bin/sh, to execute the /system/bin/am wrapper script
- /system/bin/app_process, the Dalvik VM

The user who invokes /system/xbin/su may have the ability to
manipulate the environment variables, file descriptors, signals,
rlimits, tty/stdin/stdout/stderr, and possibly other items belonging
to any of these subprocesses. At least two vulnerabilities are
readily apparent:

- On ClockWorkMod Superuser, /system/xbin/su does not set PATH to a
known-good value, so a malicious user could trick /system/bin/am into
using a trojaned app_process binary:

echo -e '#!/system/bin/sh\nexport PATH=/system/bin:$PATH\ntouch
/data/trojan.out\nexec $0 "$@"' > app_process ; chmod 755 app_process
PATH=`pwd`:$PATH su -c 'true'

The PATH vulnerability is being tracked under CVE-2013-6768.

- Other environment variables could be used to affect the behavior of
the (moderately complex) subprocesses. For instance, manipulation of
BOOTCLASSPATH could cause a malicious .jar file to be loaded into the
privileged Dalvik VM instance. All three Superuser implementations
allowed Dalvik's BOOTCLASSPATH to be supplied by the attacker.

The BOOTCLASSPATH vulnerability is being tracked under CVE-2013-6774.
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    16 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close