<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>NetStumbler</title>
	<atom:link href="http://www.netstumbler.com/category/android/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.netstumbler.com</link>
	<description>The award-winning wireless networking tool and the best source for your daily Wi-Fi, WiMAX, 3G and VoIP news.</description>
	<lastBuildDate>Fri, 19 Sep 2014 17:52:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>How Easy Is it to Write Malware for Android?</title>
		<link>http://www.netstumbler.com/2012/01/16/how-easy-is-it-to-write-malware-for-android/</link>
		<comments>http://www.netstumbler.com/2012/01/16/how-easy-is-it-to-write-malware-for-android/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 20:26:51 +0000</pubDate>
		<dc:creator>Georgia Weidman</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.netstumbler.com/?p=3062</guid>
		<description><![CDATA[The Android platform is currently the top selling mobile platform in the U.S., and in quarter four of 2010 smartphones began to outsell PC platforms worldwide.  Android was even recently picked up as the choice platform for the U.S. Department of Defense. With the ubiquitousness of Android growing, naturally it and other smartphone platforms will [...]]]></description>
				<content:encoded><![CDATA[<p>The Android platform is currently the <a href="http://www.fiercemobilecontent.com/story/npd-apples-ios-closes-android-q4-sales-surge/2012-01-10">top selling mobile platform in the U.S.</a>, and in quarter four of 2010 <a href="http://www.idc.com/about/viewpressrelease.jsp?containerId=prUS22689111">smartphones began to outsell PC</a> platforms worldwide.  Android was even recently picked up as the <a href="http://www.federalnewsradio.com/?nid=394&amp;sid=2694787">choice platform for the U.S. Department of Defense</a>. With the ubiquitousness of Android growing, naturally it and other smartphone platforms will become prime targets for malware authors. Be it for fun or for profit, stealing your information, sending you spam, and other malicious activity, has been a widespread problem in the computing world for years. It is only natural that as smartphones know even more about their users than traditional PC platforms, and have access to additional features such as text messaging and GPS data, that they will be become juicy targets for high tech criminals.</p>
<p>This past year has seen new developments in Android malware both in the wild and by researchers intent on raising awareness and improving the state of security. The Droid Dream attack against Android in early 2011 made headlines for being the first known malware infection inside of the official Android market.  The malware was packaged with seemingly legitimate applications, but once installed, the apps turned Android phones into drones in a mobile botnet. This attack had been foreshadowed by security researchers when Jon Oberheide uploaded a <a href="http://jon.oberheide.org/files/summercon10-androidhax-jonoberheide.pdf">proof of concept app</a> to the Android market disguised as an inside look at the upcoming Twilight movie.  Though malware analysists and network security experts have been combating botnets for years, smartphones open new avenues of both attack and control, that experts simply don&#8217;t have as much experience analyzing. For example security researchers have created <a href="http://georgiaweidman.com/wordpress/?cat=10">proof of concept smartphone botnet </a>scenarios that use text messaging (SMS) for command and control mechanisms.</p>
<p><span id="more-3062"></span></p>
<p>Putting aside the continually growing sophistication of smartphone based attacks, how easy is it actually to attack Android phones? How much work would be involved to learn how to write an Android app, develop an app that performs malicious activity, and get that app up on the Android market? Is this something that a beginner could feasibly accomplish, or is Android malware solely the realm of hard core criminals with the skills, time, and money to develop cutting edge attack techniques?</p>
<p>I started off by learning a little bit about coding in Android. I have some coding background including in Java, the language from which the Android software development kit was derived. My only previous experience developing for smartphones was writing base operating system level proof of concept malware in C. I had never written a mobile app before. <a href="http://developer.android.com/resources/browser.html?tag=tutorial">Android Developer offers beginning tutorials</a>, which I worked through to get started.  Android prides itself on being easy for developers to pick up and dive into, and that was my experience as well.</p>
<p>My next goal was to write an app that performs malicious activity. Specifically I wanted to steal the smartphones personal identifier (IMEI) and send a text message without giving any indication to the user. As it turns out the Android API has built in capabilities to perform both of those tasks. The only caveat is the user has to be informed at install time that I want access to these clearly potentially dangerous capabilities.  Whenever a user installs an Android app, they are presented with a list of potentially dangerous capabilities the app requests.  An example install screen is shown below:</p>
<p style="text-align: center;"><img class="size-medium wp-image-3063 aligncenter" title="android_installer_georgia" src="http://www.netstumbler.com/wp-content/uploads/android_installer_georgia-247x300.png" alt="" width="247" height="300" /></p>
<p>I then wondered if malware writers need to somehow bypass this permission model  in some way so the dangerous permissions don&#8217;t show up at install. Would having a list of dangerous permissions that would allow an app to steal data and run up fraudulent charges raise a red flag to  average Android users  and deter them from installing an app? I did a search for popular Android apps to take a look at the permissions they request. The general consensus seems to be that the top downloaded Android app of all time is from an obscure company called Facebook. The complete list of permissions the Facebook for Android app requests upon install includes: sending SMS, reading the IMEI, the smartphone&#8217;s GPS information, accessing accounts stored on the phone including their credentials, among a long list of others that can be found <a href="https://market.android.com/details?id=com.facebook.katana">here</a>. As a sometimes proud member of Facebook since it was for college kids only, I often access Facebook from my computer. Facebook seems to work just fine without sending SMS, knowing my location, or having access to my Gmail password.  It appears that being warned about potentially dangerous permissions does nothing to deter users from installing apps to their Androids. To be fair, the Facebook app comes from a legitimate and well known company. Users have less reason to be wary of Facebook than they would the sort of apps seen in the DroidDream attack. That being said, as we saw in the recent detection of spyware in the <a href="http://www.washingtonpost.com/business/economy/feds-probing-carrier-iq/2011/12/14/gIQA9nCEuO_story.html">CarrierIQ service</a>  installed by default on many smartphone platforms, any service or app can be a potential malware source, even if the developer doesn&#8217;t intend for it to be malicious.</p>
<p>Now that I knew I could just use the Android API&#8217;s permission model to make my malicious app, I went about writing it. I thought I would have to search through the Android Development manager to find out the correct code for what I wanted to do. As it turned out, a quick Google search for &#8220;Send SMS Android App&#8221; or &#8220;Access IMEI Android App&#8221; revealed several other curious developers asking for and providing the code snippets I needed.  For example the code to send an SMS transparently to the user is only a two lines long:</p>
<p><code>SmsManager sm = SmsManager.getDefault();<br />
sm.sendTextMessage(number, null, message, null, null);<code></code></code></p>
<p>where number is the phone number to send the SMS to, and message is the message to send.  By requesting the right permissions I was able to quickly and easily build an app that accessed private data and sent it to another phone through SMS. The SMS does not appear in the user&#8217;s sent folder, so users receive no indication that the message has been sent.</p>
<p>My demo app in action video:</p>
<p><iframe src="http://player.vimeo.com/video/35039316?byline=0&amp;portrait=0" frameborder="0" width="400" height="225"></iframe></p>
<p>My last task was to see about getting my proof of concept app to the Android market. Using a Gmail account that didn&#8217;t link back to my real name I was able to sign up, and I used someone else&#8217;s credit card (with permission) to sign up. This leads me to believe it is possible for a malware author to leave no trace of her true identity on an app. I didn&#8217;t actually publish my app to the market, but other researchers have already proven that a malicious app is automatically published to the Android market upon upload.</p>
<p>My conclusions are that for anyone with any development experience it is easy to pick up the Android programming language. Thus any malware authors with experience on PC platforms will be able to make the switch to Android without any trouble. Also, the Android permission system is not working to keep users safe. The average, security unaware user will often simply install an app regardless of permissions. Using the API to call malicious functionality was straightforward given the correct permissions.  Finally, uploading a malicious app to the Android market is trivial.<br />
Read more about <a href="http://about.me/georgiaw">Georgia Weidman</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.netstumbler.com/2012/01/16/how-easy-is-it-to-write-malware-for-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Offensive Mobile Forensics</title>
		<link>http://www.netstumbler.com/2011/12/12/offensive-mobile-forensics/</link>
		<comments>http://www.netstumbler.com/2011/12/12/offensive-mobile-forensics/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 16:32:26 +0000</pubDate>
		<dc:creator>Brad Slavin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Wi-Fi]]></category>

		<guid isPermaLink="false">http://www.netstumbler.com/?p=3028</guid>
		<description><![CDATA[Christmas is around the corner. Some of the top gifts are going to be shiny new mobile devices – smartphones, tablets, hacked Kindle Fires, Playbooks, and others. Is Exchange ActiveSync turned on in your environment? What is your plan for handling mobility in the Enterprise? But the biggest question of all is – What does [...]]]></description>
				<content:encoded><![CDATA[<p>Christmas is around the corner. Some of the top gifts are going to be shiny new mobile devices – smartphones, tablets, hacked Kindle Fires, Playbooks, and others. Is Exchange ActiveSync turned on in your environment? What is your plan for handling mobility in the Enterprise? But the biggest question of all is – What does a lost or stolen mobile device mean to your organization in terms of risk? What about when the CEO loses her device? Can you quantify your risk today?</p>
<p>The data leakage disclosed in this post has been gathered from a technique the author refers to as Offensive Mobile Forensics.  The term forensics is usually associated with incident response and management.  In other words, an activity performed after something bad has happened.  In contrast, offensive forensics is the act of preemptively performing a forensic analysis of systems or applications as a function of security testing, or for the purpose of quantifying risk.  An interesting side-effect of applying this technique to mobile device analysis is that it enables one to truly understand the risk of an attacker stealing or finding a lost device.  For example, if your analysis turns up native or third-party applications storing user credentials in cleartext – the author has seen everything from Facebook and Twitter to enterprise users’ Exchange ActiveSync credentials stored in the clear – depending on the accounts and data available, that could be a serious issue.<br />
<span id="more-3028"></span><br />
This technique depends on the ability to jailbreak (iOS) or root (Android) the target device, which provides root access to the underlying file system. If the reader is unfamiliar with these terms, some great resources to learn about jailbreaking and rooting are <a href="http://www.redmondpie.com/">Redmond Pie</a> (iOS) and <a href="http://www.xda-developers.com/">XDA-Developers</a> (Android). The author typically utilizes <a href="http://blog.iphone-dev.org/">Redsn0w</a> for iOS and <a href="http://forum.xda-developers.com/showthread.php?t=803682">SuperOneClick</a> for Android, performing virtually all Android analysis on Samsung devices.</p>
<p><strong>iOS</strong></p>
<p>After jailbreaking is complete, only one other tool is necessary, OpenSSH, used to pull data from the device to a host computer for analysis over WiFi.  However, as is always the case with information technology, there’s more than one way to accomplish your objective.  So, experiment with other tools, and tweak and tune your own methodology.</p>
<p>Although outside the scope of this blog post, readers interested in learning about some of the other tools used for this analysis technique can check out the <a href="http://hakin9.org/hacking-data-1111/">iOS Insecurities</a> article in November’s issue of Hackin9 Magazine. The article is a greatly expanded version of what’s here, and also includes a table listing physical locations on iOS devices that contain interesting information for analysis.</p>
<p>There are many different locations containing interesting data on iOS devices.  Data often resides in SQLite databases, the chosen format for local storage on mobile devices.  The next best place to find sensitive information is in plist, or property list files – these are the primary storage medium for configuration settings in iOS, and they are also a fantastic source of sensitive information.  User credentials are often stored here, instead of inside the KeyChain where they should be.  Rounding out the top three data sources are binary or binary-encoded files, such as the device’s keyboard cache and pasteboard.  Although storage locations commonly change with the release of new iOS firmware, it is fairly simple to poke around the general area and find what you’re looking for.</p>
<p>The most severe threat to mobile devices and applications is loss or theft of the device.  As the old saying goes, “if an attacker has physical access, it is game over.”  It only takes a few days of analyzing applications on a device to discover that the vast majority of mobile application developers fail to consider the threat of physical access to their data.  Simply put, they are stuck in the mindset of web application or client/server developers, where virtually all threats affect applications remotely.  Add some terrible design and implementation decisions related to native apps and services from Apple themselves, and you have a device that can pose a significant risk to enterprises and consumers in the event of loss or theft.  The following examples are provided in no particular order.</p>
<p><strong>Keyboard Cache (dynamic-text.dat)</strong></p>
<p>In an effort to learn how users type, iOS devices utilize a feature called AutoCorrection to populate a local keyboard cache on the device.  The problem is this feature records everything a user types that is not entered into a SECURE text field, which masks displayed data.  The author fondly refers to this feature as “Apple’s native keylogging facility”.  Data typed into text fields for virtually any application can remain in the cache for more than a year if it is not reset periodically by the user:</p>
<p>Settings &gt; General &gt; Reset &gt; Reset Keyboard Dictionary</p>
<p>Developers can also disable this feature programmatically by using the AutoCorrection = FALSE directive in desired UITextFields, although studies conducted with applications disabling this feature have shown users unanimously disapprove of it.</p>
<p>The file itself is a binary file, so passing it to the utility ‘strings’ is all that is required to generate newline-terminated output suitable for analysis.  Figure 1 displays the result of running ‘strings’ against the file, and Table 1 provides examples of near-complete conversations recorded by AutoCorrection.</p>
<div id="attachment_3035" class="wp-caption alignleft" style="width: 242px"><img class="size-medium wp-image-3035" title="KeyBoardCache" src="http://www.netstumbler.com/wp-content/uploads/KeyBoardCache-232x300.png" alt="" width="232" height="300" /><p class="wp-caption-text">Figure 1: Keyboard cache output to stdout in terminal</p></div>
<p>The keyboard cache is a well-known weakness in the iOS system, and there are many more interesting system-related locations to explore as an exercise for the reader.</p>
<div id="attachment_3036" class="wp-caption alignleft" style="width: 738px"><img class="size-full wp-image-3036" title="keyboard-cache" src="http://www.netstumbler.com/wp-content/uploads/keyboard-cache.jpg" alt="" width="728" height="179" /><p class="wp-caption-text">Table 1: Keyboard cache entries - read column top-down</p></div>
<p><strong>Application Data Leakage</strong></p>
<p>Third-party applications represent the greatest threat of data leakage on iOS devices.  This is usually the result of lazy or poorly-informed, or trained, developers storing user credentials or other sensitive information in clear text.  This threat can be mitigated by developers in several ways including storing user credentials in the KeyChain, encrypting sensitive information in plist files with the <a href="http://developer.apple.com/library/mac/">Common Crypto</a> library, or encrypting sensitive information in <a href="http://sqlcipher.net/ios-tutorial/">SQLcipher</a> SQLite databases. Figure 2 shows one example of a mobile application improperly storing credentials in a plist file.  Unfortunately, this particular application utilizes various Internet APIs for authentication including Evernote, Google Docs, Dropbox, and others, which in the event of loss or theft, could result in the compromise of each account.</p>
<div id="attachment_3037" class="wp-caption alignleft" style="width: 675px"><a href="http://www.netstumbler.com/wp-content/uploads/app-data-leakage-creds.png"><img class="size-full wp-image-3037" title="app-data-leakage-creds" src="http://www.netstumbler.com/wp-content/uploads/app-data-leakage-creds.png" alt="" width="665" height="369" /></a><p class="wp-caption-text">Figure 2: Credentials disclosed in an application&#39;s configuration PLIST</p></div>
<p><a href="http://www.netstumbler.com/wp-content/uploads/WiFi_creds_annotated.png"><img class="size-full wp-image-3046" title="WiFi_creds_annotated" src="http://www.netstumbler.com/wp-content/uploads/WiFi_creds_annotated.png" alt="" width="334" height="551" /></a></p>
<p><strong>Android</strong></p>
<p>Although there are many similarities between iOS and Android, there are a few notable differences that should be discussed. First, Android does not use property list files (“plist”) for storing configuration data, which is common on iOS devices. Android uses XML files instead of plists. Also, analysts will find many more SQLite databases on an Android device. In fact, configuration information is sometimes stored in SQLite database in lieu of utilizing XML files. Similarly to the configuration files for iOS, the XML files storing preferences for Android applications commonly include user credentials and other sensitive information. Finally, there is a very rich diagnostic and debugging environment in the Android platform, and unfortunately this output is also a common source of data leakage.</p>
<p>A huge difference between iOS devices and Android devices is the presence of the Android Debug Bridge (“ADB”) for the latter. Using the ADB, one can push or pull files to the device, review diagnostic information, and even gain access to a remote shell. The ADB Shell is the primary method of accessing the device&#8217;s file system for the purposes of pulling data to a host computer for analysis, or performing analysis on the device itself. More information on this, and other, differences can be found in the <a href="http://hakin9.org/hakin9-mobile-111-1/">Android Insecurities</a> article in January’s issue of Hakin9 Magazine.</p>
<div id="attachment_3046" class="wp-caption alignleft" style="width: 839px"></dt>
<dd class="wp-caption-dd">Annotated WiFi Credentials</dd>
</dl>
</div>
<p><strong>Email</strong></p>
<p>The Android system, like iOS, stores email in a SQLite database. Unlike iOS however, which stores email credentials in the KeyChain, user credentials on an Android system are stored in cleartext in the email database. This may seem like a trivial occurrence of data leakage, but in addition to personal email accounts such as Gmail, Exchange ActiveSync (“EAS”) credentials are also stored there. As if credentials weren&#8217;t bad enough, the database also stores messages in the clear, along with email addresses of contacts that have sent the user mail. This could be particularly devastating for corporate enterprises utilizing EAS, in the absence of a proper mobile device management (“MDM”) solution.</p>
<p>EAS and personal email account credentials can be discovered in a couple of different ways.  Figure 3 shows analysis of the EmailProvider.db SQLite file in Base, a GUI SQLite client. An even easier way to find user information is by simply running the ‘strings’ utility against the database file, as seen in Figure 4.</p>
<div class="mceTemp">
<dl id="attachment_3038" class="wp-caption alignleft" style="width: 839px;">
<dt class="wp-caption-dt"><img class="size-full wp-image-3038" title="EAS_GMAIL_Creds_2.3.4_Annotated" src="http://www.netstumbler.com/wp-content/uploads/EAS_GMAIL_Creds_2.3.4_Annotated.png" alt="" width="829" height="276" /><p class="wp-caption-text">Figure 3: Email credentials disclosure</p></div>
<p>&nbsp;</p>
<p><strong>WiFi</strong></p>
<p>The email situation is bad, but equally shocking is the method in which the Android system stores WiFi configuration information. Navigating to the <strong>/data/misc/wifi</strong> directory yields a configuration file called wpa_supplicant.conf on a Samsung Captivate that stores configuration information for every WiFi network the device has connected to – in cleartext. Assuming the data is disclosed to an attacker, an organization’s only defense is the use of multifactor authentication for their wireless networks, i.e., if corporate enterprise is using a combination of username and password exclusively, this could be a serious issue. The configuration file stores SSID, key management type, and the pre-shared key for the network.</p>
<div id="attachment_3039" class="wp-caption alignleft" style="width: 651px"><img class="size-full wp-image-3039" title="Strings_EASGMAIL_EmailProviderDB" src="http://www.netstumbler.com/wp-content/uploads/Strings_EASGMAIL_EmailProviderDB.png" alt="" width="641" height="172" /><p class="wp-caption-text">Figure 4: Email credentials disclosure</p></div>
<p>&nbsp;</p>
<p><strong>Conclusion</strong></p>
<p>Now, obviously various mitigating controls exist for protecting a user’s data on a mobile device, most notably the hardware-based encryption and <a href="http://developer.apple.com/library/ios/documentation/Miscellaneous/Conceptual/iPhoneOSTechOverview/iPhoneOSTechOverview.pdf">Data Protection</a> on the iPhone 4 and above, and encryption Android devices with Gingerbread. Passcodes lock devices, and in the case of Data Protection, enable a secondary layer of software-based encryption. That said, a recent study indicated over 50% of users don’t use a passcode at all on their devices, and another 20% utilize a 4-character combination that can be easily guessed in the usual 10 tries allotted – 1234, 4321, 9876, and so on. Add to this the ability to deploy OpenSSH as part of the jailbreaking process for iOS devices, the most prevalent choice for the Enterprise, or simply crack the passcode, and loss or theft is illuminated as a serious threat to data security. In the current ecosystem, with physical access to the device, it’s game over.</p>
<p><strong>Joey Peloquin</strong></p>
<p>Joey Peloquin is the director of mobile security at <a href="http://www.fishnetsecurity.com/">FishNet Security</a>, where he’s responsible for MDM technology review, mobile security research, testing methodologies, and business development. He’s spent the last twelve of twenty years in IT specializing in Information Security. His experience ranges from risk assessment to intrusion analysis and incident response, network and application penetration testing, and mobile forensics.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.netstumbler.com/2011/12/12/offensive-mobile-forensics/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
