<?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>feisley &#187; BlackBerry</title>
	<atom:link href="http://feisley.com/tag/blackberry/feed/" rel="self" type="application/rss+xml" />
	<link>http://feisley.com</link>
	<description>programming with a side of life</description>
	<lastBuildDate>Thu, 15 Apr 2010 07:33:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Blackberry eScreen Keygen</title>
		<link>http://feisley.com/2009/09/26/blackberry-escreen-keygen/</link>
		<comments>http://feisley.com/2009/09/26/blackberry-escreen-keygen/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 23:19:35 +0000</pubDate>
		<dc:creator>Jacob Feisley</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[eScreen]]></category>
		<category><![CDATA[reverse engineering]]></category>

		<guid isPermaLink="false">http://feisley.com/?p=3548</guid>
		<description><![CDATA[As an avid BlackBerry user I always love to see what new things I can make it do.  One of the more interesting parts is the Engineering Screen or &#8220;eScreen&#8221; within the OS. However you need a special key to unlock it.
RIM has the keygen published on their website but you need a password to [...]]]></description>
			<content:encoded><![CDATA[<p>As an avid BlackBerry user I always love to see what new things I can make it do.  One of the more interesting parts is the Engineering Screen or &#8220;eScreen&#8221; within the OS. However you need a special key to unlock it.</p>
<p>RIM has the keygen published on their website but you need a password to get to it (Perhaps it is for partners only?) You can see the site here: <a href="https://www.blackberry.com/EngineeringScreens/">https://www.blackberry.com/EngineeringScreens/</a></p>
<p>Earlier this year a few websites published their own keygen to compute the unlock code. Much to my dismay, however, none of them decided to share exactly how they did this. With that, I decided to discover the unlock code myself and publish the results. <span id="more-3548"></span></p>
<p>The unlock code is actually a simple HMAC digest with a SHA1 variant. The trick is knowing what data to throw at the algorithm to produce the proper unlock code. The data used includes:</p>
<ol>
<li>The BlackBerry device PIN</li>
<li>The application version (including parentheses if provided)</li>
<li>The current uptime of the device in seconds</li>
<li>The unlock duration</li>
<li>The secret sauce</li>
</ol>
<p>The relevant data needed was found by inspecting &#8220;net.rim.device.internal.EScreens.EngScreenSecurity&#8221;, however, I will not go into the details of that here. Once I found the unlock duration codes and the secret key, it was just a matter of putting them into a standard HMAC hash function and out came the unlock code.</p>
<p>In order to use an unlock code, you simply visit the &#8220;Help Me!&#8221; screen by pressing alt+shift+H on your BlackBerry device to get the necessary information, generate a code, and then type it directly into the Help Me screen. No characters will be echoed, but if you enter it correctly, the screen with change over to the &#8220;Engineering Screen&#8221; main page. Do note it is possible to make some changes in the &#8220;eScreen&#8221; that could cause your phone to operate improperly or even break completely so do proceed with changing values at your own risk.</p>
<p>Now I wont point fingers at the various people that have already discovered how this is done but refused to share the code or details with anyone. They are what prompted me to undertake this project in the first place. With that, I give you the Python source code to my basic unlock code keygen:</p>
<p><br class="spacer_" /></p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">hmac</span>
<span style="color: #ff7700;font-weight:bold;">import</span> hashlib
&nbsp;
pin = <span style="color: #483d8b;">'ffaa0000'</span>            <span style="color: #808080; font-style: italic;"># Device PIN                [XXXXXXXX]</span>
app = <span style="color: #483d8b;">'4.6.0.100 (233)'</span>     <span style="color: #808080; font-style: italic;"># OS Application version    [n.n.n.n (n)]</span>
uptime = <span style="color: #483d8b;">'12345'</span>            <span style="color: #808080; font-style: italic;"># Uptime in seconds             </span>
duration = <span style="color: #ff4500;">30</span>               <span style="color: #808080; font-style: italic;"># Duration for key to last  [1, 3, 6, 15, or 30]</span>
&nbsp;
lifetime = <span style="color: black;">&#123;</span>
 <span style="color: #ff4500;">1</span>: <span style="color: #483d8b;">&quot;&quot;</span>,
 <span style="color: #ff4500;">3</span>: <span style="color: #483d8b;">&quot;Hello my baby, hello my honey, hello my rag time gal&quot;</span>,
 <span style="color: #ff4500;">7</span>: <span style="color: #483d8b;">&quot;He was a boy, and she was a girl, can I make it any more obvious?&quot;</span>,
 <span style="color: #ff4500;">15</span>: <span style="color: #483d8b;">&quot;So am I, still waiting, for this world to stop hating?&quot;</span>,
 <span style="color: #ff4500;">30</span>: <span style="color: #483d8b;">&quot;I love myself today, not like yesterday. I'm cool, I'm calm, I'm gonna be okay&quot;</span>
<span style="color: black;">&#125;</span>
&nbsp;
secret = <span style="color: #483d8b;">'Up the time stream without a TARDIS'</span>
&nbsp;
data = pin + app + uptime + lifetime<span style="color: black;">&#91;</span>duration<span style="color: black;">&#93;</span>
<span style="color: #008000;">hash</span> = <span style="color: #dc143c;">hmac</span>.<span style="color: #dc143c;">new</span><span style="color: black;">&#40;</span>secret, data, digestmod = hashlib.<span style="color: black;">sha1</span><span style="color: black;">&#41;</span>
key = <span style="color: #008000;">hash</span>.<span style="color: black;">hexdigest</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span>:<span style="color: #ff4500;">8</span><span style="color: black;">&#93;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">print</span> key</pre></div></div>

<p>Weighing in at only 25 lines, this shows how simple the algorithm actually is if one only knows how to put it together. If you want a packaged online tool, then by all means check out the other published keygens, but if you are curious how the codes actually are generated (like I was) feel free to take, use, and share this code at your will.</p>
]]></content:encoded>
			<wfw:commentRss>http://feisley.com/2009/09/26/blackberry-escreen-keygen/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

