<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chirashi Security &#187; Reverse Engineering</title>
	<atom:link href="http://chirashi.zensay.com/category/reverse-engineering/feed/" rel="self" type="application/rss+xml" />
	<link>http://chirashi.zensay.com</link>
	<description>a blog with scattered thoughts on security.</description>
	<lastBuildDate>Sun, 25 Jul 2010 05:25:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Everything can be reversed.  Everything.</title>
		<link>http://chirashi.zensay.com/2010/07/everything-can-be-reversed-everything/</link>
		<comments>http://chirashi.zensay.com/2010/07/everything-can-be-reversed-everything/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 05:25:30 +0000</pubDate>
		<dc:creator>chopstick</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[Reverse Engineering]]></category>
		<category><![CDATA[decompiler]]></category>
		<category><![CDATA[disassembler]]></category>
		<category><![CDATA[license keys]]></category>
		<category><![CDATA[registration keygen]]></category>

		<guid isPermaLink="false">http://chirashi.zensay.com/?p=533</guid>
		<description><![CDATA[ I recently started reverse engineering BlackBerry applications.  I have done it before, but this time around, I focused a lot more effort and energy on it.  In short, BlackBerry apps can be decompiled; enough to the point where you can begin to write keygens for them.  Yes, much like back in the good old [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" title="Reversing" src="http://imgs.xkcd.com/comics/reverse_euphemisms.png" alt="" width="210" height="275" /> I recently started reverse engineering BlackBerry applications.  I have done it before, but this time around, I focused a lot more effort and energy on it.  In short, BlackBerry apps can be decompiled; enough to the point where you can begin to write keygens for them.  Yes, much like back in the good old days.  I&#8217;ll spare everyone the details suffice it to say that I took the BlackBerry compiler that converts .java files to .cod files and I made it reverse its core task and spit out the BlackBerty bytecode instead of .cod files.  Bytecode that runs on the BlackBerry specific JVM.</p>
<p>The fundamental thing about reverse engineering is that you absolutely need to know how things work in forward first.  You cannot reverse without knowing how things go forwards.  So I studied the compilation process in depth and discovered that the compilation is a three-step process.  The BlackBerry compile process is not, in actuality, something magical.  It first runs javac on a plain old .java file.  The resulting .class file is then <a href="http://docs.blackberry.com/en/developers/deliverables/5580/Preverifying_BB_java_applications_447176_11.jsp" target="_blank">preverified</a> (a process by which you alter the class file in a way that you save the device JVM significant processing time).  After this, the BlackBerry compiler (rapc.jar) is executed to covert the .class file into a .cod file.  This .cod file is significantly smaller than the .class file.  It also appears to be compressed.  It is not a simple task to reverse this process.  Primarily because rapc.jar is obfuscated like a mofo and you need to spend countless hours refactoring and getting things to play well together.  But you don&#8217;t want to hear that do you?  No, instead you want to hear that I am able to reverse .cod files to the point at which I have pristine .java source code, right?  Well, yes.  I can do that.</p>
<p>As I often need to appease my evil personality, I did what most anyone else in my position would do.  I looked at a few programs out there to see if I can bypass their license key requirements.  The result?  Can you say &#8220;Shooting fish in a barrel&#8221;?  Ordinarily, I would take this moment to chide all the developers out there to use better protection, I am not going to do this today.  These days, any capable person with a laptop can write and sell applications for the iPhone or the BlackBerry.  Gone are the days where you see only larger software houses publishing commercial applications.  Now just about anyone can do it.  What each individual is willing to lose to piracy and the amount of effort they wish to spend on writing software protection is entirely up to them.  All I&#8217;m going to do today is say this: Everything can be reversed.  Everything.</p>
<p>Don&#8217;t be lulled into a false sense of security that when you write an app for the BlackBerry, your code is safe; it is not.  Your commercial protections CAN and WILL be broken.  Unless you want to lose money to this problem, the only suggestion I can offer is to consider spending more effort in designing better protections.  If not, then just forget it and go about your business as you normally would.  But be aware that an increasing number of people have the means to reverse your code.  It will only be a matter of time before sites will pop up with real working keygens that you can run on your BlackBerry device.  It will be like the second coming of the PC era where good old DOS games had keygens and keygenning groups flourished.  For those interested, what would good protection consist of?</p>
<ul>
<li>Don&#8217;t do any calculations within your app that you can compare to.</li>
<li>Consider activating your app over the internet.</li>
<li>When activating your app over the internet, use SSL, and more important, VERIFY your server certificate.</li>
<li>If you need to offer trials, write two separate programs: 1 less functional trial and 1 full featured version.</li>
</ul>
<p>To sum up, make sure that you protect what is important to you.  If your application generates revenue for you, then you will want to protect it.  Spend a little extra effort on designing a better software protection framework.  To everyone those who don&#8217;t know where to start, the company I work for offers consulting on this subject.  Get in touch with me if you&#8217;re serious about it.</p>



Share this on:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fchirashi.zensay.com%2F2010%2F07%2Feverything-can-be-reversed-everything%2F&amp;title=Everything%20can%20be%20reversed.%20%20Everything.&amp;bodytext=%20I%20recently%20started%20reverse%20engineering%20BlackBerry%20applications.%20%C2%A0I%20have%20done%20it%20before%2C%20but%20this%20time%20around%2C%20I%20focused%20a%20lot%20more%20effort%20and%20energy%20on%20it.%20%C2%A0In%20short%2C%20BlackBerry%20apps%20can%20be%20decompiled%3B%20enough%20to%20the%20point%20where%20you%20can%20begin%20to%20wr" title="Digg"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fchirashi.zensay.com%2F2010%2F07%2Feverything-can-be-reversed-everything%2F&amp;title=Everything%20can%20be%20reversed.%20%20Everything.&amp;notes=%20I%20recently%20started%20reverse%20engineering%20BlackBerry%20applications.%20%C2%A0I%20have%20done%20it%20before%2C%20but%20this%20time%20around%2C%20I%20focused%20a%20lot%20more%20effort%20and%20energy%20on%20it.%20%C2%A0In%20short%2C%20BlackBerry%20apps%20can%20be%20decompiled%3B%20enough%20to%20the%20point%20where%20you%20can%20begin%20to%20wr" title="del.icio.us"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fchirashi.zensay.com%2F2010%2F07%2Feverything-can-be-reversed-everything%2F&amp;t=Everything%20can%20be%20reversed.%20%20Everything." title="Facebook"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fchirashi.zensay.com%2F2010%2F07%2Feverything-can-be-reversed-everything%2F&amp;title=Everything%20can%20be%20reversed.%20%20Everything.&amp;annotation=%20I%20recently%20started%20reverse%20engineering%20BlackBerry%20applications.%20%C2%A0I%20have%20done%20it%20before%2C%20but%20this%20time%20around%2C%20I%20focused%20a%20lot%20more%20effort%20and%20energy%20on%20it.%20%C2%A0In%20short%2C%20BlackBerry%20apps%20can%20be%20decompiled%3B%20enough%20to%20the%20point%20where%20you%20can%20begin%20to%20wr" title="Google Bookmarks"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fchirashi.zensay.com%2F2010%2F07%2Feverything-can-be-reversed-everything%2F&amp;title=Everything%20can%20be%20reversed.%20%20Everything." title="Reddit"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fchirashi.zensay.com%2F2010%2F07%2Feverything-can-be-reversed-everything%2F&amp;title=Everything%20can%20be%20reversed.%20%20Everything." title="StumbleUpon"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fchirashi.zensay.com%2F2010%2F07%2Feverything-can-be-reversed-everything%2F&amp;t=Everything%20can%20be%20reversed.%20%20Everything.&amp;s=%20I%20recently%20started%20reverse%20engineering%20BlackBerry%20applications.%20%C2%A0I%20have%20done%20it%20before%2C%20but%20this%20time%20around%2C%20I%20focused%20a%20lot%20more%20effort%20and%20energy%20on%20it.%20%C2%A0In%20short%2C%20BlackBerry%20apps%20can%20be%20decompiled%3B%20enough%20to%20the%20point%20where%20you%20can%20begin%20to%20wr" title="Tumblr"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Everything%20can%20be%20reversed.%20%20Everything.%20-%20http%3A%2F%2Fchirashi.zensay.com%2F2010%2F07%2Feverything-can-be-reversed-everything%2F" title="Twitter"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Everything%20can%20be%20reversed.%20%20Everything.&amp;url=http%3A%2F%2Fchirashi.zensay.com%2F2010%2F07%2Feverything-can-be-reversed-everything%2F" title="Slashdot"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://chirashi.zensay.com/2010/07/everything-can-be-reversed-everything/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BlackBerry Hidden Program Revealer v0.1</title>
		<link>http://chirashi.zensay.com/2009/07/blackberry-hidden-program-revealer-v0-1/</link>
		<comments>http://chirashi.zensay.com/2009/07/blackberry-hidden-program-revealer-v0-1/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 18:16:01 +0000</pubDate>
		<dc:creator>chopstick</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[Forensics]]></category>
		<category><![CDATA[Reverse Engineering]]></category>

		<guid isPermaLink="false">http://chirashi.zensay.com/?p=98</guid>
		<description><![CDATA[Okay, for real this time.  Continuing from my previous post, I&#8217;ve got version 0.1 of the HiddenProgs app available for download.  Grab your copy here.  The way I installed it was to just navigate to the link using my Bold.  By downloading the program, you&#8217;re acknowledging you&#8217;ve read and understood the disclaimer below.
Description
The program has [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, for real this time.  Continuing from my previous <a href="http://chirashi.zensay.com/2009/07/etisalat-blackberry-spyware-revealer/">post</a>, I&#8217;ve got version 0.1 of the HiddenProgs app available for download.  Grab your copy <a href="http://www.zensay.com/HiddenProgs.jad">here</a>.  The way I installed it was to just navigate to the link using my Bold.  By downloading the program, you&#8217;re acknowledging you&#8217;ve read and understood the disclaimer below.</p>
<h2>Description</h2>
<p>The program has 2 options.  One is the Reveal option.  This option is only visible in your Menu when the Etisalat BlackBerry Spyware is detected on your handheld.  If it isn&#8217;t there, then the option doesn&#8217;t show up.</p>
<p>The second option is the Show Hidden Programs.  As the name suggests, it gives you a look into all the programs that are marked as hidden on your handheld.  This also includes libraries.</p>
<p>For now, I would urge you to browse around the hidden programs and see if you come across anything suspicious.  I think, as a general rule of thumb the net.rim.* libraries and programs can be trusted.</p>
<h2>How to use</h2>
<p>Start the program, it should tell you whether or not the spyware was detected on your handheld.  If it is detected, then press the Menu and select Reveal.  Then quit the application, go to Options-&gt;Advanced Options-&gt;Applications, click on Registration and uninstall it.  That should be it.</p>
<p>I would really like to hear your comments and most importantly would like to have your help in improving this program.  Please try it out and either post a comment or mail me directly.  My email address is in the About option.</p>
<p>Thanks, and be safe!</p>
<h3>Disclaimer (sorry, got to put this in)</h3>
<p><span>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER &#8220;AS IS&#8221; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></p>



Share this on:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fblackberry-hidden-program-revealer-v0-1%2F&amp;title=BlackBerry%20Hidden%20Program%20Revealer%20v0.1&amp;bodytext=Okay%2C%20for%20real%20this%20time.%C2%A0%20Continuing%20from%20my%20previous%20post%2C%20I%27ve%20got%20version%200.1%20of%20the%20HiddenProgs%20app%20available%20for%20download.%C2%A0%20Grab%20your%20copy%20here.%C2%A0%20The%20way%20I%20installed%20it%20was%20to%20just%20navigate%20to%20the%20link%20using%20my%20Bold.%C2%A0%20By%20downloading%20the%20pro" title="Digg"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fblackberry-hidden-program-revealer-v0-1%2F&amp;title=BlackBerry%20Hidden%20Program%20Revealer%20v0.1&amp;notes=Okay%2C%20for%20real%20this%20time.%C2%A0%20Continuing%20from%20my%20previous%20post%2C%20I%27ve%20got%20version%200.1%20of%20the%20HiddenProgs%20app%20available%20for%20download.%C2%A0%20Grab%20your%20copy%20here.%C2%A0%20The%20way%20I%20installed%20it%20was%20to%20just%20navigate%20to%20the%20link%20using%20my%20Bold.%C2%A0%20By%20downloading%20the%20pro" title="del.icio.us"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fblackberry-hidden-program-revealer-v0-1%2F&amp;t=BlackBerry%20Hidden%20Program%20Revealer%20v0.1" title="Facebook"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fblackberry-hidden-program-revealer-v0-1%2F&amp;title=BlackBerry%20Hidden%20Program%20Revealer%20v0.1&amp;annotation=Okay%2C%20for%20real%20this%20time.%C2%A0%20Continuing%20from%20my%20previous%20post%2C%20I%27ve%20got%20version%200.1%20of%20the%20HiddenProgs%20app%20available%20for%20download.%C2%A0%20Grab%20your%20copy%20here.%C2%A0%20The%20way%20I%20installed%20it%20was%20to%20just%20navigate%20to%20the%20link%20using%20my%20Bold.%C2%A0%20By%20downloading%20the%20pro" title="Google Bookmarks"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fblackberry-hidden-program-revealer-v0-1%2F&amp;title=BlackBerry%20Hidden%20Program%20Revealer%20v0.1" title="Reddit"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fblackberry-hidden-program-revealer-v0-1%2F&amp;title=BlackBerry%20Hidden%20Program%20Revealer%20v0.1" title="StumbleUpon"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fblackberry-hidden-program-revealer-v0-1%2F&amp;t=BlackBerry%20Hidden%20Program%20Revealer%20v0.1&amp;s=Okay%2C%20for%20real%20this%20time.%C2%A0%20Continuing%20from%20my%20previous%20post%2C%20I%27ve%20got%20version%200.1%20of%20the%20HiddenProgs%20app%20available%20for%20download.%C2%A0%20Grab%20your%20copy%20here.%C2%A0%20The%20way%20I%20installed%20it%20was%20to%20just%20navigate%20to%20the%20link%20using%20my%20Bold.%C2%A0%20By%20downloading%20the%20pro" title="Tumblr"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=BlackBerry%20Hidden%20Program%20Revealer%20v0.1%20-%20http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fblackberry-hidden-program-revealer-v0-1%2F" title="Twitter"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=BlackBerry%20Hidden%20Program%20Revealer%20v0.1&amp;url=http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fblackberry-hidden-program-revealer-v0-1%2F" title="Slashdot"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://chirashi.zensay.com/2009/07/blackberry-hidden-program-revealer-v0-1/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Etisalat BlackBerry Spyware Revealer</title>
		<link>http://chirashi.zensay.com/2009/07/etisalat-blackberry-spyware-revealer/</link>
		<comments>http://chirashi.zensay.com/2009/07/etisalat-blackberry-spyware-revealer/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 19:30:13 +0000</pubDate>
		<dc:creator>chopstick</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[Forensics]]></category>
		<category><![CDATA[Reverse Engineering]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://chirashi.zensay.com/?p=86</guid>
		<description><![CDATA[I wrote a spyware busting tool for the Etisalat Spyware that was recently installed on BlackBerries across the UAE.  I am waiting to get my Code Signing Keys sorted from RIM before I can release it publicly.  Mail me for the source.]]></description>
			<content:encoded><![CDATA[<p><strong>[Update: The spyware revealer tool is now ready and so is the whitepaper.  I've added links to navigate easily]</strong></p>
<h2>Navigation</h2>
<ul>
<li>You can <a href="http://chirashi.zensay.com/2009/07/blackberry-hidden-program-revealer-v0-1/">download the software revealer here</a></li>
<li>You can <a href="http://chirashi.zensay.com/2009/07/spyware-removal-howto-guide/">download the spyware removal guide here</a></li>
<li>You can <a href="http://chirashi.zensay.com/whitepapers/">download the whitepaper here</a></li>
</ul>
<p>Now onto the rest of the original article:</p>
<p>Okay, so I put aside the write up for awhile to complete my BlackBerry App that will reveal the Etisalat Spyware if it is installed on your BlackBerry.  So far, I have tested it on my simulators and it works well.  I&#8217;ve posted some screenshots here.  Now as luck would have it, I did get a hold of a set of BlackBerry Code Signing Keys.  This would allow me to distribute this app and people would be able to use it and, hopefully, benefit from it.  But not all of that luck was good.  I tried installing the keys and the registration with the central BlackBerry servers is failing.  I have mailed RIM about this and I am waiting their response.  What does this mean?  Well, sadly, I cannot release the tool because of this so no-one is going to be able to clean their BB&#8217;s over the weekend.  Bummer.  I&#8217;ve got the source which I will release at the same time.  In the meantime, if anyone is interested in the source, leave a comment and I&#8217;ll pick it up from there on.  So while I wait for the Keys to come through, I&#8217;ll get to work on the writeup.</p>
<p>The App:</p>
<p>I called it the Hidden Program Revealer (yeah, I know, as original as some of the shop names in Dubai.)  So far all the app does is start up and look for the name of the Etisalat application and determines if it is installed.  It detects if it is hiddenand will give you an option to reveal it if it is.  At that point, you can go to Options-&gt;Advanced Options-&gt;Applications-&gt;Registration-&gt;Delete to remove the spyware completely.  Additionally, I wanted to make the app a bit more useful for the future and I put in an option to reveal all hidden programs and libraries on your handheld.  This will give you an opportunity to search for anything suspicious.  If you do find some other suspicious apps, then mail me the name and I&#8217;ll ship a custom app for you to reveal it and uninstall it.  I think a good rule of thumb, much like Tripwire is to install a known, good copy of the BlackBerry device software, run my utility and baseline the hidden apps on your device.  That way, you will know if anything is changed.  This is actually the direction I want to go with my app as well.</p>
<p>For now, only screenshots.</p>
<p>Screenshots of my BlackBerry App running on the sim:</p>

<a href='http://chirashi.zensay.com/2009/07/etisalat-blackberry-spyware-revealer/picture-26/' title='Picture 26'><img width="84" height="150" src="http://chirashi.zensay.com/wp-content/uploads/2009/07/Picture-26.png" class="attachment-thumbnail" alt="" title="Picture 26" /></a>
<a href='http://chirashi.zensay.com/2009/07/etisalat-blackberry-spyware-revealer/picture-27/' title='Picture 27'><img width="83" height="150" src="http://chirashi.zensay.com/wp-content/uploads/2009/07/Picture-27.png" class="attachment-thumbnail" alt="" title="Picture 27" /></a>
<a href='http://chirashi.zensay.com/2009/07/etisalat-blackberry-spyware-revealer/picture-28/' title='Picture 28'><img width="91" height="150" src="http://chirashi.zensay.com/wp-content/uploads/2009/07/Picture-28.png" class="attachment-thumbnail" alt="" title="Picture 28" /></a>
<a href='http://chirashi.zensay.com/2009/07/etisalat-blackberry-spyware-revealer/picture-29/' title='Picture 29'><img width="92" height="150" src="http://chirashi.zensay.com/wp-content/uploads/2009/07/Picture-29.png" class="attachment-thumbnail" alt="" title="Picture 29" /></a>
<a href='http://chirashi.zensay.com/2009/07/etisalat-blackberry-spyware-revealer/picture-30/' title='Picture 30'><img width="91" height="150" src="http://chirashi.zensay.com/wp-content/uploads/2009/07/Picture-30.png" class="attachment-thumbnail" alt="" title="Picture 30" /></a>
<a href='http://chirashi.zensay.com/2009/07/etisalat-blackberry-spyware-revealer/picture-31/' title='Picture 31'><img width="91" height="150" src="http://chirashi.zensay.com/wp-content/uploads/2009/07/Picture-31.png" class="attachment-thumbnail" alt="" title="Picture 31" /></a>
<a href='http://chirashi.zensay.com/2009/07/etisalat-blackberry-spyware-revealer/picture-32/' title='Picture 32'><img width="93" height="150" src="http://chirashi.zensay.com/wp-content/uploads/2009/07/Picture-32.png" class="attachment-thumbnail" alt="" title="Picture 32" /></a>




Share this on:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fetisalat-blackberry-spyware-revealer%2F&amp;title=Etisalat%20BlackBerry%20Spyware%20Revealer&amp;bodytext=I%20wrote%20a%20spyware%20busting%20tool%20for%20the%20Etisalat%20Spyware%20that%20was%20recently%20installed%20on%20BlackBerries%20across%20the%20UAE.%20%20I%20am%20waiting%20to%20get%20my%20Code%20Signing%20Keys%20sorted%20from%20RIM%20before%20I%20can%20release%20it%20publicly.%20%20Mail%20me%20for%20the%20source." title="Digg"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fetisalat-blackberry-spyware-revealer%2F&amp;title=Etisalat%20BlackBerry%20Spyware%20Revealer&amp;notes=I%20wrote%20a%20spyware%20busting%20tool%20for%20the%20Etisalat%20Spyware%20that%20was%20recently%20installed%20on%20BlackBerries%20across%20the%20UAE.%20%20I%20am%20waiting%20to%20get%20my%20Code%20Signing%20Keys%20sorted%20from%20RIM%20before%20I%20can%20release%20it%20publicly.%20%20Mail%20me%20for%20the%20source." title="del.icio.us"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fetisalat-blackberry-spyware-revealer%2F&amp;t=Etisalat%20BlackBerry%20Spyware%20Revealer" title="Facebook"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fetisalat-blackberry-spyware-revealer%2F&amp;title=Etisalat%20BlackBerry%20Spyware%20Revealer&amp;annotation=I%20wrote%20a%20spyware%20busting%20tool%20for%20the%20Etisalat%20Spyware%20that%20was%20recently%20installed%20on%20BlackBerries%20across%20the%20UAE.%20%20I%20am%20waiting%20to%20get%20my%20Code%20Signing%20Keys%20sorted%20from%20RIM%20before%20I%20can%20release%20it%20publicly.%20%20Mail%20me%20for%20the%20source." title="Google Bookmarks"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fetisalat-blackberry-spyware-revealer%2F&amp;title=Etisalat%20BlackBerry%20Spyware%20Revealer" title="Reddit"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fetisalat-blackberry-spyware-revealer%2F&amp;title=Etisalat%20BlackBerry%20Spyware%20Revealer" title="StumbleUpon"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fetisalat-blackberry-spyware-revealer%2F&amp;t=Etisalat%20BlackBerry%20Spyware%20Revealer&amp;s=I%20wrote%20a%20spyware%20busting%20tool%20for%20the%20Etisalat%20Spyware%20that%20was%20recently%20installed%20on%20BlackBerries%20across%20the%20UAE.%20%20I%20am%20waiting%20to%20get%20my%20Code%20Signing%20Keys%20sorted%20from%20RIM%20before%20I%20can%20release%20it%20publicly.%20%20Mail%20me%20for%20the%20source." title="Tumblr"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Etisalat%20BlackBerry%20Spyware%20Revealer%20-%20http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fetisalat-blackberry-spyware-revealer%2F" title="Twitter"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Etisalat%20BlackBerry%20Spyware%20Revealer&amp;url=http%3A%2F%2Fchirashi.zensay.com%2F2009%2F07%2Fetisalat-blackberry-spyware-revealer%2F" title="Slashdot"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://chirashi.zensay.com/2009/07/etisalat-blackberry-spyware-revealer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dissecting the GoDaddy email notifier &#8211; Part 4</title>
		<link>http://chirashi.zensay.com/2007/08/dissecting-the-godaddy-email-notifier-part-4/</link>
		<comments>http://chirashi.zensay.com/2007/08/dissecting-the-godaddy-email-notifier-part-4/#comments</comments>
		<pubDate>Fri, 03 Aug 2007 20:12:00 +0000</pubDate>
		<dc:creator>chopstick</dc:creator>
				<category><![CDATA[Reverse Engineering]]></category>

		<guid isPermaLink="false">http://chirashi.zensay.com/?p=9</guid>
		<description><![CDATA[Ok, this is hopefully the last part of my Dissecting series for the email notifier.  I last left you with the fact that I had reverse engineered the encryption and decryption algorithm.  I simply poked around the calls to the registry key write function calls and found the encryption and decryption routines.  [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, this is hopefully the last part of my Dissecting series for the email notifier.  I last left you with the fact that I had reverse engineered the encryption and decryption algorithm.  I simply poked around the calls to the registry key write function calls and found the encryption and decryption routines.  I will list them here:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
</pre></td><td class="code"><pre class="asm" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;">004046D7</span>  <span style="color: #339933;">/</span>$  <span style="color: #0000ff;">55</span>            <span style="color: #00007f; font-weight: bold;">PUSH</span> <span style="color: #00007f;">EBP</span>               <span style="color: #666666; font-style: italic;">;  Main Encrypter</span>
<span style="color: #adadad; font-style: italic;">004046D8</span>  |<span style="color: #339933;">.</span>  8BEC          <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EBP</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESP</span>
<span style="color: #adadad; font-style: italic;">004046DA</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">51</span>            <span style="color: #00007f; font-weight: bold;">PUSH</span> <span style="color: #00007f;">ECX</span>
<span style="color: #adadad; font-style: italic;">004046DB</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">51</span>            <span style="color: #00007f; font-weight: bold;">PUSH</span> <span style="color: #00007f;">ECX</span>
<span style="color: #adadad; font-style: italic;">004046DC</span>  |<span style="color: #339933;">.</span>  837E <span style="color: #0000ff;">14</span> <span style="color: #0000ff;">00</span>    <span style="color: #00007f; font-weight: bold;">CMP</span> <span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">ESI</span><span style="color: #339933;">+</span><span style="color: #0000ff;">14</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">0</span>
<span style="color: #adadad; font-style: italic;">004046E0</span>  |<span style="color: #339933;">.</span>  8BC6          <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESI</span>
<span style="color: #adadad; font-style: italic;">004046E2</span>  |<span style="color: #339933;">.</span>  0F84 CC000000 <span style="color: #00007f; font-weight: bold;">JE</span> 004047B4
<span style="color: #adadad; font-style: italic;">004046E8</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">53</span>            <span style="color: #00007f; font-weight: bold;">PUSH</span> <span style="color: #00007f;">EBX</span>
<span style="color: #adadad; font-style: italic;">004046E9</span>  |<span style="color: #339933;">.</span>  8B5E <span style="color: #0000ff;">14</span>       <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EBX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">ESI</span><span style="color: #339933;">+</span><span style="color: #0000ff;">14</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">004046EC</span>  |<span style="color: #339933;">.</span>  895D FC       <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">EBX</span>
<span style="color: #adadad; font-style: italic;">004046EF</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">57</span>            <span style="color: #00007f; font-weight: bold;">PUSH</span> <span style="color: #00007f;">EDI</span>
<span style="color: #adadad; font-style: italic;">004046F0</span>  |<span style="color: #339933;">.</span>  4B            <span style="color: #00007f; font-weight: bold;">DEC</span> <span style="color: #00007f;">EBX</span>
<span style="color: #adadad; font-style: italic;">004046F1</span>  |<span style="color: #339933;">.</span>  8BFB          <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EDI</span><span style="color: #339933;">,</span><span style="color: #00007f;">EBX</span>
<span style="color: #adadad; font-style: italic;">004046F3</span>  |<span style="color: #339933;">.</span>  E8 A0010000   <span style="color: #00007f; font-weight: bold;">CALL</span> <span style="color: #0000ff;">00404898</span>
<span style="color: #adadad; font-style: italic;">004046F8</span>  |<span style="color: #339933;">.</span>  0FB608        <span style="color: #00007f; font-weight: bold;">MOVZX</span> <span style="color: #00007f;">ECX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">BYTE</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EAX</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">004046FB</span>  |<span style="color: #339933;">.</span>  8B45 FC       <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">004046FE</span>  |<span style="color: #339933;">.</span>  6A <span style="color: #0000ff;">05</span>         <span style="color: #00007f; font-weight: bold;">PUSH</span> <span style="color: #0000ff;">5</span>
<span style="color: #adadad; font-style: italic;">00404700</span>  |<span style="color: #339933;">.</span>  33D2          <span style="color: #00007f; font-weight: bold;">XOR</span> <span style="color: #00007f;">EDX</span><span style="color: #339933;">,</span><span style="color: #00007f;">EDX</span>
<span style="color: #adadad; font-style: italic;">00404702</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">5F</span>            <span style="color: #00007f; font-weight: bold;">POP</span> <span style="color: #00007f;">EDI</span>
<span style="color: #adadad; font-style: italic;">00404703</span>  |<span style="color: #339933;">.</span>  F7F7          <span style="color: #00007f; font-weight: bold;">DIV</span> <span style="color: #00007f;">EDI</span>
<span style="color: #adadad; font-style: italic;">00404705</span>  |<span style="color: #339933;">.</span>  8BFB          <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EDI</span><span style="color: #339933;">,</span><span style="color: #00007f;">EBX</span>
<span style="color: #adadad; font-style: italic;">00404707</span>  |<span style="color: #339933;">.</span>  C1E2 <span style="color: #0000ff;">08</span>       <span style="color: #00007f; font-weight: bold;">SHL</span> <span style="color: #00007f;">EDX</span><span style="color: #339933;">,</span><span style="color: #0000ff;">8</span>
<span style="color: #adadad; font-style: italic;">0040470A</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span>0FB68411 <span style="color: #0000ff;">4</span>&gt;<span style="color: #00007f; font-weight: bold;">MOVZX</span> <span style="color: #00007f;">AX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">BYTE</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EAX</span><span style="color: #339933;">+</span><span style="color: #00007f;">ECX</span><span style="color: #339933;">+</span>427F48<span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">00404713</span>  |<span style="color: #339933;">.</span>  0FB7C0        <span style="color: #00007f; font-weight: bold;">MOVZX</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">AX</span>
<span style="color: #adadad; font-style: italic;">00404716</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">8945</span> FC       <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">EAX</span>
<span style="color: #adadad; font-style: italic;">00404719</span>  |<span style="color: #339933;">.</span>  8BC6          <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESI</span>
<span style="color: #adadad; font-style: italic;">0040471B</span>  |<span style="color: #339933;">.</span>  E8 <span style="color: #0000ff;">78010000</span>   <span style="color: #00007f; font-weight: bold;">CALL</span> <span style="color: #0000ff;">00404898</span>
<span style="color: #adadad; font-style: italic;">00404720</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span>8B00       <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">AX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EAX</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">00404723</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span><span style="color: #0000ff;">25</span> 00FF    <span style="color: #00007f; font-weight: bold;">AND</span> <span style="color: #00007f;">AX</span><span style="color: #339933;">,</span>0FF00
<span style="color: #adadad; font-style: italic;">00404727</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span>0B45 FC    <span style="color: #00007f; font-weight: bold;">OR</span> <span style="color: #00007f;">AX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">0040472B</span>  |<span style="color: #339933;">.</span>  0FB7C0        <span style="color: #00007f; font-weight: bold;">MOVZX</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">AX</span>
<span style="color: #adadad; font-style: italic;">0040472E</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">8945</span> FC       <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">EAX</span>
<span style="color: #adadad; font-style: italic;">00404731</span>  |<span style="color: #339933;">.</span>  8BC6          <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESI</span>
<span style="color: #adadad; font-style: italic;">00404733</span>  |<span style="color: #339933;">.</span>  E8 <span style="color: #0000ff;">60010000</span>   <span style="color: #00007f; font-weight: bold;">CALL</span> <span style="color: #0000ff;">00404898</span>
<span style="color: #adadad; font-style: italic;">00404738</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span>8B4D FC    <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">CX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">0040473C</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span><span style="color: #0000ff;">8908</span>       <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EAX</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">CX</span>
<span style="color: #adadad; font-style: italic;">0040473F</span>  |<span style="color: #339933;">.</span>  8BC6          <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESI</span>
<span style="color: #adadad; font-style: italic;">00404741</span>  |<span style="color: #339933;">.</span>  E8 <span style="color: #0000ff;">52010000</span>   <span style="color: #00007f; font-weight: bold;">CALL</span> <span style="color: #0000ff;">00404898</span>
<span style="color: #adadad; font-style: italic;">00404746</span>  |<span style="color: #339933;">.</span>  0FB700        <span style="color: #00007f; font-weight: bold;">MOVZX</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EAX</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">00404749</span>  |<span style="color: #339933;">.</span>  6A <span style="color: #0000ff;">05</span>         <span style="color: #00007f; font-weight: bold;">PUSH</span> <span style="color: #0000ff;">5</span>
<span style="color: #adadad; font-style: italic;">0040474B</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">99</span>            <span style="color: #00007f; font-weight: bold;">CDQ</span>
<span style="color: #adadad; font-style: italic;">0040474C</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">59</span>            <span style="color: #00007f; font-weight: bold;">POP</span> <span style="color: #00007f;">ECX</span>
<span style="color: #adadad; font-style: italic;">0040474D</span>  |<span style="color: #339933;">.</span>  F7F9          <span style="color: #00007f; font-weight: bold;">IDIV</span> <span style="color: #00007f;">ECX</span>
<span style="color: #adadad; font-style: italic;">0040474F</span>  |<span style="color: #339933;">.</span>  33FF          <span style="color: #00007f; font-weight: bold;">XOR</span> <span style="color: #00007f;">EDI</span><span style="color: #339933;">,</span><span style="color: #00007f;">EDI</span>
<span style="color: #adadad; font-style: italic;">00404751</span>  |<span style="color: #339933;">.</span>  85DB          <span style="color: #00007f; font-weight: bold;">TEST</span> <span style="color: #00007f;">EBX</span><span style="color: #339933;">,</span><span style="color: #00007f;">EBX</span>
<span style="color: #adadad; font-style: italic;">00404753</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">8955</span> FC       <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">EDX</span>
<span style="color: #adadad; font-style: italic;">00404756</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">76</span> <span style="color: #0000ff;">58</span>         <span style="color: #00007f; font-weight: bold;">JBE</span> <span style="color: #000000; font-weight: bold;">SHORT</span> 004047B0
<span style="color: #adadad; font-style: italic;">00404758</span>  |&gt;  8BC6          <span style="color: #339933;">/</span><span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESI</span>
<span style="color: #adadad; font-style: italic;">0040475A</span>  |<span style="color: #339933;">.</span>  E8 <span style="color: #0000ff;">39010000</span>   |CALL <span style="color: #0000ff;">00404898</span>
<span style="color: #adadad; font-style: italic;">0040475F</span>  |<span style="color: #339933;">.</span>  0FB600        |MOVZX <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">BYTE</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EAX</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">00404762</span>  |<span style="color: #339933;">.</span>  8B4D FC       |MOV <span style="color: #00007f;">ECX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">00404765</span>  |<span style="color: #339933;">.</span>  C1E1 <span style="color: #0000ff;">08</span>       |SHL <span style="color: #00007f;">ECX</span><span style="color: #339933;">,</span><span style="color: #0000ff;">8</span>
<span style="color: #adadad; font-style: italic;">00404768</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span>0FB68408 <span style="color: #0000ff;">4</span>&gt;|MOVZX <span style="color: #00007f;">AX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">BYTE</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EAX</span><span style="color: #339933;">+</span>ECX427F48<span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">00404771</span>  |<span style="color: #339933;">.</span>  0FB7C0        |MOVZX <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">AX</span>
<span style="color: #adadad; font-style: italic;">00404774</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">8945</span> F8       |MOV <span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">EAX</span>
<span style="color: #adadad; font-style: italic;">00404777</span>  |<span style="color: #339933;">.</span>  8BC6          |MOV <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESI</span>
<span style="color: #adadad; font-style: italic;">00404779</span>  |<span style="color: #339933;">.</span>  E8 1A010000   |CALL <span style="color: #0000ff;">00404898</span>
<span style="color: #adadad; font-style: italic;">0040477E</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span>8B00       |MOV <span style="color: #00007f;">AX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EAX</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">00404781</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span><span style="color: #0000ff;">25</span> 00FF    |AND <span style="color: #00007f;">AX</span><span style="color: #339933;">,</span>0FF00
<span style="color: #adadad; font-style: italic;">00404785</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span>0B45 F8    |OR <span style="color: #00007f;">AX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">00404789</span>  |<span style="color: #339933;">.</span>  0FB7C0        |MOVZX <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">AX</span>
<span style="color: #adadad; font-style: italic;">0040478C</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">8945</span> F8       |MOV <span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">EAX</span>
<span style="color: #adadad; font-style: italic;">0040478F</span>  |<span style="color: #339933;">.</span>  8BC6          |MOV <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESI</span>
<span style="color: #adadad; font-style: italic;">00404791</span>  |<span style="color: #339933;">.</span>  E8 <span style="color: #0000ff;">02010000</span>   |CALL <span style="color: #0000ff;">00404898</span>
<span style="color: #adadad; font-style: italic;">00404796</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span>8B4D F8    |MOV <span style="color: #00007f;">CX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">0040479A</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span><span style="color: #0000ff;">8908</span>       |MOV <span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EAX</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">CX</span>
<span style="color: #adadad; font-style: italic;">0040479D</span>  |<span style="color: #339933;">.</span>  8B45 FC       |MOV <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">004047A0</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">47</span>            |INC <span style="color: #00007f;">EDI</span>
<span style="color: #adadad; font-style: italic;">004047A1</span>  |<span style="color: #339933;">.</span>  6A <span style="color: #0000ff;">05</span>         |PUSH <span style="color: #0000ff;">5</span>
<span style="color: #adadad; font-style: italic;">004047A3</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">40</span>            |INC <span style="color: #00007f;">EAX</span>
<span style="color: #adadad; font-style: italic;">004047A4</span>  |<span style="color: #339933;">.</span>  33D2          |XOR <span style="color: #00007f;">EDX</span><span style="color: #339933;">,</span><span style="color: #00007f;">EDX</span>
<span style="color: #adadad; font-style: italic;">004047A6</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">59</span>            |POP <span style="color: #00007f;">ECX</span>
<span style="color: #adadad; font-style: italic;">004047A7</span>  |<span style="color: #339933;">.</span>  F7F1          |DIV <span style="color: #00007f;">ECX</span>
<span style="color: #adadad; font-style: italic;">004047A9</span>  |<span style="color: #339933;">.</span>  3BFB          |CMP <span style="color: #00007f;">EDI</span><span style="color: #339933;">,</span><span style="color: #00007f;">EBX</span>
<span style="color: #adadad; font-style: italic;">004047AB</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">8955</span> FC       |MOV <span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">EDX</span>
<span style="color: #adadad; font-style: italic;">004047AE</span>  |<span style="color: #339933;">.</span>^ <span style="color: #0000ff;">72</span> A8         \<span style="color: #00007f; font-weight: bold;">JB</span> <span style="color: #000000; font-weight: bold;">SHORT</span> <span style="color: #0000ff;">00404758</span>
<span style="color: #adadad; font-style: italic;">004047B0</span>  |&gt;  <span style="color: #0000ff;">5F</span>            <span style="color: #00007f; font-weight: bold;">POP</span> <span style="color: #00007f;">EDI</span>
<span style="color: #adadad; font-style: italic;">004047B1</span>  |<span style="color: #339933;">.</span>  8BC6          <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESI</span>
<span style="color: #adadad; font-style: italic;">004047B3</span>  |<span style="color: #339933;">.</span>  5B            <span style="color: #00007f; font-weight: bold;">POP</span> <span style="color: #00007f;">EBX</span>
<span style="color: #adadad; font-style: italic;">004047B4</span>  |&gt;  C9            <span style="color: #00007f; font-weight: bold;">LEAVE</span>
<span style="color: #adadad; font-style: italic;">004047B5</span>  \<span style="color: #339933;">.</span>  C3            <span style="color: #00007f; font-weight: bold;">RET</span></pre></td></tr></table></div>

<p>The code above is for the Encrypter and the code below is the Decrypter:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
</pre></td><td class="code"><pre class="asm" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;">004047B6</span>  <span style="color: #339933;">/</span>$  <span style="color: #0000ff;">55</span>            <span style="color: #00007f; font-weight: bold;">PUSH</span> <span style="color: #00007f;">EBP</span>                 <span style="color: #666666; font-style: italic;">;  Main Decrypter</span>
<span style="color: #adadad; font-style: italic;">004047B7</span>  |<span style="color: #339933;">.</span>  8BEC          <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EBP</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESP</span>
<span style="color: #adadad; font-style: italic;">004047B9</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">51</span>            <span style="color: #00007f; font-weight: bold;">PUSH</span> <span style="color: #00007f;">ECX</span>
<span style="color: #adadad; font-style: italic;">004047BA</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">51</span>            <span style="color: #00007f; font-weight: bold;">PUSH</span> <span style="color: #00007f;">ECX</span>
<span style="color: #adadad; font-style: italic;">004047BB</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">53</span>            <span style="color: #00007f; font-weight: bold;">PUSH</span> <span style="color: #00007f;">EBX</span>
<span style="color: #adadad; font-style: italic;">004047BC</span>  |<span style="color: #339933;">.</span>  8B5E <span style="color: #0000ff;">14</span>       <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EBX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">ESI</span><span style="color: #339933;">+</span><span style="color: #0000ff;">14</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">004047BF</span>  |<span style="color: #339933;">.</span>  85DB          <span style="color: #00007f; font-weight: bold;">TEST</span> <span style="color: #00007f;">EBX</span><span style="color: #339933;">,</span><span style="color: #00007f;">EBX</span>
<span style="color: #adadad; font-style: italic;">004047C1</span>  |<span style="color: #339933;">.</span>  8BC6          <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESI</span>
<span style="color: #adadad; font-style: italic;">004047C3</span>  |<span style="color: #339933;">.</span>  0F84 CC000000 <span style="color: #00007f; font-weight: bold;">JE</span> <span style="color: #0000ff;">00404895</span>
<span style="color: #adadad; font-style: italic;">004047C9</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">57</span>            <span style="color: #00007f; font-weight: bold;">PUSH</span> <span style="color: #00007f;">EDI</span>
<span style="color: #adadad; font-style: italic;">004047CA</span>  |<span style="color: #339933;">.</span>  4B            <span style="color: #00007f; font-weight: bold;">DEC</span> <span style="color: #00007f;">EBX</span>
<span style="color: #adadad; font-style: italic;">004047CB</span>  |<span style="color: #339933;">.</span>  8BFB          <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EDI</span><span style="color: #339933;">,</span><span style="color: #00007f;">EBX</span>
<span style="color: #adadad; font-style: italic;">004047CD</span>  |<span style="color: #339933;">.</span>  E8 C6000000   <span style="color: #00007f; font-weight: bold;">CALL</span> <span style="color: #0000ff;">00404898</span>
<span style="color: #adadad; font-style: italic;">004047D2</span>  |<span style="color: #339933;">.</span>  0FB700        <span style="color: #00007f; font-weight: bold;">MOVZX</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EAX</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">004047D5</span>  |<span style="color: #339933;">.</span>  6A <span style="color: #0000ff;">05</span>         <span style="color: #00007f; font-weight: bold;">PUSH</span> <span style="color: #0000ff;">5</span>
<span style="color: #adadad; font-style: italic;">004047D7</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">99</span>            <span style="color: #00007f; font-weight: bold;">CDQ</span>
<span style="color: #adadad; font-style: italic;">004047D8</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">59</span>            <span style="color: #00007f; font-weight: bold;">POP</span> <span style="color: #00007f;">ECX</span>
<span style="color: #adadad; font-style: italic;">004047D9</span>  |<span style="color: #339933;">.</span>  F7F9          <span style="color: #00007f; font-weight: bold;">IDIV</span> <span style="color: #00007f;">ECX</span>
<span style="color: #adadad; font-style: italic;">004047DB</span>  |<span style="color: #339933;">.</span>  33FF          <span style="color: #00007f; font-weight: bold;">XOR</span> <span style="color: #00007f;">EDI</span><span style="color: #339933;">,</span><span style="color: #00007f;">EDI</span>
<span style="color: #adadad; font-style: italic;">004047DD</span>  |<span style="color: #339933;">.</span>  85DB          <span style="color: #00007f; font-weight: bold;">TEST</span> <span style="color: #00007f;">EBX</span><span style="color: #339933;">,</span><span style="color: #00007f;">EBX</span>
<span style="color: #adadad; font-style: italic;">004047DF</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">8955</span> FC       <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">EDX</span>
<span style="color: #adadad; font-style: italic;">004047E2</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">76</span> <span style="color: #0000ff;">58</span>         <span style="color: #00007f; font-weight: bold;">JBE</span> <span style="color: #000000; font-weight: bold;">SHORT</span> 0040483C
<span style="color: #adadad; font-style: italic;">004047E4</span>  |&gt;  8BC6          <span style="color: #339933;">/</span><span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESI</span>
<span style="color: #adadad; font-style: italic;">004047E6</span>  |<span style="color: #339933;">.</span>  E8 AD000000   |CALL <span style="color: #0000ff;">00404898</span>
<span style="color: #adadad; font-style: italic;">004047EB</span>  |<span style="color: #339933;">.</span>  0FB600        |MOVZX <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">BYTE</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EAX</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">004047EE</span>  |<span style="color: #339933;">.</span>  8B4D FC       |MOV <span style="color: #00007f;">ECX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">004047F1</span>  |<span style="color: #339933;">.</span>  C1E1 <span style="color: #0000ff;">08</span>       |SHL <span style="color: #00007f;">ECX</span><span style="color: #339933;">,</span><span style="color: #0000ff;">8</span>
<span style="color: #adadad; font-style: italic;">004047F4</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span>0FB68408 <span style="color: #0000ff;">4</span>&gt;|MOVZX <span style="color: #00007f;">AX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">BYTE</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EAX</span><span style="color: #339933;">+</span><span style="color: #00007f;">ECX</span><span style="color: #339933;">+</span><span style="color: #0000ff;">428448</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">004047FD</span>  |<span style="color: #339933;">.</span>  0FB7C0        |MOVZX <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">AX</span>
<span style="color: #adadad; font-style: italic;">00404800</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">8945</span> F8       |MOV <span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">EAX</span>
<span style="color: #adadad; font-style: italic;">00404803</span>  |<span style="color: #339933;">.</span>  8BC6          |MOV <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESI</span>
<span style="color: #adadad; font-style: italic;">00404805</span>  |<span style="color: #339933;">.</span>  E8 <span style="color: #0000ff;">8E000000</span>   |CALL <span style="color: #0000ff;">00404898</span>
<span style="color: #adadad; font-style: italic;">0040480A</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span>8B00       |MOV <span style="color: #00007f;">AX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EAX</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">0040480D</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span><span style="color: #0000ff;">25</span> 00FF    |AND <span style="color: #00007f;">AX</span><span style="color: #339933;">,</span>0FF00
<span style="color: #adadad; font-style: italic;">00404811</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span>0B45 F8    |OR <span style="color: #00007f;">AX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">00404815</span>  |<span style="color: #339933;">.</span>  0FB7C0        |MOVZX <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">AX</span>
<span style="color: #adadad; font-style: italic;">00404818</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">8945</span> F8       |MOV <span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">EAX</span>
<span style="color: #adadad; font-style: italic;">0040481B</span>  |<span style="color: #339933;">.</span>  8BC6          |MOV <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESI</span>
<span style="color: #adadad; font-style: italic;">0040481D</span>  |<span style="color: #339933;">.</span>  E8 <span style="color: #0000ff;">76000000</span>   |CALL <span style="color: #0000ff;">00404898</span>
<span style="color: #adadad; font-style: italic;">00404822</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span>8B4D F8    |MOV <span style="color: #00007f;">CX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">00404826</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span><span style="color: #0000ff;">8908</span>       |MOV <span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EAX</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">CX</span>
<span style="color: #adadad; font-style: italic;">00404829</span>  |<span style="color: #339933;">.</span>  8B45 FC       |MOV <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">0040482C</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">47</span>            |INC <span style="color: #00007f;">EDI</span>
<span style="color: #adadad; font-style: italic;">0040482D</span>  |<span style="color: #339933;">.</span>  6A <span style="color: #0000ff;">05</span>         |PUSH <span style="color: #0000ff;">5</span>
<span style="color: #adadad; font-style: italic;">0040482F</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">40</span>            |INC <span style="color: #00007f;">EAX</span>
<span style="color: #adadad; font-style: italic;">00404830</span>  |<span style="color: #339933;">.</span>  33D2          |XOR <span style="color: #00007f;">EDX</span><span style="color: #339933;">,</span><span style="color: #00007f;">EDX</span>
<span style="color: #adadad; font-style: italic;">00404832</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">59</span>            |POP <span style="color: #00007f;">ECX</span>
<span style="color: #adadad; font-style: italic;">00404833</span>  |<span style="color: #339933;">.</span>  F7F1          |DIV <span style="color: #00007f;">ECX</span>
<span style="color: #adadad; font-style: italic;">00404835</span>  |<span style="color: #339933;">.</span>  3BFB          |CMP <span style="color: #00007f;">EDI</span><span style="color: #339933;">,</span><span style="color: #00007f;">EBX</span>
<span style="color: #adadad; font-style: italic;">00404837</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">8955</span> FC       |MOV <span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">EDX</span>
<span style="color: #adadad; font-style: italic;">0040483A</span>  |<span style="color: #339933;">.</span>^ <span style="color: #0000ff;">72</span> A8         \<span style="color: #00007f; font-weight: bold;">JB</span> <span style="color: #000000; font-weight: bold;">SHORT</span> <span style="color: #0000ff;">004047E4</span>
<span style="color: #adadad; font-style: italic;">0040483C</span>  |&gt;  8B46 <span style="color: #0000ff;">14</span>       <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">ESI</span><span style="color: #339933;">+</span><span style="color: #0000ff;">14</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">0040483F</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">8945</span> F8       <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">EAX</span>
<span style="color: #adadad; font-style: italic;">00404842</span>  |<span style="color: #339933;">.</span>  8BFB          <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EDI</span><span style="color: #339933;">,</span><span style="color: #00007f;">EBX</span>
<span style="color: #adadad; font-style: italic;">00404844</span>  |<span style="color: #339933;">.</span>  8BC6          <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESI</span>
<span style="color: #adadad; font-style: italic;">00404846</span>  |<span style="color: #339933;">.</span>  E8 4D000000   <span style="color: #00007f; font-weight: bold;">CALL</span> <span style="color: #0000ff;">00404898</span>
<span style="color: #adadad; font-style: italic;">0040484B</span>  |<span style="color: #339933;">.</span>  0FB608        <span style="color: #00007f; font-weight: bold;">MOVZX</span> <span style="color: #00007f;">ECX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">BYTE</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EAX</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">0040484E</span>  |<span style="color: #339933;">.</span>  8B45 F8       <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">00404851</span>  |<span style="color: #339933;">.</span>  6A <span style="color: #0000ff;">05</span>         <span style="color: #00007f; font-weight: bold;">PUSH</span> <span style="color: #0000ff;">5</span>
<span style="color: #adadad; font-style: italic;">00404853</span>  |<span style="color: #339933;">.</span>  33D2          <span style="color: #00007f; font-weight: bold;">XOR</span> <span style="color: #00007f;">EDX</span><span style="color: #339933;">,</span><span style="color: #00007f;">EDX</span>
<span style="color: #adadad; font-style: italic;">00404855</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">5F</span>            <span style="color: #00007f; font-weight: bold;">POP</span> <span style="color: #00007f;">EDI</span>
<span style="color: #adadad; font-style: italic;">00404856</span>  |<span style="color: #339933;">.</span>  F7F7          <span style="color: #00007f; font-weight: bold;">DIV</span> <span style="color: #00007f;">EDI</span>
<span style="color: #adadad; font-style: italic;">00404858</span>  |<span style="color: #339933;">.</span>  8BFB          <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EDI</span><span style="color: #339933;">,</span><span style="color: #00007f;">EBX</span>
<span style="color: #adadad; font-style: italic;">0040485A</span>  |<span style="color: #339933;">.</span>  C1E2 <span style="color: #0000ff;">08</span>       <span style="color: #00007f; font-weight: bold;">SHL</span> <span style="color: #00007f;">EDX</span><span style="color: #339933;">,</span><span style="color: #0000ff;">8</span>
<span style="color: #adadad; font-style: italic;">0040485D</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span>0FB68411 <span style="color: #0000ff;">4</span>&gt;<span style="color: #00007f; font-weight: bold;">MOVZX</span> <span style="color: #00007f;">AX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">BYTE</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">ECX</span><span style="color: #339933;">+</span><span style="color: #00007f;">EDX</span><span style="color: #339933;">+</span><span style="color: #0000ff;">428448</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">00404866</span>  |<span style="color: #339933;">.</span>  0FB7C0        <span style="color: #00007f; font-weight: bold;">MOVZX</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">AX</span>
<span style="color: #adadad; font-style: italic;">00404869</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">8945</span> F8       <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">EAX</span>
<span style="color: #adadad; font-style: italic;">0040486C</span>  |<span style="color: #339933;">.</span>  8BC6          <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESI</span>
<span style="color: #adadad; font-style: italic;">0040486E</span>  |<span style="color: #339933;">.</span>  E8 <span style="color: #0000ff;">25000000</span>   <span style="color: #00007f; font-weight: bold;">CALL</span> <span style="color: #0000ff;">00404898</span>
<span style="color: #adadad; font-style: italic;">00404873</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span>8B00       <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">AX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EAX</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">00404876</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span><span style="color: #0000ff;">25</span> 00FF    <span style="color: #00007f; font-weight: bold;">AND</span> <span style="color: #00007f;">AX</span><span style="color: #339933;">,</span>0FF00
<span style="color: #adadad; font-style: italic;">0040487A</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span>0B45 F8    <span style="color: #00007f; font-weight: bold;">OR</span> <span style="color: #00007f;">AX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">0040487E</span>  |<span style="color: #339933;">.</span>  0FB7C0        <span style="color: #00007f; font-weight: bold;">MOVZX</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">AX</span>
<span style="color: #adadad; font-style: italic;">00404881</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">8945</span> F8       <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #000000; font-weight: bold;">DWORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">EAX</span>
<span style="color: #adadad; font-style: italic;">00404884</span>  |<span style="color: #339933;">.</span>  8BC6          <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESI</span>
<span style="color: #adadad; font-style: italic;">00404886</span>  |<span style="color: #339933;">.</span>  E8 0D000000   <span style="color: #00007f; font-weight: bold;">CALL</span> <span style="color: #0000ff;">00404898</span>
<span style="color: #adadad; font-style: italic;">0040488B</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span>8B4D F8    <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">CX</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">SS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EBP</span><span style="color: #339933;">-</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
<span style="color: #adadad; font-style: italic;">0040488F</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">66</span><span style="color: #339933;">:</span><span style="color: #0000ff;">8908</span>       <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #000000; font-weight: bold;">WORD</span> <span style="color: #000000; font-weight: bold;">PTR</span> <span style="color: #00007f;">DS</span><span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">EAX</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span><span style="color: #00007f;">CX</span>
<span style="color: #adadad; font-style: italic;">00404892</span>  |<span style="color: #339933;">.</span>  8BC6          <span style="color: #00007f; font-weight: bold;">MOV</span> <span style="color: #00007f;">EAX</span><span style="color: #339933;">,</span><span style="color: #00007f;">ESI</span>
<span style="color: #adadad; font-style: italic;">00404894</span>  |<span style="color: #339933;">.</span>  <span style="color: #0000ff;">5F</span>            <span style="color: #00007f; font-weight: bold;">POP</span> <span style="color: #00007f;">EDI</span>
<span style="color: #adadad; font-style: italic;">00404895</span>  |&gt;  5B            <span style="color: #00007f; font-weight: bold;">POP</span> <span style="color: #00007f;">EBX</span>
<span style="color: #adadad; font-style: italic;">00404896</span>  |<span style="color: #339933;">.</span>  C9            <span style="color: #00007f; font-weight: bold;">LEAVE</span>
<span style="color: #adadad; font-style: italic;">00404897</span>  \<span style="color: #339933;">.</span>  C3            <span style="color: #00007f; font-weight: bold;">RET</span></pre></td></tr></table></div>

<p>I will leave you with the python source code for the encryption and decryption routines so that you can look at the algorithm and get a feel for what was going on.  You will need the static data which can be found in the .rdata section.  This is the cipher text that is looked up during the encryption and decryption phase.  I have included it in the tool as a separate file.<br />I may decide to start developing a Linux variant for checking my GoDaddy mail, but don’t hold your breath.  Mail me any questions you may have.  If you’re interested.</p>
<p>The tool can be found <a href="http://chirashi.zensay.com/wp-content/uploads/2007/08/wben.zip">here.</a></p>



Share this on:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F08%2Fdissecting-the-godaddy-email-notifier-part-4%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%204&amp;bodytext=Ok%2C%20this%20is%20hopefully%20the%20last%20part%20of%20my%20Dissecting%20series%20for%20the%20email%20notifier.%20%20I%20last%20left%20you%20with%20the%20fact%20that%20I%20had%20reverse%20engineered%20the%20encryption%20and%20decryption%20algorithm.%20%20I%20simply%20poked%20around%20the%20calls%20to%20the%20registry%20key%20write%20funct" title="Digg"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F08%2Fdissecting-the-godaddy-email-notifier-part-4%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%204&amp;notes=Ok%2C%20this%20is%20hopefully%20the%20last%20part%20of%20my%20Dissecting%20series%20for%20the%20email%20notifier.%20%20I%20last%20left%20you%20with%20the%20fact%20that%20I%20had%20reverse%20engineered%20the%20encryption%20and%20decryption%20algorithm.%20%20I%20simply%20poked%20around%20the%20calls%20to%20the%20registry%20key%20write%20funct" title="del.icio.us"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F08%2Fdissecting-the-godaddy-email-notifier-part-4%2F&amp;t=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%204" title="Facebook"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F08%2Fdissecting-the-godaddy-email-notifier-part-4%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%204&amp;annotation=Ok%2C%20this%20is%20hopefully%20the%20last%20part%20of%20my%20Dissecting%20series%20for%20the%20email%20notifier.%20%20I%20last%20left%20you%20with%20the%20fact%20that%20I%20had%20reverse%20engineered%20the%20encryption%20and%20decryption%20algorithm.%20%20I%20simply%20poked%20around%20the%20calls%20to%20the%20registry%20key%20write%20funct" title="Google Bookmarks"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F08%2Fdissecting-the-godaddy-email-notifier-part-4%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%204" title="Reddit"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F08%2Fdissecting-the-godaddy-email-notifier-part-4%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%204" title="StumbleUpon"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F08%2Fdissecting-the-godaddy-email-notifier-part-4%2F&amp;t=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%204&amp;s=Ok%2C%20this%20is%20hopefully%20the%20last%20part%20of%20my%20Dissecting%20series%20for%20the%20email%20notifier.%20%20I%20last%20left%20you%20with%20the%20fact%20that%20I%20had%20reverse%20engineered%20the%20encryption%20and%20decryption%20algorithm.%20%20I%20simply%20poked%20around%20the%20calls%20to%20the%20registry%20key%20write%20funct" title="Tumblr"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%204%20-%20http%3A%2F%2Fchirashi.zensay.com%2F2007%2F08%2Fdissecting-the-godaddy-email-notifier-part-4%2F" title="Twitter"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%204&amp;url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F08%2Fdissecting-the-godaddy-email-notifier-part-4%2F" title="Slashdot"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://chirashi.zensay.com/2007/08/dissecting-the-godaddy-email-notifier-part-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dissecting the GoDaddy email notifier &#8211; Part 3</title>
		<link>http://chirashi.zensay.com/2007/07/dissecting-the-godaddy-email-notifier-part-3/</link>
		<comments>http://chirashi.zensay.com/2007/07/dissecting-the-godaddy-email-notifier-part-3/#comments</comments>
		<pubDate>Sun, 29 Jul 2007 14:52:00 +0000</pubDate>
		<dc:creator>chopstick</dc:creator>
				<category><![CDATA[Reverse Engineering]]></category>

		<guid isPermaLink="false">http://chirashi.zensay.com/?p=8</guid>
		<description><![CDATA[It’s been sometime since I made a post and that kinda sucks. I’ve been a bit swamped with work and have not had any real time to do my own stuff. Presently out in Cairo. Pyramids are phun.
You must be wondering why the hell I chose OllyDbg to make a simple hex edit in the [...]]]></description>
			<content:encoded><![CDATA[<p>It’s been sometime since I made a post and that kinda sucks. I’ve been a bit swamped with work and have not had any real time to do my own stuff. Presently out in Cairo. Pyramids are phun.</p>
<p>You must be wondering why the hell I chose OllyDbg to make a simple hex edit in the previous post. The truth is, I was using it to try and study at exactly what point the SSL protocol is chosen and I found it at 0×414356.</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_HgI3JtvsKSk/Rqyp6euhrfI/AAAAAAAAABE/-cVovFuYS2Q/s1600-h/stgwbe.png"><img style="cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_HgI3JtvsKSk/Rqyp6euhrfI/AAAAAAAAABE/-cVovFuYS2Q/s200/stgwbe.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5092632100794904050" /></a></p>
<p>By changing the CMP operation as in the picture above with 0×2E instead of 0×00, I can get the client to select plain old HTTP to speak to the main server. This is good, because I can now look at all the Web Service calls it makes and hopefully try to write a Linux version.<br />One other reason I chose OllyDbg is to study what the client actually does. My next quest is to study where my credentials are stored. Since this is Windows, I figure the first place to look would be the registry. By sniffing around the “string references” of the client, I did notice a specific registry key which is referenced: “HKEY_CURRENT_USER\Software\Starfield\WBEN\Settings”<br /> <br />Examining this registry key with regedit, I see the following:</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_HgI3JtvsKSk/RqyqDeuhrgI/AAAAAAAAABM/kx_h4bq6qsw/s1600-h/registry.png"><img style="cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_HgI3JtvsKSk/RqyqDeuhrgI/AAAAAAAAABM/kx_h4bq6qsw/s200/registry.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5092632255413726722" /></a></p>
<p>That looks interesting. If I count the characters, it equates to the exact number for both my email address and password*. This means that their encryption algorithm generates fixed length cipher text. This most likely means that they’re using a substitution algorithm. Tsk, tsk, tsk. Substitution algorithms rely on some form of calculation (if any) and lookup in order to generate cipher text. Again, by looking at the encrypted strings, it is possible to determine the fact that a calculation involving the string length is also done. How do I deduce this? By looking at the last two characters in my email address (d1). They are both “qq” for “om” the last two letters in “.com”. This means that both “o” and “m” are equal to “q”. Not possible in direct lookups with calculation.</p>
<p>Another good thing is the fact that I know the credentials are stored in the registry. This shortens my hunt significantly because I only have to trace any specific registry calls to find out where the Encryption/Decryption algorithms are lurking. If I trace any references or calls to the specific registry key, then I will most likely find where the algorithms exist.</p>
<p>Using the “search for all string references” in Olly, I try to pull up all the calls to “HKEY_CURRENT_USER\Software\Starfield\WBEN\Settings”. I end up with this list:</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_HgI3JtvsKSk/RqyqNOuhrhI/AAAAAAAAABU/LJbgLqNWZdg/s1600-h/call_tree.png"><img style="cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_HgI3JtvsKSk/RqyqNOuhrhI/AAAAAAAAABU/LJbgLqNWZdg/s200/call_tree.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5092632422917451282" /></a></p>
<p>The column “Called from” is what I’m interested in. This list contains all the addresses where the call to this registry key is made. I now have to follow each one and see if there is a “RegistrySetValue” call made. I look through each call one by one until I stumble upon this one:</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_HgI3JtvsKSk/RqyqXeuhriI/AAAAAAAAABc/QwUy2HdOOm4/s1600-h/unicode_d1.png"><img style="cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_HgI3JtvsKSk/RqyqXeuhriI/AAAAAAAAABc/QwUy2HdOOm4/s200/unicode_d1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5092632599011110434" /></a></p>
<p>It’s interesting because of the entry I have highlighted. This Unicode “d1” that’s on the stack is the registry entry for my email address. I follow this one to see where it goes and wind up discovering both the encryption and decryption algorithm. I will list them in the next part of this series. I think this post is dragging on long enough and I think it is about time I wrap it up. I will do just that in the next post and save everyone a lot of misery. I have successfully reversed the encryption/decryption algorithm and will post the python source code in my next post.</p>



Share this on:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-3%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%203&amp;bodytext=It%E2%80%99s%20been%20sometime%20since%20I%20made%20a%20post%20and%20that%20kinda%20sucks.%20I%E2%80%99ve%20been%20a%20bit%20swamped%20with%20work%20and%20have%20not%20had%20any%20real%20time%20to%20do%20my%20own%20stuff.%20Presently%20out%20in%20Cairo.%20Pyramids%20are%20phun.You%20must%20be%20wondering%20why%20the%20hell%20I%20chose%20OllyDbg%20to%20make" title="Digg"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-3%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%203&amp;notes=It%E2%80%99s%20been%20sometime%20since%20I%20made%20a%20post%20and%20that%20kinda%20sucks.%20I%E2%80%99ve%20been%20a%20bit%20swamped%20with%20work%20and%20have%20not%20had%20any%20real%20time%20to%20do%20my%20own%20stuff.%20Presently%20out%20in%20Cairo.%20Pyramids%20are%20phun.You%20must%20be%20wondering%20why%20the%20hell%20I%20chose%20OllyDbg%20to%20make" title="del.icio.us"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-3%2F&amp;t=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%203" title="Facebook"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-3%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%203&amp;annotation=It%E2%80%99s%20been%20sometime%20since%20I%20made%20a%20post%20and%20that%20kinda%20sucks.%20I%E2%80%99ve%20been%20a%20bit%20swamped%20with%20work%20and%20have%20not%20had%20any%20real%20time%20to%20do%20my%20own%20stuff.%20Presently%20out%20in%20Cairo.%20Pyramids%20are%20phun.You%20must%20be%20wondering%20why%20the%20hell%20I%20chose%20OllyDbg%20to%20make" title="Google Bookmarks"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-3%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%203" title="Reddit"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-3%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%203" title="StumbleUpon"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-3%2F&amp;t=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%203&amp;s=It%E2%80%99s%20been%20sometime%20since%20I%20made%20a%20post%20and%20that%20kinda%20sucks.%20I%E2%80%99ve%20been%20a%20bit%20swamped%20with%20work%20and%20have%20not%20had%20any%20real%20time%20to%20do%20my%20own%20stuff.%20Presently%20out%20in%20Cairo.%20Pyramids%20are%20phun.You%20must%20be%20wondering%20why%20the%20hell%20I%20chose%20OllyDbg%20to%20make" title="Tumblr"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%203%20-%20http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-3%2F" title="Twitter"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%203&amp;url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-3%2F" title="Slashdot"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://chirashi.zensay.com/2007/07/dissecting-the-godaddy-email-notifier-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dissecting the GoDaddy email notifier &#8211; Part 2</title>
		<link>http://chirashi.zensay.com/2007/07/dissecting-the-godaddy-email-notifier-part-2/</link>
		<comments>http://chirashi.zensay.com/2007/07/dissecting-the-godaddy-email-notifier-part-2/#comments</comments>
		<pubDate>Fri, 13 Jul 2007 21:47:00 +0000</pubDate>
		<dc:creator>chopstick</dc:creator>
				<category><![CDATA[Reverse Engineering]]></category>

		<guid isPermaLink="false">http://chirashi.zensay.com/?p=7</guid>
		<description><![CDATA[Welcome back.  In our last installment, we had just figured out that the GoDaddy Email notifier uses SSL to communicate with the server.  Today, I will look at ways of trying to bypass this and sniff traffic in order to figure out how the client communicates with the server.
Like I described in my [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome back.  In our last installment, we had just figured out that the GoDaddy Email notifier uses SSL to communicate with the server.  Today, I will look at ways of trying to bypass this and sniff traffic in order to figure out how the client communicates with the server.</p>
<p>Like I described in my previous post, I hooked up an stunnel/replug proxy chain to try and decrypt traffic, sniff it, and encrypt the traffic back on its way to the server.  I first setup stunnel in both daemon and client modes.  Here is a description of each:</p>
<p><strong>Daemon mode.</strong>  This instance of stunnel will listen on localhost:443 and forward traffic to localhost:8888 all over SSL.<br /><code><br />sheran@azazel:~$ sudo stunnel -d 443 -r localhost:8888<br /></code><br /><strong>Client mode.</strong>  This instance will listen in non-SSL mode on port 8889 and re-establish the connection in SSL mode to the server. (When sniffing traffic, the DNS lookup for the notifier was noted.  It looks up email.secureserver.net)<br /><code><br />sheran@azazel:~$ sudo stunnel -c -d 8889 -r email.secureserver.net:443<br /></code><br />How do we plug the hole in the middle? Simple, use replug found in <a href="http://www.sockpuppet.org/blackbag-0.9.tgz">BlackBag</a>.  Here&#8217;s how:<br /><code><br />sheran@azazel:~$ bkb replug localhost:8889@8888<br /></code><br />This will start replug and listen on localhost:8888.  Whatever it listens to on this port it will forward down to localhost:8889.  The way traffic flows will be similar to this:<br /><code><br />Client ---&gt; localhost:443 (stunnel) ---&gt; localhost:8888 (replug) ---&gt; localhost:8889 (stunnel) ---&gt; email.secureserver.net:443<br /></code><br />Now for the client to think it&#8217;s talking to an authentic server, I need to replicate the server certificate as well.  This is not going to be an easy task since I don&#8217;t own a CA; especially not the one that issues GoDaddy&#8217;s certificates.  So I do the next best thing and create a self-signed certificate almost identical to the GoDaddy certificate (weirder things have worked for me in the past).  No dice.  The client notifier program refuses to negotiate SSL with my first instance of stunnel.  Shit.</p>
<p>Since this is not going to be as simple as I thought, I will have to resort to the next best thing: disassemble the notifier executable and try to patch it to talk non-SSL.  So I fire up my favorite disassembler OllyDbg and try to locate any strings in the executable to give me a clue as to where the connection is made.</p>
<p>Well, here&#8217;s something.  Looking through strings (Right-click->Search for->All Referenced Strings) gives me several entries to a string reference called &#8220;http://&#8221; and &#8220;https://&#8221;.  I wonder if changing &#8220;https://&#8221; to &#8220;http://&#8221; will have any effect.  Let&#8217;s see:</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_HgI3JtvsKSk/RpfzIQCbzFI/AAAAAAAAAAs/9X7-Ps2NEzM/s1600-h/strings_https.png"><img style="cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_HgI3JtvsKSk/RpfzIQCbzFI/AAAAAAAAAAs/9X7-Ps2NEzM/s400/strings_https.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5086801627207945298" /></a></p>
<p>In the &#8220;Strings window&#8221;, right click and do a &#8220;Follow in Disassembler&#8221;; then when you&#8217;re in the disassembler window, right click on the line with the &#8220;https://&#8221; and do a &#8220;Follow in Dump&#8221;->&#8221;Immediate Constant&#8221;</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_HgI3JtvsKSk/RpfzYwCbzGI/AAAAAAAAAA0/M_L7gXYn624/s1600-h/follow_string.png"><img style="cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_HgI3JtvsKSk/RpfzYwCbzGI/AAAAAAAAAA0/M_L7gXYn624/s400/follow_string.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5086801910675786850" /></a></p>
<p>This should then bring the string up on the lower left window where you can change the &#8220;https://&#8221; entry to &#8220;http://&#8221;.  Then, right-click, choose &#8220;Copy to Executable&#8221;, right-click on the window that opens up and select &#8220;Save File&#8221;.  Save it as another name and try it out for yourself.  Now you can see all the traffic flowing between the client and server on Wireshark.</p>
<p>At this point, you will notice that GoDaddy&#8217;s email notifier uses SOAP to transfer XML messages to and from the server.  The URL is <a href="https://email.secureserver.net/soap/public.php">https://email.secureserver.net/soap/public.php</a> and a listing of available operations and WSDL file.</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_HgI3JtvsKSk/RpfzggCbzHI/AAAAAAAAAA8/HLVMbMho2v0/s1600-h/soap.png"><img style="cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_HgI3JtvsKSk/RpfzggCbzHI/AAAAAAAAAA8/HLVMbMho2v0/s400/soap.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5086802043819773042" /></a></p>
<p>I personally felt that it was easier to get the client to do various operations and sniff the traffic to get an idea of how things are implemented.  I think I&#8217;m well on my way to writing my linux variant of the notifier.</p>
<p>Next time, I&#8217;ll look into how the credentials are stored and if they are encrypted and if this is a trivial encryption to break.</p>



Share this on:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-2%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%202&amp;bodytext=Welcome%20back.%20%20In%20our%20last%20installment%2C%20we%20had%20just%20figured%20out%20that%20the%20GoDaddy%20Email%20notifier%20uses%20SSL%20to%20communicate%20with%20the%20server.%20%20Today%2C%20I%20will%20look%20at%20ways%20of%20trying%20to%20bypass%20this%20and%20sniff%20traffic%20in%20order%20to%20figure%20out%20how%20the%20client%20comm" title="Digg"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-2%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%202&amp;notes=Welcome%20back.%20%20In%20our%20last%20installment%2C%20we%20had%20just%20figured%20out%20that%20the%20GoDaddy%20Email%20notifier%20uses%20SSL%20to%20communicate%20with%20the%20server.%20%20Today%2C%20I%20will%20look%20at%20ways%20of%20trying%20to%20bypass%20this%20and%20sniff%20traffic%20in%20order%20to%20figure%20out%20how%20the%20client%20comm" title="del.icio.us"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-2%2F&amp;t=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%202" title="Facebook"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-2%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%202&amp;annotation=Welcome%20back.%20%20In%20our%20last%20installment%2C%20we%20had%20just%20figured%20out%20that%20the%20GoDaddy%20Email%20notifier%20uses%20SSL%20to%20communicate%20with%20the%20server.%20%20Today%2C%20I%20will%20look%20at%20ways%20of%20trying%20to%20bypass%20this%20and%20sniff%20traffic%20in%20order%20to%20figure%20out%20how%20the%20client%20comm" title="Google Bookmarks"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-2%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%202" title="Reddit"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-2%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%202" title="StumbleUpon"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-2%2F&amp;t=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%202&amp;s=Welcome%20back.%20%20In%20our%20last%20installment%2C%20we%20had%20just%20figured%20out%20that%20the%20GoDaddy%20Email%20notifier%20uses%20SSL%20to%20communicate%20with%20the%20server.%20%20Today%2C%20I%20will%20look%20at%20ways%20of%20trying%20to%20bypass%20this%20and%20sniff%20traffic%20in%20order%20to%20figure%20out%20how%20the%20client%20comm" title="Tumblr"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%202%20-%20http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-2%2F" title="Twitter"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%202&amp;url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-2%2F" title="Slashdot"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://chirashi.zensay.com/2007/07/dissecting-the-godaddy-email-notifier-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dissecting the GoDaddy email notifier &#8211; Part 1</title>
		<link>http://chirashi.zensay.com/2007/07/dissecting-the-godaddy-email-notifier-part-1/</link>
		<comments>http://chirashi.zensay.com/2007/07/dissecting-the-godaddy-email-notifier-part-1/#comments</comments>
		<pubDate>Wed, 04 Jul 2007 17:21:00 +0000</pubDate>
		<dc:creator>chopstick</dc:creator>
				<category><![CDATA[Reverse Engineering]]></category>

		<guid isPermaLink="false">http://chirashi.zensay.com/?p=6</guid>
		<description><![CDATA[I host at GoDaddy.  Yes, yes, I know there have been horror stories and there is even a site that lists incidents involving the shutting down of some sites with little or no warning; but they&#8217;re dirt cheap and I&#8217;m poor so&#8230;
Anyway, GoDaddy has this email notifier which will check your mailbox to see [...]]]></description>
			<content:encoded><![CDATA[<p>I host at GoDaddy.  Yes, yes, I know there have been horror stories and there is even a <a href="http://www.nodaddy.com/">site </a>that lists incidents involving the shutting down of some sites with little or no warning; but they&#8217;re dirt cheap and I&#8217;m poor so&#8230;</p>
<p>Anyway, GoDaddy has this <a href="https://email.secureserver.net/notifier.php">email notifier</a> which will check your mailbox to see if you&#8217;ve got new mail without logging into the horribly slow Web Based email client.  It&#8217;s fairly convenient, but only installs on Windows.  I wanted to do two things with this notifier:</p>
<p>1.See how safely it actually kept my credentials.<br />2. See how it communicated with the server and if it was secure as well.</p>
<p>I then wanted to see how easy it was to have a version written for Linux so that I can use it on my Ubuntu box.</p>
<p>I don&#8217;t know how many of you have nodded off by now and how many of you wondering why I even bother.  The truth is, its important to me, its my blog and it will also hopefully enlighten you on how you can go about conducting an analysis on a network application.  In this regard, this is what I will be doing with this application:</p>
<p>1. Examining the communication between notifier and server<br />2. Identifying how the credentials are stored and if they are encrypted<br />3. Attempting to decrypt the credentials if it proves easy to do so<br />4. Writing my own Linux version of the tool.  Either a Gnome Applet or Firefox Extension (whichever is easier)</p>
<p>Since this will be an ongoing saga of sorts, I will break it down into several posts for managability&#8217;s sake.  It also gives me time to conduct my research and publish the findings without waiting till the end.</p>
<p>Right, let&#8217;s begin&#8230;</p>
<p>As with all applications, I downloaded and installed the tool.  The notifier is in the form of a small envelope that sits in your taskbar  <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_HgI3JtvsKSk/Ro0pKBwxn3I/AAAAAAAAAAc/djME2FqcYRg/s1600-h/taskbar.png"><img style="cursor: pointer;" absmiddle="" src="http://bp0.blogger.com/_HgI3JtvsKSk/Ro0pKBwxn3I/AAAAAAAAAAc/djME2FqcYRg/s200/taskbar.png" alt="" id="BLOGGER_PHOTO_ID_5083764806619602802" align="" border="0" /></a>.  You can configure it to check up to 5 email addresses and specify such settings as duration between email checks, how long to display messages for and how many new messages to display in a small popup window.  All fairly simple.</p>
<p>My first order of business is to check how the tool communicates with the server.  So I fire up Wireshark and sniff a few packets.  Immediately, it is apparent that the tool uses SSL.  Points for GoDaddy.  No casual sniffing can be done.  This puts a dent in my plans of attempting to write a Linux version.  How can I write one, when I don&#8217;t know what it says to the server?  I can always try an MITM SSL sniffing exercise.  The idea for this one is as simple as this:</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_HgI3JtvsKSk/Ro0plxwxn4I/AAAAAAAAAAk/u0xR4vM3jZQ/s1600-h/mitm.png"><img style="cursor: pointer;" src="http://bp3.blogger.com/_HgI3JtvsKSk/Ro0plxwxn4I/AAAAAAAAAAk/u0xR4vM3jZQ/s200/mitm.png" alt="" id="BLOGGER_PHOTO_ID_5083765283360972674" border="0" /></a></p>
<p>This can all be achieved by using stunnel and the replug tool found in Matasano&#8217;s BlackBag.  As a matter of fact, Dave Goldsmith has an <a href="http://www.matasano.com/log/843/mitming-an-sslized-java-app/">article </a>on the Matasano Blog about how he did this for a Java Application.  In his case, it was a fairly easy workaround to bypass the certificate validation.  I don&#8217;t know how easy it will be for this specific application.  But I&#8217;m getting ahead of myself. Join me for the next post where I setup the stunnel/replug proxy chain, discover if proper certificate validation is done and look for a way around the SSL communication.</p>



Share this on:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-1%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%201&amp;bodytext=I%20host%20at%20GoDaddy.%20%20Yes%2C%20yes%2C%20I%20know%20there%20have%20been%20horror%20stories%20and%20there%20is%20even%20a%20site%20that%20lists%20incidents%20involving%20the%20shutting%20down%20of%20some%20sites%20with%20little%20or%20no%20warning%3B%20but%20they%27re%20dirt%20cheap%20and%20I%27m%20poor%20so...Anyway%2C%20GoDaddy%20has%20this%20e" title="Digg"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-1%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%201&amp;notes=I%20host%20at%20GoDaddy.%20%20Yes%2C%20yes%2C%20I%20know%20there%20have%20been%20horror%20stories%20and%20there%20is%20even%20a%20site%20that%20lists%20incidents%20involving%20the%20shutting%20down%20of%20some%20sites%20with%20little%20or%20no%20warning%3B%20but%20they%27re%20dirt%20cheap%20and%20I%27m%20poor%20so...Anyway%2C%20GoDaddy%20has%20this%20e" title="del.icio.us"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-1%2F&amp;t=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%201" title="Facebook"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-1%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%201&amp;annotation=I%20host%20at%20GoDaddy.%20%20Yes%2C%20yes%2C%20I%20know%20there%20have%20been%20horror%20stories%20and%20there%20is%20even%20a%20site%20that%20lists%20incidents%20involving%20the%20shutting%20down%20of%20some%20sites%20with%20little%20or%20no%20warning%3B%20but%20they%27re%20dirt%20cheap%20and%20I%27m%20poor%20so...Anyway%2C%20GoDaddy%20has%20this%20e" title="Google Bookmarks"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-1%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%201" title="Reddit"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-1%2F&amp;title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%201" title="StumbleUpon"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-1%2F&amp;t=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%201&amp;s=I%20host%20at%20GoDaddy.%20%20Yes%2C%20yes%2C%20I%20know%20there%20have%20been%20horror%20stories%20and%20there%20is%20even%20a%20site%20that%20lists%20incidents%20involving%20the%20shutting%20down%20of%20some%20sites%20with%20little%20or%20no%20warning%3B%20but%20they%27re%20dirt%20cheap%20and%20I%27m%20poor%20so...Anyway%2C%20GoDaddy%20has%20this%20e" title="Tumblr"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%201%20-%20http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-1%2F" title="Twitter"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Dissecting%20the%20GoDaddy%20email%20notifier%20-%20Part%201&amp;url=http%3A%2F%2Fchirashi.zensay.com%2F2007%2F07%2Fdissecting-the-godaddy-email-notifier-part-1%2F" title="Slashdot"><img src="http://chirashi.zensay.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://chirashi.zensay.com/2007/07/dissecting-the-godaddy-email-notifier-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
