<?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>Chirashi Security &#187; Surveillance</title>
	<atom:link href="http://chirashi.zenconsult.net/tag/surveillance/feed/" rel="self" type="application/rss+xml" />
	<link>http://chirashi.zenconsult.net</link>
	<description>A blog with scattered thoughts on security</description>
	<lastBuildDate>Sun, 16 Oct 2011 17:26:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Mice, Permissions and a Solution?</title>
		<link>http://chirashi.zenconsult.net/2009/11/mice-permissions-and-a-solution/</link>
		<comments>http://chirashi.zenconsult.net/2009/11/mice-permissions-and-a-solution/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 18:14:04 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Surveillance]]></category>

		<guid isPermaLink="false">http://chirashi.zensay.com/?p=394</guid>
		<description><![CDATA[The BlackBerry default application permissions should be one of the most important things to a BlackBerry Internet Service (BIS) user.  But how can these application permissions be monitored and checked for those times when they are changed (creating a potentially risky situation) and the user forgets to revert to its original setting?  This post will highlight a possible mechanism of checking for the most critical permissions.  There's also some sample program source code that users can download and play with.]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-399" style="padding: 0 7px 5px; 0" title="mice" src="http://chirashi.zenconsult.net/wp-content/uploads/2009/11/mice-300x218.jpg" alt="mice" width="300" height="218" />What do mice do when its cold?  They sit around a candle.  What do they do when its really cold?  They light the candle.  In a sense, the same applies to the Default Application Permissions on your BlackBerry.  They are important, but without being set correctly and understood well, they’re very much like the unlit candle the mice sit around: lots of potential, but completely ineffectual.  The perils of not setting your application permissions correctly?  Here are a two:</p>
<ol>
<li>You don’t know if your “Input Simulation” permission is set to “Allow”.  If it is allowed, any application can make key-presses on your handheld as if they were you.  Potential: <a href="http://chirashi.zensay.com/2009/10/remote-listening-for-the-blackberry/">an application can answer your phone calls</a>.</li>
<li>You’re not sure your “Security Timer Reset” permission is set to “Allow”.  If it is, then any application can <a href="http://chirashi.zensay.com/2009/11/the-security-timer-reset-permission/">render your screen lockout useless</a>.</li>
</ol>
<p>I can almost hear you asking me, “Why tell me about it? You think I don’t know about this?” and the truth is, its an even split.  There are users out there that are blissfully unaware of things like Default Application Permissions.  The BlackBerry is going the way of the consumer, and fast.  With the rise in popularity of the <a href="http://en.wikipedia.org/wiki/BlackBerry_Internet_Service" target="_blank">BlackBerry Internet Service</a>, a user no longer needs to be a part of an large organization to reap the many benefits of a BlackBerry.  The flip side?  There is no <a href="http://en.wikipedia.org/wiki/BlackBerry_Enterprise_Server" target="_blank">enterprise security administrator</a> or policy to protect these users.  Thus when they decide to go with BIS, they take on the task of remaining secure.  For a second, leave these users out of the picture.  Pick the other half of the users who are aware.  Suppose they set some permissions and then forgot about them?  Maybe they allowed access based on an application requesting them to do so and they never set the permissions back.  What then?</p>
<p>I thought about this and came up with a solution of sorts.  Why not have a list of the most important security permissions and check them at a timed interval to see if they have been changed?  If they have, then send the user an alert.  Here’s the code I came up with:</p>
<pre lang="JAVA">package com.zensay.sectest;

import java.util.Timer;
import java.util.TimerTask;
import net.rim.device.api.applicationcontrol.ApplicationPermissions;
import net.rim.device.api.applicationcontrol.ApplicationPermissionsManager;
import net.rim.device.api.system.Application;
import net.rim.device.api.system.Bitmap;
import net.rim.device.api.ui.Manager;
import net.rim.device.api.ui.Screen;
import net.rim.device.api.ui.Ui;
import net.rim.device.api.ui.UiEngine;
import net.rim.device.api.ui.component.Dialog;

public class Main extends Application
{
    public static void main(String args[])
    {
        Main app = new Main();
        app.enterEventDispatcher();
    }

    public Main()
    {
        TimerTask tm = new TimerTask()
        {
			public void run()
			{
				reqPerm();
			}
        };
    	Timer t = new Timer();
        t.schedule(tm,10000, 10000);
    }

    public void reqPerm()
	{
		ApplicationPermissionsManager apm = ApplicationPermissionsManager.getInstance();
		int input = apm.getPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION);
		if(input == ApplicationPermissions.VALUE_ALLOW)
		{
			synchronized(Application.getEventLock())
			{
				UiEngine ui = Ui.getUiEngine();
				Screen screen = new Dialog(Dialog.D_OK, "Input Simulation is allowed!!",
						Dialog.OK, Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION), Manager.VERTICAL_SCROLL);
				ui.pushGlobalScreen(screen, 1, UiEngine.GLOBAL_QUEUE);
			}
		}
	}
}</pre>
<p><img class="alignnone size-medium wp-image-406" title="perm_check" src="http://chirashi.zenconsult.net/wp-content/uploads/2009/11/perm_check-188x300.jpg" alt="perm_check" width="188" height="300" /></p>
<p style="clear: both;">To explain it a little bit, the code (when compiled, signed and executed on your BlackBerry) will check your “Input Simulation” permission.  If it is set to “Allow” the application will pop open a message window and notify the user.  It does this every 10 seconds.  Its annoying as hell, but I think you get the general idea.  I tested this on my Bold and it works very well.  I’m thinking about making it an additional feature in Kisses; with a slightly longer timeout of course.  Its a feature I would find useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://chirashi.zenconsult.net/2009/11/mice-permissions-and-a-solution/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Team BlackBerryForums! Fu*k Yeah!</title>
		<link>http://chirashi.zenconsult.net/2009/11/team-blackberryforums-fuk-yeah/</link>
		<comments>http://chirashi.zenconsult.net/2009/11/team-blackberryforums-fuk-yeah/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 07:54:46 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[Spyware]]></category>
		<category><![CDATA[Surveillance]]></category>
		<category><![CDATA[WTF?]]></category>

		<guid isPermaLink="false">http://chirashi.zensay.com/?p=324</guid>
		<description><![CDATA[I&#8217;m glad I don&#8217;t take things personally.  I am also a firm believer in the phrase &#8220;no good deed goes unpunished&#8221;.  I decided to post in both the CrackBerry Forums and BlackBerryForums communities that I&#8217;d released the program called Kisses.  It would appear, however, that the fact that I had designed both PhoneSnoop and Kisses [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-325" style="margin: 5px;" title="teamamerica_1024" src="http://chirashi.zenconsult.net/wp-content/uploads/2009/11/teamamerica_1024.jpg" alt="teamamerica_1024" width="294" height="222" />I&#8217;m glad I don&#8217;t take things personally.  I am also a firm believer in the phrase &#8220;no good deed goes unpunished&#8221;.  I decided to post in both the <a href="http://forums.crackberry.com/f83/show-hidden-apps-263067/#post2993904" target="_blank">CrackBerry</a> Forums and <a href="http://www.blackberryforums.com/" target="_blank">BlackBerryForums</a> communities that I&#8217;d released the program called <a href="http://kisses.zensay.com/" target="_blank">Kisses</a>.  It would appear, however, that the fact that I had designed both <a href="http://chirashi.zensay.com/2009/10/remote-listening-for-the-blackberry/" target="_blank">PhoneSnoop</a> and Kisses seemed to strike a nerve with the members of both forums.  CrackBerry has deleted the post I made.  The <a href="http://www.blackberryforums.com/aftermarket-software/209443-kisses-free-spyware-detector.html" target="_blank">thread on the BlackBerryForums</a>, however, is still alive and kicking. If you have some time to waste, head on down there and have a read.</p>
<p>The thread demonstrates some of the ways in which people formulate opinions and it highlighted something very important; to me at least.  Its a trait that I have seen with so many developers of applications as well.  It would appear to me that people are always looking to &#8220;play&#8221; within a certain set of distinct boundaries.</p>
<p>I&#8217;ll give you an example of a web application developer.  In one banking application I tested, I was able to do a &#8220;negative transfer&#8221;.  It worked like this, if Alice were to transfer -$1000 to Bob, the logic of the application made Bob do a transfer of $1000 to Alice.  So by Alice initiating a negative transfer, she was able to pull money out of Bob&#8217;s account.  When confronted with this, the developer simply stated &#8220;yes, but a user is not supposed to do this.&#8221;  Well of course he&#8217;s not supposed to do this, but isn&#8217;t it your job as a developer to check for it?  An attacker is not going to play nice; he&#8217;s going to find any way he can to own you.  If he can&#8217;t hack your systems, he&#8217;ll come at you with a knife or a gun.  To him, the end goal is getting what he wants.  He&#8217;s not going to stop doing something just because &#8220;a user is not supposed to do this&#8221;.</p>
<p>If you take the case of what happened in the forums above, it seems very similar.  Here goes:</p>
<p>The forum users and moderators that did reply, seem to be under the impression that just because I released PhoneSnoop, I am trying to infect them by pushing Kisses (in their minds a malicious app) as a cure.  So to me, at least, it appears that their &#8220;boundary&#8221; or &#8220;sandbox&#8221; is the fact that I should have released one or the other but not both.  I&#8217;ll cover why this is not a very sound way of thinking later, but first, some fun.  Here are some of the things said in the forum post if you didn&#8217;t bother reading the whole thing.</p>
<ul>
<li>I was asked if now that I had raised awareness how long I will make PhoneSnoop available for.</li>
<li>I was compared to a fox guarding a hen house</li>
<li>I was compared to a pharmaceutical company</li>
<li>I was wished with &#8220;Kisses of death&#8221;</li>
<li>I was threatened with being sent back to Sri Lanka in a box.</li>
<li>I was called a lovely set of names ranging from &#8220;super-spy&#8221;, &#8220;spy-master&#8221; and compared with mid-eastern terrorists</li>
<li>I asked for donations to help get my hands of copies of FlexiSpy and MobileSpy (mostly because I was writing Kisses for free and was not in a position to pay over $200 for them) and thanks to some members of the phone community out there, I was able to get my hands on copies.  I was questioned as to why I asked for donations and they stated that even free anti-virus product companies don&#8217;t ask for donations.</li>
<li>One of them thinks my Kim Jong Il avatar (taken from Team America; very apt in this case I must say <img src='http://chirashi.zenconsult.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  ) on my twitter page makes me look very shady.</li>
</ul>
<p>So I now am going to dub these wonderful people who are protectors of the BlackBerry community as <strong>Team <span style="color: #ff0000;">Black</span><span style="color: #c0c0c0;">Berry</span><span style="color: #0000ff;">Forums</span></strong>.</p>
<p>I have to admit, though, that I respect them very much.  The are very dedicated and I hope that most of what they say comes from some place inside them where they want to protect other users.  For this, yes, I have to bow down and say that I&#8217;m impressed.</p>
<p>Right, now onto the reason why this sort of behavior is not very helpful.  First, I really don&#8217;t care if users don&#8217;t download and use my Kisses application.  I put it up there, because I wanted to give something back to users for free to help them protect themselves.  This was my only intention.</p>
<p>By making it appear to other users that I am evil because I wrote PhoneSnoop and now I&#8217;m writing Kisses, <strong>Team <span style="color: #ff0000;">Black</span><span style="color: #c0c0c0;">Berry</span><span style="color: #0000ff;">Forums</span></strong> are not being helpful to their users.  Its like in <a href="http://en.wikipedia.org/wiki/Green_Eggs_and_Ham" target="_blank">Green Eggs and Ham</a> &#8211; a pre-conceived notion before investigating things further. It would have been far more helpful to their users if they had verified things first before seemingly writing off the app as spyware.  To their credit, however, they did ask a lot of questions.  CrackBerry Forums just shut down the thread.  If they had researched what I <a href="http://www.slideshare.net/ch0pstick/spyware-presentation-at-hitb" target="_blank">presented in the Hack In The Box</a> security conference, they would known that there are far more creative ways of infecting BlackBerry users.  I tried to stress this point in my replies, but I guess their minds were already made up.</p>
<p>Lets <a href="http://dictionary.reference.com/browse/hypothetical" target="_blank">hypothetically</a> take the situation where I am someone evil and my only job is to spy on BlackBerry users.  I think I would have a far better chance of being stealthy.  I would certainly not highlight the fact that I can bug peoples phones and I surely would not release a proof-of-concept application.  This removes the element of stealth from my plan.  This is how I would do it, again, <a href="http://dictionary.reference.com/browse/hypothetical" target="_blank">hypothetically</a>.</p>
<p>I think <strong>Team <span style="color: #ff0000;">Black</span><span style="color: #c0c0c0;">Berry</span><span style="color: #0000ff;">Forums</span></strong> believes that by releasing a proof-of-concept tool makes me a terrorist of sorts.  They seem to think that nothing I do from now on can be trusted and is not well-intentioned.  Now I can see how they would think that.  But surely, they should be aware that if I had a serious need to read people&#8217;s email or tap their phone calls, I would find a way to do it?  And do it quietly?</p>
<p>Looking at my latest log file, I have 489 distinct downloads of Kisses.  I have had numerous emails from people asking me to support older versions of their BlackBerries and I have had lots of emails thanking me for releasing the free app.  I&#8217;m very happy that some people out there perceive the app as useful.  I think that&#8217;s enough for me.  So for the sake of those people out there, I will continue to develop Kisses and release it.  A big thanks go out to you guys.</p>
]]></content:encoded>
			<wfw:commentRss>http://chirashi.zenconsult.net/2009/11/team-blackberryforums-fuk-yeah/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>The theory behind BlackBerry phone taps</title>
		<link>http://chirashi.zenconsult.net/2009/10/the-theory-behind-blackberry-phone-taps/</link>
		<comments>http://chirashi.zenconsult.net/2009/10/the-theory-behind-blackberry-phone-taps/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 06:14:39 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[phone tap]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[spyphone]]></category>
		<category><![CDATA[Spyware]]></category>
		<category><![CDATA[Surveillance]]></category>

		<guid isPermaLink="false">http://chirashi.zensay.com/?p=297</guid>
		<description><![CDATA[The new version of FlexiSpy (which I dissected and posted about) promises to allow a user to spy on a target when he is on a call.  They call it Call Interception.  The site says: &#8220;Call Interception is the ability to listen in to an active phone call on the target device. You specify the [...]]]></description>
			<content:encoded><![CDATA[<p>The new version of FlexiSpy (which <a href="http://chirashi.zensay.com/2009/10/the-anatomy-of-a-spyware-application-part-1/" target="_blank">I dissected and posted about</a>) promises to allow a user to spy on a target when he is on a call.  They call it Call Interception.  The site says: <em>&#8220;Call Interception is the ability to listen in to an active phone call on the target device. You specify the numbers you are interested in and when any calls to or from these numbers occur on the target, FlexiSPY PRO-X will send a secret SMS to your mobile. If you now call the target mobile, you will be added to the call.&#8221;</em></p>
<p>Knowing the APIs of the BlackBerry, I can confirm that this will work only if and when a target has conference calling enabled.  The theory is simple again.  The application hooks the &#8220;<a href="http://www.blackberry.com/developers/docs/4.6.0api/net/rim/blackberry/api/phone/PhoneListener.html#callConnected(int)" target="_blank"><em>callConnected</em></a>&#8221; method on the <a href="http://www.blackberry.com/developers/docs/4.6.0api/net/rim/blackberry/api/phone/PhoneListener.html" target="_blank"><em>PhoneListener</em></a> class.  Then when it detects a specific number that has been specified, it sends an SMS to a pre-defined number.  Once that same pre-defined number calls in during an active call, the phone automatically answers and adds the user into a three-way conference.  So its dependent on the target and his phone plan.  Thus this feature is not a guaranteed one.  One thing I plan to try out is to see if the target will actually hear the call-waiting tone before the third call is connected.  Here&#8217;s a graphic that explains how it works:</p>
<div id="attachment_302" class="wp-caption alignnone" style="width: 360px"><img class="size-full wp-image-302" title="scene1" src="http://chirashi.zenconsult.net/wp-content/uploads/2009/10/scene1.png" alt="Bob calls Alice on her bugged phone" width="350" height="170" /><p class="wp-caption-text">Bob calls Alice on her bugged phone</p></div>
<div id="attachment_303" class="wp-caption alignnone" style="width: 360px"><img class="size-full wp-image-303" title="scene2" src="http://chirashi.zenconsult.net/wp-content/uploads/2009/10/scene2.png" alt="Alice's phone sends an SMS to Charlie" width="350" height="170" /><p class="wp-caption-text">Alice&#39;s phone sends an SMS to Charlie</p></div>
<div id="attachment_304" class="wp-caption alignnone" style="width: 360px"><img class="size-full wp-image-304" title="scene3" src="http://chirashi.zenconsult.net/wp-content/uploads/2009/10/scene3.png" alt="Charlie calls Alice's phone &amp; is added to the conversation" width="350" height="350" /><p class="wp-caption-text">Charlie calls Alice&#39;s phone &amp; is added to the conversation</p></div>
<p>In the scene above, Bob is a friend who calls Alice.  Alice has had her phone bugged by Charlie.  Charlie wants to listen into conversations between Bob and Alice.  For this to work, Alice needs to have the ability to make conference calls.  This is typically a value-added service from the mobile network operator.  Thus this attack is dependent on Alice having subscribed to such services.</p>
<p>Like all the other things, I&#8217;ve written about, I need to conduct some more research on it.  I&#8217;ve been busy these days with the day job and my research is taking a back seat.  Sad really.  Maybe its time to look for a job that pays me to do this stuff??  If you want the tool that lets you test out <a href="http://chirashi.zensay.com/2009/10/phonesnoop-turn-a-blackberry-into-a-portable-bug/" target="_blank">how you can remotely listen in</a> on ambient noise and conversations, <a href="http://chirashi.zensay.com/2009/10/remote-listening-for-the-blackberry/">look here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://chirashi.zenconsult.net/2009/10/the-theory-behind-blackberry-phone-taps/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>The Anatomy Of A Spyware Application &#8211; Part 1</title>
		<link>http://chirashi.zenconsult.net/2009/10/the-anatomy-of-a-spyware-application-part-1/</link>
		<comments>http://chirashi.zenconsult.net/2009/10/the-anatomy-of-a-spyware-application-part-1/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 17:40:17 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[flexispy]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[spyphone]]></category>
		<category><![CDATA[Spyware]]></category>
		<category><![CDATA[Surveillance]]></category>

		<guid isPermaLink="false">http://chirashi.zensay.com/?p=281</guid>
		<description><![CDATA[In keeping with the spirit of raising awareness, I&#8217;m pleased to present an in-depth look at the commercial spyware application known as FlexiSpy.  Looking at its creation date, the FlexiSpy domain started its online life in July of 2008 April of 2006, more than a three years ago [thanks Spyphoneguy for pointing that out].  The [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-287" style="margin-left: 5px; margin-right: 5px;" title="Agent Perry " src="http://chirashi.zenconsult.net/wp-content/uploads/2009/10/65736054.jpg" alt="Agent Perry " width="168" height="126" />In keeping with the spirit of raising awareness, I&#8217;m pleased to present an in-depth look at the commercial spyware application known as FlexiSpy.  Looking at its creation date, the FlexiSpy domain started its online life in <span style="text-decoration: line-through;">July of 2008</span> April of 2006, more than <span style="text-decoration: line-through;">a</span> three years ago [<span style="color: #000000;"><em>thanks Spyphoneguy for pointing that out</em></span>].  The site sells several products meant for mobile phones, most of them can be classified as surveillance tools.  Their product suite, once purchased, will need to be installed on a &#8220;target&#8217;s&#8221; phone.  This target is a person on whom surveillance is conducted.  Functionality includes remotely reading emails, SMS messages, call logs and of course remote listening.  Depending on the product, this will set a buyer back about $200 &#8211; $300.</p>
<p>Once a buyer parts with his $300, he will receive a user manual that provides information on how the application can be installed on a target&#8217;s phone.  I examined the version for the BlackBerry.  When going through the user manual, one of the first things that jumped out at me was this: <strong>explicit instructions to set the Default Permissions of the BlackBerry handheld to Allow All.</strong> This means that not just FlexiSpy, but every single application the target installs on his phone after this can gain full control (within the scope of the programming interface or API) over his handheld.  Obviously user protection is not a high priority in this case.</p>
<p><img class="alignleft" title="default_perms" src="http://chirashi.zenconsult.net/wp-content/uploads/2009/10/default_perms.png" alt="default_perms" width="608" height="226" /></p>
<p>At this point, I haven&#8217;t installed the app yet.  I begin to do so.  By using the phone&#8217;s built-in browser, I am asked to visit the site http://djp.cc.  I need to enter my activation key here and then I am presented with a download dialog.  This download dialog is simply a JAD file.  The contents of which are listed below:</p>
<pre><code>Manifest-Version: 1.0
MIDlet-Version: 3.02.04
MIDlet-Jar-Size: 232073
RIM-COD-URL-2: net_rim_app_console_pro-2.cod
MicroEdition-Configuration: CLDC-1.1
MIDlet-Jar-URL: net_rim_app_console_pro.jar
RIM-COD-Module-Dependencies: net_rim_cldc,net_rim_bbapi_mailv2,net_rim_os,net_rim_bbapi_phone,
net_rim_locationapi
RIM-COD-SHA1-2: 49 d9 a2 9c 2e 55 c2 fc da b4 2d 96 01 67 ef 7a 89 26 25 ac
RIM-COD-URL-1: net_rim_app_console_pro-1.cod
RIM-COD-SHA1-1: ab 26 1a 63 7c e9 e4 83 bc 04 2b 69 22 c7 54 5b 73 02 13 ce
RIM-COD-Size-2: 31304
RIM-COD-Size-1: 87268
RIM-COD-Module-Name: net_rim_app_console_pro
MIDlet-Name: net_rim_app_console_pro
RIM-COD-Size: 78756
RIM-COD-Creation-Time: 1246442605
RIM-COD-URL: net_rim_app_console_pro.cod
RIM-Library-Flags: 3
RIM-COD-SHA1: c9 33 b8 05 92 d8 08 e0 03 a6 21 e3 56 e7 70 0a f8 42 63 b5
MicroEdition-Profile: MIDP-2.0
MIDlet-Vendor: &lt;unknown&gt;</code></pre>
<p>This tells a BlackBerry where to go to get the actual binary or COD file.  In this case its http://djp.cc/net_rim_app_console_pro.cod and http://djp.cc/net_rim_app_console_pro-1.cod.  Generally, if a COD file exceeds size limitations or consists of several pre-compile external libraries, there will be a need to download more than 1 file.  This is interesting because the first thing I did after installing it is look for it in my Applications screen.  It turns out that FlexiSpy is never hidden on your BlackBerry.  It remains in plain sight, but with an obscure name that looks very similar to a RIM native library.  The application is also tagged as a library.</p>
<div id="attachment_284" class="wp-caption alignnone" style="width: 332px"><img class="size-full wp-image-284" src="http://chirashi.zenconsult.net/wp-content/uploads/2009/10/app_sc_1.png" alt="How FlexiSpy looks when installed" width="322" height="242" /><p class="wp-caption-text">How FlexiSpy looks when installed</p></div>
<div id="attachment_285" class="wp-caption alignnone" style="width: 334px"><img class="size-full wp-image-285" title="app_sc_2" src="http://chirashi.zenconsult.net/wp-content/uploads/2009/10/app_sc_2.png" alt="FlexiSpy is installed as a library" width="324" height="242" /><p class="wp-caption-text">FlexiSpy is installed as a library</p></div>
<p>So there it is, if you want to look for the latest version of FlexiSpy on your BlackBerries, go to <em>Options</em>-&gt;<em>Advanced</em> <em>Options</em>-&gt;<em>Applications</em> and look for &#8220;<strong>net_rim_app_console_pro</strong>&#8220;.  One thing very interesting is that if something is marked as a Library, in theory at least, you should be able to access some of the classes and methods within.  Curious, I did a &#8220;<em>strings</em>&#8221; on each of the COD files.  True enough, there was a list of package names, classes and methods visible &#8211; at least their names.  Since I&#8217;ve given out the URL, I&#8217;ll leave this exercise up to the reader.  I will explore possibilities of how this can be done and if indeed other applications can make use of FlexiSpy&#8217;s libraries.</p>
<h3>Behavior</h3>
<p>FlexiSpy requires activation before it can begin to spy on a target.  To do this, a user has to dial the number *#900900900 and then a hidden screen is activated.  On this screen, a user is prompted to enter the activation code.  Never one to leave home without my Wireshark, I sniffed the traffic that went through during the activation process.  Here is the information that went across the wire:</p>
<pre><code>POST /t4l-mcli/cmd/productactivate?mode=0&amp;ver=0302&amp;pid=FSP_BB_V4.2&amp;actcode=[Activation Code]
&amp;hash=[IMEI]&amp;phmodel=8300(4.5.0.44) HTTP/1.1</code></pre>
<p>This request is made to a server with second level domain &#8220;aabackup.info&#8221; It resolves to the same IP Address as the host djp.cc listed above.  As you can see, the phone&#8217;s IMEI is being sent back to FlexiSpy HQ.  Also visible is the Activation Code.  What is returned is a hash value which I didn&#8217;t look into very closely yet.  Presumably the phone calculates a similar algorithm and waits for a matching hash.  Once the correct hash is received the app is activated.</p>
<p>From this point out, its a case of configuring the application to intercept SMS messages, email messages, call logs, etc.  The application has a command channel through SMS.  Thus, you have a list of about 8 commands which do the following:</p>
<ul>
<li>Start Capture &#8211; Begin capturing events like email, sms, location, etc</li>
<li>Stop Capture &#8211; Stop an already started capture</li>
<li>Send Immediate &#8211; Send all collected events to the central logging host</li>
<li>Send Diagnostics &#8211; Send diagnostic info</li>
<li>Start SIM Monitor &#8211; Watch for any attempt at changing the SIM</li>
<li>Stop SIM Monitor &#8211; Stop</li>
<li>Start Mic Monitor &#8211; Wait for calls from a trigger number</li>
<li>Stop Mic Monitor &#8211; Stop</li>
</ul>
<p>The funny thing is that the command channel SMS messages cannot be deleted, so the manual advises a user to select short phrases like &#8220;Good morning&#8221; or some such to begin capturing information.  The phrases should be chosen so as not to arouse the target&#8217;s suspicion.</p>
<h3>Detection</h3>
<p>FlexiSpy relies very heavily on Listeners.  Even to bring up its secret screen, it adds a PhoneListener to wait for a specific number to be dialed.  This ensures that no running applications exist on the phone.  It uses these built-in features of the BlackBerry to remain cloaked.  It sits in plain sight in your applications directory and FlexiSpy can choose to constantly change its name whenever they release a new version.  I am incorporating the detection of both FlexiSpy and Mobile-Spy in <a href="http://kisses.zensay.com/" target="_blank">my Kisses app</a>.  I have a few ideas on how I can write a one time detector for FlexiSpy and Mobile-Spy.  The theories are on the drawing board at the moment.  I have to find a way to bring it into the code.</p>
<p>I expect to do a much more detailed write up on both FlexiSpy and Mobile-Spy and a much needed paper on what BlackBerry users can do to protect themselves.</p>
<h3>Acknowledgments</h3>
<p>Special thanks go out to <a href="http://www.spyphoneguy.com/" target="_blank">Spyphoneguy</a> for all his help!</p>
]]></content:encoded>
			<wfw:commentRss>http://chirashi.zenconsult.net/2009/10/the-anatomy-of-a-spyware-application-part-1/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>PhoneSnoop &#8211; Turn a BlackBerry into a portable bug</title>
		<link>http://chirashi.zenconsult.net/2009/10/phonesnoop-turn-a-blackberry-into-a-portable-bug/</link>
		<comments>http://chirashi.zenconsult.net/2009/10/phonesnoop-turn-a-blackberry-into-a-portable-bug/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 07:42:16 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[Bugs and Kisses]]></category>
		<category><![CDATA[Hack In The Box]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[Listening Device]]></category>
		<category><![CDATA[Remote Listening]]></category>
		<category><![CDATA[Spyware]]></category>
		<category><![CDATA[Surveillance]]></category>

		<guid isPermaLink="false">http://chirashi.zensay.com/?p=247</guid>
		<description><![CDATA[I’m back at work after attending Hack in the Box security conference.  It was an excellent conference and I managed to catch up with a few friends and industry professionals.  The Malaysian conference is still by far bigger than the one held in Dubai.  This year saw roughly 600 people.  I also heard that the [...]]]></description>
			<content:encoded><![CDATA[<p>I’m back at work after attending <a href="http://conference.hackinthebox.org/hitbsecconf2009kl/" target="_blank">Hack in the Box security conference</a>.  It was an excellent conference and I managed to catch up with a few friends and industry professionals.  The Malaysian conference is still by far bigger than the one held in Dubai.  This year saw roughly 600 people.  I also heard that the HITB crew is adding a new location to the list of venues &#8211; Amsterdam.  Now that will most likely be an awesome con.</p>
<p>I promised everyone at the conference that I’d have a working application that can spy on the audio of other users who own a BlackBerry.  I am ready to deliver on that promise today.  This post is a prelude to the release of the tool.  I’ve so far not packaged it with Bugs.  Its a separate program that I named <a href="http://chirashi.zensay.com/2009/10/remote-listening-for-the-blackberry/" target="_blank">PhoneSnoop</a>.  Please note that PhoneSnoop is not an application that does Phone Taps or give you the ability to listen into phone calls.  It can be done, however, and you can <a href="http://chirashi.zensay.com/2009/10/the-theory-behind-blackberry-phone-taps/">read more on that how to tap calls here</a>.  <span style="text-decoration: line-through;">I’d like to have some volunteer beta testers  to see how well the application works</span> You can now <a href="http://www.zensay.com/PhoneSnoop.jad">download PhoneSnoop directly from here</a> by using your BlackBerry (be sure to <a href="http://www.zenconsult.net/PhoneSnoop_Guide.pdf">read the guide</a> and also make sure to set your input language to English US for the app to work correctly).  You will be able to configure your own phone number.  <span style="text-decoration: line-through;">If you’re interested, please mail me on zen.chopstick@gmail.com</span> For the chickens out there, here’s a video of the app in action (I&#8217;ve not got audio on it, but it has closed captioning so make sure you turn it on).  I’m working on a video that shows the app on a real handheld with commentary, but for now, make do with this :p</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/bpR_v62vQCA&amp;hl=en&amp;fs=1&amp;rel=0&amp;hd=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/bpR_v62vQCA&amp;hl=en&amp;fs=1&amp;rel=0&amp;hd=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://www.youtube.com/watch?v=bpR_v62vQCA" target="_blank">PhoneSnoop &#8211; BlackBerry Bugging Application</a></p>
<p>Here’s how it works:</p>
<p>You install and run PhoneSnoop on a victims’ BlackBerry.  PhoneSnoop sets up a PhoneListener and waits for an incoming call from a specific number.  Once it detects a call from that specific number, it automatically answers the victims’ phone and puts the phone into SpeakerPhone mode.  This way, the attacker that called can now hear whats going on at the victims end.  Pretty simple right?  In the video above, I have setup PhoneSnoop to listen in for calls originating from +12120031337.  I first make a call from +12120031336 to show that there&#8217;s no effect.  Then, I show what happens when a call is made from the expected number.  The demo is on the BlackBerry simulator for now, but I&#8217;m working on bringing you a video that demonstrates the application on a real BlackBerry Bold.</p>
<p>Installation Instructions:</p>
<ol>
<li>Grab your friend’s BlackBerry</li>
<li>Download PhoneSnoop from the URL I mail you</li>
<li>Once installed, go to Options-&gt;Advanced Options-&gt;Applications-&gt;PhoneSnoop-&gt;Edit Permissions and change the “Input Simulation/Event Injection” to “Allow”</li>
<li>Run PhoneSnoop</li>
</ol>
<p>Checking the bugging capabilities:</p>
<ol>
<li>Call the victims phone number</li>
<li>Listen</li>
</ol>
<p><span style="text-decoration: line-through;">I will need to give you a customized version of PhoneSnoop hence there&#8217;s no download.  If you’re interested in trying it, mail me at zen.chopstick@gmail.com.  Include your phone number so that I can code it into the application.  I’m not doing a general release at the moment because of the implications of this tool.  I’m mainly looking for feedback so that I can refine the tool and write a paper on it.</span> The tool is now available for general release.  Anyone can download it.  <a href="http://chirashi.zensay.com/2009/10/remote-listening-for-the-blackberry/">Go here to read more.</a><span style="text-decoration: line-through;"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://chirashi.zenconsult.net/2009/10/phonesnoop-turn-a-blackberry-into-a-portable-bug/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
	</channel>
</rss>

