top | item 4569686

USSD code to factory data reset a Galaxy S3 can be trigged from a HTML page

295 points| EwanToo | 13 years ago |exquisitetweets.com | reply

174 comments

order
[+] tomscott|13 years ago|reply
Hello. I'm the guy who put this collection together. I've since tried to update it, and to hit 'delete' on it to avoid spreading misinformation, but Exquisite Tweets is still caching the original version. Mea culpa: I didn't do the research before passing it on.

There's been a lot of back-and-forth over whether it's true or not (check @pof's timeline for such), and a hell of a lot of people sending it on without double-checking. Myself included.

There is clearly a big security bug here (see the video linked), but it's extremely questionable as to whether it can be activated from a web page or whether it requires a bit of social engineering too!

[Edited to add: and just as I write this, @jwheare has cleared the cache and fixed the bug in Exquisite Tweets. Hopefully that should nip this in the bud.]

[+] forgotusername|13 years ago|reply
I tried reproducing it using a "USSD" that works on my venerable Nexus One (radio debug - * # * # 4636 # * # *), but on entering dialler app the input box is empty. This might simply mean the debug activity was started and got focus before the dialler app had its focus set, so if another such code triggered factory reset, might definitely still work.
[+] jrabone|13 years ago|reply
I wrote a trivial webpage (using the show IMEI USSD * #06#), served from my desktop with Lighttpd. It certainly can be executed via a simple web page using a frameset on both Chrome & Browser, and there's no prompt. Works on a Huawei running 2.3, a Galaxy S2 running ICS, and an HTC.
[+] GICodeWarrior|13 years ago|reply
I created an Android app to intercept these requests and prevent them. https://dl.dropbox.com/s/28lk6rn09x84qqg/AutoResetBlocker.ap...

Please test it and make sure it works for you.

  1. Open the above link on your phone
  2. Install the application (it requires no special permissions)
  3. Try this IMEI test: http://jsfiddle.net/kKFn8/
  4. Check the box to make "Auto-Reset Blocker" the default action
  5. Auto-Reset Blocker will show you the malicious number
  6. Open this safe telephone number test: http://jsfiddle.net/tLHpw/
  7. Auto-Reset Blocker will show the safe number and you will be asked which dialer to use
  8. Select your normal dialer
  9. Your normal dialer will open with the safe number
Again, please give it a try. If people like it, I will see about setting up an Android Market account to distribute it.
[+] molmalo|13 years ago|reply
I tested it with my S2 and it works, but I had to put the files in a local web server because for some reason, the malicious code didn't work from jsfiddle.net

So I did the following:

  1- I tested the link provided by kristofferR (http://kristofferr.com/samsung.html).
  2- Made 2 local copies
  3- Edited one of the copies, replaceing the IMEI code with a normal phone number.
  4- Placed both files in a local web server.
  5- Accesed the files from my phone, and got the expected results with your App.
Thanks!
[+] TazeTSchnitzel|13 years ago|reply
Works great. However, the immediate select app popup if it's "safe" means that the "This phone number appears safe" text is shadowed on my phone. Perhaps add a "dial" button?

Still, please set up a Market account, this would be great!

[+] nl|13 years ago|reply
This seems to work, but I couldn't get the JSFiddles to make it trigger.

May I suggest pointing people to a simple webpage (like http://kristofferr.com/samsung.html) maybe more user-friendly?

[+] manki|13 years ago|reply
Please add this to Google Play store so its more trustworthy and easier to access.
[+] forgotusername|13 years ago|reply
Page text was:

    the USSD code to factory data reset a Galaxy S3 is *2767*3855# can be
    triggered from browser like this: <frame src="tel:*2767*3855%23" />
[+] Achshar|13 years ago|reply
Looks like OP decided to pull this down to minimize damage. Makes me wonder was this a 0-day or he informed Samsung first.
[+] andrewcooke|13 years ago|reply
does that mean premium rate numbers can also be triggered?
[+] aw3c2|13 years ago|reply
If I was really bored and feeling malicious, printing QR codes to point to this "exploit" and then pasting them over QR codes on random advertisements in the streets seems like a terrible idea.
[+] asmithmd1|13 years ago|reply
It wouldn't affect anyone because no one has ever scanned a QR code in an ad
[+] mibbitier|13 years ago|reply
I've yet to scan one of these codes, or see anyone scanning one. It seems like something from the 90s just came back for one last dying breath.
[+] ColinDabritz|13 years ago|reply
This is pretty darn dangerous already, but I would note you may not need a website at all for this. From my understanding, the problem is in the stock dialer, and it automatically executes when the number is entered. I will quietly note here that, as part of the standard, QR codes can embed phone numbers. I do not have a samsung phone to test this with. Anyone?
[+] kristofferR|13 years ago|reply
Here's a safe version of the exploit that displays your IMEI: http://kristofferR.com/samsung.html

Check the html in your desktop browser first, for all you know I might as well be a malicious douchebag.

The exploit seems to require a stock Samsung Galaxy dialer, works fine on my cheap Samsung Galaxy Y but not on my friend's modded S3 with a vanilla Android dialer.

[+] nicholassmith|13 years ago|reply
That's a pretty big flaw, there's plenty of companies with QR Codes printed on posters etc, only takes one malicious reprint or sticker overlay. I imagine Samsung will probably take fast action on it. Well, hopefully fast action.
[+] antidoh|13 years ago|reply
And then the Telcos will take a year or more to roll it out incrementally around the world as they argue with Samsung over who pays for it.
[+] lwhi|13 years ago|reply
As far as I can tell, the problem is with the Samsung Dialler application that's part of TouchWiz.

If you install a second dialler application via the Play Store, you'll initially be asked which dialler app you want to use before the code is executed - which can prevent execution.

There's a strong possibility that other dialler applications aren't affected (i.e. stock / 3rd party).

[+] FreshCode|13 years ago|reply
Can anyone on HN confirm this exploit?
[+] henriklied|13 years ago|reply
I just tested it on a Samsung Galaxy S3, in several forms (as src in link, script, img, video and object elements, as well as the href in an a element). Nothing happened here.
[+] DirtyCalvinist|13 years ago|reply
I just tried it on the S3 test device here at work. No go on either putting it in a web page, or going through a QR code.
[+] semenko|13 years ago|reply
I'm 95% sure this bug was fixed between ICS and Jelly Bean.

I'd been using the app Hidden Menus (https://play.google.com/store/apps/details?id=com.lorenx.and...) which stopped working at the ICS -> JB transition. You now need to type USSD/star codes manually.

Perhaps this puts a new face on the Android OS update/fragmentation problem.

[+] jrabone|13 years ago|reply
The only JB device I have to hand is a Nexus 7, which of course just prompts to add the number as a contact...
[+] armis|13 years ago|reply
I have samsung galaxy s i9000 Android CM9 4.0.4. Can confirm that exploit is working and shows imei popup
[+] oofabz|13 years ago|reply
+++ATH0
[+] joezydeco|13 years ago|reply
Hah! A friend of mine back in the BBS days had a last name that ended in a certain pair of characters that would trigger a zmodem download. Those were fun times, weren't they?
[+] drewwwwww|13 years ago|reply
exactly what i thought of! except even worse.
[+] gulbrandr|13 years ago|reply
Can you explain this please?
[+] EwanToo|13 years ago|reply
Seems to require that the web page is trigged by an external source, e.g. a QR code, NFC, etc, but still scary stuff.
[+] sssparkkk|13 years ago|reply
This is for real. Just confirmed the auto-execution of an USSD code on a Samsung Galaxy Mini II. Try the link below to see whether your device is vulnerable:

http://www.tinyurl.com/samsungexploit

It will show your firmware version by executing *#1234#.

[+] potkor|13 years ago|reply
Works with my HTC Desire if I use the info code, the dialog for showing battery status etc pops up.

Raises interesting consumer protection questions, this is a 2010 phone with no updates recently. The law says the dealer has to fix or make up for manufacturing defects that show up years later.

[+] camiller|13 years ago|reply
Are software defects considered manufacturing defects?

BTW, read elsewhere that if you are using the Chrome browser instead of the Samsung browser this doesn't affect you. Haven't had the guts to test it myself.

[+] corin_|13 years ago|reply
The S3 was released four months ago, not in 2010.
[+] emehrkay|13 years ago|reply
Classic case of a developer putting a backdoor in (for testing) and forgetting to take it out. I'm curious as to how long it will take to patch it and if there will be any fallout over this (they are the number 1 phone producer in the world).
[+] dubcanada|13 years ago|reply
No their not lol... Apple & HTC sell more phones then they do.