[CVE-2013-3685][Root]Multiple LG Android devices, Sprite Software Backup

Search This thread

osashi555

New member
Jan 14, 2013
2
1
Subject:
Race condition in Sprite Software's backup software, installed by OEM on LG Android devices.

Author:
Justin Case - [email protected]

CVE ID:
CVE-2013-3685

Effect:
Locally exploited vulnerability with minimal device user interaction which results in executing code as the root user. Under specific circumstances, it is possible to exploit this vulnerability without the device user's knowledge

Products:
"Backup"
"spritebud"

Vendors:
Sprite Software
LG Electronics
Potentially other vendors

Affected Versions:
spritebud 1.3.24
backup 2.5.4105
Likely others versions as well

Affected Devices (Subject to firmware configuration):
LG-E971 LG Optimus G
LG-E973 LG Optimus G
LG-E975 LG Optimus G
LG-E975K LG Optimus G
LG-E975T LG Optimus G
LG-E976 LG Optimus G
LG-E977 LG Optimus G
LG-F100K LG Optimus Vu
LG-F100L LG Optimus Vu
LG-F100S LG Optimus Vu
LG-F120K LG Optimus Vu
LG-F120L LG Optimus LTE Tag
LG-F120S LG Optimus LTE Tag
LG-F160K LG Optimus LTE 2
LG-F160L LG Optimus LTE 2
LG-F160LV LG Optimus LTE 2
LG-F160S LG Optimus LTE 2
LG-F180K LG Optimus G
LG-F180L LG Optimus G
LG-F180S LG Optimus G
LG-F200K LG Optimus Vu 2
LG-F200L LG Optimus Vu 2
LG-F200S LG Optimus Vu 2
LG-F240K LG Optimus G Pro
LG-F240L LG Optimus G Pro
LG-F240S LG Optimus G Pro
LG-F260K LG Optimus LTE 3
LG-F260L LG Optimus LTE 3
LG-F260S LG Optimus LTE 3
LG-L21 LG Optimus G
LG-LG870 LG (Unknown)
LG-LS860 LG Mach
LG-LS970 LG Optimus G
LG-P760 LG Optimus L9
LG-P769 LG Optimus L9
LG-P780 LG Optimus L7
LG-P875 LG Optimus F5
LG-P875h LG Optimus F5
LG-P880 LG Optimus 4X HD
LG-P940 LG Prada
LG-SU540 LG Prada 3.0
LG-SU870 LG Optimus 3D Cube
LG-US780 LG Lollipop
Potentially other devices as well.


Product Information:

"Backup" and "spritebud" are a setting and application backup/restore system written by Sprite Software and deployed on LG Android smartphones. "Backup" is the end user front end app, and "spritebud" is the service that preforms the backup and restore functions.


Details:

The "spritebud" daemon is started by the init scripts and runs as the root user. Listening on a unix socket, the daemon accepts instructions from the "Backup" app. Using a crafted backup, we can write to, change permission and change ownership of any file, being that "spritebud" is running under the root user.


The crafted backup contains restore data for our exploiting application, "com.cunninglogic.lgpwn". The data includes a 50mb dummy file (a) used to increase our exploit window, su binary (b), a script (c) to install su, and a text file (d) containing the path to our script. All files are owned by the application, and are world write/read/execute. All files are restored in alphabetical order. The entire backup, after compress, is approximately 2mb. The structure of this backup is as follows:


drwxrwxrwx u0_a114 u0_a114 2013-05-28 20:13 files


./files:
- -rwxr-xr-x u0_a114 u0_a114 52428800 2013-05-22 20:06 a
- -rwxr-xr-x u0_a114 u0_a114 91992 2013-05-22 20:07 b
- -rwxr-xr-x u0_a114 u0_a114 251 2013-05-22 20:12 c
- -rwxr-xr-x u0_a114 u0_a114 42 2013-05-22 20:07 d


Prior to restoration, our exploit app runs, watches the process and waits. During restoration, the spritebud daemon first creates the files directory, then sets it's permission and owner. Next it decompresses and restores the "a" file, our 50mb dummy files. During the restoration of "a", our exploit application has time to symlink "d", our text file containing the full path to our script (c), to /sys/kernel/uevent_helper. Upon restoration of file "d", our path is written to uevent_helper. When a hotplug even occurs (which occur every few seconds), the path contained in uevent_helper is execute by the kernel and our script (c) is executed and installs the su binary (b).

omg omg thank you man, you rock, finally managed to root my lg l9, props to you man, i didnt know how to check on spritebud and other stuff, but i said meh lets try it, i used root checker, it said im rooted,
 
  • Like
Reactions: thatgurllizz

jamespxcv

Member
Jul 14, 2013
10
3
Los Angeles
Another Solution?

I was excited tried it out but did not work. I got the message:

CVE-2013-3685 POC by jcase

Can not find /system/xbin/spritebud, device may not be vulnerable.

I went to that file with ES File Manager but found another file named dexdump
 

KindleUser

Senior Member
Dec 7, 2012
402
103
This didn't work, I got the no SU Binary message, any help is appreciative, thanks! My phone model is in my sig if you need it. :)

EDIT: Nvm, I got it to work after 3 times, thanks man it really works still :D
 
Last edited:

lowcab311

New member
Jan 16, 2012
3
0
Rooted

Rooted on first try, thanks. Got phone yesterday, ota to p76920f, reset phone then ran lgpwn.
 

reikred

Member
Jul 12, 2013
45
2
Moto G8
Tried LGSlap.apk on p769 20h, not successful

Justin,

I have had success with LGPwn.apk, which worked on LG Optimus L9 firmware version p769 20f (thanks) but not on version 20h, which I foolishly installed today.

I saw you mention earlier that you may have a new exploit and asked for a listing of ls -l /system/app. I have attached that listing from my phone to see if you have any other exploit suggestions for me.

Thanks
RR
 

Attachments

  • rr.lg-optimus-l9-phone.ls-system-app.txt
    19.3 KB · Views: 269
Last edited:

chadteck

New member
Jan 6, 2009
4
2
P769 V20h

It initially appeared that the exploit had been patched in P769 V20h, but I was able to get it to work.

What I did was restore the backup and prior to clicking the button to restart, plugged the phone into my computer. I was prompted with a SuperSU confirmation dialog and I granted access.

This hotplug wasn't necessary with previous ROM versions, but maybe something changed. I read that was how the exploit worked, so I thought I'd give it a try.
 

Mactech.chris

New member
Feb 11, 2011
2
1
hot plug trick

It initially appeared that the exploit had been patched in P769 V20h, but I was able to get it to work.

What I did was restore the backup and prior to clicking the button to restart, plugged the phone into my computer. I was prompted with a SuperSU confirmation dialog and I granted access.

This hotplug wasn't necessary with previous ROM versions, but maybe something changed. I read that was how the exploit worked, so I thought I'd give it a try.


Thanks! The hot plug trick worked for me on P76920h
 
  • Like
Reactions: Nitrobass

reikred

Member
Jul 12, 2013
45
2
Moto G8
It initially appeared that the exploit had been patched in P769 V20h, but I was able to get it to work.

What I did was restore the backup and prior to clicking the button to restart, plugged the phone into my computer. I was prompted with a SuperSU confirmation dialog and I granted access.

This hotplug wasn't necessary with previous ROM versions, but maybe something changed. I read that was how the exploit worked, so I thought I'd give it a try.

Hmm, this still does not work with my t-mobile (US) p769 20h for me. In case it is significant: When I do the USB hotplug operation after restore, I choose the "LG Software Mode" as opposed to the other 3 USB modes that a popup shows me. I do NOT get a SuperSU permission dialog, although I have SuperSU installed from Google Play.

I also have already the SU binary:

[email protected]:/ $ ls -l /system/xbin/su
-rwxr-xr-x root shell 91992 2013-07-27 11:12 su
 

spiceminesofkessel

New member
Oct 4, 2013
2
0
Does LGPwn Need to Remain on the Phone?

This worked great in rooting my LG P769 20h. It worked the first time without any issues. My only question is this: Is it okay to uninstall LGPwn after I have gained root with it? I don't need the 50MB of space and it doesn't bother me being on the phone, I'm just curious as to whether or not it needs to remain on the phone. Thank you for your work, jcase!
 

mathorv

Senior Member
Jun 5, 2011
378
277
Will the phone became unrootred after factory reset?
Factory state without signs of tampering, factory bootloader(which is in my understanding untouched here.

If rooting method will fail - how to erase obsolete files?
 
Last edited:

jayfizze

Member
Jul 14, 2013
37
3
Kingston
I have a LG Optimus L9 Running Firmware 20H I have been trying to root it using LGPWN for about an hour now .... IT KEEPS FAILING >>>>>>>> .... Thing is the phone was rooted yesterday and I wiped my data from it .... it did the OTA update immediately as it turned back on and i figured i cld just root it again when i needed to customize it ( I.E. NOW !!! ) but this keeps failing ... any ideas as to why ... im seeing post that it should work but it's not working for me ........ :crying:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 44
    Subject:
    Race condition in Sprite Software's backup software, installed by OEM on LG Android devices.

    Author:
    Justin Case - [email protected]

    CVE ID:
    CVE-2013-3685

    Effect:
    Locally exploited vulnerability with minimal device user interaction which results in executing code as the root user. Under specific circumstances, it is possible to exploit this vulnerability without the device user's knowledge

    Products:
    "Backup"
    "spritebud"

    Vendors:
    Sprite Software
    LG Electronics
    Potentially other vendors

    Affected Versions:
    spritebud 1.3.24
    backup 2.5.4105
    Likely others versions as well

    Affected Devices (Subject to firmware configuration):
    LG-E971 LG Optimus G
    LG-E973 LG Optimus G
    LG-E975 LG Optimus G
    LG-E975K LG Optimus G
    LG-E975T LG Optimus G
    LG-E976 LG Optimus G
    LG-E977 LG Optimus G
    LG-F100K LG Optimus Vu
    LG-F100L LG Optimus Vu
    LG-F100S LG Optimus Vu
    LG-F120K LG Optimus Vu
    LG-F120L LG Optimus LTE Tag
    LG-F120S LG Optimus LTE Tag
    LG-F160K LG Optimus LTE 2
    LG-F160L LG Optimus LTE 2
    LG-F160LV LG Optimus LTE 2
    LG-F160S LG Optimus LTE 2
    LG-F180K LG Optimus G
    LG-F180L LG Optimus G
    LG-F180S LG Optimus G
    LG-F200K LG Optimus Vu 2
    LG-F200L LG Optimus Vu 2
    LG-F200S LG Optimus Vu 2
    LG-F240K LG Optimus G Pro
    LG-F240L LG Optimus G Pro
    LG-F240S LG Optimus G Pro
    LG-F260K LG Optimus LTE 3
    LG-F260L LG Optimus LTE 3
    LG-F260S LG Optimus LTE 3
    LG-L21 LG Optimus G
    LG-LG870 LG (Unknown)
    LG-LS860 LG Mach
    LG-LS970 LG Optimus G
    LG-P760 LG Optimus L9
    LG-P769 LG Optimus L9
    LG-P780 LG Optimus L7
    LG-P875 LG Optimus F5
    LG-P875h LG Optimus F5
    LG-P880 LG Optimus 4X HD
    LG-P940 LG Prada
    LG-SU540 LG Prada 3.0
    LG-SU870 LG Optimus 3D Cube
    LG-US780 LG Lollipop
    Potentially other devices as well.


    Product Information:

    "Backup" and "spritebud" are a setting and application backup/restore system written by Sprite Software and deployed on LG Android smartphones. "Backup" is the end user front end app, and "spritebud" is the service that preforms the backup and restore functions.


    Details:

    The "spritebud" daemon is started by the init scripts and runs as the root user. Listening on a unix socket, the daemon accepts instructions from the "Backup" app. Using a crafted backup, we can write to, change permission and change ownership of any file, being that "spritebud" is running under the root user.


    The crafted backup contains restore data for our exploiting application, "com.cunninglogic.lgpwn". The data includes a 50mb dummy file (a) used to increase our exploit window, su binary (b), a script (c) to install su, and a text file (d) containing the path to our script. All files are owned by the application, and are world write/read/execute. All files are restored in alphabetical order. The entire backup, after compress, is approximately 2mb. The structure of this backup is as follows:


    drwxrwxrwx u0_a114 u0_a114 2013-05-28 20:13 files


    ./files:
    - -rwxr-xr-x u0_a114 u0_a114 52428800 2013-05-22 20:06 a
    - -rwxr-xr-x u0_a114 u0_a114 91992 2013-05-22 20:07 b
    - -rwxr-xr-x u0_a114 u0_a114 251 2013-05-22 20:12 c
    - -rwxr-xr-x u0_a114 u0_a114 42 2013-05-22 20:07 d


    Prior to restoration, our exploit app runs, watches the process and waits. During restoration, the spritebud daemon first creates the files directory, then sets it's permission and owner. Next it decompresses and restores the "a" file, our 50mb dummy files. During the restoration of "a", our exploit application has time to symlink "d", our text file containing the full path to our script (c), to /sys/kernel/uevent_helper. Upon restoration of file "d", our path is written to uevent_helper. When a hotplug even occurs (which occur every few seconds), the path contained in uevent_helper is execute by the kernel and our script (c) is executed and installs the su binary (b).
    1
    Neither is the work, donation made, enjoy a beer or a cheap American six pack on me, ha.

    Sent from my LG-P769 using Tapatalk 2

    Thanks, will end up being pizza or ice cream for the kids
    1
    Enclosed. I grep'ed the logcat file for lgpwn, here is what came of it:

    I/ActivityManager( 350): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.cunninglogic.lgpwn/.MainActivity u=0} from pid 638
    I/ActivityManager( 350): Start proc com.cunninglogic.lgpwn for activity com.cunninglogic.lgpwn/.MainActivity: pid=2527 uid=10120 gids={1015, 1028}
    D/SurfaceFlinger( 142): createSurface for (1 x 1), name=Starting com.cunninglogic.lgpwn
    W/ActivityThread( 2527): Application com.cunninglogic.lgpwn is waiting for the debugger on port 8100...
    W/ActivityManager( 350): Activity idle timeout for ActivityRecord{418e27f8 com.cunninglogic.lgpwn/.MainActivity}

    In developer settings, do you have an app marked to be debugged?
    1
    Subject:
    Race condition in Sprite Software's backup software, installed by OEM on LG Android devices.

    Author:
    Justin Case - [email protected]

    CVE ID:
    CVE-2013-3685

    Effect:
    Locally exploited vulnerability with minimal device user interaction which results in executing code as the root user. Under specific circumstances, it is possible to exploit this vulnerability without the device user's knowledge

    Products:
    "Backup"
    "spritebud"

    Vendors:
    Sprite Software
    LG Electronics
    Potentially other vendors

    Affected Versions:
    spritebud 1.3.24
    backup 2.5.4105
    Likely others versions as well

    Affected Devices (Subject to firmware configuration):
    LG-E971 LG Optimus G
    LG-E973 LG Optimus G
    LG-E975 LG Optimus G
    LG-E975K LG Optimus G
    LG-E975T LG Optimus G
    LG-E976 LG Optimus G
    LG-E977 LG Optimus G
    LG-F100K LG Optimus Vu
    LG-F100L LG Optimus Vu
    LG-F100S LG Optimus Vu
    LG-F120K LG Optimus Vu
    LG-F120L LG Optimus LTE Tag
    LG-F120S LG Optimus LTE Tag
    LG-F160K LG Optimus LTE 2
    LG-F160L LG Optimus LTE 2
    LG-F160LV LG Optimus LTE 2
    LG-F160S LG Optimus LTE 2
    LG-F180K LG Optimus G
    LG-F180L LG Optimus G
    LG-F180S LG Optimus G
    LG-F200K LG Optimus Vu 2
    LG-F200L LG Optimus Vu 2
    LG-F200S LG Optimus Vu 2
    LG-F240K LG Optimus G Pro
    LG-F240L LG Optimus G Pro
    LG-F240S LG Optimus G Pro
    LG-F260K LG Optimus LTE 3
    LG-F260L LG Optimus LTE 3
    LG-F260S LG Optimus LTE 3
    LG-L21 LG Optimus G
    LG-LG870 LG (Unknown)
    LG-LS860 LG Mach
    LG-LS970 LG Optimus G
    LG-P760 LG Optimus L9
    LG-P769 LG Optimus L9
    LG-P780 LG Optimus L7
    LG-P875 LG Optimus F5
    LG-P875h LG Optimus F5
    LG-P880 LG Optimus 4X HD
    LG-P940 LG Prada
    LG-SU540 LG Prada 3.0
    LG-SU870 LG Optimus 3D Cube
    LG-US780 LG Lollipop
    Potentially other devices as well.


    Product Information:

    "Backup" and "spritebud" are a setting and application backup/restore system written by Sprite Software and deployed on LG Android smartphones. "Backup" is the end user front end app, and "spritebud" is the service that preforms the backup and restore functions.


    Details:

    The "spritebud" daemon is started by the init scripts and runs as the root user. Listening on a unix socket, the daemon accepts instructions from the "Backup" app. Using a crafted backup, we can write to, change permission and change ownership of any file, being that "spritebud" is running under the root user.


    The crafted backup contains restore data for our exploiting application, "com.cunninglogic.lgpwn". The data includes a 50mb dummy file (a) used to increase our exploit window, su binary (b), a script (c) to install su, and a text file (d) containing the path to our script. All files are owned by the application, and are world write/read/execute. All files are restored in alphabetical order. The entire backup, after compress, is approximately 2mb. The structure of this backup is as follows:


    drwxrwxrwx u0_a114 u0_a114 2013-05-28 20:13 files


    ./files:
    - -rwxr-xr-x u0_a114 u0_a114 52428800 2013-05-22 20:06 a
    - -rwxr-xr-x u0_a114 u0_a114 91992 2013-05-22 20:07 b
    - -rwxr-xr-x u0_a114 u0_a114 251 2013-05-22 20:12 c
    - -rwxr-xr-x u0_a114 u0_a114 42 2013-05-22 20:07 d


    Prior to restoration, our exploit app runs, watches the process and waits. During restoration, the spritebud daemon first creates the files directory, then sets it's permission and owner. Next it decompresses and restores the "a" file, our 50mb dummy files. During the restoration of "a", our exploit application has time to symlink "d", our text file containing the full path to our script (c), to /sys/kernel/uevent_helper. Upon restoration of file "d", our path is written to uevent_helper. When a hotplug even occurs (which occur every few seconds), the path contained in uevent_helper is execute by the kernel and our script (c) is executed and installs the su binary (b).

    omg omg thank you man, you rock, finally managed to root my lg l9, props to you man, i didnt know how to check on spritebud and other stuff, but i said meh lets try it, i used root checker, it said im rooted,
    1
    hot plug trick

    It initially appeared that the exploit had been patched in P769 V20h, but I was able to get it to work.

    What I did was restore the backup and prior to clicking the button to restart, plugged the phone into my computer. I was prompted with a SuperSU confirmation dialog and I granted access.

    This hotplug wasn't necessary with previous ROM versions, but maybe something changed. I read that was how the exploit worked, so I thought I'd give it a try.


    Thanks! The hot plug trick worked for me on P76920h