<?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>Blog Central &#187; Exploit for Android</title>
	<atom:link href="http://blogs.mcafee.com/tag/exploit-for-android/feed" rel="self" type="application/rss+xml" />
	<link>http://blogs.mcafee.com</link>
	<description></description>
	<lastBuildDate>Wed, 22 May 2013 17:16:09 +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>Evolution of Android Malware: IRCBot Joins the Party</title>
		<link>http://blogs.mcafee.com/mcafee-labs/evolution-of-android-malware-ircbot-for-android</link>
		<comments>http://blogs.mcafee.com/mcafee-labs/evolution-of-android-malware-ircbot-for-android#comments</comments>
		<pubDate>Wed, 09 May 2012 11:50:31 +0000</pubDate>
		<dc:creator>Arun Sabapathy</dc:creator>
				<category><![CDATA[McAfee Labs]]></category>
		<category><![CDATA[Android Bot analysis]]></category>
		<category><![CDATA[Android Dropper]]></category>
		<category><![CDATA[Android Malware]]></category>
		<category><![CDATA[Android Malware Analysis]]></category>
		<category><![CDATA[Android Rooting Exploit]]></category>
		<category><![CDATA[Android SMS broadcast]]></category>
		<category><![CDATA[Arun Sabapathy]]></category>
		<category><![CDATA[Exploit for Android]]></category>
		<category><![CDATA[IRCBOT for android]]></category>
		<category><![CDATA[Malicious Android Application]]></category>
		<category><![CDATA[mobile malware]]></category>
		<category><![CDATA[Premium SMS Trojan]]></category>
		<category><![CDATA[Rooting Exploit]]></category>

		<guid isPermaLink="false">http://blogs.mcafee.com/?p=15979</guid>
		<description><![CDATA[We all know how fast the smart phone market is growing. Along with it, the complexity and the numbers of mobile malware are also on the rise. While I was going through our mobile malware collection, I found an interesting piece of malware for Android. This malware acts as an IRC Bot, just as we <a href="http://blogs.mcafee.com/mcafee-labs/evolution-of-android-malware-ircbot-for-android">Read more...</a>]]></description>
				<content:encoded><![CDATA[<p>We all know how fast the smart phone market is growing. Along with it, the complexity and the numbers of mobile malware are also on the rise. While I was going through our mobile malware collection, I found an interesting piece of malware for Android. This malware acts as an IRC Bot, just as we have seen in Windows malware.</p>
<p>This malware binary is not a repackaged application as we have seen in the past. It masquerades as the game MADDEN NFL 12. The malware has three modules embedded into it: The main component is actually a dropper that drops a set of other components onto the compromised user device.</p>
<p><a href="http://blogs.mcafee.com/?attachment_id=15983"><img class=" wp-image-15983 alignnone" src="http://blogs.mcafee.com/wp-content/uploads/2012/05/Android_Bot2.jpg" alt="" width="426" height="219" /></a></p>
<p style="text-align: center;">Figure 1: Android Malware Component</p>
<p>Upon installation, the malicious application drops these three malicious components:</p>
<ul>
<li>Header01.png: Rooting Exploit</li>
<li>Footer01.png: IRCBot</li>
<li>Border01.png: SMS Trojan</li>
</ul>
<p>&nbsp;</p>
<p><a href="http://blogs.mcafee.com/?attachment_id=15984"><img class="aligncenter size-full wp-image-15984" src="http://blogs.mcafee.com/wp-content/uploads/2012/05/Android_Bot3.jpg" alt="" width="122" height="151" /></a></p>
<p style="text-align: left;">Figure 2: Files in asset folder of the main component</p>
<p style="text-align: left;"><strong>What&#8217;s It All About?</strong></p>
<p>The files header01.png and footer01.png masquerade as PNG image files, although they are originally ELF files. Header01.png acts as a rooting exploit; we already discussed this in an <a>earlier blog</a>. The purpose of this component is to root the device and then elevate the device&#8217;s privilege. Once the device is rooted, footer01.png connects to a remote IRC channel. The final component, boarder01.png, acts as Trojan that sends SMS messages to premium numbers. The other *.png files in the package are just random image files to thwart hash-based detection. This can be seen in the details of the three components.</p>
<p>&nbsp;</p>
<p><strong>Main Dropper Component</strong></p>
<p>The main dropper has a size of more than 5MB. The class file AndroidBotActivity is responsible for dropping the other three malicious components onto the device as well as for setting the highest permission to the directory in which it drops these component files. This Android manifest file gives us a vague idea of what this malware binary is capable of: Their package names and labels have been branded as com.android.bot and AndroidBotActivity.</p>
<p>&nbsp;</p>
<p><a href="http://blogs.mcafee.com/?attachment_id=15986"><img class="aligncenter size-full wp-image-15986" src="http://blogs.mcafee.com/wp-content/uploads/2012/05/Android_Bot5.jpg" alt="" width="740" height="459" /></a></p>
<p style="text-align: center;">Figure 3: Android manifest file of the main component</p>
<p style="text-align: left;"><a href="http://blogs.mcafee.com/?attachment_id=15985"><img class="aligncenter size-full wp-image-15985" src="http://blogs.mcafee.com/wp-content/uploads/2012/05/Android_Bot4.jpg" alt="" width="1232" height="345" /></a></p>
<p style="text-align: center;">Figure 4: Malicious class file AndroidBotActivity dropper code</p>
<p>The malicious class file creates the directory /data/data/com.android.bot/files and drops the three component files, the root exploit, IRCBot, and SMS Trojan in the folder of the compromised device. It then gives chmod 777 permission to that directory. Each number in chmod represents the permissions given to different users such as owner, group, and others; here the malware binary sets the permission to chmod to 777 to give read, write, and execute permission for all users to this folder.</p>
<p>&nbsp;</p>
<p><a href="http://blogs.mcafee.com/?attachment_id=15988"><img class="aligncenter size-full wp-image-15988" src="http://blogs.mcafee.com/wp-content/uploads/2012/05/Android_Bot7.jpg" alt="" width="584" height="95" /></a></p>
<p style="text-align: center;">Figure 5 : Setting file permission to chmod 777</p>
<p><strong>Root Exploit Component</strong></p>
<p>The root exploit component is nothing new, as we have already discussed it in my previous blog. However, the malware authors have slightly modified the code. The root exploit component, in simple terms, roots the device to its highest privilege so that the attacker can gain admin privilege and can execute commands from a remote server. Once the device is rooted, it executes the IRCBot component file header01.png.</p>
<p>&nbsp;</p>
<p><a href="http://blogs.mcafee.com/?attachment_id=15993"><img class="aligncenter size-full wp-image-15993" src="http://blogs.mcafee.com/wp-content/uploads/2012/05/Android_Bot12.jpg" alt="" width="756" height="511" /></a></p>
<p style="text-align: center;">Figure 6: Code to execute the IRCBot component</p>
<p><strong>IRCBot Component</strong></p>
<p>This is basically a backdoor Trojan that acts as an IRCBot to connect to a remote server and receive and execute commands.</p>
<p>On analyzing this malware binary further, we find that once the system is rooted it sets a marker “1,” which means the system is already rooted. Thus the malware can skip attempting to exploit a device that is already rooted and also from again executing the file footer01.png.</p>
<p>&nbsp;</p>
<p><a href="http://blogs.mcafee.com/?attachment_id=15995"><img class="aligncenter size-full wp-image-15995" src="http://blogs.mcafee.com/wp-content/uploads/2012/05/Android_Bot14.jpg" alt="" width="817" height="404" /></a></p>
<p style="text-align: center;">Figure 7 : IRCBot component silently installs the SMS Trojan component</p>
<p>The malware then connects to the remote IRC server 199.68.&lt;removed&gt; and generates a random user name that is used to log into the remote IRC channel.</p>
<p>The malware joins the IRC channel #andros and waits for commands from the attacker.</p>
<p>Once it starts receiving commands from the remote site, it parses them and performs the actions. We found three commands:</p>
<ul>
<li>PRIVMSG #andros :[SH] &#8211; %s.</li>
<li>PRIVMSG #andros :[ID] &#8211; %d</li>
<li>PRIVMSG #andros :[EXIT] &#8211; exiting ordered.</li>
</ul>
<p>&nbsp;</p>
<p><strong>SMS Trojan Component </strong></p>
<p>The last component of the package is a regular SMS Trojan that sends SMS messages to premium numbers which charge the victim. This one also masquerade as a PNG image file but was originally an .apk file, an application package for Android. We have seen this type of <a href="http://blogs.mcafee.com/mcafee-labs/android-malware-spreads-through-qr-code">premium SMS abuser</a> many times in the past.</p>
<p>The difference in this malware binary when compared to others is, first, it retrieves the geo location of the SIM and based on the geo location it sends SMS to premium numbers corresponding to that geo location. This is carried out by the following snippet:</p>
<p>&nbsp;</p>
<p><a href="http://blogs.mcafee.com/?attachment_id=15989"><img class="aligncenter size-full wp-image-15989" src="http://blogs.mcafee.com/wp-content/uploads/2012/05/Android_Bot8.jpg" alt="" width="661" height="229" /></a></p>
<p style="text-align: center;">Figure 8: Snippet to get the geo location of the SIM</p>
<p>&nbsp;</p>
<p>The Trojan sends SMS messages to the premium numbers if the SIM geo is found to be applicable.</p>
<p>&nbsp;</p>
<p><a href="http://blogs.mcafee.com/?attachment_id=15991"><img class="aligncenter size-full wp-image-15991" src="http://blogs.mcafee.com/wp-content/uploads/2012/05/Android_Bot10.jpg" alt="" width="408" height="272" /></a></p>
<p style="text-align: center;">Figure 9: Premium SMS numbers</p>
<p>The Trojan also has code to check the message body and sender of all SMS messages received. If the sender is found to be any of the numbers listed above, the malware aborts that message. This step is carried out by the abortBroadcast(); function.</p>
<p>The Trojan then broadcasts an SMS to a remote server along with the mobile number and the message body.</p>
<p><a href="http://blogs.mcafee.com/?attachment_id=15992"><img class="aligncenter size-full wp-image-15992" src="http://blogs.mcafee.com/wp-content/uploads/2012/05/Android_Bot11.jpg" alt="" width="536" height="27" /></a></p>
<p>&nbsp;</p>
<p>To sum it up, here is the flow diagram for this Android malware:</p>
<p>&nbsp;</p>
<p><a href="http://blogs.mcafee.com/?attachment_id=15997"><img class="aligncenter size-full wp-image-15997" src="http://blogs.mcafee.com/wp-content/uploads/2012/05/Android_Bot16.jpg" alt="" width="614" height="791" /></a></p>
<p style="text-align: center;">Figure 10: Flow diagram</p>
<p>Here&#8217;s an example of how dangerous this infection can be: If the victim receives a message from the bank that has a two-way authentication code, that message body&#8211;along with the mobile number&#8211;will be sent to the remote attacker, who can later compromise bank transactions. This alone tells us how serious this attack can be. However, we don&#8217;t know what the attackers do with this data, nor what their server-side code does.</p>
<p>In any case, this is a reminder that malware authors consider the Android platform their favorite mobile attack vector, and are coming up with new infection strategies to compromise users and their data. We expect this trend to continue thanks to the growing smart phone market as well as the continued increase of enterprise use, banking functionality, and other consumer usage.</p>
<p>We detect the main component of this malware as Android/Multi.dr, the root exploit component as Linux/Exploit-Lotoor.a, the IRCBot component as Android/IRCBot.a, and the SMS Trojan as Android/SMS.gen.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.mcafee.com/mcafee-labs/evolution-of-android-malware-ircbot-for-android/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rooting Exploit for Android Works Silently</title>
		<link>http://blogs.mcafee.com/mcafee-labs/rooting-exploit-for-android</link>
		<comments>http://blogs.mcafee.com/mcafee-labs/rooting-exploit-for-android#comments</comments>
		<pubDate>Thu, 15 Sep 2011 16:26:31 +0000</pubDate>
		<dc:creator>Arun Sabapathy</dc:creator>
				<category><![CDATA[McAfee Labs]]></category>
		<category><![CDATA[Android Exploit]]></category>
		<category><![CDATA[Android Malware]]></category>
		<category><![CDATA[Android Malware Analysis]]></category>
		<category><![CDATA[Android Mobile Malware]]></category>
		<category><![CDATA[Android Rooting Exploit]]></category>
		<category><![CDATA[Exploit for Android]]></category>
		<category><![CDATA[Linux/Exploit:Looter Analysis]]></category>
		<category><![CDATA[Looter Analysis]]></category>
		<category><![CDATA[mobile malware]]></category>

		<guid isPermaLink="false">http://blogs.mcafee.com/?p=11083</guid>
		<description><![CDATA[In our last blog about Android malware, we discussed the expanding threat landscape for Android malware. Recently, we received an Android package in our collection and observed that this malicious application uses a rooting exploit that targets Android devices running OS Versions 2.3 or earlier to gain root privileges on the compromised device. The malware <a href="http://blogs.mcafee.com/mcafee-labs/rooting-exploit-for-android">Read more...</a>]]></description>
				<content:encoded><![CDATA[<p>In our last blog about <a href="http://blogs.mcafee.com/mcafee-labs/latest-android-malware-records-conversations">Android malware,</a> we discussed the expanding threat landscape for Android malware. Recently, we received an Android package in our collection and observed that this malicious application uses a rooting exploit that targets Android devices running OS Versions 2.3 or earlier to gain root privileges on the compromised device.</p>
<p>The malware binary is packaged with a legitimate application. In this case, the malicious exploit code comes with “Daily Beauties,&#8221; which showcases pictures of celebrities that are updated periodically. Attackers use this repacking approach to hide their malware within genuine applications, which users will download and install.</p>
<p>The following image represents the repacking a legit application with malicious code. These repackaged applications are made available in Android black markets and third-party markets.</p>
<p style="text-align: left" align="center"><a href="http://blogs.mcafee.com/wp-content/uploads/2011/09/Looter2.jpg"><img class="aligncenter size-full wp-image-11086" src="http://blogs.mcafee.com/wp-content/uploads/2011/09/Looter2.jpg" alt="" width="369" height="138" /></a></p>
<p style="text-align: left" align="center">                           Figure 1: Repackaged application</p>
<p style="text-align: left" align="center">This malicious application requires the following user permissions:</p>
<p style="text-align: left" align="center"><a href="http://blogs.mcafee.com/wp-content/uploads/2011/09/Looter5.jpg"><img class="aligncenter size-full wp-image-11088" src="http://blogs.mcafee.com/wp-content/uploads/2011/09/Looter5.jpg" alt="" width="736" height="310" /></a></p>
<p align="center">Figure 2: User permissions required by the malicious application</p>
<p><a href="http://blogs.mcafee.com/wp-content/uploads/2011/09/Looter2.jpg"><br />
</a>From the preceding list of permissions requested by the malicious application, I was curious about two in particular.</p>
<ul>
<li>android.permission.MOUNT_UNMOUNT_FILESYSTEMS</li>
<li>android.permission.WRITE_OWNER_DATA</li>
</ul>
<p>&nbsp;</p>
<p style="text-align: left" align="center">Why would an application that displays pictures of celebrities require permission to write user data and mount/unmount file systems?</p>
<p style="text-align: left" align="center">Upon opening the malicious application we see the names of celebrities, as shown in the below figure. The victims would see the pictures, but they wouldn’t see the malicious service running in the background.</p>
<p style="text-align: center" align="center"><a href="http://blogs.mcafee.com/wp-content/uploads/2011/09/Looter2.jpg"><br />
</a><a href="http://blogs.mcafee.com/wp-content/uploads/2011/09/Lotter4.jpg"><img class="aligncenter size-full wp-image-11096" src="http://blogs.mcafee.com/wp-content/uploads/2011/09/Lotter4.jpg" alt="" width="537" height="377" /></a></p>
<p style="text-align: center" align="center"><a href="http://blogs.mcafee.com/wp-content/uploads/2011/09/looter6.png"><img class="aligncenter size-full wp-image-11089" src="http://blogs.mcafee.com/wp-content/uploads/2011/09/looter6.png" alt="" width="266" height="384" /></a></p>
<p style="text-align: center" align="center">Figure 3: A picture of the celebrity showcased by the application</p>
<p style="text-align: left" align="center">So how does the exploit work? The malicious application has four files bundled along with the legit application. They can be found in the asset folder of the application package. The file names appear in Figure 4:</p>
<p align="center"><a href="http://blogs.mcafee.com/wp-content/uploads/2011/09/looter7.jpg"><img class="aligncenter size-full wp-image-11090" src="http://blogs.mcafee.com/wp-content/uploads/2011/09/looter7.jpg" alt="" width="413" height="86" /></a><a href="http://blogs.mcafee.com/wp-content/uploads/2011/09/looter7.jpg"><br />
</a></p>
<p align="center">Figure 4: Malicious files in the asset folder of the Android application package</p>
<p>The file gbfm.png carries the exploit code; the others are script/shell files. all four masquerade as PNG image files, although they are originally ELF (gbfm.png, runme.png) and shell script (install.png, installsoft.png) files.</p>
<p>When the required services start, the malicious application renames the .png extension to .sh and executes the exploit as shell script.</p>
<p><a href="http://blogs.mcafee.com/wp-content/uploads/2011/09/Looter8.jpg"><img class="aligncenter size-full wp-image-11091" src="http://blogs.mcafee.com/wp-content/uploads/2011/09/Looter8.jpg" alt="" width="843" height="212" /></a></p>
<p align="center">Figure 5: Renaming the .png extension to .sh extension</p>
<p>The malicious application first checks for the version of the Android OS and then exploits it:</p>
<p><a href="http://blogs.mcafee.com/wp-content/uploads/2011/09/Looter9.jpg"><img class="aligncenter size-full wp-image-11092" src="http://blogs.mcafee.com/wp-content/uploads/2011/09/Looter9.jpg" alt="" width="754" height="327" /></a></p>
<p align="center">Figure 6: Malware checks for the Android OS version and executes the exploit</p>
<p>The malware next checks for the <a href="http://en.wikipedia.org/wiki/User_identifier">Unix user identifier</a> of the currently running process and stores it. Then it triggers the exploit (gbfm.sh). If it&#8217;s successful, the malware will elevate the device to the root privilege.</p>
<p>When the device is successfully rooted, it will run the install.sh script, which will set the appropriate file permissions <a href="http://en.wikipedia.org/wiki/Chmod">(chmod 4775)</a> to the system partition and copies the shell from the bin folder /system/bin/sh to the folder created by the malicious application /system/xbin/appmaster. Thus the shell can be accessed whenever it wishes and the system partition is remounted.</p>
<p style="text-align: center"><a href="http://blogs.mcafee.com/wp-content/uploads/2011/09/Looter10.jpg"><img class="aligncenter size-full wp-image-11093" src="http://blogs.mcafee.com/wp-content/uploads/2011/09/Looter10.jpg" alt="" width="674" height="540" /></a></p>
<p align="center">Figure 7: Setting up the file permissions</p>
<p>After a while, the malware executes the installsoft.sh script, which silently downloads more APK files in the background and installs them by executing the &#8220;pm install&#8221; command in the root shell.</p>
<p><a href="http://blogs.mcafee.com/wp-content/uploads/2011/09/Looter11.jpg"><img class="aligncenter size-full wp-image-11094" src="http://blogs.mcafee.com/wp-content/uploads/2011/09/Looter11.jpg" alt="" width="778" height="244" /></a></p>
<p align="center">Figure 8: Installing APK files in the background</p>
<p>The malware retrieves the following information from the compromised device and sends that information to a remote site:</p>
<p><a href="http://blogs.mcafee.com/wp-content/uploads/2011/09/Looter12.jpg"><img class="aligncenter size-full wp-image-11095" src="http://blogs.mcafee.com/wp-content/uploads/2011/09/Looter12.jpg" alt="" width="473" height="362" /></a></p>
<p align="center">Figure 9: User information retrieved by the malicious file</p>
<p>The exploit will work only when the device has an SD card installed. If not, it will not run. McAfee products detect this malware in our latest DATs as <a href="http://home.mcafee.com/VirusInfo/VirusProfile.aspx?key=549589">Linux/Exploit-Lotoor</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.mcafee.com/mcafee-labs/rooting-exploit-for-android/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
