<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: All About In-App Purchases Part 3: Anti-Piracy Measures</title>
	<atom:link href="http://gamesfromwithin.com/in-app-purchases-part-3/feed" rel="self" type="application/rss+xml" />
	<link>http://gamesfromwithin.com/in-app-purchases-part-3</link>
	<description>Living the indie life</description>
	<lastBuildDate>Thu, 09 Feb 2012 12:36:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: shayne</title>
		<link>http://gamesfromwithin.com/in-app-purchases-part-3/comment-page-1#comment-4976</link>
		<dc:creator>shayne</dc:creator>
		<pubDate>Mon, 04 Jan 2010 05:52:19 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=776#comment-4976</guid>
		<description>Ahh heck dude. You and me both tried to break into 1943 it seems. I failed dismally, but then I was bit of a novice. 

I was more interested in figuring out how to poke in cheat codes. I had made a little TSR thing I had hooked into memory location zero (You just hit reset and instead of resetting it&#039;d call your tsr) which I could then use to try and find where the live decrement counter was. Usually not hard to work out, but completely bamboozling when the code was a bit more defensive against that sort of thing.

So they just XOR&#039;d it huh? 

Man, playing around with ARM assembly lately (inlining some time critical operations in a G729 codec) really brought back memories of the days when I had most of the key Z80 opcodes memorised. Good times.</description>
		<content:encoded><![CDATA[<p>Ahh heck dude. You and me both tried to break into 1943 it seems. I failed dismally, but then I was bit of a novice. </p>
<p>I was more interested in figuring out how to poke in cheat codes. I had made a little TSR thing I had hooked into memory location zero (You just hit reset and instead of resetting it&#8217;d call your tsr) which I could then use to try and find where the live decrement counter was. Usually not hard to work out, but completely bamboozling when the code was a bit more defensive against that sort of thing.</p>
<p>So they just XOR&#8217;d it huh? </p>
<p>Man, playing around with ARM assembly lately (inlining some time critical operations in a G729 codec) really brought back memories of the days when I had most of the key Z80 opcodes memorised. Good times.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shul</title>
		<link>http://gamesfromwithin.com/in-app-purchases-part-3/comment-page-1#comment-4863</link>
		<dc:creator>shul</dc:creator>
		<pubDate>Mon, 28 Dec 2009 16:55:13 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=776#comment-4863</guid>
		<description>Great story :-)

I think I heard knuth saying that back in the day he got a xor matrix wiped off a board in one convention, because it was a state secret :-)</description>
		<content:encoded><![CDATA[<p>Great story <img src='http://gamesfromwithin.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I think I heard knuth saying that back in the day he got a xor matrix wiped off a board in one convention, because it was a state secret <img src='http://gamesfromwithin.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noel</title>
		<link>http://gamesfromwithin.com/in-app-purchases-part-3/comment-page-1#comment-4846</link>
		<dc:creator>Noel</dc:creator>
		<pubDate>Sun, 27 Dec 2009 22:21:14 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=776#comment-4846</guid>
		<description>Ha! The 1943 protection was really fun to beat. In those days, it was all about trying to get access to the memory after the game was loaded from tape/disk (which was the part that was really copy-protected). In this particular case, after all the usual tricks to confuse and lose the hacker (do a call statement, pop a value from the stack, and return to whatever address was previously on the stack, or set special interrupt handlers and jump to them), they had a particularly nasty piece of work. 

It was a simple loop that would iterate through the *whole* 64K of memory, XORing it against some particular number. The code following the loop seemed total garbage, but once the XOR was applied, it was revealed to be another loop XORing all of memory again with another number. This was repeated many times (maybe 100 times?). So clearly, if you had any other code residing in memory, it would be wiped completely. It was almost like playing CoreWars on a real computer! :-)

And every so often, if you looked at the ASCII representation of some parts of memory that you thought would contain something useful, you found messages from the developers egging you on, or telling you how you&#039;d never break it. Pretty fun really. A lot more fun than the game itself, that&#039;s for sure!</description>
		<content:encoded><![CDATA[<p>Ha! The 1943 protection was really fun to beat. In those days, it was all about trying to get access to the memory after the game was loaded from tape/disk (which was the part that was really copy-protected). In this particular case, after all the usual tricks to confuse and lose the hacker (do a call statement, pop a value from the stack, and return to whatever address was previously on the stack, or set special interrupt handlers and jump to them), they had a particularly nasty piece of work. </p>
<p>It was a simple loop that would iterate through the *whole* 64K of memory, XORing it against some particular number. The code following the loop seemed total garbage, but once the XOR was applied, it was revealed to be another loop XORing all of memory again with another number. This was repeated many times (maybe 100 times?). So clearly, if you had any other code residing in memory, it would be wiped completely. It was almost like playing CoreWars on a real computer! <img src='http://gamesfromwithin.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>And every so often, if you looked at the ASCII representation of some parts of memory that you thought would contain something useful, you found messages from the developers egging you on, or telling you how you&#8217;d never break it. Pretty fun really. A lot more fun than the game itself, that&#8217;s for sure!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shul</title>
		<link>http://gamesfromwithin.com/in-app-purchases-part-3/comment-page-1#comment-4805</link>
		<dc:creator>shul</dc:creator>
		<pubDate>Fri, 25 Dec 2009 16:49:31 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=776#comment-4805</guid>
		<description>Noel,
 I agree with you. another step you can take to make life harder for the cracker is to download the extensions each time, and delete them before the application closes. this works if your server is up and works 100% of the time and the user has network support.

 But we arrive at the same conclusion again, the minute the cracker has a way to read the OSs memory, the game is lost :-(

 btw, would be great to hear more about your footnote :0) - especially the taunting part :-)</description>
		<content:encoded><![CDATA[<p>Noel,<br />
 I agree with you. another step you can take to make life harder for the cracker is to download the extensions each time, and delete them before the application closes. this works if your server is up and works 100% of the time and the user has network support.</p>
<p> But we arrive at the same conclusion again, the minute the cracker has a way to read the OSs memory, the game is lost <img src='http://gamesfromwithin.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p> btw, would be great to hear more about your footnote :0) &#8211; especially the taunting part <img src='http://gamesfromwithin.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noel</title>
		<link>http://gamesfromwithin.com/in-app-purchases-part-3/comment-page-1#comment-4795</link>
		<dc:creator>Noel</dc:creator>
		<pubDate>Fri, 25 Dec 2009 03:53:48 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=776#comment-4795</guid>
		<description>Shul, Thanks! Glad you like the blog.

What you suggest is only true for items that are already included in the code (fertilizer, extra garden). But the ones that need to be downloaded from the server would require a bit more work: download it, add it to the binary, and turn off the whole purchase path. I guess the consolation is that someone needs to do it by hand instead of just running a script like they did before to &quot;crack&quot; it.</description>
		<content:encoded><![CDATA[<p>Shul, Thanks! Glad you like the blog.</p>
<p>What you suggest is only true for items that are already included in the code (fertilizer, extra garden). But the ones that need to be downloaded from the server would require a bit more work: download it, add it to the binary, and turn off the whole purchase path. I guess the consolation is that someone needs to do it by hand instead of just running a script like they did before to &#8220;crack&#8221; it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shul</title>
		<link>http://gamesfromwithin.com/in-app-purchases-part-3/comment-page-1#comment-4792</link>
		<dc:creator>shul</dc:creator>
		<pubDate>Fri, 25 Dec 2009 02:08:54 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=776#comment-4792</guid>
		<description>Hi,
 First, thank you Noel for the blog and the info - you are really a developers developer :-)

 @Kevin &amp;&amp; @John: All a cracker need do is find out where in the code Noel get his server answer and turn a false into true. No need to falsify receipts or anything.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
 First, thank you Noel for the blog and the info &#8211; you are really a developers developer <img src='http://gamesfromwithin.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p> @Kevin &amp;&amp; @John: All a cracker need do is find out where in the code Noel get his server answer and turn a false into true. No need to falsify receipts or anything.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Gadd</title>
		<link>http://gamesfromwithin.com/in-app-purchases-part-3/comment-page-1#comment-4748</link>
		<dc:creator>Kevin Gadd</dc:creator>
		<pubDate>Tue, 22 Dec 2009 19:00:27 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=776#comment-4748</guid>
		<description>John,

That&#039;s assuming that it&#039;s impossible to craft a receipt that causes the Apple server to return an error code. That&#039;s rarely a correct assumption.</description>
		<content:encoded><![CDATA[<p>John,</p>
<p>That&#8217;s assuming that it&#8217;s impossible to craft a receipt that causes the Apple server to return an error code. That&#8217;s rarely a correct assumption.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Biesnecker</title>
		<link>http://gamesfromwithin.com/in-app-purchases-part-3/comment-page-1#comment-4741</link>
		<dc:creator>John Biesnecker</dc:creator>
		<pubDate>Tue, 22 Dec 2009 08:47:19 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=776#comment-4741</guid>
		<description>Kevin,

They&#039;d only get things for free temporarily (because the app can periodically check and see if the receipt is valid) and only if the Apple servers happen to be down when they&#039;re trying. It&#039;s a pretty small, and temporary, window.</description>
		<content:encoded><![CDATA[<p>Kevin,</p>
<p>They&#8217;d only get things for free temporarily (because the app can periodically check and see if the receipt is valid) and only if the Apple servers happen to be down when they&#8217;re trying. It&#8217;s a pretty small, and temporary, window.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Gadd</title>
		<link>http://gamesfromwithin.com/in-app-purchases-part-3/comment-page-1#comment-4734</link>
		<dc:creator>Kevin Gadd</dc:creator>
		<pubDate>Mon, 21 Dec 2009 22:09:04 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=776#comment-4734</guid>
		<description>If you&#039;re going to assume that an Apple failure means the end user&#039;s receipt is legit, you should make sure that the end user has no way to manipulate the receipt sent to the server. Otherwise, all they have to do is shove a custom built malformed receipt into the right place and your app gives them everything for free.</description>
		<content:encoded><![CDATA[<p>If you&#8217;re going to assume that an Apple failure means the end user&#8217;s receipt is legit, you should make sure that the end user has no way to manipulate the receipt sent to the server. Otherwise, all they have to do is shove a custom built malformed receipt into the right place and your app gives them everything for free.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noel</title>
		<link>http://gamesfromwithin.com/in-app-purchases-part-3/comment-page-1#comment-4731</link>
		<dc:creator>Noel</dc:creator>
		<pubDate>Mon, 21 Dec 2009 21:15:55 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=776#comment-4731</guid>
		<description>Hi Neil,

Good point. You&#039;re absolutely right. If the Apple server fails to respond, then it would be better not to automatically flag it as an invalid purchase. I probably haven&#039;t considered that case because the Apple server has been up 100% of the time, but I think I&#039;ll change it.
Thanks.</description>
		<content:encoded><![CDATA[<p>Hi Neil,</p>
<p>Good point. You&#8217;re absolutely right. If the Apple server fails to respond, then it would be better not to automatically flag it as an invalid purchase. I probably haven&#8217;t considered that case because the Apple server has been up 100% of the time, but I think I&#8217;ll change it.<br />
Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil Inglis</title>
		<link>http://gamesfromwithin.com/in-app-purchases-part-3/comment-page-1#comment-4730</link>
		<dc:creator>Neil Inglis</dc:creator>
		<pubDate>Mon, 21 Dec 2009 21:12:40 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=776#comment-4730</guid>
		<description>Thanks for the post, great info, particularly the base 64 encoding. I hadn&#039;t seen that in the docs.

One comment, your php function seems to return false if the call to the Apple servers fails.  Wouldn&#039;t it be better to give the user the benefit of the doubt in that case and approve the purchase?  I see you&#039;re storing the receipts so you can check the next time the client reports to the server.

This would remove any user frustration when either your server or the Apple server fails to make/return from the verification step.</description>
		<content:encoded><![CDATA[<p>Thanks for the post, great info, particularly the base 64 encoding. I hadn&#8217;t seen that in the docs.</p>
<p>One comment, your php function seems to return false if the call to the Apple servers fails.  Wouldn&#8217;t it be better to give the user the benefit of the doubt in that case and approve the purchase?  I see you&#8217;re storing the receipts so you can check the next time the client reports to the server.</p>
<p>This would remove any user frustration when either your server or the Apple server fails to make/return from the verification step.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tweets that mention Games from Within &#124; All About In-App Purchases Part 3: Anti-Piracy Measures -- Topsy.com</title>
		<link>http://gamesfromwithin.com/in-app-purchases-part-3/comment-page-1#comment-4728</link>
		<dc:creator>Tweets that mention Games from Within &#124; All About In-App Purchases Part 3: Anti-Piracy Measures -- Topsy.com</dc:creator>
		<pubDate>Mon, 21 Dec 2009 21:05:47 +0000</pubDate>
		<guid isPermaLink="false">http://gamesfromwithin.com/?p=776#comment-4728</guid>
		<description>[...] This post was mentioned on Twitter by Noel Llopis and Gagan Biyani, GameDev.net. GameDev.net said: RT @SnappyTouch: New blog post: All About In-App Purchases Part 3: Anti-Piracy Measures http://bit.ly/907UmC [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by Noel Llopis and Gagan Biyani, GameDev.net. GameDev.net said: RT @SnappyTouch: New blog post: All About In-App Purchases Part 3: Anti-Piracy Measures <a href="http://bit.ly/907UmC" rel="nofollow">http://bit.ly/907UmC</a> [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

