<?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; sasfis registry key</title>
	<atom:link href="http://blog.fortinet.com/tag/sasfis-registry-key/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>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>
	</channel>
</rss>

