<?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>seoxys.com&#187; Cocoa</title>
	<atom:link href="http://www.seoxys.com/category/cocoa/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.seoxys.com</link>
	<description></description>
	<lastBuildDate>Mon, 17 Jan 2011 00:49:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Growing iPhone Development Into A Viable Business</title>
		<link>http://www.seoxys.com/growing-iphone-development-into-a-viable-business/</link>
		<comments>http://www.seoxys.com/growing-iphone-development-into-a-viable-business/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 20:28:00 +0000</pubDate>
		<dc:creator>kenneth</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.seoxys.com/?p=155</guid>
		<description><![CDATA[When one hears stories from iPhone developers, they&#8217;re either from the lucky ones who made insane amounts of money and laugh all the way to the bank, or rather from disappointed developers who consider their efforts a&#160;failure. The latter tend to blame the App Store for the failure of their application(s). Granted, the App Store [...]]]></description>
			<content:encoded><![CDATA[<p>When one hears stories from iPhone developers, they&#8217;re either from the lucky ones who made insane amounts of money and laugh all the way to the bank, or rather from disappointed developers who <a href="http://www.techcrunch.com/2009/03/22/should-an-iphone-app-developer-charge-or-run-ads-galaxy-impact-case-study/">consider their efforts a&nbsp;failure</a>.</p>
<p>The latter tend to blame the App Store for the failure of their application(s). Granted, the App Store is a harsh market which has both its advantages and its flaws. But, in my humble opinion, a good craftsman never blames his&nbsp;tools.</p>
<p>The App Store has trends that can be analyzed, and if you&#8217;re going to be developing for the iPhone, you need to learn how to adapt. I have learnt this first-hand through experimentation, and have learnt many valuable lessons along the&nbsp;way.</p>
<p>Last September, while working on a much bigger iPhone game, I thought it would be cool to create a quick one-trick application for viewing jokes. I never envisioned that <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=291699747&#038;mt=8">iLaugh</a> would become my most lucrative app that would keep me going while I develop the aforementioned&nbsp;game.</p>
<p><img src="http://akhun.com/seo/skitch/AppViz-20090408-213830.png" /></p>
<p>The Y-Axis shows daily revenue in US&nbsp;dollars.</p>
<p>Let&#8217;s leave the end of the graph (Feb-Apr) aside for a minute, we&#8217;ll get back to&nbsp;it.</p>
<p>You can see the initial release spikes, typical of the App Store, and then a very depressing downwards trend right after release. For the second release, 1.1, I upped the price from $0.99 to $1.99. Which slightly lowered the initial spike revenue. But at that stage, I had a much more mature app which unfortunately, due to lack of effective marketing stagnated at a sub-$20 daily&nbsp;revenue.</p>
<p>But in February, I made pretty much the best decision I have ever made. That, of course, was to release a Lite version. I initially thought it would be a nearly cost-free way to get some free advertising for the premium version. The main reason I put ads inside the Lite version was actually not to create revenue, but rather to give users a reason to upgrade. But, other than that, the Lite version was an identical, fully functional copy of the premium&nbsp;version.</p>
<p>As you can see, it did a pretty decent job of advertising the premium version. Since the mid-Feb release of iLaugh Lite, daily revenue for iLaugh has been much higher than it previously&nbsp;was.</p>
<p>Fortunately, <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=305152278&#038;mt=8">iLaugh Lite</a> became quite popular on the iTunes App Store, and while never entering the global top 100, it has charted as high as #29 on the Entertainment chart, and has been in the top 40 entertainment apps nearly since its&nbsp;release.</p>
<p>While this did have some unexpected consequences, like bringing my entire server down due to excessive traffic which brought the iLaugh service down and forced me to upgrade to a better server, the benefits were pretty&nbsp;clear.</p>
<p><img src="http://akhun.com/seo/skitch/AppViz-20090408-215757.png" /></p>
<p>This graph shows daily iLaugh Lite&nbsp;downloads.</p>
<p>This equates to about 100,000 monthly&nbsp;downloads.</p>
<p>Here&#8217;s a graph that shows the web-service traffic this generates (since each joke is fetched from my server, this gives me a pretty good overview of the actual usage of the app). Unfortunately, I only started using this particular analytics package on March 2nd, so that&#8217;s when the graph&nbsp;starts.</p>
<p><img src="http://akhun.com/seo/skitch/Custom_Report_-_Google_Analytics-20090408-222008.png" /></p>
<p>To date, iLaugh has served over 6 million jokes, and it&#8217;s going at about one million per&nbsp;week.</p>
<p>So far I left out one pretty important thing: ad revenue. But one always leaves the best for last, right? So here&nbsp;goes:</p>
<p><img src="http://akhun.com/seo/skitch/skitched-20090408-221114.png" /></p>
<p>As the installed user-base for iLaugh Lite grows, so does daily ad revenue. Currently, I&#8217;m seeing pretty good numbers. I have around 6 million monthly ad impressions, and as you can see in the above graph, I&#8217;m seeing around $100 daily ad&nbsp;revenue.</p>
<p>While these aren&#8217;t mind-shattering numbers, I think they give a pretty good overview of what one can achieve as an average developer for the iPhone&nbsp;platform.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seoxys.com/growing-iphone-development-into-a-viable-business/feed/</wfw:commentRss>
		<slash:comments>49</slash:comments>
		</item>
		<item>
		<title>3 Easy Tips to Prevent a Binary Crack</title>
		<link>http://www.seoxys.com/3-easy-tips-to-prevent-a-binary-crack/</link>
		<comments>http://www.seoxys.com/3-easy-tips-to-prevent-a-binary-crack/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 11:14:17 +0000</pubDate>
		<dc:creator>kenneth</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Hacking]]></category>

		<guid isPermaLink="false">http://www.seoxys.com/?p=88</guid>
		<description><![CDATA[When coding anti-piracy prevention measures, your goal should be to keep honest users honest. It is important to make the user experience pleasing and simple for your paid&#160;customers. While in an ideal world, people would buy everything legally, reality is very different. Most people, if tempted with an easy free way to get your app, [...]]]></description>
			<content:encoded><![CDATA[<p>When coding anti-piracy prevention measures, your goal should be to keep honest users honest.<br />
It is important to make the user experience pleasing and simple for your paid&nbsp;customers.</p>
<p>While in an ideal world, people would buy everything legally, reality is very different.<br />
Most people, if tempted with an easy free way to get your app, will pirate even though they know it is&nbsp;wrong.</p>
<p>Here are three easy tips that will help your app resist to binary cracks, but do not take much work to&nbsp;implement.</p>
<ul>
<li><a href="#strip">Strip debug&nbsp;symbols</a></li>
<li><a href="#ptrace">PT_DENY_ATTACH</a></li>
<li><a href="#checksum">Checksum your&nbsp;binary</a></li>
</ul>
<p>You can <a href="http://dl.azuretalon.com/ProtectionSample.zip">grab the sample code</a> for the first two&nbsp;tips.</p>
<h1 id="strip">Strip debug&nbsp;symbols</h1>
<p>Stripping debug symbols will remove all the method names from the executable, which makes it a lot harder for anyone to reverse-engineer your app using gdb. (I showed how this is usually done <a href="http://www.seoxys.com/hacking-mac-apps-direct-mail/">here</a>) Now, instead of seeing all your method names, which method the app is currently in, and instead of being able to breakpoint the app at that spot, they&#8217;ll only see hexadecimal&nbsp;addresses.</p>
<p>You can still get around this by class-dumping the executable and getting new method&#8217;s hex addresses from there, (although they might be off by a certain difference which you&#8217;d have to calculate) but this already makes it a lot harder for crackers to&nbsp;attack.</p>
<p>So, without further ado, here&#8217;s how you do this: Apple&#8217;s <a href="http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html">documentation</a> has a detailed explanation, so instead of rewriting it myself, I&#8217;ll just copy-paste it&nbsp;here:</p>
<blockquote><p>Xcode provides several built-in options for stripping executables of their debugging symbols. One of these is the Strip Linked Product build setting. While typically set, it has no effect unless the Deployment Postprocessing setting is also set. Deployment Postprocessing is a master switch that enables the action of a host of other build settings. It&#8217;s approximately analogous to running the xcodebuild tool with the install&nbsp;command.</p>
<p>Again, open the target build settings and turn on debugging symbols for the Release configuration. Open the project build settings; in the Release configuration, enable both Strip Linked Product (if it isn&#8217;t on already) and Deployment Postprocessing. Your project settings should now resemble those shown in Table&nbsp;2.</p>
<table>
<tr>
<td><b>Build Setting</b></td>
<td><b>Value</b></td>
</tr>
<tr>
<td>Deployment Postprocessing</td>
<td>YES</td>
</tr>
<tr>
<td>Strip Linked Product</td>
<td>YES</td>
</tr>
</table>
</blockquote>
<h1 id="ptrace">PT_DENY_ATTACH</h1>
<p>Behind this barbaric name is a very useful flag which lets you prevent gdb from attaching to your app. Ever tried <a href="http://www.steike.com/code/debugging-itunes-with-gdb/">debugging iTunes</a>? Give it a try now, but be prepared for a disappointment, it crashes gdb when it tries to attach to&nbsp;it.</p>
<p>One step further in protecting your app after striping debug symbols is to activate PT_DENY_ATTACH. Note that this doesn&#8217;t make stripping debug symbols useless. While in theory it does, there are <a href="http://landonf.bikemonkey.org/code/macosx/Leopard_PT_DENY_ATTACH.20080122.html">ways</a> to get around&nbsp;it.</p>
<p>Activating this protection is really easy, and only involves editing your&nbsp;<i>main.m</i>.</p>
<pre class="textmate-source barf"><span class="source source_objc"><span class="comment comment_line comment_line_double-slash comment_line_double-slash_c++"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_c">//</span>
</span><span class="comment comment_line comment_line_double-slash comment_line_double-slash_c++"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_c">//</span>  main.m
</span><span class="comment comment_line comment_line_double-slash comment_line_double-slash_c++"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_c">//</span>  ProtectionSample
</span><span class="comment comment_line comment_line_double-slash comment_line_double-slash_c++"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_c">//</span>
</span><span class="comment comment_line comment_line_double-slash comment_line_double-slash_c++"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_c">//</span>  Created by Kenneth Ballenegger on 2008/06/27.
</span><span class="comment comment_line comment_line_double-slash comment_line_double-slash_c++"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_c">//</span>  Copyright Azure Talon 2008. All rights reserved.
</span><span class="comment comment_line comment_line_double-slash comment_line_double-slash_c++"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_c">//</span>
</span>
<span class="meta meta_preprocessor meta_preprocessor_c meta_preprocessor_c_include">#<span class="keyword keyword_control keyword_control_import keyword_control_import_include keyword_control_import_include_c">import</span> <span class="string string_quoted string_quoted_other string_quoted_other_lt-gt string_quoted_other_lt-gt_include string_quoted_other_lt-gt_include_c"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_c">&lt;</span>Cocoa/Cocoa.h<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_c">&gt;</span></span></span>
<span class="meta meta_preprocessor meta_preprocessor_c meta_preprocessor_c_include">#<span class="keyword keyword_control keyword_control_import keyword_control_import_include keyword_control_import_include_c">include</span> <span class="string string_quoted string_quoted_other string_quoted_other_lt-gt string_quoted_other_lt-gt_include string_quoted_other_lt-gt_include_c"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_c">&lt;</span>sys/ptrace.h<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_c">&gt;</span></span></span>

<span class="storage storage_type storage_type_c">int</span><span class="meta meta_function meta_function_c"> <span class="entity entity_name entity_name_function entity_name_function_c">main</span><span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_c">(</span><span class="storage storage_type storage_type_c">int</span> argc, <span class="storage storage_type storage_type_c">char</span> *argv<span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[]</span></span><span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_c">)</span></span>
{
    <span class="comment comment_line comment_line_double-slash comment_line_double-slash_c++"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_c">//</span>Build settings -&gt; Other C Flags: -DDEBUG
</span><span class="meta meta_preprocessor meta_preprocessor_c">#<span class="keyword keyword_control keyword_control_import keyword_control_import_c">ifdef</span> DEBUG</span>
    <span class="comment comment_line comment_line_double-slash comment_line_double-slash_c++"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_c">//</span>do nothing
</span><span class="meta meta_preprocessor meta_preprocessor_c">#<span class="keyword keyword_control keyword_control_import keyword_control_import_c">else</span></span>
    ptrace(PT_DENY_ATTACH, <span class="constant constant_numeric constant_numeric_c">0</span>, <span class="constant constant_numeric constant_numeric_c">0</span>, <span class="constant constant_numeric constant_numeric_c">0</span>);
<span class="meta meta_preprocessor meta_preprocessor_c">#<span class="keyword keyword_control keyword_control_import keyword_control_import_c">endif</span></span>
    <span class="keyword keyword_control keyword_control_c">return</span> <span class="support support_function support_function_cocoa">NSApplicationMain</span>(argc,  (<span class="storage storage_modifier storage_modifier_c">const</span> <span class="storage storage_type storage_type_c">char</span> **) argv);
}
</span></pre>
<p>This code should be pretty&nbsp;self-explanotary&#8230;</p>
<p>You need to have a flag that differs for release build and debug builds. You want to be able to debug your app while you code it. That&#8217;s why I set <i>Other C Flags</i> for the Debug build settings to &#8220;-DDEBUG&#8221; and used an #ifdef to activate it only for release&nbsp;builds.</p>
<p>Test it if it works quickly, fire up terminal and try to use&nbsp;gdb.</p>
<pre class="textmate-source barf"><span class="text text_plain"><span class="meta meta_paragraph meta_paragraph_text">seoMac:~ kenneth$ gdb /Users/kenneth/Desktop/ProtectionSample/build/Release/ProtectionSample.app/Contents/MacOS/ProtectionSample
GNU gdb 6.3.50-20050815 (Apple version gdb-952) (Sat Mar 29 03:33:05 UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries ..... done
</span>
<span class="meta meta_paragraph meta_paragraph_text">(gdb) r
Starting program: /Users/kenneth/Desktop/ProtectionSample/build/Release/ProtectionSample.app/Contents/MacOS/ProtectionSample
Reading symbols for shared libraries ++++....................................................................... done
</span>
<span class="meta meta_paragraph meta_paragraph_text">Program exited with code 055.
(gdb)
</span></span></pre>
<p>Congratulations, it works! Your app cannot be loaded into gdb anymore. (Note: there are workarounds. Experienced hackers who really want to will still manage to get&nbsp;in.)</p>
<h1 id="checksum">Checksum your&nbsp;binary</h1>
<p>The last tip for today is of a different kind, and it is probably the most effective of the&nbsp;three.</p>
<p>Basically, all you need to do is to checksum your binary. Put the md5 somewhere in your .app, preferably well hidden. Preferably use a salted hash, or double-hash it. Make it hard for a potential hacker to figure out how to get the correct hash for a given hash. Hide the file in which you store this hash well, or store it in your Info.plist. Where you store it doesn&#8217;t matter, but you can&#8217;t put it in the binary. Preferably set up a build script that will re-generate the new hash at every build (when your binary changes), so you don&#8217;t have to do it&nbsp;yourself.</p>
<p>In your code, check the stored hash against the binary, and if they are different, it means the binary has been modified. In that case, display an error message asking to re-download the app from your site, and&nbsp;quit.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seoxys.com/3-easy-tips-to-prevent-a-binary-crack/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Registration Schemes: Asymmetrical Cryptography</title>
		<link>http://www.seoxys.com/registration-schemes-asymmetrical-cryptography/</link>
		<comments>http://www.seoxys.com/registration-schemes-asymmetrical-cryptography/#comments</comments>
		<pubDate>Sat, 05 Apr 2008 22:13:05 +0000</pubDate>
		<dc:creator>kenneth</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.seoxys.com/?p=86</guid>
		<description><![CDATA[One challenge that most developers face when nearing release of their first application is how to implement registration and piracy protection. This three-part article will describe three common types of registration schemes: Serial Numbers, Asymmetrical Cryptographic Keys and Product&#160;Activation. Part Two: Asymmetrical&#160;Cryptography Asymmetrical Cryptographic Keys are a great way to secure you app, because the [...]]]></description>
			<content:encoded><![CDATA[<p>One challenge that most developers face when nearing release of their first application is how to implement registration and piracy protection. This three-part article will describe three common types of registration schemes: <b>Serial Numbers</b>, <b>Asymmetrical Cryptographic Keys</b> and <b>Product&nbsp;Activation</b>.</p>
<hr />
<h1>Part Two: Asymmetrical&nbsp;Cryptography</h1>
<p>Asymmetrical Cryptographic Keys are a great way to secure you app, because the code used to generate serials is not included in your app, thus removing the risk of a keygen. Using a private key, you sign (or encrypt) some of the user&#8217;s details. You then use this singed data as the key to your software, either in the form of a serial, a file, or even <a href="http://switchersblog.com/2007/04/05/license-keys-mac-style-1passwd-introduces-new-license-cards.html">an image with the data embedded</a>. You then verify that the signature is valid using the public key in your&nbsp;app.</p>
<p><b>Example</b></p>
<p>Start off by generating a set of private and public RSA keys. You can do this by using the following in&nbsp;Terminal.app:</p>
<p><code>openssl genrsa -out private.pem 2048<br />
openssl rsa -in private.pem -out public.pem -outform PEM&nbsp;-pubout</code></p>
<p>You can use different size keys. Using a shorter key, such as 512 will make your software more vulnerable to brute-force attack, but has the advantage of making the signature smaller (Which is useful if you wish to display it in the form of a Serial&nbsp;Number).</p>
<p>I believe I used the following set of keys. The keys are also included as files in the source code of this example (available at the bottom of this&nbsp;article).</p>
<p><code>-----BEGIN RSA PRIVATE KEY-----<br />
MIIEpAIBAAKCAQEAwKhjrkHmaupDGERSHdgZuSwBWBr4kufBGz0Dk5sn3PR3ZtaP<br />
Vrv6+5Mdz1gAEBYbUVH3m+4+dHcwol5xNckKBT8M5Zy6GPoV9dBUS/1wQBzgdTzf<br />
jvV4uE9S0pofQWw3faZ904tTOjbM0qUko2nd7yyjYBhh/m1ABEFHuL62BvRp13na<br />
vv6534OqqeExEb9VD3K9+Rr4+YQVRUpqZSz2xwhqfLgAzFVQ9bmSG8yTVKmF/vQA<br />
t+N8ThN2WO5qYtCbPawkmIpwvUCTXkxAiiTPNOiU3G1vwtzBoma9TL6dgGmhq6P7<br />
0KBcQNGUEpA2PFC7MEBeNyVyiMIOAvrkHjY/VQIDAQABAoIBABUNET9EMiIykLxB<br />
Etvx9fWWylrPL6QVsLMCOrbROEzbZYSWIzlt9uGwVIyIaBFZ6Qg8tZqTML3XHDhR<br />
q3seCXtDRWx9cJQ0F1wxtFRNUAuhXCFTUnYzekphWIJslse2RGX1YEBSM/jjbgQC<br />
SXuVoMt2jC9+2o5Lb7hHTcfxBsDBmZpghArT5seTOwDOOhTULqoh2wgZYB2IpgTI<br />
UV2CPpAqRVECRnPNdE5UcNIeHc7g4aji5BO0G0u8uM4RUffuRcLaPymuxpU9vwd1<br />
gjVaG6BF/2odW7GEBU3FNLUtvr9MxT+HC+hwOJUuk8NWxU7DqMdyiwSs7W3Nnx7R<br />
5RPvj8ECgYEA34DZjy5EMm7QyPZA6DvAZv6RIecFEwEkwFG+mQgoCy4VfLikkwzC<br />
bI8M8fc6Xiix7ZTjSmvuHt1D4HSRHMOVYgDzY0A5+F+8X657mN5TwNlYMOUkDX3I<br />
rNwc3cRVqtLZYGX0H7cR6eEomGJ7fA9gKuTpaXI0IJz5DsqsgTaGvfECgYEA3Ktr<br />
Q53i52jnssL9c3JsxQO+I/2fWKgo3bZeBI/5zLsz3itVjFjMVldrIK1QZWXI4z7l<br />
dPYwh6qCa1unsizuuzeAhW6NcuUjGPBlBqlo/a9WfOo16ExPXBoH3PH2DXz/YS+D<br />
DOp4Wl8ePhO7C46t3zmGahchysx3kCGkAmNkA6UCgYEA0upvZNUOemFlGiB5RC8O<br />
9KMLJukyOqr7mZoKubOexl4o3NgKRtLlrziXyMe8Bxt0PXYhwBt2TR4Vbf3S60gO<br />
8rte86yqiB8gT1MDRFGazATPWuUCTtECzU2y1/ztsxTjGjtcU4mZmBJpEtTtHzgL<br />
Uq9PLbkeRCCeUD0m6ZEhOqECgYB85jFyNh1F6aSrE56tB2j1Iicu69CTN6rZwuz4<br />
HB3BeXvkFhb3txMBE7244yAMJE5OAT2Ss/3H7AShi2EhgjklkkaWP3qkO3lgFkC4<br />
Qo8Ad4u2bEJS105bzQgCUJl6DPPnKCM+3j98tzXA4R4PbpSPMloYFju0M4LA+6l/<br />
CI6FWQKBgQCWr4Py/GBhgoYOlY/f41NzOfsttwcCBum3uPbiPq6gM/AQQRjzdUmK<br />
QRgG9XXs/33KUMiU+/15hK8ShrOWRSx+zHdgeMhVmuYJdEeygANI9dkonJ3+Olth<br />
77beMQrKIY9kw4bVRFtLWhxfAHXvnksnBg79PX05joVvoHFgVxuwlg==<br />
-----END RSA PRIVATE KEY-----<br />
-----BEGIN PUBLIC KEY-----<br />
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwKhjrkHmaupDGERSHdgZ<br />
uSwBWBr4kufBGz0Dk5sn3PR3ZtaPVrv6+5Mdz1gAEBYbUVH3m+4+dHcwol5xNckK<br />
BT8M5Zy6GPoV9dBUS/1wQBzgdTzfjvV4uE9S0pofQWw3faZ904tTOjbM0qUko2nd<br />
7yyjYBhh/m1ABEFHuL62BvRp13navv6534OqqeExEb9VD3K9+Rr4+YQVRUpqZSz2<br />
xwhqfLgAzFVQ9bmSG8yTVKmF/vQAt+N8ThN2WO5qYtCbPawkmIpwvUCTXkxAiiTP<br />
NOiU3G1vwtzBoma9TL6dgGmhq6P70KBcQNGUEpA2PFC7MEBeNyVyiMIOAvrkHjY/<br />
VQIDAQAB<br />
-----END PUBLIC KEY-----<br />
</code></p>
<p>Next, we will create the generator. We will start by concatenating the details (full name and email address) into a single&nbsp;string:</p>
<p><code>First&nbsp;Last+email@address.com</code></p>
<p>Then, we will use RSA to sign this string using the private key generated&nbsp;above:</p>
<p><code>lFZpwJ6GPLXz8sDez033RIxJsN072lOEa0qF+8hQ5KCcZEPQqSBU4MKbW+UJxIfSmKMOBYnVfy/wwAoSxTtqn2JIuAPEJvsTlb0mGH5u7mpxH+FDj2TicoBKephWv7UXP9k10OPA45247+j/u4yKT1UZcq7WjChQ3JoE3wBtEoFucQm8vLk/VqvNaBM1TyNEgwT8FmrKlbK1FNUI8nQ0QOEJ9P8oMAblkWE5kALZZqWnAs6xE7c73sex73t5FvxYRqRDzRDzkjTwK0anXCv8dmeLvnaaHAFcfD5llx09oa89q+wzWucE7V1TsPRYKH1sZsSz5G2xTt2pZrjIoTw5ew==</code></p>
<p><b>Note</b>: for this sample app, I explicitly turned off creating newlines in the base64&nbsp;signature.</p>
<p>The code used for this generator&nbsp;is:</p>
<pre class="textmate-source"><span class="source source_objc"><span class="meta meta_implementation meta_implementation_objc"><span class="meta meta_scope meta_scope_implementation meta_scope_implementation_objc"><span class="meta meta_function meta_function_objc">-<span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">IBAction</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">generate</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">sender</span></span>
</span>{
    <span class="support support_class support_class_cocoa">NSData</span> *privateKeyData = <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="support support_class support_class_cocoa">NSData</span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">dataWithContentsOfURL<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="support support_class support_class_cocoa">NSURL</span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">fileURLWithPath<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="support support_class support_class_cocoa">NSBundle</span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">mainBundle</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">pathForResource<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="string string_quoted string_quoted_double string_quoted_double_objc"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_objc">@"</span>private<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_objc">"</span></span> <span class="support support_function support_function_any-method support_function_any-method_name-of-parameter support_function_any-method_name-of-parameter_objc">ofType<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="string string_quoted string_quoted_double string_quoted_double_objc"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_objc">@"</span>pem<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_objc">"</span></span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>;
    <span class="support support_class support_class_cocoa">NSData</span> *publicKeyData = <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="support support_class support_class_cocoa">NSData</span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">dataWithContentsOfURL<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="support support_class support_class_cocoa">NSURL</span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">fileURLWithPath<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="support support_class support_class_cocoa">NSBundle</span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">mainBundle</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">pathForResource<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="string string_quoted string_quoted_double string_quoted_double_objc"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_objc">@"</span>public<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_objc">"</span></span> <span class="support support_function support_function_any-method support_function_any-method_name-of-parameter support_function_any-method_name-of-parameter_objc">ofType<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="string string_quoted string_quoted_double string_quoted_double_objc"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_objc">@"</span>pem<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_objc">"</span></span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>;
    <span class="support support_class support_class_cocoa">NSString</span> *details = <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="support support_class support_class_cocoa">NSString</span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">stringWithFormat<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="string string_quoted string_quoted_double string_quoted_double_objc"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_objc">@"</span>%@+%@<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_objc">"</span></span>, <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span>name <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">stringValue</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>, <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span>email <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">stringValue</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>;

    SSCrypto *crypto = <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span>SSCrypto <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">alloc</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">initWithPublicKey<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span>publicKeyData <span class="support support_function support_function_any-method support_function_any-method_name-of-parameter support_function_any-method_name-of-parameter_objc">privateKey<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span>privateKeyData</span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>;
    <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span>crypto <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">setClearTextWithString<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span>details</span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>;

    <span class="support support_class support_class_cocoa">NSData</span> *signedTextData = <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span>crypto <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">sign</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>;
    <span class="support support_class support_class_cocoa">NSString</span> *string = <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span>signedTextData <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">encodeBase64WithNewlines<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="constant constant_language constant_language_objc">NO</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>;

    <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span>serial <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">setStringValue<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span>string</span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>;

    <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span>crypto <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">release</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>;
}
</span></span></span></pre>
<p>As you can see, I used Septicus Software&#8217;s great <a href="http://septicus.com/products/opensource/">SSCrypto</a> framework for this task&#8230; It makes things so much easier&#8230; Unfortunately it doesn&#8217;t support base32 or DSA, which would both have helped make more human-friendly&nbsp;keys.</p>
<p>The other piece needed is the validator, used in your software to validate serial numbers. Include only the public key in your app, and use RSA to verify the&nbsp;key.</p>
<pre class="textmate-source"><span class="source source_objc"><span class="meta meta_implementation meta_implementation_objc"><span class="meta meta_scope meta_scope_implementation meta_scope_implementation_objc"><span class="meta meta_function meta_function_objc">-<span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">IBAction</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">validate</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">sender</span></span>
</span>{
    <span class="support support_class support_class_cocoa">NSData</span> *publicKeyData = <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="support support_class support_class_cocoa">NSData</span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">dataWithContentsOfURL<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="support support_class support_class_cocoa">NSURL</span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">fileURLWithPath<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="support support_class support_class_cocoa">NSBundle</span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">mainBundle</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">pathForResource<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="string string_quoted string_quoted_double string_quoted_double_objc"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_objc">@"</span>public<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_objc">"</span></span> <span class="support support_function support_function_any-method support_function_any-method_name-of-parameter support_function_any-method_name-of-parameter_objc">ofType<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="string string_quoted string_quoted_double string_quoted_double_objc"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_objc">@"</span>pem<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_objc">"</span></span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>;
    <span class="support support_class support_class_cocoa">NSString</span> *details = <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="support support_class support_class_cocoa">NSString</span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">stringWithFormat<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="string string_quoted string_quoted_double string_quoted_double_objc"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_objc">@"</span>%@+%@<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_objc">"</span></span>, <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span>name <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">stringValue</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>, <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span>email <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">stringValue</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>;
    <span class="support support_class support_class_cocoa">NSData</span> *number = <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span>serial <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">stringValue</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">dataUsingEncoding<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="support support_constant support_constant_cocoa">NSUTF8StringEncoding</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">decodeBase64WithNewLines<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="constant constant_language constant_language_objc">NO</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>;

    SSCrypto *crypto = <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span>SSCrypto <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">alloc</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">initWithPublicKey<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span>publicKeyData</span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>;
    <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span>crypto <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">setCipherText<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span>number</span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>;

    <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span>crypto <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">verify</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>;

    <span class="keyword keyword_control keyword_control_c">if</span>(<span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span><span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span>crypto <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">clearTextAsString</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span> <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">isEqualToString<span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span>details</span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>)
        <span class="support support_function support_function_cocoa">NSRunAlertPanel</span>(<span class="string string_quoted string_quoted_double string_quoted_double_objc"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_objc">@"</span>Result<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_objc">"</span></span>, <span class="string string_quoted string_quoted_double string_quoted_double_objc"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_objc">@"</span>Good serial!<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_objc">"</span></span>, <span class="string string_quoted string_quoted_double string_quoted_double_objc"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_objc">@"</span>OK<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_objc">"</span></span>, <span class="constant constant_language constant_language_objc">nil</span>, <span class="constant constant_language constant_language_objc">nil</span>);
    <span class="keyword keyword_control keyword_control_c">else</span>
        <span class="support support_function support_function_cocoa">NSRunAlertPanel</span>(<span class="string string_quoted string_quoted_double string_quoted_double_objc"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_objc">@"</span>Result<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_objc">"</span></span>, <span class="string string_quoted string_quoted_double string_quoted_double_objc"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_objc">@"</span>Wrong serial!<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_objc">"</span></span>, <span class="string string_quoted string_quoted_double string_quoted_double_objc"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_objc">@"</span>OK<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_objc">"</span></span>, <span class="constant constant_language constant_language_objc">nil</span>, <span class="constant constant_language constant_language_objc">nil</span>);

    <span class="meta meta_bracketed meta_bracketed_objc"><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">[</span>crypto <span class="meta meta_function-call meta_function-call_objc"><span class="support support_function support_function_any-method support_function_any-method_objc">release</span></span><span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_objc">]</span></span>;
}
</span></span></span></pre>
<p><b>Important Note</b>: In this sample code, I included both the generator and the validator in the same application. I included the private.pem file in the bundle. You should <b>never</b> do this. If the private key is ever leaked, it compromises the whole security of your&nbsp;application.</p>
<p><b>Making it&nbsp;safer</b></p>
<p>You can easily make it more secure by combining this technique with the technique explained in Part One. Instead of simple concatenating the details as I did here, you could use all the techniques applied in Part One, such as using a hash instead, or doing ROT13 on it, or rearranging the order of the&nbsp;characters.</p>
<p>Another thing you should do is to hardcode and obfuscate your public key. Having it as a file in the bundle makes you vulnerable to key substitution. (Basically, a cracker would replace the public key in your app by a different key they created using a private key they know, thus making their licenses valid instead of&nbsp;yours.) </p>
<p><b>Form&nbsp;Factors</b></p>
<p>While you may not realize it at first sight, this has become one of the most common methods in Mac shareware, thanks to the open-source framework <a href="http://aquaticmac.com">AquaticPrime</a>. AquaticPrime uses this technique behind the scenes, by embedding the signature in a plist file. AquaticPrime is a very easy way to use this. Unfortunately, if you decide to use AquaticPrime.framework in your app, it is very easy to replace the .framework file with a malicious one that will always claim your licenses are&nbsp;valid.</p>
<p>To date, as far as I know, there isn&#8217;t any HackuaticPrime.framework yet, but this might one day become a problem with AquaticPrime gaining popularity thanks to it&#8217;s extreme simplicity of&nbsp;implementation.</p>
<p><b>Update</b>: <b>Devon</b> in the comments suggests implementing a hash check of the framework, which is a simple way of checking the framework&#8217;s integrity. Of course, there are still ways to get around it, but this makes it one step more&nbsp;difficult.</p>
<p>Another common form factor for Asymmetrical Cryptographic Keys is custom URL schemes. That&#8217;s actually a very clever and convenient way of doing it. To register, the users get to simple click on a link which looks like this: (All the user sees is a nice &#8220;Click here to register&#8221;&nbsp;link)</p>
<p><code>myapp://name:email:key</code> </p>
<p>Another clever, but controversial form factor is Agile Web Solution&#8217;s 1Password <a href="http://switchersblog.com/2007/04/05/license-keys-mac-style-1passwd-introduces-new-license-cards.html">License&nbsp;&#8220;Cards&#8221;</a>.</p>
<p>And of course, if you find a way to make short base32 signatures (I hear DSA makes short signatures), you can even use longer Serial&nbsp;Numbers.</p>
<p><code>AHJ53-5HGJZ-8DG8R-284DF-56FJB-74FH4-FJUEH</code></p>
<hr />
<p><b>Sample&nbsp;Code</b></p>
<p>The code used in this article can be downloaded <a href="http://dl.azuretalon.com/async.zip">here</a>.<br />
As always, licensed under MIT license. If you do use it, mention it in the About Box or&nbsp;readme.txt.</p>
<hr />
<p><a href="http://www.seoxys.com/registration-schemes-serial-numers/">Part One: Serial Numbers</a><br />
The next part will be coming&nbsp;soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seoxys.com/registration-schemes-asymmetrical-cryptography/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Interviews and Podcasts</title>
		<link>http://www.seoxys.com/interviews-and-podcasts/</link>
		<comments>http://www.seoxys.com/interviews-and-podcasts/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 09:58:13 +0000</pubDate>
		<dc:creator>kenneth</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.seoxys.com/interviews-and-podcasts/</guid>
		<description><![CDATA[iAppblog recently interviewed me on the new iPhone SDK, Apple&#8217;s business model, and whether we will see Exces for iPhone. It&#8217;s an interesting read, so be sure to go have a&#160;look Last week, I also participated in the MacSB podcst episode 4. It was really interesting and instructive to have a chat with some really [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://iappblog.com/">iAppblog</a> recently interviewed me on the new iPhone SDK, Apple&#8217;s business model, and whether we will see Exces for iPhone. It&#8217;s an interesting read, so be sure to go <a href="http://iappblog.com/interview-with-kenneth-ballenegger-on-the-iphone-sdk">have a&nbsp;look</a></p>
<p>Last week, I also participated in the <a href="http://www.macdevnet.com/index.php/shows/macsoftwarebusiness">MacSB podcst</a> <a href="http://www.macdevnet.com/index.php/shows/macsoftwarebusiness/40-macsoftwarebusiness/229-macsb004-software-bundles">episode 4</a>. It was really interesting and instructive to have a chat with some really cool other developers: <a href="http://atomicwang.org/motherfucker/">Mike Lee</a>, <a href="http://www.memoryminer.com/blog/">John Fox</a>, <a href="http://dannygreg.com">Danny Greg</a>, and our host, <a href="">Steve&nbsp;Scotty</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seoxys.com/interviews-and-podcasts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NanoLifeSaver</title>
		<link>http://www.seoxys.com/nanolifesaver/</link>
		<comments>http://www.seoxys.com/nanolifesaver/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 23:06:43 +0000</pubDate>
		<dc:creator>kenneth</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Art]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.seoxys.com/nanolifesaver/</guid>
		<description><![CDATA[I bring to you,&#160;NanoLifeSaver. NanoLifeSaver is a slick Core Animation&#160;screensaver. (This last one is a movie, Click to&#160;Play) Download&#160;NanoLifeSaver Credit goes to Scott Stevenson for coming up with the original animation&#160;code.]]></description>
			<content:encoded><![CDATA[<p>I bring to you,&nbsp;NanoLifeSaver.</p>
<p>NanoLifeSaver is a slick Core Animation&nbsp;screensaver.</p>
<p><img src="http://rsrc.azuretalon.com/nano/nano_screen1.png" /></p>
<p><img src="http://rsrc.azuretalon.com/nano/nano_screen2.png" />  	<object width="347" height="266" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab"><param name="src" value="http://rsrc.azuretalon.com/nano/nano-poster.jpg" /><param name="href" value="nano.mov" /><param name="target" value="myself" /><param name="controller" value="false" /><param name="autoplay" value="false" /><param name="scale" value="aspect" /><embed width="347" height="266" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" 			src="http://rsrc.azuretalon.com/nano/nano-poster.jpg" 			href="http://rsrc.azuretalon.com/nano/nano.mov" 			target="myself" 			controller="false" 			autoplay="false" 			scale="aspect"></embed></object><br />
(This last one is a movie, Click to&nbsp;Play)</p>
<p><a href="http://dl.azuretalon.com/nano.zip">Download&nbsp;NanoLifeSaver</a></p>
<p>Credit goes to <a href="http://theocacao.com">Scott Stevenson</a> for coming up with the <a href="http://theocacao.com/document.page/555/">original animation&nbsp;code</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seoxys.com/nanolifesaver/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
<enclosure url="http://rsrc.azuretalon.com/nano/nano.mov" length="78" type="video/quicktime" />
		</item>
		<item>
		<title>R.I.P. Hijack</title>
		<link>http://www.seoxys.com/rip-hijack/</link>
		<comments>http://www.seoxys.com/rip-hijack/#comments</comments>
		<pubDate>Fri, 22 Feb 2008 14:27:05 +0000</pubDate>
		<dc:creator>kenneth</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.seoxys.com/rip-hijack/</guid>
		<description><![CDATA[Disappointingly, codename: Hijack / Spool is no&#160;more. I have posted about this project before, and it was really something I was excited&#160;about. Back in the day where I actually had time, I was a forum freak and was active in more than 10 forums&#8230; This would have been the dream app for&#160;me. Unfortunately, Hijack has [...]]]></description>
			<content:encoded><![CDATA[<p>Disappointingly, codename: Hijack / Spool <a href="http://hijackapp.com/2008/02/04/welcome-to-codename-hijack/">is no&nbsp;more</a>.</p>
<p><img src="http://goodcomics.com/end/spool/spool_reveal.jpg" /></p>
<p>I have <a href="http://www.seoxys.com/everything-about-nothing/">posted about this project before</a>, and it was really something I was excited&nbsp;about.</p>
<p>Back in the day where I actually had time, I was a forum freak and was active in more than 10 forums&#8230; This would have been the dream app for&nbsp;me.</p>
<p>Unfortunately, Hijack has just been open-sourced. Which means that the project is essentially&nbsp;dead.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seoxys.com/rip-hijack/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hacking mac apps: Direct Mail</title>
		<link>http://www.seoxys.com/hacking-mac-apps-direct-mail-archive/</link>
		<comments>http://www.seoxys.com/hacking-mac-apps-direct-mail-archive/#comments</comments>
		<pubDate>Tue, 18 Dec 2007 23:02:36 +0000</pubDate>
		<dc:creator>kenneth</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Hacking]]></category>

		<guid isPermaLink="false">http://www.seoxys.com/2007/12/19/hacking-mac-apps-direct-mail/</guid>
		<description><![CDATA[Update: I rewrote this post with better language and better explanations. Please read the newer version first. In this post, I will describe how to hack a mac shareware app. The reason for this is to push the developers to create stronger protection, and to show common weaknesses in licensing&#160;code. Before each hack is published, [...]]]></description>
			<content:encoded><![CDATA[<p><b>Update:</b> I <a href="http://kswizz.com/post/2785664228/hacking-mac-apps">rewrote</a> this post with better language and better explanations. Please read the newer version first.<br />
<br />
In this post, I will describe how to hack a mac shareware app.<br />
<br />
The reason for this is to push the developers to create stronger protection, and to show common weaknesses in licensing&nbsp;code.</p>
<p>Before each hack is published, I get the concerned developer&#8217;s approval, and send them a note describing the hack, and suggesting ways to improve their protection. I also leave them some time to patch their app before I publish the&nbsp;hack.</p>
<p>I have no intention of promoting piracy, and this not meant to be used as a guide for would-be pirates to get those for free. What follows if of highly technical nature, and is intended for fellow&nbsp;developers.</p>
<p>Today is up: <a href="http://ethreesoftware.com/directmail/index.php">Direct Mail</a>, a great app from e3 software useful for anyone doing mailing lists or press&nbsp;releases.</p>
<p>I did this hack on version 1.8.3, because it isn&#8217;t the&nbsp;latest.</p>
<p>First thing to do, is to class-dump the executable, which results in an interesting find:<br />
</p>
<pre class="textmate-source barf"><span class="source source_objc"><span class="meta meta_interface-or-protocol meta_interface-or-protocol_objc"><span class="storage storage_type storage_type_objc"><span class="punctuation punctuation_definition punctuation_definition_storage punctuation_definition_storage_type punctuation_definition_storage_type_objc">@</span>interface</span> <span class="entity entity_name entity_name_type entity_name_type_objc">CAppDelegate</span> <span class="punctuation punctuation_definition punctuation_definition_entity punctuation_definition_entity_other punctuation_definition_entity_other_inherited-class punctuation_definition_entity_other_inherited-class_objc">:</span> <span class="entity entity_other entity_other_inherited-class entity_other_inherited-class_objc">NSObject</span><span class="meta meta_divider meta_divider_objc">
</span><span class="meta meta_scope meta_scope_interface meta_scope_interface_objc">{
    <span class="storage storage_type storage_type_objc">BOOL</span> _registered;   <span class="comment comment_line comment_line_double-slash comment_line_double-slash_c++"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_c">//</span> 4 = 0x4
</span>    <span class="support support_class support_class_cocoa">NSString</span> *_registeredName;  <span class="comment comment_line comment_line_double-slash comment_line_double-slash_c++"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_c">//</span> 8 = 0x8
</span>    SUUpdater *sparkleUpdater;  <span class="comment comment_line comment_line_double-slash comment_line_double-slash_c++"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_c">//</span> 12 = 0xc
</span>}

<span class="meta meta_function meta_function_objc">+ <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">sharedDelegate</span></span>;</span>
<span class="meta meta_function meta_function_objc">+ <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span??span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">applyIconsToChangeStatusMenu</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp8</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">init</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">BOOL</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">registered</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">registeredName</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">setRegisteredName</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp8</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">BOOL</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">validateMenuItem</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp8</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">loadRegistration</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">BOOL</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">isValidCode</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp8</span></span> <span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc">forName</span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp12</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">saveRegistrationCode</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp8</span></span> <span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc">forName</span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp12</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">sparkleUpdater</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">doPrefs</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp8</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">doRegister</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp8</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">doPurchase</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp8</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">BOOL</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">alertShowHelp</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp8</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">doAbout</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp8</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">doReportBug</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp8</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">doConnectionDoctor</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp8</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">openAppWebsite</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">openRegisterWebsite</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">runKRM</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">lookupKagiAffiliate</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">showPurchaseThankYou</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp8</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">showFirstRunAlert</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">applicationWillFinishLaunching</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp8</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_c">void</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">applicationDidFinishLaunching</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp8</span></span>;</span>
<span class="meta meta_function meta_function_objc">- <span class="meta meta_return-type meta_return-type_objc"><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">BOOL</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="entity entity_name entity_name_function entity_name_function_objc">crashReporterShouldDisplayException</span></span><span class="meta meta_argument-type meta_argument-type_objc"><span class="entity entity_name entity_name_function entity_name_function_name-of-parameter entity_name_function_name-of-parameter_objc"><span class="punctuation punctuation_separator punctuation_separator_arguments punctuation_separator_arguments_objc">:</span></span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">(</span><span class="storage storage_type storage_type_objc">id</span><span class="punctuation punctuation_definition punctuation_definition_type punctuation_definition_type_objc">)</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_objc">fp8</span></span>;</span>

</span><span class="storage storage_type storage_type_objc"><span class="punctuation punctuation_definition punctuation_definition_storage punctuation_definition_storage_type punctuation_definition_storage_type_objc">@</span>end</span></span>
</span></pre>
<p>Now, there&#8217;s different ways to hack this. You could just edit the ivar _registered upon launch. Other option would be to hack registered or isValidCode:forName: to always return true.<br />
<br />
I&#8217;m going to go with a slightly more complicated way, and hack the methods which call&nbsp;isValidCode:forName:.</p>
<p>Let&#8217;s set a breakpoint when isValidCode is called. Disassemble the whole thing, and check where isValidCode:forName: is called. For me, it returns at 0x00008fdc. Run. It hits the breakpoint immediately. Continue once, to let it finish its setting up etc. Now, using the app, go to the register menu and try to register (with a properly-formatted email-address). It will hit the breakpoint again. Do a nexti. You now are in &#8220;0x0002ffb7 in -[CRegisterPanelController doOK:] ()&#8221;<br />
<br />
Let&#8217;s disassemble this&nbsp;method:</p>
<p><code style="overflow:auto;white-space: nowrap; ">0x0002ff50 &lt;-[CRegisterPanelController doOK:]+0&gt;:   push   %ebp<br />0x0002ff51 &lt;-[CRegisterPanelController doOK:]+1&gt;:   mov    %esp,%ebp<br />0x0002ff53 &lt;-[CRegisterPanelController doOK:]+3&gt;:   push   %edi<br />0x0002ff54 &lt;-[CRegisterPanelController doOK:]+4&gt;:   push   %esi<br />0x0002ff55 &lt;-[CRegisterPanelController doOK:]+5&gt;:   push   %ebx<br />0x0002ff56 &lt;-[CRegisterPanelController doOK:]+6&gt;:   sub    $0x1c,%esp<br />0x0002ff59 &lt;-[CRegisterPanelController doOK:]+9&gt;:   mov    0x8(%ebp),%edi<br />0x0002ff5c &lt;-[CRegisterPanelController doOK:]+12&gt;:  mov    0x22091c,%eax<br />0x0002ff61 &lt;-[CRegisterPanelController doOK:]+17&gt;:  mov    %eax,0x4(%esp)<br />0x0002ff65 &lt;-[CRegisterPanelController doOK:]+21&gt;:  mov    0x221fa4,%eax<br />0x0002ff6a &lt;-[CRegisterPanelController doOK:]+26&gt;:  mov    %eax,(%esp)<br />0x0002ff6d &lt;-[CRegisterPanelController doOK:]+29&gt;:  call   0x21f395 &lt;dyld_stub_objc_msgSend&gt;<br />0x0002ff72 &lt;-[CRegisterPanelController doOK:]+34&gt;:  mov    %eax,%esi<br />0x0002ff74 &lt;-[CRegisterPanelController doOK:]+36&gt;:  mov    0xc(%edi),%edx<br />0x0002ff77 &lt;-[CRegisterPanelController doOK:]+39&gt;:  mov    0x221428,%eax<br />0x0002ff7c &lt;-[CRegisterPanelController doOK:]+44&gt;:  mov    %eax,0x4(%esp)<br />0x0002ff80 &lt;-[CRegisterPanelController doOK:]+48&gt;:  mov    %edx,(%esp)<br />0x0002ff83 &lt;-[CRegisterPanelController doOK:]+51&gt;:  call   0x21f395 &lt;dyld_stub_objc_msgSend&gt;<br />0x0002ff88 &lt;-[CRegisterPanelController doOK:]+56&gt;:  mov    %eax,%ebx<br />0x0002ff8a &lt;-[CRegisterPanelController doOK:]+58&gt;:  mov    0x8(%edi),%edx<br />0x0002ff8d &lt;-[CRegisterPanelController doOK:]+61&gt;:  mov    0x221428,%eax<br />0x0002ff92 &lt;-[CRegisterPanelController doOK:]+66&gt;:  mov    %eax,0x4(%esp)<br />0x0002ff96 &lt;-[CRegisterPanelController doOK:]+70&gt;:  mov    %edx,(%esp)<br />0x0002ff99 &lt;-[CRegisterPanelController doOK:]+73&gt;:  call   0x21f395 &lt;dyld_stub_objc_msgSend&gt;<br />0x0002ff9e &lt;-[CRegisterPanelController doOK:]+78&gt;:  mov    %ebx,0xc(%esp)<br />0x0002ffa2 &lt;-[CRegisterPanelController doOK:]+82&gt;:  mov    %eax,0x8(%esp)<br />0x0002ffa6 &lt;-[CRegisterPanelController doOK:]+86&gt;:  mov    0x22084c,%eax<br />0x0002ffab &lt;-[CRegisterPanelController doOK:]+91&gt;:  mov    %eax,0x4(%esp)<br />0x0002ffaf &lt;-[CRegisterPanelController doOK:]+95&gt;:  mov    %esi,(%esp)<br />0x0002ffb2 &lt;-[CRegisterPanelController doOK:]+98&gt;:  call   0x21f395 &lt;dyld_stub_objc_msgSend&gt;<br />0x0002ffb7 &lt;-[CRegisterPanelController doOK:]+103&gt;: test   %al,%al<br />0x0002ffb9 &lt;-[CRegisterPanelController doOK:]+105&gt;: jne    0x2ffc7 &lt;-[CRegisterPanelController doOK:]+119&gt;<br />0x0002ffbb &lt;-[CRegisterPanelController doOK:]+107&gt;: add    $0x1c,%esp<br />0x0002ffbe &lt;-[CRegisterPanelController doOK:]+110&gt;: pop    %ebx<br />0x0002ffbf &lt;-[CRegisterPanelController doOK:]+111&gt;: pop    %esi<br />0x0002ffc0 &lt;-[CRegisterPanelController doOK:]+112&gt;: pop    %edi<br />0x0002ffc1 &lt;-[CRegisterPanelController doOK:]+113&gt;: pop    %ebp<br />0x0002ffc2 &lt;-[CRegisterPanelController doOK:]+114&gt;: jmp    0x21f444 &lt;dyld_stub_NSBeep&gt;<br />0x0002ffc7 &lt;-[CRegisterPanelController doOK:]+119&gt;: mov    0x22091c,%eax<br />0x0002ffcc &lt;-[CRegisterPanelController doOK:]+124&gt;: mov    %eax,0x4(%esp)<br />0x0002ffd0 &lt;-[CRegisterPanelController doOK:]+128&gt;: mov    0x221fa4,%eax<br />0x0002ffd5 &lt;-[CRegisterPanelController doOK:]+133&gt;: mov    %eax,(%esp)<br />0x0002ffd8 &lt;-[CRegisterPanelController doOK:]+136&gt;: call   0x21f395 &lt;dyld_stub_objc_msgSend&gt;<br />0x0002ffdd &lt;-[CRegisterPanelController doOK:]+141&gt;: mov    %eax,%esi<br />0x0002ffdf &lt;-[CRegisterPanelController doOK:]+143&gt;: mov    0xc(%edi),%edx<br />0x0002ffe2 &lt;-[CRegisterPanelController doOK:]+146&gt;: mov    0x221428,%eax<br />0x0002ffe7 &lt;-[CRegisterPanelController doOK:]+151&gt;: mov    %eax,0x4(%esp)<br />0x0002ffeb &lt;-[CRegisterPanelController doOK:]+155&gt;: mov    %edx,(%esp)<br />0x0002ffee &lt;-[CRegisterPanelController doOK:]+158&gt;: call   0x21f395 &lt;dyld_stub_objc_msgSend&gt;<br />0x0002fff3 &lt;-[CRegisterPanelController doOK:]+163&gt;: mov    %eax,%ebx<br />0x0002fff5 &lt;-[CRegisterPanelController doOK:]+165&gt;: mov    0x8(%edi),%edx<br />0x0002fff8 &lt;-[CRegisterPanelController doOK:]+168&gt;: mov    0x221428,%eax<br />0x0002fffd &lt;-[CRegisterPanelController doOK:]+173&gt;: mov    %eax,0x4(%esp)<br />0x00030001 &lt;-[CRegisterPanelController doOK:]+177&gt;: mov    %edx,(%esp)<br />0x00030004 &lt;-[CRegisterPanelController doOK:]+180&gt;: call   0x21f395 &lt;dyld_stub_objc_msgSend&gt;<br />0x00030009 &lt;-[CRegisterPanelController doOK:]+185&gt;: mov    %ebx,0xc(%esp)<br />0x0003000d &lt;-[CRegisterPanelController doOK:]+189&gt;: mov    %eax,0x8(%esp)<br />0x00030011 &lt;-[CRegisterPanelController doOK:]+193&gt;: mov    0x220788,%eax<br />0x00030016 &lt;-[CRegisterPanelController doOK:]+198&gt;: mov    %eax,0x4(%esp)<br />0x0003001a &lt;-[CRegisterPanelController doOK:]+202&gt;: mov    %esi,(%esp)<br />0x0003001d &lt;-[CRegisterPanelController doOK:]+205&gt;: call   0x21f395 &lt;dyld_stub_objc_msgSend&gt;<br />0x00030022 &lt;-[CRegisterPanelController doOK:]+210&gt;: movl   $0x219530,0x8(%esp)<br />0x0003002a &lt;-[CRegisterPanelController doOK:]+218&gt;: mov    0x220784,%eax<br />0x0003002f &lt;-[CRegisterPanelController doOK:]+223&gt;: mov    %eax,0x4(%esp)<br />0x00030033 &lt;-[CRegisterPanelController doOK:]+227&gt;: mov    0x221fb4,%eax<br />0x00030038 &lt;-[CRegisterPanelController doOK:]+232&gt;: mov    %eax,(%esp)<br />0x0003003b &lt;-[CRegisterPanelController doOK:]+235&gt;: call   0x21f395 &lt;dyld_stub_objc_msgSend&gt;<br />0x00030040 &lt;-[CRegisterPanelController doOK:]+240&gt;: mov    0x220780,%edx<br />0x00030046 &lt;-[CRegisterPanelController doOK:]+246&gt;: mov    %edx,0x4(%esp)<br />0x0003004a &lt;-[CRegisterPanelController doOK:]+250&gt;: mov    %eax,(%esp)<br />0x0003004d &lt;-[CRegisterPanelController doOK:]+253&gt;: call   0x21f395 &lt;dyld_stub_objc_msgSend&gt;<br />0x00030052 &lt;-[CRegisterPanelController doOK:]+258&gt;: mov    0x4(%edi),%edx<br />0x00030055 &lt;-[CRegisterPanelController doOK:]+261&gt;: mov    0x220900,%eax<br />0x0003005a &lt;-[CRegisterPanelController doOK:]+266&gt;: mov    %eax,0xc(%ebp)<br />0x0003005d &lt;-[CRegisterPanelController doOK:]+269&gt;: mov    %edx,0x8(%ebp)<br />0x00030060 &lt;-[CRegisterPanelController doOK:]+272&gt;: add    $0x1c,%esp<br />0x00030063 &lt;-[CRegisterPanelController doOK:]+275&gt;: pop    %ebx<br />0x00030064 &lt;-[CRegisterPanelController doOK:]+276&gt;: pop    %esi<br />0x00030065 &lt;-[CRegisterPanelController doOK:]+277&gt;: pop    %edi<br />0x00030066 &lt;-[CRegisterPanelController doOK:]+278&gt;: pop    %ebp<br />0x00030067 &lt;-[CRegisterPanelController doOK:]+279&gt;: jmp    0x21f395 &lt;dyld_stub_objc_msgSend&gt;<br />
</code></p>
<p>We now are at this line: &#8220;0x0002ffb7 <-[CRegisterPanelController doOK:]+103>:	test&nbsp;%al,%al&#8221;</p>
<p>That, in the right, is assembly code. This is basically some kind of &#8220;if&#8221; statement. (a TEST followed by a JNE (jump if not equal)).<br />
<br />
What interests me is the next line: &#8220;0x0002ffb9 <-[CRegisterPanelController doOK:]+105>:	jne    0x2ffc7 <-[CRegisterPanelController doOK:]+119>&#8221;<br />
<br />
If we just reverse this test (turn the JNE into a JE (jump if equal)), any invalid code will be considered valid, and vice-versa. Let&#8217;s examine the memory for this&nbsp;statement.</p>
<p><code style="overflow:auto;white-space: nowrap; "><br />
<br />
(gdb) x/x 0x0002ffb9<br />
<br />
0x2ffb9 <-[CRegisterPanelController doOK:]+105>:	0xc4830c75<br />
<br />
</code></p>
<p>Now, I&#8217;m working on a intel machine. And for some dumb reason, every block of four bytes is inverted. What this means, is that the byte that interests me is  the rightmost one: 0x75. This is what a JNE looks like. Do some more tests by setting breakpoints until you find a JE, and read the memory for it: you will find that a JE is&nbsp;0x74.</p>
<p>Let&#8217;s test if our theory is correct by editing the memory live, before we edit it in the binary. Do the&nbsp;following:</p>
<p><code style="overflow:auto;white-space: nowrap; "><br />
<br />(gdb) set {char}0x0002ffb9=0x74<br />(gdb) x/x 0x0002ffb9<br />0x2ffb9 <-[CRegisterPanelController doOK:]+105>:	0xc4830c74<br />(gdb) disassemble 0x0002ffb7<br />Dump of assembler code for function -[CRegisterPanelController doOK:]:<br />[...edited out...]<br />0x0002ff99 <-[CRegisterPanelController doOK:]+73>:	call   0x21f395 <dyld_stub_objc_msgSend><br />0x0002ff9e <-[CRegisterPanelController doOK:]+78>:	mov    %ebx,0xc(%esp)<br />0x0002ffa2 <-[CRegisterPanelController doOK:]+82>:	mov    %eax,0x8(%esp)<br />0x0002ffa6 <-[CRegisterPanelController doOK:]+86>:	mov    0x22084c,%eax<br />0x0002ffab <-[CRegisterPanelController doOK:]+91>:	mov    %eax,0x4(%esp)<br />0x0002ffaf <-[CRegisterPanelController doOK:]+95>:	mov    %esi,(%esp)<br />0x0002ffb2 <-[CRegisterPanelController doOK:]+98>:	call   0x21f395 <dyld_stub_objc_msgSend><br />0x0002ffb7 <-[CRegisterPanelController doOK:]+103>:	test   %al,%al<br />0x0002ffb9 <-[CRegisterPanelController doOK:]+105>:	je     0x2ffc7 <-[CRegisterPanelController doOK:]+119><br />0x0002ffbb <-[CRegisterPanelController doOK:]+107>:	add    $0x1c,%esp<br />0x0002ffbe <-[CRegisterPanelController doOK:]+110>:	pop    %ebx<br />0x0002ffbf <-[CRegisterPanelController doOK:]+111>:	pop    %esi<br />0x0002ffc0 <-[CRegisterPanelController doOK:]+112>:	pop    %edi<br />0x0002ffc1 <-[CRegisterPanelController doOK:]+113>:	pop    %ebp<br />0x0002ffc2 <-[CRegisterPanelController doOK:]+114>:	jmp    0x21f444 <dyld_stub_NSBeep><br />0x0002ffc7 <-[CRegisterPanelController doOK:]+119>:	mov    0x22091c,%eax<br />[...edited out...]<br />End of assembler dump.<br />(gdb) <br />
</code></p>
<p>Here we change the byte for the JNE, then test if we changed it correctly by re-reading it.<br />
<br />
Then we disassemble the whole method again to see if the JNE was changed correctly. And yes&thinsp;&#8212;&thinsp;tah-da&thinsp;&#8212;&thinsp;- it now says JE. Perfect. Continue. You are now registered. To make this change permanent: do &#8220;x/8x 0x0002ffb9&#8221;. You will get 24 bytes of data. Open the binary in your favorite hex editor and find the bytes outputted by gdb. If you&#8217;re on intel, don&#8217;t forget you have to reverse all the blocks of four bytes before searching. When you find it, edit the 0x75 into 0x74. Bravo! You have now made the change&nbsp;permanent.</p>
<p>We are not finished yet. As you will now notice if you run the program, it makes your code valid, but you get an error message each launch, and you have to re-do the entering a code process every time. This is because the first check at launch doesn&#8217;t happen in&nbsp;doOk:.</p>
<p>Continue and quit normally (using cmd-Q in Direct Mail). Launch it again by doing run. But this time, don&#8217;t continue after hitting the breakpoint at launch. Do nexti. Ok, so now we are in loadRegistration. Disassemble this method. Similarly, there&#8217;s a JE this time, just after the call to isValidCode:forName: Turn this into a JNE by changing the 0x74 into a 0x75 at this location in memory. If you disassemble the method again, you can see that the JE turned into a JNE. Like before, change this in the&nbsp;binary.</p>
<p>Well Done! You have now fully hacked Direct Mail&nbsp;1.8.3.</p>
<p>By now, the developer has probably fixed this security flaw, so you can&#8217;t use this to get this app for free. If you like it, buy it. It&#8217;s a great piece of software! Think about the poor developers who have to feed their family.<br />
<br />
You can <a href="http://ethreesoftware.com/directmail/download.php">download the trial version&nbsp;here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.seoxys.com/hacking-mac-apps-direct-mail-archive/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>An introduction to Sean Collins</title>
		<link>http://www.seoxys.com/an-introduction-to-sean-collins/</link>
		<comments>http://www.seoxys.com/an-introduction-to-sean-collins/#comments</comments>
		<pubDate>Thu, 22 Nov 2007 08:59:12 +0000</pubDate>
		<dc:creator>kenneth</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.seosoft.info/seolog/2007/11/22/an-introduction-to-sean-collins/</guid>
		<description><![CDATA[From: Sean Collins Date: July 23, 2007 4:32:35 PM EDT To: [anonymous@gmail.com] Subject: Aquatic&#160;Prime I recently read your blog post about Aquatic prime, after I was hunting around inside another&#160;application. I would like to perhaps exchange some notes, because I think I might have found at least an individual application that uses the PHP authentication [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>
<b>From</b>: Sean Collins <sean@seanmcollins.com><br />
<b>Date</b>: July 23, 2007 4:32:35 PM EDT<br />
<b>To</b>: [anonymous@gmail.com]<br />
<b>Subject</b>: Aquatic&nbsp;Prime</p>
<p>I recently read your blog post about Aquatic prime, after I was hunting around inside another&nbsp;application.</p>
<p>I would like to perhaps exchange some notes, because I think I might have found at least an individual application that uses the PHP authentication of the AquaticPrime framework, and I suspect that it would be vulnerable to SQL Injection attacks, as well as using what I believe to be, a cookie that never expires that is baked into the executable, which could lead to some other interesting&nbsp;things.</p>
<p>Let me know if you&#8217;d be interested in a&nbsp;chat!</p>
<p>Thank You,<br />
Sean&nbsp;Collins
</p></blockquote>
<blockquote><p>
1:42:24 PM <span style="color:red;">seanwdp</span>: [Hey], it&#8217;s Sean C<br />
1:42:48 PM <span style="color:blue;">anonymous</span>: hey sean.<br />
1:43:10 PM <span style="color:red;">seanwdp</span>: The app in question is called Exces<br />
1:43:22 PM <span style="color:red;">seanwdp</span>: part of that MacHeist deal they were doing a week ago<br />
1:43:35 PM <span style="color:blue;">anonymous</span>: ok<br />
1:43:58 PM <span style="color:blue;">anonymous</span>: and what can you do exactly? (re-reading your email)<br />
1:44:13 PM <span style="color:red;">seanwdp</span>: I don&#8217;t have any POC just yet, just some leads.<br />
1:44:41 PM <span style="color:red;">seanwdp</span>: just looking through the executable, found some little things<br />
1:45:04 PM <span style="color:red;">seanwdp</span>: the app uses the PHP part of the AP framework<br />
1:45:14 PM <span style="color:red;">seanwdp</span>: to do registration keys and such<br />
1:45:20 PM <span style="color:blue;">anonymous</span>: k<br />
1:45:44 PM <span style="color:red;">seanwdp</span>: let me give you the executable dump<br />
1:45:55 PM <span style="color:blue;">anonymous</span>: k<br />
1:47:27 PM <span style="color:blue;">anonymous</span>: can i just strings it?<br />
1:47:57 PM <span style="color:red;">seanwdp</span>: yeah, already did and sent it to you as a txt<br />
1:48:52 PM <span style="color:red;">seanwdp</span>: one of the stings contains his license check<br />
1:48:53 PM <span style="color:blue;">anonymous</span>: ok<br />
1:48:59 PM <span style="color:red;">seanwdp</span>: it&#8217;s a PHP script<br />
1:49:09 PM <span style="color:red;">seanwdp</span>: if you connect to it with just a browser you get a bunch of mysql errors<br />
1:49:10 PM <span style="color:blue;">anonymous</span>: http://www.seosoft.info/app_rsrc/exces_licence_check.plist.php<br />
1:49:13 PM <span style="color:blue;">anonymous</span>: yeah i see<br />
1:49:14 PM <span style="color:red;">seanwdp</span>: exactly<br />
1:49:23 PM <span style="color:red;">seanwdp</span>: so I think that the cookie is a few lines below<br />
1:49:25 PM <span style="color:red;">seanwdp</span>: that has the login data<br />
1:49:43 PM <span style="color:blue;">anonymous</span>: and that is based on the AP sample code you think?<br />
1:49:52 PM <span style="color:red;">seanwdp</span>: I&#8217;m not entirely sure<br />
1:49:59 PM <span style="color:red;">seanwdp</span>: If it is the AP sample code<br />
1:50:02 PM <span style="color:red;">seanwdp</span>: that&#8217;s pretty bad<br />
1:50:11 PM <span style="color:red;">seanwdp</span>: I was going from the thinking that he tried to extend the AP<br />
1:50:18 PM <span style="color:blue;">anonymous</span>: so have you actually tried to inject anything?<br />
1:50:32 PM <span style="color:red;">seanwdp</span>: I&#8217;ve been looking for a way to feed it some bad data<br />
1:50:38 PM <span style="color:red;">seanwdp</span>: I was doing some pretty simple stuff<br />
1:50:47 PM <span style="color:red;">seanwdp</span>: the license key I think is through stenography<br />
1:50:57 PM <span style="color:red;">seanwdp</span>: so I was trying to see what it takes as a dragging source<br />
1:51:12 PM <span style="color:red;">seanwdp</span>: see if I could craft some bad data, then capture the packets<br />
1:51:22 PM <span style="color:blue;">anonymous</span>: heh ok<br />
1:51:30 PM <span style="color:red;">seanwdp</span>: What makes me wonder, is the fact that he has another part, his bug reporting<br />
1:51:39 PM <span style="color:blue;">anonymous</span>: ap uses real encryption though<br />
1:51:51 PM <span style="color:red;">seanwdp</span>: right<br />
1:51:52 PM <span style="color:blue;">anonymous</span>: no stenagraphy no faking<br />
1:52:13 PM <span style="color:red;">seanwdp</span>: but my thinking is that the app will send a user/pass<br />
1:52:30 PM <span style="color:red;">seanwdp</span>: since you get the error about not having a user or database selected<br />
1:52:35 PM <span style="color:red;">seanwdp</span>: when you visit that register page<br />
1:53:22 PM <span style="color:blue;">anonymous</span>: what user/pass?<br />
1:53:28 PM <span style="color:blue;">anonymous</span>: a bit confused<br />
1:53:44 PM <span style="color:red;">seanwdp</span>: okay. Know how you visit that registration page with a regular browser?<br />
1:53:53 PM <span style="color:blue;">anonymous</span>: y<br />
1:54:10 PM <span style="color:red;">seanwdp</span>: notice those mysql errors<br />
1:54:16 PM <span style="color:blue;">anonymous</span>: right right<br />
1:54:22 PM <span style="color:red;">seanwdp</span>: Line 2 is the host<br />
1:54:27 PM <span style="color:red;">seanwdp</span>: line 3 is the database<br />
1:54:46 PM <span style="color:blue;">anonymous</span>: looks like he&#8217;s on a dreamhost box<br />
1:54:50 PM <span style="color:red;">seanwdp</span>: right<br />
1:54:59 PM <span style="color:red;">seanwdp</span>: I&#8217;m thinking those variables<br />
1:55:02 PM <span style="color:red;">seanwdp</span>: the PHP ones<br />
1:55:22 PM <span style="color:red;">seanwdp</span>: that set the host, database name, and possibly user/password combo are in the app<br />
1:55:26 PM <span style="color:blue;">anonymous</span>: ok<br />
1:55:32 PM <span style="color:blue;">anonymous</span>: i&#8217;d be real surprised<br />
1:55:36 PM <span style="color:red;">seanwdp</span>: as would I<br />
1:55:48 PM <span style="color:blue;">anonymous</span>: in fact i doubt its likely at all<br />
1:56:05 PM <span style="color:blue;">anonymous</span>: knowing dreamhost (used to be a customer) they firewall off the mysql server<br />
1:56:24 PM <span style="color:blue;">anonymous</span>: the info would be embedded in the php<br />
1:56:33 PM <span style="color:blue;">anonymous</span>: it looks to me as if the guy has a f-ed up php<br />
1:56:45 PM <span style="color:blue;">anonymous</span>: either the mysql server is down, or something is misconfigured<br />
1:56:52 PM <span style="color:blue;">anonymous</span>: i dont think the username password are in the app<br />
1:56:56 PM <span style="color:blue;">anonymous</span>: unless you&#8217;ve found them?<br />
1:57:08 PM <span style="color:red;">seanwdp</span>: only guesses at this point, nothing jumped out in the strings<br />
1:57:14 PM <span style="color:blue;">anonymous</span>: what happens when you packet sniff?<br />
1:57:23 PM <span style="color:red;">seanwdp</span>: still trying to get that running<br />
1:57:27 PM <span style="color:blue;">anonymous</span>: ok<br />
1:57:29 PM <span style="color:red;">seanwdp</span>: I might have to do what you did<br />
1:57:33 PM <span style="color:red;">seanwdp</span>: with the code injection<br />
1:57:37 PM <span style="color:red;">seanwdp</span>: just force it to connect<br />
1:57:43 PM <span style="color:blue;">anonymous</span>: ah<br />
1:57:54 PM <span style="color:blue;">anonymous</span>: so it doesn&#8217;t connect to that url normally?<br />
1:58:02 PM <span style="color:blue;">anonymous</span>: until you register it perhaps?<br />
1:58:05 PM <span style="color:red;">seanwdp</span>: yeah<br />
1:58:08 PM <span style="color:red;">seanwdp</span>: and there&#8217;s a cookie<br />
1:58:13 PM <span style="color:red;">seanwdp</span>: expires never<br />
1:58:27 PM <span style="color:red;">seanwdp</span>: I wondered if that might be a good lead.<br />
1:58:33 PM <span style="color:blue;">anonymous</span>: AP is designed for client side validation<br />
1:58:39 PM <span style="color:blue;">anonymous</span>: he&#8217;s doing it server side too perhaps<br />
1:59:03 PM <span style="color:red;">seanwdp</span>: I mean the guy just sold like 100k licenses or something<br />
1:59:09 PM <span style="color:blue;">anonymous</span>: no shit?<br />
1:59:11 PM <span style="color:red;">seanwdp</span>: yeah<br />
1:59:12 PM <span style="color:red;">seanwdp</span>: macheist<br />
1:59:16 PM <span style="color:red;">seanwdp</span>: so I mean, it&#8217;s gotta work<br />
1:59:19 PM <span style="color:blue;">anonymous</span>: heh<br />
1:59:20 PM <span style="color:blue;">anonymous</span>: yeha<br />
1:59:24 PM <span style="color:blue;">anonymous</span>: unless it is a dead url<br />
1:59:29 PM <span style="color:blue;">anonymous</span>: isn&#8217;t used any more<br />
1:59:33 PM <span style="color:blue;">anonymous</span>: or is in there to throw you off <img src='http://www.seoxys.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> <br />
1:59:34 PM <span style="color:red;">seanwdp</span>: true, maybe he baked a new version for macheist<br />
1:59:39 PM <span style="color:blue;">anonymous</span>: maybe<br />
1:59:53 PM <span style="color:red;">seanwdp</span>: I dunno, I can&#8217;t imagine him being too smart<br />
2:00:06 PM <span style="color:red;">seanwdp</span>: his app just hands off the dirty work to disk utility<br />
2:00:09 PM <span style="color:blue;">anonymous</span>: i&#8217;d _hope_ he is if he&#8217;s releasing an encryption app<br />
2:00:11 PM <span style="color:blue;">anonymous</span>: ah<br />
2:00:12 PM <span style="color:blue;">anonymous</span>: haha<br />
2:00:19 PM <span style="color:red;">seanwdp</span>: yet still manages to have a &#8220;limit&#8221; of 10gb<br />
2:00:26 PM <span style="color:red;">seanwdp</span>: for his &#8220;vaults&#8221;<br />
2:00:48 PM <span style="color:red;">seanwdp</span>: it&#8217;s right in the code, he calls hdiutil<br />
2:01:03 PM <span style="color:red;">seanwdp</span>: all he&#8217;s got is a pretty GUI<br />
2:01:31 PM <span style="color:blue;">anonymous</span>: yeah<br />
2:01:35 PM <span style="color:blue;">anonymous</span>: another Disco app<br />
2:01:38 PM <span style="color:red;">seanwdp</span>: yep.<br />
2:02:00 PM <span style="color:red;">seanwdp</span>: At least Disco has &#8220;ismoke&#8221;<br />
2:02:05 PM <span style="color:red;">seanwdp</span>: <img src='http://www.seoxys.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> <br />
2:03:30 PM <span style="color:red;">seanwdp</span>: so what are your thoughts?<br />
2:04:17 PM <span style="color:blue;">anonymous</span>: i dunno. i&#8217;d be really surprised if the app relies on it for registration<br />
2:04:30 PM <span style="color:blue;">anonymous</span>: AP is vulnerable once you have it in your hands.<br />
2:04:44 PM <span style="color:blue;">anonymous</span>: it just depends on how much work the guy has done to obfuscate it<br />
2:04:56 PM <span style="color:blue;">anonymous</span>: and even then you can always find (and then replace) the public key used<br />
2:05:04 PM <span style="color:red;">seanwdp</span>: right<br />
2:05:11 PM <span style="color:red;">seanwdp</span>: but what about the risks to his website<br />
2:05:20 PM <span style="color:blue;">anonymous</span>: i&#8217;d be surprised if there are any<br />
2:05:28 PM <span style="color:blue;">anonymous</span>: it could just be the mysql server is fubared<br />
2:05:32 PM <span style="color:blue;">anonymous</span>: something is misconfigured<br />
2:05:41 PM <span style="color:blue;">anonymous</span>: hard to say<br />
2:05:50 PM <span style="color:blue;">anonymous</span>: any badly written php could be vulnerable<br />
2:05:54 PM <span style="color:red;">seanwdp</span>: right<br />
2:06:04 PM <span style="color:blue;">anonymous</span>: to find out for sure you need to sniff the packets and find out what it sends<br />
2:06:07 PM <span style="color:red;">seanwdp</span>: well I mean he has a bug reporter, where all the stuff is sent using the $_GET array<br />
2:06:19 PM <span style="color:blue;">anonymous</span>: any suspicious looking printf style strings?<br />
2:06:32 PM <span style="color:blue;">anonymous</span>: stuff that could be a http url request?<br />
2:06:47 PM <span style="color:blue;">anonymous</span>: &#8220;%@&#038;%@&#038;%@&#8221; type stuff?<br />
2:07:01 PM <span style="color:red;">seanwdp</span>: lemme see<br />
2:07:09 PM <span style="color:blue;">anonymous</span>: you could try hacking the bug reporter<br />
2:07:11 PM <span style="color:red;">seanwdp</span>: I swear I saw some<br />
2:07:22 PM <span style="color:blue;">anonymous</span>: if that is vulnerable then the license check  probably is too<br />
2:07:27 PM <span style="color:red;">seanwdp</span>: yeah<br />
2:07:40 PM <span style="color:red;">seanwdp</span>: I mean, it&#8217;s much easier to crack the bug reporter<br />
2:07:52 PM <span style="color:red;">seanwdp</span>: since I guess the database connection info is in the script<br />
2:07:56 PM <span style="color:red;">seanwdp</span>: *not guess<br />
2:07:59 PM <span style="color:red;">seanwdp</span>: it is<br />
2:08:07 PM <span style="color:blue;">anonymous</span>: that makes no sense<br />
2:08:08 PM <span style="color:blue;">anonymous</span>: why do that?<br />
2:08:16 PM <span style="color:red;">seanwdp</span>: pulled it out of a php book<br />
2:08:16 PM <span style="color:blue;">anonymous</span>: easier for it to be server side<br />
2:08:24 PM <span style="color:blue;">anonymous</span>: if he has to change the password he&#8217;d be fucked<br />
2:08:26 PM <span style="color:red;">seanwdp</span>: right, that&#8217;s what I&#8217;m saying<br />
2:08:27 PM <span style="color:blue;">anonymous</span>: or whatever<br />
2:08:34 PM <span style="color:red;">seanwdp</span>: he&#8217;s probably got a mysql_connect.php<br />
2:08:46 PM <span style="color:red;">seanwdp</span>: that has a username, password, host, and all that<br />
2:08:54 PM <span style="color:blue;">anonymous</span>: but even then he&#8217;d have to jump through hoops to expose his mysql server to the world<br />
2:08:59 PM <span style="color:blue;">anonymous</span>: by default DH firewalls it<br />
2:09:07 PM <span style="color:blue;">anonymous</span>: so you have to assume he knows how to do that at least<br />
2:09:12 PM <span style="color:red;">seanwdp</span>: yeah<br />
2:09:21 PM <span style="color:blue;">anonymous</span>: which is inconsistent with him putting his password in the client<br />
2:09:31 PM <span style="color:red;">seanwdp</span>: it would be<br />
2:09:46 PM <span style="color:red;">seanwdp</span>: it&#8217;s just that you don&#8217;t get the same error reporting on the bug page as the license page<br />
2:10:15 PM <span style="color:red;">seanwdp</span>: but that could be because someone wrote the bug script better<br />
2:10:24 PM <span style="color:red;">seanwdp</span>: and it doesn&#8217;t give out those errors to the user<br />
2:10:38 PM <span style="color:red;">seanwdp</span>: meanwhile someone far dumber left the error reporting on, for the license script<br />
2:11:59 PM <span style="color:blue;">anonymous</span>: well focus on the bug reporter see if you can capture what it sends<br />
2:12:05 PM <span style="color:blue;">anonymous</span>: i&#8217;d be interested to see that<br />
2:15:46 PM <span style="color:red;">seanwdp</span>: yeah<br />
2:15:58 PM <span style="color:red;">seanwdp</span>: I&#8217;m pretty sure it just sends three or four variables<br />
2:16:06 PM <span style="color:red;">seanwdp</span>: the PHP script gets them and off they go into the database<br />
2:16:12 PM <span style="color:red;">seanwdp</span>: since they&#8217;re right in the url<br />
2:16:23 PM <span style="color:red;">seanwdp</span>: http://www.seosoft.info/app_rsrc/bug_send.php?<br />lang=%@&#038;product=Exces&#038;name=%@&#038;email=<br />%@&#038;description=%@&#038;explanation=%@<br />
2:16:52 PM <span style="color:blue;">anonymous</span>: yeah<br />
2:17:15 PM <span style="color:blue;">anonymous</span>: so do some injection <img src='http://www.seoxys.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> <br />
2:24:07 PM <span style="color:red;">seanwdp</span>: I&#8217;ll let you know what I come up with<br />
2:24:20 PM <span style="color:blue;">anonymous</span>: cool<br />
2:24:26 PM <span style="color:red;">seanwdp</span>: work finally threw up their hands and let me run our stuff on Apache<br />
2:24:39 PM <span style="color:red;">seanwdp</span>: the guy running the server (win2003) has NFC<br />
2:24:47 PM <span style="color:red;">seanwdp</span>: and i don&#8217;t like or care about IIS<br />
2:24:56 PM <span style="color:red;">seanwdp</span>: thing spent more time broken then up and&nbsp;running
</p></blockquote>
<p>&#8216;Nuff&nbsp;said.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seoxys.com/an-introduction-to-sean-collins/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Excellent LangSwitch Review</title>
		<link>http://www.seoxys.com/excellent-langswitch-review/</link>
		<comments>http://www.seoxys.com/excellent-langswitch-review/#comments</comments>
		<pubDate>Mon, 16 Jul 2007 21:03:43 +0000</pubDate>
		<dc:creator>kenneth</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.seosoft.info/seolog/2007/07/16/excellent-langswitch-review/</guid>
		<description><![CDATA[LangSwitch just got reviewed 5/5 by&#160;softpedia. This is mainly a little tool that I created for myself, it turns out that people actually like and use&#160;it. Maybe this will motivate me to improve it: add Locales support, Undo, better drag-and-drop support. Drag-and-drop on the application icon support, and lotsa other cool&#160;stuff.]]></description>
			<content:encoded><![CDATA[<p>LangSwitch just got reviewed 5/5 by&nbsp;softpedia.</p>
<p>This is mainly a little tool that I created for myself, it turns out that people actually like and use&nbsp;it.</p>
<p><del>Maybe</del> this will motivate me to improve it: add Locales support, Undo, better drag-and-drop support. Drag-and-drop on the application icon support, and lotsa other cool&nbsp;stuff.</p>
<p><a href="http://www.softpedia.com/reviews/mac/LangSwitch-Review-59766.shtml"><img src="http://www.softpedia.com/images/reviews/awards/sp_editor_excellent.gif" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.seoxys.com/excellent-langswitch-review/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

