Skip to main content

Remote USSD Attack - Clarifications

An interesting (and potentially devestating) remote attack against at least some Samsung Android phones (including the Galaxy S3) was disclosed recently.
Update 1: Samsung have been aware of this issue for a few months and the latest firmware for Galaxy S3 (4.0.4) appears to resolve the issue.
Update 1a: While some 4.0.4 versions appear to be secure, others are vulnerable.
Update 1b: The issue has been patched in some firmware builds. It appears that all 4.1-based builds are safe, and possibly some 4.0.4 builds are also.
Update 2: Samsung is not alone in being vulnerable to this issue.
Update 3: Some apps have been created specifically to catch these URL calls: TelStop (by @colimrm) and Auto-reset Blocker
In brief it works like this:


  • Phones support special dialing codes called USSDs that can display certain information or perform specific special features. Among these are common ones (*#06# to display IMEI number) and phone specific ones (including, on some phones, a factory reset code). 
  • There is a URL scheme prefix called tel: which can, in theory, be used to hyperlink to phone numbers. The idea being that clicking on a tel: URL will initiate the phone's dialer to call that number.
  • In some phones the dialer will automatically process the incoming number. If it's a USSD code then it will be handled exactly as if it had be keyed in manually - requiring no user intervention to execute.
  • A tel: URL can be used by a hostile website as the SRC for an iframe (or potentially other resources like stylesheets or scripts I guess). It may then be loaded and acted upon with no user intervention at all.
A video demonstrating the process has been widely circulated - it also details some other vectors to deliver the tel: URL - including WAP Push SMS, QR Code and NFC. All of these processes have the same end result.
I created a small page to test the attack myself (using the non-destructive *#06# IMEI code rather than the very damaging factory reset one) and replicated the outcomes displayed in the video and documented elsewhere.
Ussd-imei
The fundamental problem here is the dialer. It is acting on the phone number it's sent exactly as it would had it been keyed in directly. If it the tel: URL can be directed to an application that does not have that behaviour then the threat can be neutralised.
Thankfully Android allows for alternate dialers to be installed. I picked a popular one from Google Play - Dialer One - and installed it. Even with out making it the default phone dialer I have prevented the threat. A tel: URL will now prompt me for the application to use.
Ussd-prompt
If I select the standard dialer the same issue reoccurs, but if I select Dialer One (which does not take action on the incoming USSD code) or cancel the request entire I am protected.
Ussd-dialerone
It's likely that many other dialers behave in the same way, but you should test them carefully. The important thing is to avoid letting the stock dialer handle tel: URLs without direct user interaction.

Comments

Popular posts from this blog

Windows 7 Boot Updater

ជាទូទៅអ្នកតែងតែឃើញនូវរូប Logo របស់ Windows 7 រៀងរាល់ពេលដែល អ្នកបើកដំនើរការ កុំព្យូទ័រ ដែលគេហៅថា BootScreen។ ដូច្នេះនៅក្នុងអត្ថបទនេះ អាយធីកូនខ្មែរ នឹងបង្ហាញពីរ របៀបផ្លាស់ប្តូរ BootScreen របស់ Windows 7។ ជំហានទី ១៖ អ្នកត្រូវធ្វើការទាញយកកម្មវិធី Windows 7 Boot Updater  ចុចត្រង់នេះ ជំហានទី ២៖ បើកដំនើរការកម្មវិធីបន្ទាប់មកនៅក្នុងប្រអប់ Animation ជ្រើសរើសយកជំរើស Animation

Real Football Manager 2013 APK (Armv6 & 7)

Game Features : An intuitive interface with a simple game system (enhanced for RF Manager 2013). Actions with the press, fans and  players  that affect the performance of your  computer . An impressive array of  options , from technical to training schedules. Find the stars of tomorrow with scouting reports you send promising young. Download  Link: DataFileHost: Real Football Manager APK 2Shared: Real Football Manager APK Install  APK And Play. It's a java  port  of RFM13.

Orkida English-Khmer Dictionary

ថ្ងៃ​នេះ​សុំ លើក​យក​វត្ថុ​បូរាណ​ ប៉ុន្តែ​ពេញ​និយម ដែល​ត្រូវ​បាន​ដំឡើង​ស្ទើគ្រប់​កុំព្យូទ័រ​បង​ប្អូន​ខ្មែរ​យើងគឺ វចនានុក្រម Orkida English<->Khmer ។ សង្ឃឹម​ថា​ម្ចាស់​បង្កើតវចនា​នុក្រម​នេះ មិន​យល់​ទាស់​អី​ទេ ដែល​ខ្ញុំ​ដាក់​អោយ​គេ​ទាញ​យក​ជាសាធារណះ​ដូច្នេះ ព្រោះ​ថា​វា​កម្មវិធី​ដែល​បង្កើត​ឡើង​តាំង​ពីឆ្នាំ ១៩៩៨មក​ម្ល៉េះ ម្យ៉ាង​វិញ​ទៀតបង​ប្អូន​យើង​បាន​ចម្លង​ពីមួយ​ទៅ​មួយស្ទើរ​គ្រប់​កុំព្យូទ័រ​ ទៅ​ហើយ។ ដោយ​ឡែក​ពេល​ខ្ញុំ​សាកល្បង​ស្វែង​រក​ក្នុង Google អំពី​វចនា​នុក្រម​នេះ ហាក់​ដូច​ជា​ស្ងាត់​ឈឹង​ មិនសូវ​មាន​កន្លែង​ Download សោះ ! ដូច្នេះ​ដើម្បី​អោយ​ការ​ស្វែង​រកក្នុង​អ៊ិនធឺណិត​ទាក់​ទង​នឹង​ស្រុក​ខ្មែរ​ យើងកាន់​តែមាន​​ប្រសិទ្ធភាព ខ្ញុំ​សម្រេច​ចិត្ត​ Upload វា​ចូល​ក្នុង Hosting របស់​ខ្ញុំ​ ហើយ​ចែក​អោយ​បងប្អូន​ដែល​ត្រូវ​ការ​វា​ យក​ទៅ​ប្រើ​ប្រាស់​ចុះ។ ថ្វីត្បិត​តែ​វា​រាង​ចំណាស់​បន្តិច​មែន តែ​រហូត​មក​ដល់​ Windows 7 ហើយ​ វា​នៅ​តែ​អាច​ដំឡើង​និង​ប្រើ​បាន​ជា​ធម្មតា។ ទាញ​យកវចនានុក្រម​ Orkida By : Sam Vichea