<?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>gaurav's rants &#187; drm</title>
	<atom:link href="http://blog.gauravgiri.com/tag/drm/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.gauravgiri.com</link>
	<description>mostly iPhone stuff</description>
	<lastBuildDate>Sun, 13 Mar 2011 19:16:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>DRM = FAIL</title>
		<link>http://blog.gauravgiri.com/2008/07/drm-fail/</link>
		<comments>http://blog.gauravgiri.com/2008/07/drm-fail/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 15:12:02 +0000</pubDate>
		<dc:creator>gaurav</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[drm]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[store]]></category>

		<guid isPermaLink="false">http://blog.gauravgiri.com/?p=33</guid>
		<description><![CDATA[it&#8217;s a sad day for Apple Inc. they thought they were on top of things when they decided to take a 30% cut from the developers&#8217; earnings from the iPhone App Store.. they really thought DRM would make the applications copy proof.. i mean.. c&#8217;mon.. you know better than that Apple&#8230; it&#8217;s the basic nature [...]]]></description>
			<content:encoded><![CDATA[<p>it&#8217;s a sad day for Apple Inc.<br />
they thought they were on top of things when they decided to take a 30% cut from the developers&#8217; earnings from the iPhone App Store..<br />
they really thought DRM would make the applications copy proof.. i mean.. c&#8217;mon.. you know better than that Apple&#8230;</p>
<p>it&#8217;s the basic nature of all software to be crackable.. i&#8217;m yet to see an application that&#8217;s got no crack to go along with it on the torrent sites&#8230;</p>
<p>now that the simple crack to patch the DRM is out.. we should expect to see a great deal of cracked apps to start floating around..</p>
<p>Apple can kiss goodbye to their app store revenue&#8230; [well most of it atleast..]<br />
<span id="more-33"></span><br />
Here&#8217;s what you&#8217;ll need to break the law [atleast in the US]-<br />
1.GNU Debugger for iphone<br />
2. otool for iphone<br />
3. Legal legitamite app<br />
4. SSH</p>
<p>otool and gdb are availalbe through cydia. gdb is GNU Debugger and otool is located in the toolchain. After downloading, check permissions are set to 755 and reboot you iphone/ipod.</p>
<p>1. First off you will want to run an otool on you app.</p>
<div class="codetitle"><strong>Code:</strong></div>
<div class="codecontent">otool -l path/to/myapp.app/xyz</div>
<p>This will give you alot on info. The part we are interested in is the LC_ENCRYPTION_INFO. It will look like this-</p>
<p>Load command 9<br />
cmd LC_ENCRYPTION_INFO<br />
cmdsize 20<br />
cryptoff 4096<br />
cryptsize 798720<br />
cryptid 1<br />
Load command 10</p>
<p>cryptid means that it is encrypted. 1= encrypted 0= unencrypted</p>
<p>cryptsize is the szie of the encrypted bytes. Notice the first 4096 arnt encrypted (mach-o header).</p>
<p>2. Now we will use gdb to grab a memory dump of the decrypted application from the iphones flash memory.</p>
<p>launch the app from you ipod touch.</p>
<p>the use this command-</p>
<div class="codetitle"><strong>Code:</strong></div>
<div class="codecontent">ps ax</div>
<p>this shows us the current running processes on our iphone.</p>
<p>Now we want to attach gdb to an process. PID is the first number on the left.</p>
<div class="codetitle"><strong>Code:</strong></div>
<div class="codecontent">gdb -p &lt;pid&gt;</div>
<p>this will take a while&#8230;..</p>
<p>Now to grab the dump. Use this command in gdb to dump the memory. we want bytes from 0&#215;2000 until the end of the encrypted data (which you can calculate by turning cryptsize onto hex and adding the starting address)</p>
<div class="codetitle"><strong>Code:</strong></div>
<div class="codecontent">dump memory dump.bin 0&#215;2000 0&#215;20000</div>
<p>the we are done. So quit gdb.</p>
<p>3. Now we must use hex to add it together.</p>
<p>Replace data from 0&#215;1000 on the original exec with the info you dumped. Now we must change crypt id. it is usually around line 0&#215;800. Now save it as a new file. SSH back into ipod. Navigate to the directory and replace with the old exec with the new one. Now use this command to sign it</p>
<div class="codetitle"><strong>Code:</strong></div>
<div class="codecontent">ldid -S myapp</div>
<p>CREDIT LSEMTEX,F3AR,CDECL,Some unkown guy, call him TNT</p>
<p>Also have a look at this</p>
<p><!-- m --><a class="postlink" onclick="window.open(this.href);return false;" href="http://www.246tnt.com/iPhone/#gdb">http://www.246tnt.com/iPhone/#gdb</a></p>
<p><!-- m --><span class="postbody"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gauravgiri.com/2008/07/drm-fail/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

