[Exploit] Location Stealing on Samsung smartphones

Search This thread

pedrodh

Retired Recognized Developer
Oct 19, 2009
194
226
www.pedronveloso.com
Edit: Uploaded new APK which is compatible with devices from Android 2.0 and up.

First of all, let me say this: I love Samsung smartphones, I myself own one, the Samsung Galaxy S, and these are great devices. Me sharing this information is only in the will to do good, so that people know how to protect themselves from this exploit and to pressure Samsung in fixing it on future updates.

What my exploit does it to obtain the user location, without the app needing any android permission AT ALL. Usually you could obtain the user location by using permissions such as ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION or even via Internet. The thing is, by using one of those, the user is alerted that that particular app will have access to those permissions on the device, but with my exploit the app is able to get the same info without issuing any of those. Also, this does not rely on having Root permissions on the device, this exploit works on out-of-the box devices.

The reason why this happens is because a certain widget (accurweather widget that comes with the phone) on some modern Samsung phones places the info about the location readable by every app in System Properties, its hidden from the 'naked eye' if you're just looking at the API, but you just have to know its name to get it. So these next 2 lines of code will get you the information used for the exploit (go ahead and compile your own version if you're afraid of my APK):

String value1 = Settings.System.getString(getContentResolver(), "aw_daemon_service_key_city_name");
String value2 = Settings.System.getString(getContentResolver(), "aw_daemon_service_key_detail_info");



The problem is even more serious than I first though, because you only need to have the widget on the launcher once, and that info will remain in the system informations when you remote it from the launcher, even across reboots or even if you clear the widget's data and cache (pretty scary :S). Sometimes (I don't know why exactly yet) the info goes away for good, but only if you don't have this widget on your launcher!

So, what devices does this affect. From my tests, it affect the Galaxy Note and the Samsung Galaxy S II, but it should affect much more new Samsung devices probably, I just didn't test. I have a SGS but since I run cyanogenMod there was no point running it there either (cyanogenmod ftw! :p).

Of course you might be wondering right now, that if you MANUALLY set the place to some strange place on the widget (let's say a remote village in China) what is reported by the exploit will be that place, but it seems to me that most people will be using this on "current location" setting.

So my truly advise is, root the phone and remove the widget for good (needs root because it is a system app). If you don't want to root the phone, then just manually change the place of the widget to something else.

In this thread I leave the simple app that shows you if your device its exploitable, and if so it shows you SOME of the information that could be exploited. As you'll notice during install, no permissions are required, nor the app will at any time ask for root permissions.

Market link to same app: https://market.android.com/details?id=com.pedronveloso.samsunglocationstealing
 

Attachments

  • SamsungLocationStealingExploit_1_1.apk
    14.4 KB · Views: 1,205
Last edited:

bedwa

Inactive Recognized Developer
Oct 5, 2008
1,152
718
Springfield IL
"Issue parsing the package" error and does not let me download in the market as I'm on an LG Thrill. I would however like to see if the Thrill/O3D's Accuweather widget is also prone to this issue. Thank you.
 

Snuble

Senior Member
Aug 5, 2010
69
2
So would it be enough for Accuweather to be updated (once its patched), or is the problem deeper then that?
 

mildlydisturbed

Senior Member
Oct 28, 2010
616
101
Nashville
We have a class action lawsuit against HTC/Accuweather going on over on the HTC EVO side, although our accuweather issue is it's transmitting location unencrypted in plain text to advertisers.

Wonder if this could be modified to work with the Sprint/HTC accuweather
 

pedrodh

Retired Recognized Developer
Oct 19, 2009
194
226
www.pedronveloso.com
So would it be enough for Accuweather to be updated (once its patched), or is the problem deeper then that?

I don't know for sure yet, but I'm guessing it probably could. The thing is, I think accurweather its a modified version for the Samsung phones, so only a ROM itself would carry such update, and we know how long those take :\.
 

pedrodh

Retired Recognized Developer
Oct 19, 2009
194
226
www.pedronveloso.com
"Issue parsing the package" error and does not let me download in the market as I'm on an LG Thrill. I would however like to see if the Thrill/O3D's Accuweather widget is also prone to this issue. Thank you.

Was probably because I made the minimum SDK equals to Android 2.3.3 . I've fixed that now, on the attachment and on the Market, so go ahead and try again please ;)
 

Phil750123

Senior Member
Apr 6, 2010
829
137
Birmingham, UK
Could anybody do me a huge favour, all i need is a screenshot of the results this application gets (a real location)

Im doing a dissertation on android gps forensics and it would be useful :) and as i dont have a samsung myself i cant do it.
 

pedrodh

Retired Recognized Developer
Oct 19, 2009
194
226
www.pedronveloso.com
Could anybody do me a huge favour, all i need is a screenshot of the results this application gets (a real location)

Im doing a dissertation on android gps forensics and it would be useful :) and as i dont have a samsung myself i cant do it.

This an earlier screenshot I have, almost the same but field names are in portuguese, however the info extracted is the same and reads in English so you can get the idea.
 

Attachments

  • sls.jpg
    sls.jpg
    38 KB · Views: 203
  • Like
Reactions: Phil750123

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    Edit: Uploaded new APK which is compatible with devices from Android 2.0 and up.

    First of all, let me say this: I love Samsung smartphones, I myself own one, the Samsung Galaxy S, and these are great devices. Me sharing this information is only in the will to do good, so that people know how to protect themselves from this exploit and to pressure Samsung in fixing it on future updates.

    What my exploit does it to obtain the user location, without the app needing any android permission AT ALL. Usually you could obtain the user location by using permissions such as ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION or even via Internet. The thing is, by using one of those, the user is alerted that that particular app will have access to those permissions on the device, but with my exploit the app is able to get the same info without issuing any of those. Also, this does not rely on having Root permissions on the device, this exploit works on out-of-the box devices.

    The reason why this happens is because a certain widget (accurweather widget that comes with the phone) on some modern Samsung phones places the info about the location readable by every app in System Properties, its hidden from the 'naked eye' if you're just looking at the API, but you just have to know its name to get it. So these next 2 lines of code will get you the information used for the exploit (go ahead and compile your own version if you're afraid of my APK):

    String value1 = Settings.System.getString(getContentResolver(), "aw_daemon_service_key_city_name");
    String value2 = Settings.System.getString(getContentResolver(), "aw_daemon_service_key_detail_info");



    The problem is even more serious than I first though, because you only need to have the widget on the launcher once, and that info will remain in the system informations when you remote it from the launcher, even across reboots or even if you clear the widget's data and cache (pretty scary :S). Sometimes (I don't know why exactly yet) the info goes away for good, but only if you don't have this widget on your launcher!

    So, what devices does this affect. From my tests, it affect the Galaxy Note and the Samsung Galaxy S II, but it should affect much more new Samsung devices probably, I just didn't test. I have a SGS but since I run cyanogenMod there was no point running it there either (cyanogenmod ftw! :p).

    Of course you might be wondering right now, that if you MANUALLY set the place to some strange place on the widget (let's say a remote village in China) what is reported by the exploit will be that place, but it seems to me that most people will be using this on "current location" setting.

    So my truly advise is, root the phone and remove the widget for good (needs root because it is a system app). If you don't want to root the phone, then just manually change the place of the widget to something else.

    In this thread I leave the simple app that shows you if your device its exploitable, and if so it shows you SOME of the information that could be exploited. As you'll notice during install, no permissions are required, nor the app will at any time ask for root permissions.

    Market link to same app: https://market.android.com/details?id=com.pedronveloso.samsunglocationstealing
    1
    Could anybody do me a huge favour, all i need is a screenshot of the results this application gets (a real location)

    Im doing a dissertation on android gps forensics and it would be useful :) and as i dont have a samsung myself i cant do it.

    This an earlier screenshot I have, almost the same but field names are in portuguese, however the info extracted is the same and reads in English so you can get the idea.