<?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; permissions</title>
	<atom:link href="http://chirashi.zenconsult.net/tag/permissions/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>The &#8216;Security Timer Reset&#8217; permission</title>
		<link>http://chirashi.zenconsult.net/2009/11/the-security-timer-reset-permission/</link>
		<comments>http://chirashi.zenconsult.net/2009/11/the-security-timer-reset-permission/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 18:14:53 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ubertwitter]]></category>

		<guid isPermaLink="false">http://chirashi.zensay.com/?p=334</guid>
		<description><![CDATA[Did you ever wonder what some of those Application Permissions were on your BlackBerry?  I&#8217;m putting together a paper that details the more important ones and why you should be careful in changing them.  For now, I thought I&#8217;d share some information about the &#8220;Security Timer Reset&#8221; permission and what you can do with it. [...]]]></description>
			<content:encoded><![CDATA[<p>Did you ever wonder what some of those Application Permissions were on your BlackBerry?  I&#8217;m putting together a paper that details the more important ones and why you should be careful in changing them.  For now, I thought I&#8217;d share some information about the &#8220;<em>Security Timer Reset</em>&#8221; permission and what you can do with it.</p>
<p>The Security Timer Reset permission is set to Deny by default.  This is good.  Be wary of applications asking you for Allow permissions on this.  One of the things you can do with this permission enabled is to delay your lock screen.  Indefinitely.</p>
<p>The lock screen usually appears when your <em>Security Timeout</em> is exceeded.</p>
<div id="attachment_336" class="wp-caption alignnone" style="width: 250px"><img class="size-full wp-image-336" title="9000_lock_screen" src="http://chirashi.zenconsult.net/wp-content/uploads/2009/11/9000_lock_screen.png" alt="Device Lock Screen" width="240" height="160" /><p class="wp-caption-text">Device Lock Screen</p></div>
<p>For example, if you have a <em>Security Timeout</em> set to 2 minutes, your screen will lock automatically and you will have to enter your password to access the device again.  This is handy to have, if you leave your BlackBerry on your desk at work and are afraid someone will pick it up and install nasty stuff on your BlackBerry.</p>
<div id="attachment_335" class="wp-caption alignnone" style="width: 250px"><img class="size-full wp-image-335" title="9000_lock_screen-01" src="http://chirashi.zenconsult.net/wp-content/uploads/2009/11/9000_lock_screen-01.png" alt="Lock Screen Timeout" width="240" height="160" /><p class="wp-caption-text">Security Timeout</p></div>
<p>Let&#8217;s take the case where you download a malicious application (you don&#8217;t know its malicious of course).  It is such a compelling one (read: porn slideshow) that you just HAD to download it.  Now the application innocently asks you for the &#8220;<em>Event Injection</em>&#8221; &amp; &#8220;<em>Security Timer Reset</em>&#8221; permission to &#8216;advance&#8217; the slides back and forth.  &#8220;Sure&#8221;, you think, &#8220;no problems there now is it?&#8221; and you grant Allow access to the application.  What this application <strong><em>could</em></strong> do is to then inject a key event every 15 seconds.  This can be done so that you don&#8217;t notice.  When this key event is injected every 15 seconds, its as if you are moving the trackball or clicking a key.  This delays the device lockout because the timer is reset every 15 seconds.  <strong>The device will now never lock itself out.</strong></p>
<p>So be wary of granting Allow Permissions on almost everything.  I know UberTwitter is an application that asks for a lot of Allow permissions (although it doesn&#8217;t ask you for the Security Timer Reset permission).  I think it might be worthwhile starting a Permissions Hall of Shame on my site, just to list such offenders.</p>
<div id="attachment_337" class="wp-caption alignnone" style="width: 346px"><img class="size-full wp-image-337 " title="ubertwitter_2" src="http://chirashi.zenconsult.net/wp-content/uploads/2009/11/ubertwitter_2.png" alt="Permission Change Request" width="336" height="224" /><p class="wp-caption-text">Permission Change Request</p></div>
<div id="attachment_338" class="wp-caption alignnone" style="width: 346px"><img class="size-full wp-image-338 " title="ubertwitter_3" src="http://chirashi.zenconsult.net/wp-content/uploads/2009/11/ubertwitter_3.png" alt="Allow All" width="336" height="224" /><p class="wp-caption-text">Allow All</p></div>
<div id="attachment_339" class="wp-caption alignnone" style="width: 346px"><img class="size-full wp-image-339 " title="ubertwitter_4" src="http://chirashi.zenconsult.net/wp-content/uploads/2009/11/ubertwitter_4.png" alt="...like really!" width="336" height="224" /><p class="wp-caption-text">...like really!</p></div>
]]></content:encoded>
			<wfw:commentRss>http://chirashi.zenconsult.net/2009/11/the-security-timer-reset-permission/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

