mradermacher/Llama-2-7b-chat-xgpt-GGUF
Updated
•
338
type
stringclasses 1
value | custom_template
null | created_at
stringlengths 24
24
| id
stringlengths 24
24
| slug
stringlengths 2
124
| featured
int64 0
1
| updated_at
stringlengths 24
24
| visibility
stringclasses 1
value | status
stringclasses 2
values | feature_image
stringclasses 7
values | published_at
stringlengths 24
24
⌀ | title
stringlengths 2
127
| html
stringlengths 4
358k
⌀ | plaintext
stringlengths 1
82.3k
⌀ | mobiledoc
stringlengths 99
369k
| comment_id
stringlengths 1
24
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
post | null | 2019-01-31T02:39:49.000Z | 63873b9a8b1c1e0007f52ee3 | v2-demo-post | 0 | 2019-02-15T07:20:06.000Z | public | draft | null | 2019-01-31T02:39:49.000Z | Koenig Demo Post | <p>Hey there! Welcome to the new Ghost editor - affectionately known as <strong>Koenig</strong>.</p><p>Koenig is a brand new writing experience within Ghost, and follows more of a rich writing experience which you've come to expect from the best publishing platforms. Don't worry though! You can still use Markdown too, if that's what you prefer.</p><p>Because there are some changes to how Ghost outputs content using its new editor, we dropped this draft post into your latest update to tell you a bit about it – and simultaneously give you a chance to preview how well your theme handles these changes. So after reading this post you should both understand how everything works, and also be able to see if there are any changes you need to make to your theme in order to upgrade to Ghost 2.0.</p><hr><h1 id="what-s-new">What's new</h1><p>The new editor is designed to allow you have a more rich editing experience, so it's no longer limited to just text and formatting options – but it can also handle rich media objects, called cards. You can insert a card either by clicking on the <code>+</code> button on a new line, or typing <code>/</code> on a new line to search for a particular card. </p><p>Here's one now:</p><figure class="kg-card kg-embed-card"><blockquote class="twitter-tweet"><p lang="en" dir="ltr">Fun announcement coming this afternoon ? what could it be?</p>— Ghost (@TryGhost) <a href="https://twitter.com/TryGhost/status/761119175192420352?ref_src=twsrc%5Etfw">August 4, 2016</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</figure><p>Cards are rich objects which contain content which is more than just text. To start with there are cards for things like images, markdown, html and embeds — but over time we'll introduce more cards and integrations, as well as allowing you to create your own!</p><h2 id="some-examples-of-possible-future-cards">Some examples of possible future cards</h2><ul><li>A chart card to display dynamic data visualisations</li><li>A recipe card to show a pre-formatted list of ingredients and instructions</li><li>A Mailchimp card to capture new subscribers with a web form</li><li>A recommended reading card to display a dynamic suggested story based on the current user's reading history</li></ul><p>For now, though, we're just getting started with the basics.</p><h1 id="new-ways-to-work-with-images">New ways to work with images</h1><p>Perhaps the most notable change to how you're used to interacting with Ghost is in the images. In Koenig, they're both more powerful and easier to work with in the editor itself - and in the theme, they're output slightly differently with different size options.</p><p>For instance, here's your plain ol' regular image:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://casper.ghost.org/v1.25.0/images/koenig-demo-1.jpg" class="kg-image" alt loading="lazy"><figcaption>A regular size image</figcaption></figure><p>But perhaps you've got a striking panorama that you really want to stand out as your readers scroll down the page. In that case, you could use the new full-bleed image size which stretches right out to the edges of the screen:</p><figure class="kg-card kg-image-card kg-width-full kg-card-hascaption"><img src="https://casper.ghost.org/v1.25.0/images/koenig-demo-2.jpg" class="kg-image" alt loading="lazy"><figcaption>It's wide</figcaption></figure><p>Or maybe you're looking for something in between, which will give you just a little more size to break up the vertical rhythm of the post without dominating the entire screen. If that's the case, you might like the breakout size:</p><figure class="kg-card kg-image-card kg-width-wide kg-card-hascaption"><img src="https://casper.ghost.org/v1.25.0/images/koenig-demo-3.jpg" class="kg-image" alt loading="lazy"><figcaption>It's wider, but not widest</figcaption></figure><p>Each of these sizes can be selected from within the editor, and each will output a number of HTML classes for the theme to do styling with. </p><p>Chances are your theme will need a few small updates to take advantage of the new editor functionality. Some people might also find they need to tweak their theme layout, as the editor canvas previously output a wrapper div around its content – but no longer does. If you rely on that div for styling, you can always add it back again in your theme.</p><p>Oh, we have some nice new image captions, too :)</p><h1 id="what-else">What else?</h1><p>Well, you can still write Markdown, as mentioned. In fact you'll find the entire previous Ghost editor <em>inside</em> this editor. If you want to use it then just go ahead and add a Markdown card and start writing like nothing changed at all:</p><!--kg-card-begin: markdown--><p>Markdown content works just the way it always did, <strong>simply</strong> and <em>beautifully</em>.</p>
<!--kg-card-end: markdown--><p>of course you can embed code blocks</p><pre><code>.new-editor {
display: bock;
}</code></pre><p>or embed things from external services like YouTube...</p><p></p><p>and yeah you can do full HTML if you need to, as well!</p><!--kg-card-begin: html--><div style="background:#fafafa;margin-bottom:1.5em;padding:20px 50px;">
<blink>hello world</blink>
</div><!--kg-card-end: html--><p>So everything works, hopefully, just about how you would expect. It's like the old editor, but faster, cleaner, prettier, and a whole lot more powerful.</p><h1 id="what-do-i-do-with-this-information">What do I do with this information?</h1><p>Preview this post on your site to see if it causes any issues with your theme. Click on the settings cog in the top right ?? corner of the editor, then click on '<strong>Preview</strong>' next to the 'Post URL' input.</p><p>If everything looks good to you then there's nothing you need to do, you're all set! If you spot any issues with your design, or there are some funky display issues, then you might need to make some updates to your theme based on the new editor classes being output.</p><p>Head over to the <a href="https://forum.ghost.org/t/ghost-2-0-theme-compatibility-help-support/2103">Ghost 2.0 Theme Compatibility</a> forum topic to discuss any changes and get help if needed.</p><p>That's it!</p><p>We're looking forward to sharing more about the new editor soon</p> | Hey there! Welcome to the new Ghost editor - affectionately known as Koenig.
Koenig is a brand new writing experience within Ghost, and follows more of a rich writing experience which you've come to expect from the best publishing platforms. Don't worry though! You can still use Markdown too, if that's what you prefer.
Because there are some changes to how Ghost outputs content using its new editor, we dropped this draft post into your latest update to tell you a bit about it – and simultaneously give you a chance to preview how well your theme handles these changes. So after reading this post you should both understand how everything works, and also be able to see if there are any changes you need to make to your theme in order to upgrade to Ghost 2.0.
What's new
The new editor is designed to allow you have a more rich editing experience, so it's no longer limited to just text and formatting options – but it can also handle rich media objects, called cards. You can insert a card either by clicking on the + button on a new line, or typing / on a new line to search for a particular card.
Here's one now:
Fun announcement coming this afternoon ? what could it be?
— Ghost (@TryGhost) August 4, 2016
Cards are rich objects which contain content which is more than just text. To start with there are cards for things like images, markdown, html and embeds — but over time we'll introduce more cards and integrations, as well as allowing you to create your own!
Some examples of possible future cards
* A chart card to display dynamic data visualisations
* A recipe card to show a pre-formatted list of ingredients and instructions
* A Mailchimp card to capture new subscribers with a web form
* A recommended reading card to display a dynamic suggested story based on the current user's reading history
For now, though, we're just getting started with the basics.
New ways to work with images
Perhaps the most notable change to how you're used to interacting with Ghost is in the images. In Koenig, they're both more powerful and easier to work with in the editor itself - and in the theme, they're output slightly differently with different size options.
For instance, here's your plain ol' regular image:
But perhaps you've got a striking panorama that you really want to stand out as your readers scroll down the page. In that case, you could use the new full-bleed image size which stretches right out to the edges of the screen:
Or maybe you're looking for something in between, which will give you just a little more size to break up the vertical rhythm of the post without dominating the entire screen. If that's the case, you might like the breakout size:
Each of these sizes can be selected from within the editor, and each will output a number of HTML classes for the theme to do styling with.
Chances are your theme will need a few small updates to take advantage of the new editor functionality. Some people might also find they need to tweak their theme layout, as the editor canvas previously output a wrapper div around its content – but no longer does. If you rely on that div for styling, you can always add it back again in your theme.
Oh, we have some nice new image captions, too :)
What else?
Well, you can still write Markdown, as mentioned. In fact you'll find the entire previous Ghost editor inside this editor. If you want to use it then just go ahead and add a Markdown card and start writing like nothing changed at all:
Markdown content works just the way it always did, simply and beautifully.
of course you can embed code blocks
.new-editor {
display: bock;
}
or embed things from external services like YouTube...
and yeah you can do full HTML if you need to, as well!
hello world
So everything works, hopefully, just about how you would expect. It's like the old editor, but faster, cleaner, prettier, and a whole lot more powerful.
What do I do with this information?
Preview this post on your site to see if it causes any issues with your theme. Click on the settings cog in the top right ?? corner of the editor, then click on 'Preview' next to the 'Post URL' input.
If everything looks good to you then there's nothing you need to do, you're all set! If you spot any issues with your design, or there are some funky display issues, then you might need to make some updates to your theme based on the new editor classes being output.
Head over to the Ghost 2.0 Theme Compatibility forum topic to discuss any changes and get help if needed.
That's it!
We're looking forward to sharing more about the new editor soon | {"version":"0.3.1","atoms":[],"cards":[["hr",{}],["embed",{"url":"https://twitter.com/TryGhost/status/761119175192420352","html":"<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">Fun announcement coming this afternoon ? what could it be?</p>— Ghost (@TryGhost) <a href=\"https://twitter.com/TryGhost/status/761119175192420352?ref_src=twsrc%5Etfw\">August 4, 2016</a></blockquote>\n<script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>\n","type":"rich"}],["image",{"src":"https://casper.ghost.org/v1.25.0/images/koenig-demo-1.jpg","alt":"","caption":"A regular size image"}],["image",{"src":"https://casper.ghost.org/v1.25.0/images/koenig-demo-2.jpg","alt":"","cardWidth":"full","caption":"It's wide"}],["image",{"src":"https://casper.ghost.org/v1.25.0/images/koenig-demo-3.jpg","alt":"","cardWidth":"wide","caption":"It's wider, but not widest"}],["markdown",{"markdown":"Markdown content works just the way it always did, **simply** and *beautifully*."}],["code",{"code":".new-editor {\n\tdisplay: bock;\n}"}],["html",{"html":"<div style=\"background:#fafafa;margin-bottom:1.5em;padding:20px 50px;\">\n <blink>hello world</blink>\n</div>"}]],"markups":[["strong"],["code"],["em"],["a",["href","https://forum.ghost.org/t/ghost-2-0-theme-compatibility-help-support/2103"]]],"sections":[[1,"p",[[0,[],0,"Hey there! Welcome to the new Ghost editor - affectionately known as "],[0,[0],1,"Koenig"],[0,[],0,"."]]],[1,"p",[[0,[],0,"Koenig is a brand new writing experience within Ghost, and follows more of a rich writing experience which you've come to expect from the best publishing platforms. Don't worry though! You can still use Markdown too, if that's what you prefer."]]],[1,"p",[[0,[],0,"Because there are some changes to how Ghost outputs content using its new editor, we dropped this draft post into your latest update to tell you a bit about it – and simultaneously give you a chance to preview how well your theme handles these changes. So after reading this post you should both understand how everything works, and also be able to see if there are any changes you need to make to your theme in order to upgrade to Ghost 2.0."]]],[10,0],[1,"h1",[[0,[],0,"What's new"]]],[1,"p",[[0,[],0,"The new editor is designed to allow you have a more rich editing experience, so it's no longer limited to just text and formatting options – but it can also handle rich media objects, called cards. You can insert a card either by clicking on the "],[0,[1],1,"+"],[0,[],0," button on a new line, or typing "],[0,[1],1,"/"],[0,[],0," on a new line to search for a particular card. "]]],[1,"p",[[0,[],0,"Here's one now:"]]],[10,1],[1,"p",[[0,[],0,"Cards are rich objects which contain content which is more than just text. To start with there are cards for things like images, markdown, html and embeds — but over time we'll introduce more cards and integrations, as well as allowing you to create your own!"]]],[1,"h2",[[0,[],0,"Some examples of possible future cards"]]],[3,"ul",[[[0,[],0,"A chart card to display dynamic data visualisations"]],[[0,[],0,"A recipe card to show a pre-formatted list of ingredients and instructions"]],[[0,[],0,"A Mailchimp card to capture new subscribers with a web form"]],[[0,[],0,"A recommended reading card to display a dynamic suggested story based on the current user's reading history"]]]],[1,"p",[[0,[],0,"For now, though, we're just getting started with the basics."]]],[1,"h1",[[0,[],0,"New ways to work with images"]]],[1,"p",[[0,[],0,"Perhaps the most notable change to how you're used to interacting with Ghost is in the images. In Koenig, they're both more powerful and easier to work with in the editor itself - and in the theme, they're output slightly differently with different size options."]]],[1,"p",[[0,[],0,"For instance, here's your plain ol' regular image:"]]],[10,2],[1,"p",[[0,[],0,"But perhaps you've got a striking panorama that you really want to stand out as your readers scroll down the page. In that case, you could use the new full-bleed image size which stretches right out to the edges of the screen:"]]],[10,3],[1,"p",[[0,[],0,"Or maybe you're looking for something in between, which will give you just a little more size to break up the vertical rhythm of the post without dominating the entire screen. If that's the case, you might like the breakout size:"]]],[10,4],[1,"p",[[0,[],0,"Each of these sizes can be selected from within the editor, and each will output a number of HTML classes for the theme to do styling with. "]]],[1,"p",[[0,[],0,"Chances are your theme will need a few small updates to take advantage of the new editor functionality. Some people might also find they need to tweak their theme layout, as the editor canvas previously output a wrapper div around its content – but no longer does. If you rely on that div for styling, you can always add it back again in your theme."]]],[1,"p",[[0,[],0,"Oh, we have some nice new image captions, too :)"]]],[1,"h1",[[0,[],0,"What else?"]]],[1,"p",[[0,[],0,"Well, you can still write Markdown, as mentioned. In fact you'll find the entire previous Ghost editor "],[0,[2],1,"inside"],[0,[],0," this editor. If you want to use it then just go ahead and add a Markdown card and start writing like nothing changed at all:"]]],[10,5],[1,"p",[[0,[],0,"of course you can embed code blocks"]]],[10,6],[1,"p",[[0,[],0,"or embed things from external services like YouTube..."]]],[1,"p",[]],[1,"p",[[0,[],0,"and yeah you can do full HTML if you need to, as well!"]]],[10,7],[1,"p",[[0,[],0,"So everything works, hopefully, just about how you would expect. It's like the old editor, but faster, cleaner, prettier, and a whole lot more powerful."]]],[1,"h1",[[0,[],0,"What do I do with this information?"]]],[1,"p",[[0,[],0,"Preview this post on your site to see if it causes any issues with your theme. Click on the settings cog in the top right ?? corner of the editor, then click on '"],[0,[0],1,"Preview"],[0,[],0,"' next to the 'Post URL' input."]]],[1,"p",[[0,[],0,"If everything looks good to you then there's nothing you need to do, you're all set! If you spot any issues with your design, or there are some funky display issues, then you might need to make some updates to your theme based on the new editor classes being output."]]],[1,"p",[[0,[],0,"Head over to the "],[0,[3],1,"Ghost 2.0 Theme Compatibility"],[0,[],0," forum topic to discuss any changes and get help if needed."]]],[1,"p",[[0,[],0,"That's it!"]]],[1,"p",[[0,[],0,"We're looking forward to sharing more about the new editor soon"]]]],"ghostVersion":"3.0"} | 5c525ff5e604c8004fbbd5dd |
post | null | 2016-09-02T03:46:03.000Z | 63873b9a8b1c1e0007f52ee4 | conficker-domain-abuse | 0 | 2018-10-06T08:54:04.000Z | public | published | null | 2016-09-02T08:28:38.000Z | Conficker域名被滥用情况分析 | <!--kg-card-begin: markdown--><p>根据对conficker域名的跟踪,我们发现conficker的域名存在明显的滥用。主要表现为浏览器访问conficker域名后,会跳转到广告页面(既有正常业务,也有赌博/色情等灰色业务),有时候还会存在一些垃圾软件(比如虚假的杀毒软件)的推广等。</p>
<p>由于conficker的DGA域名的巨大数量,我们希望了解产生这种状况的原因以及其现在的规模。</p>
<h2 id="conficker">Conficker域名现状及被滥用状况</h2>
<h3 id="conficker">Conficker简介</h3>
<p>Conficker是出现于2008年11月,曾感染了数百万台电脑。Conficker有一个独特的特性是它使用了DGA技术。利用随机生成的域名来防止网络设备的封堵。自此以后DGA技术也开始逐渐流行起来。关于conficker和DGA的细节,请参考<sup class="footnote-ref"><a href="#fn1" id="fnref1">[1]</a></sup> <sup class="footnote-ref"><a href="#fn2" id="fnref2">[2]</a></sup>。</p>
<h3 id="passviedns">校验数据集及passvieDNS中的命中情况</h3>
<p>我们选取了2010-01-01到2016-09-15这段时间内,由conficker.a 和conficker.b生成的全部的DGA域名作为数据全集,共1225000条域名。</p>
<p>检查这些域名在passiveDNS中的命中情况。排除NXDOMAIN之外,总共命中了216352条。约占总数的17.67%。实际情况中,还有大量的conficker域名返回的是NXDOMAIN,因为并不是所有的conficker域名都被sinkhole。</p>
<p>在这些命中的域名中,按照sinkhole的NS服务器的名字进行区分,每种NS服务器的sinkhole的域名数量分布如下:</p>
<table>
<tr>
<th>Count</th>
<th>Type</th>
<th>NS Server</th>
</tr>
<tr>
<td>1892</td>
<td>parkingdomains</td>
<td>N/A</td>
</tr>
<tr>
<td>23915</td>
<td>cndomains</td>
<td>ns.conficker-sinkhole.cn</td>
</tr>
<tr>
<td>98182</td>
<td>com_net_org_domains</td>
<td>ns.conficker-sinkhole.com/net/org</td>
</tr>
<tr>
<td>15091</td>
<td>opendns_domains</td>
<td>146.112.61.105</td>
</tr>
<tr>
<td>40151</td>
<td>cwgsh_domains</td>
<td>ns.cwgsh.com/net/org</td>
</tr>
<tr>
<td>19731</td>
<td>0xc0f1c3a5_domains</td>
<td>ns.0xc0f1c3a5.com/org</td>
</tr>
<tr>
<td>17390</td>
<td>unclassifed_domain</td>
<td>N/A</td>
</tr>
</table>
<p><img src="__GHOST_URL__/content/images/2016/09/conficker-sinkhole-distribution.png" alt="" loading="lazy"> <em>图1 不同sinkhole所解析的conficker域名分布数量</em></p>
<p>上图列出针对conficker的DGA域名的主要sinkhole占比情况,还有一些很小的sinkhole没有列出来。包括honeybot.us, sinkhole.ru等。由于它们对应的域名的数量很少,不再单独进行分类,统一合并到unclassified类型中。</p>
<p>在unclassified的数据中,除了少量的sinkhole域名以及同样少量的NXDOMAIN被篡改为有效的IP(原因主要是各种ISP的不规范行为)之外,剩余的部分主要是与conficker域名冲突的正常业务的域名。</p>
<p>处于parking/reselling状态的域名则是其NS服务器为parking的NS服务器。<br>
在我们的数据中,ns.conficker-sinkhole.cn与ns.conficker-sinkhole.com/net/org占的数量巨大,占到总份额的56%。是预防conficker扩散的主力军。</p>
<p>ns.cwgsh.com/net/org与ns.0xc0f1c3a5.com/org是由Microsoft及其关联方针对conficker DGA域名的sinkhole。它们的占比也达到了28%。</p>
<p>OpenDNS和传统的sinkhole手段不同,它针对conficker的域名请求,在OpenDNS的resolver上设置了这些域名的黑名单,如果resolver发现请求的域名位列黑名单中,则返回一个提示性页面,这也是使用DNS提供安全服务的一种常见的手段。这个数量如上图所示,大概在7%左右。</p>
<h3 id="">哪些数据被滥用?</h3>
<p>在上面列出的各个种类中,由ns.cwgsh.com/net/org解析的conficker DGA域名是被滥用的主体。</p>
<p>如上一节所提,通过查询WHOIS发现,ns.cwgsh.com/net/org与ns.0xc0f1c3a5.com/org所sinkhole的域名的注册邮箱都是cflicker@live.com。但是注册人分别为“Conficker Cabal/ Microsoft”与” Conficker Holding Account/ Afilias”。另外cwgsh服务的域名注册时间在2009年,0xc0f1c3a5服务的域名注册时间在2011年。它们所解析的域名分别在2010年与2011年有效。另外它们只解析TLD为<strong>org,info</strong>为后缀的conficker域名。</p>
<p>尽管使用的是同一个注册邮箱,但是由于使用的NS服务器不同。它们解析的域名在被滥用方面却并不相同。其实0xc0f1c3a5.org/net/com也存在相应的问题。0xc0f1c3a5.org/net/com当中只有org域名是有效的,com/net两个域名无效。但是由于org域名一直保持更新(AUTORENEWPERIOD),因此它是一个有效的域名,所以它解析的域名解析是正常的。</p>
<p>滥用部分主要集中在NS服务器为ns.cwgsh.com/net/org的conficker域名上。这三个域名是由shandowserver注册的,在注册一年之后(2011-03-04),由于没有续费,NS服务器被切换到NS1/2.RENEWYOURNAME.NET。在此之后,这个域名就处在parking/reselling状态,在不同的注册商之间颠沛流离<sup class="footnote-ref"><a href="#fn3" id="fnref3">[3]</a></sup>。它们负责解析的conficker域名也就无法继续被正常的解析和使用。</p>
<h3 id="">滥用域名的数量</h3>
<p>从conficker域名的生效日期来看,每天的数据量相差不大,只有2010年10月份的数据要稍高一点。如图1所示,滥用规模占整个conficker.a conficker.b的有效记录总数的近20% 。<br>
<img src="__GHOST_URL__/content/images/2016/09/abuse_dn_num.png" alt="" loading="lazy"> <em>图2 滥用的conficker域名的有效日期分布</em></p>
<p>从每个conficker域名的DNS请求量来看,这个数量并不大。访问数量在43以下的,已经占到所有的数据的98.5%。50以下的占到99%。整体来看,访问量比较偏少。<br>
<img src="__GHOST_URL__/content/images/2016/09/DNS-request-number.jpg" alt="" loading="lazy"> <em>图3 滥用的conficker域名的访问量分布</em></p>
<p>从访问来源来看,从2014年10月份开始到2016年8月23日,我们总共看到了5300+个独立的访问源。<br>
从地理位置上来看,主要分布在国内。有少量的欧洲和南美的访问。<br>
<img src="__GHOST_URL__/content/images/2016/09/geo.png" alt="" loading="lazy"> <em>图4 滥用的conficker访问源的地理分布</em></p>
<p>从访问时间来看,最早的数据访问记录在2014年的10月(真实情况可能比这个时间更早)。大规模的访问是从2015年8月中旬开始的。从那时起每日访问的域名平均在1000个左右。访问的日期分布如下:<br>
<img src="__GHOST_URL__/content/images/2016/09/access_count_daily.png" alt="" loading="lazy"> <em>图5 滥用的conficker访问日期分布</em></p>
<h3 id="">访问的原因</h3>
<p>由于被访的Conficker域名生效时间在2010年。在时隔5~6年之后的今天,理论上是不会有conficker的受害用户对这种域名再进行访问的。是什么原因导致产生这种访问呢?<br>
根据我们对DNS请求来源的调查发现,现在每天至少有50~70个独立的用户会发起这些过期域名的请求。并且在这些用户当中,大约有65%~80%的用户即会访问新的(比如2016年当天生成的)conficker域名,同时也会访问2010年老的conficker域名。也就是说大多数的conficker受害用户是产生这种访问的主要原因。至于为什么会有这种怪异的请求出现,现在尚不清楚。另外还有20%~30%的用户则只请求2010年的conficker域名,这部分访问量的产生也需要进一步分析。</p>
<h2 id="">域名接管及后续数据流</h2>
<p>现在我们来了解一下这些conficker域名是如何从sinkhole状态转到给垃圾广告导流的。</p>
<h3 id="">域名的接管</h3>
<p>从DNS角度来看,要接管一个域名,接管它的NS服务器就可以了。这些conficker域名就是这样转变的。</p>
<p>由于conficker的DGA域名的最初的NS服务器NS.CWGSH.COM/NET/ORG这三个域名在2011年2月28日到期之后,没有再进行续费。导致这三个域名就进入了注册商的reselling/parking列表。而使用这些NS服务器的DGA域名(后缀为info/org)的解析状态进入不确定的状态。</p>
<p>就目前(2016.08.30)来看,cwgsh.com是比较“纯粹”的处在saling状态的域名。尽管这个页面上也会放置一些广告。<br>
cwgsh.org现在则是一个XX网站,也比较纯粹。<br>
ns.cwgsh.net是引起conficker转变的根源。它现在作为ns服务器,针对任何请求(合法或者非法的域名),均会返回固定的四条记录(以360.com和一个非法的域名作为例子)。<br>
<img src="__GHOST_URL__/content/images/2016/09/cwgsh.net.jpg" alt="" loading="lazy"> <em>图6 ns.cwgsh.net针对任意请求均返回相同的应答结果</em></p>
<p>不过奇怪的是conficker域名的whois状态貌似在一直更新。并且和2010年主要注册信息(Name,email,organization,address, NS server)比对来看,均没有发生太大的变化。看起来域名所有者一直在保持更新。</p>
<h3 id="">数据流</h3>
<p>是时候来看一下从这些老的conficker域名开始的web数据流向了(针对有些session做了删减,但并不影响整个业务流程)。<br>
<img src="__GHOST_URL__/content/images/2016/09/fiddler.png" alt="" loading="lazy"> <em>图7 conficker的web流程</em></p>
<ol>
<li>lixfley.info是20100408的conficker.a的域名,针对lixfley.info的请求会解析到86.107.110.247(Romania/RO "AS8708 RCS & RDS")。</li>
<li>之后是一个http 302的跳转,跳转到youforgottorenewyourhosting.com。从这个域名的词法来看,它是一个专门用来做过期域名跳转生意的。它对应的IP地址为192.232.208.138(United States/US Houston "AS46606 Unified Layer")。</li>
<li>针对第二条的应答,仍然是一个302跳转,跳转目标为初始域名加一个tclub的前缀。它的应答除了包含常规的流量统计之外(第5条会话的请求),还包含了针对第8条会话的请求,这是它真正下一步的目的地。</li>
<li>在第8条会话中,我们可以看到在它的URL中包含了ww9开头的后接初始请求域名的形式。在sucuri的一篇blog<sup class="footnote-ref"><a href="#fn4" id="fnref4">[4]</a></sup>中提到了ww2后接初始请求的域名形式。事实上这种请求域名形式完全依赖于第三条会话的返回内容。类似的形式包括”in/ww2/ww9/blog”等前缀形式。具体每种形式的前缀的含义现在还不清楚,猜测可能是标识不同的广告系统,另外这个前缀形式也需要体现在DNS的配置当中,具体参见上一节的DNS解析记录。</li>
<li>在从第12条之后的会话过程便是ADnetwork的过程了。整个过程非常复杂,不停地在不同的页面之间进行跳转。上图隐藏的31~88会话均是这个过程。</li>
<li>第80条是整个跳转链的结尾。上图的会话展示的是一个游戏站点。事实上跳转链结尾的站点(也就是广告主)的类型多种多样,既包含正规站点,也包含处于灰色地带的色情站点/虚假杀毒软件等站点。</li>
</ol>
<h3 id="">基础设施</h3>
<p>在针对conficker的DGA域名的滥用过程中,针对第一步跳转IP及这些域名的NS服务器。我们分别对其NS server和IP进行总结:</p>
<p>NS server:<br>
ns[1-4].888dns.net<br>
ns[1-3].dnskarma.com</p>
<p>IP:<br>
195.22.126.212<br>
195.22.126.213<br>
166.78.101.108<br>
213.184.126.162<br>
213.184.126.163<br>
50.57.203.17<br>
5.79.74.75<br>
64.71.74.227<br>
77.247.178.109<br>
86.107.110.247<br>
91.92.110.2</p>
<h1 id="">结论</h1>
<p>这是一起典型的由于NS服务器运营不当,在过期之后被他人接手导致原先这个NS服务器所服务的域名统统被接管的案例。只不过这个NS服务器所解析的域名是conficker的DGA域名,所以它尤显重要,所造成的问题也更显突出。</p>
<p>现在的parking/reselling状态的域名也存在诸多的乱象,很多恶意软件的分发中都存在这部分域名的影子。针对它们的分析也是我们后续工作的重点。</p>
<p>在sinkhole的运作方面也有很多值得思考的问题。后续我们会对不同类别的DGA以及非DGA域名被sinkhole的情况做进一步的分析。</p>
<h1 id="">参考资料</h1>
<hr class="footnotes-sep">
<section class="footnotes">
<ol class="footnotes-list">
<li id="fn1" class="footnote-item"><p><a href="https://en.wikipedia.org/wiki/Conficker">https://en.wikipedia.org/wiki/Conficker</a> <a href="#fnref1" class="footnote-backref">↩︎</a></p>
</li>
<li id="fn2" class="footnote-item"><p><a href="https://en.wikipedia.org/wiki/Domain_generation_algorithm">https://en.wikipedia.org/wiki/Domain_generation_algorithm</a> <a href="#fnref2" class="footnote-backref">↩︎</a></p>
</li>
<li id="fn3" class="footnote-item"><p><a href="https://research.domaintools.com/research/whois-history/search/?q=cwgsh.com#changes">https://research.domaintools.com/research/whois-history/search/?q=cwgsh.com#changes</a> <a href="#fnref3" class="footnote-backref">↩︎</a></p>
</li>
<li id="fn4" class="footnote-item"><p><a href="https://blog.sucuri.net/2016/07/fake-freedns-used-to-redirect-traffic-to-malicious-sites.html">https://blog.sucuri.net/2016/07/fake-freedns-used-to-redirect-traffic-to-malicious-sites.html</a> <a href="#fnref4" class="footnote-backref">↩︎</a></p>
</li>
</ol>
</section>
<!--kg-card-end: markdown--> | 根据对conficker域名的跟踪,我们发现conficker的域名存在明显的滥用。主要表现为浏览器访问conficker域名后,会跳转到广告页面(既有正常业务,也有赌博/色情等灰色业务),有时候还会存在一些垃圾软件(比如虚假的杀毒软件)的推广等。
由于conficker的DGA域名的巨大数量,我们希望了解产生这种状况的原因以及其现在的规模。
Conficker域名现状及被滥用状况
Conficker简介
Conficker是出现于2008年11月,曾感染了数百万台电脑。Conficker有一个独特的特性是它使用了DGA技术。利用随机生成的域名来防止网络设备的封堵。自此以后DGA技术也开始逐渐流行起来。关于conficker和DGA的细节,请参考[1] [2]。
校验数据集及passvieDNS中的命中情况
我们选取了2010-01-01到2016-09-15这段时间内,由conficker.a 和conficker.b生成的全部的DGA域名作为数据全集,共1225000条域名。
检查这些域名在passiveDNS中的命中情况。排除NXDOMAIN之外,总共命中了216352条。约占总数的17.67%。实际情况中,还有大量的conficker域名返回的是NXDOMAIN,因为并不是所有的conficker域名都被sinkhole。
在这些命中的域名中,按照sinkhole的NS服务器的名字进行区分,每种NS服务器的sinkhole的域名数量分布如下:
Count
Type
NS Server
1892
parkingdomains
N/A
23915
cndomains
ns.conficker-sinkhole.cn
98182
com_net_org_domains
ns.conficker-sinkhole.com/net/org
15091
opendns_domains
146.112.61.105
40151
cwgsh_domains
ns.cwgsh.com/net/org
19731
0xc0f1c3a5_domains
ns.0xc0f1c3a5.com/org
17390
unclassifed_domain
N/A
图1 不同sinkhole所解析的conficker域名分布数量
上图列出针对conficker的DGA域名的主要sinkhole占比情况,还有一些很小的sinkhole没有列出来。包括honeybot.us, sinkhole.ru等。由于它们对应的域名的数量很少,不再单独进行分类,统一合并到unclassified类型中。
在unclassified的数据中,除了少量的sinkhole域名以及同样少量的NXDOMAIN被篡改为有效的IP(原因主要是各种ISP的不规范行为)之外,剩余的部分主要是与conficker域名冲突的正常业务的域名。
处于parking/reselling状态的域名则是其NS服务器为parking的NS服务器。
在我们的数据中,ns.conficker-sinkhole.cn与ns.conficker-sinkhole.com/net/org占的数量巨大,占到总份额的56%。是预防conficker扩散的主力军。
ns.cwgsh.com/net/org与ns.0xc0f1c3a5.com/org是由Microsoft及其关联方针对conficker DGA域名的sinkhole。它们的占比也达到了28%。
OpenDNS和传统的sinkhole手段不同,它针对conficker的域名请求,在OpenDNS的resolver上设置了这些域名的黑名单,如果resolver发现请求的域名位列黑名单中,则返回一个提示性页面,这也是使用DNS提供安全服务的一种常见的手段。这个数量如上图所示,大概在7%左右。
哪些数据被滥用?
在上面列出的各个种类中,由ns.cwgsh.com/net/org解析的conficker DGA域名是被滥用的主体。
如上一节所提,通过查询WHOIS发现,ns.cwgsh.com/net/org与ns.0xc0f1c3a5.com/org所sinkhole的域名的注册邮箱都是cflicker@live.com。但是注册人分别为“Conficker Cabal/ Microsoft”与” Conficker Holding Account/ Afilias”。另外cwgsh服务的域名注册时间在2009年,0xc0f1c3a5服务的域名注册时间在2011年。它们所解析的域名分别在2010年与2011年有效。另外它们只解析TLD为org,info为后缀的conficker域名。
尽管使用的是同一个注册邮箱,但是由于使用的NS服务器不同。它们解析的域名在被滥用方面却并不相同。其实0xc0f1c3a5.org/net/com也存在相应的问题。0xc0f1c3a5.org/net/com当中只有org域名是有效的,com/net两个域名无效。但是由于org域名一直保持更新(AUTORENEWPERIOD),因此它是一个有效的域名,所以它解析的域名解析是正常的。
滥用部分主要集中在NS服务器为ns.cwgsh.com/net/org的conficker域名上。这三个域名是由shandowserver注册的,在注册一年之后(2011-03-04),由于没有续费,NS服务器被切换到NS1/2.RENEWYOURNAME.NET。在此之后,这个域名就处在parking/reselling状态,在不同的注册商之间颠沛流离[3]。它们负责解析的conficker域名也就无法继续被正常的解析和使用。
滥用域名的数量
从conficker域名的生效日期来看,每天的数据量相差不大,只有2010年10月份的数据要稍高一点。如图1所示,滥用规模占整个conficker.a conficker.b的有效记录总数的近20% 。
图2 滥用的conficker域名的有效日期分布
从每个conficker域名的DNS请求量来看,这个数量并不大。访问数量在43以下的,已经占到所有的数据的98.5%。50以下的占到99%。整体来看,访问量比较偏少。
图3 滥用的conficker域名的访问量分布
从访问来源来看,从2014年10月份开始到2016年8月23日,我们总共看到了5300+个独立的访问源。
从地理位置上来看,主要分布在国内。有少量的欧洲和南美的访问。
图4 滥用的conficker访问源的地理分布
从访问时间来看,最早的数据访问记录在2014年的10月(真实情况可能比这个时间更早)。大规模的访问是从2015年8月中旬开始的。从那时起每日访问的域名平均在1000个左右。访问的日期分布如下:
图5 滥用的conficker访问日期分布
访问的原因
由于被访的Conficker域名生效时间在2010年。在时隔5~6年之后的今天,理论上是不会有conficker的受害用户对这种域名再进行访问的。是什么原因导致产生这种访问呢?
根据我们对DNS请求来源的调查发现,现在每天至少有50~70个独立的用户会发起这些过期域名的请求。并且在这些用户当中,大约有65%~80%的用户即会访问新的(比如2016年当天生成的)conficker域名,同时也会访问2010年老的conficker域名。也就是说大多数的conficker受害用户是产生这种访问的主要原因。至于为什么会有这种怪异的请求出现,现在尚不清楚。另外还有20%~30%的用户则只请求2010年的conficker域名,这部分访问量的产生也需要进一步分析。
域名接管及后续数据流
现在我们来了解一下这些conficker域名是如何从sinkhole状态转到给垃圾广告导流的。
域名的接管
从DNS角度来看,要接管一个域名,接管它的NS服务器就可以了。这些conficker域名就是这样转变的。
由于conficker的DGA域名的最初的NS服务器NS.CWGSH.COM/NET/ORG这三个域名在2011年2月28日到期之后,没有再进行续费。导致这三个域名就进入了注册商的reselling/parking列表。而使用这些NS服务器的DGA域名(后缀为info/org)的解析状态进入不确定的状态。
就目前(2016.08.30)来看,cwgsh.com是比较“纯粹”的处在saling状态的域名。尽管这个页面上也会放置一些广告。
cwgsh.org现在则是一个XX网站,也比较纯粹。
ns.cwgsh.net是引起conficker转变的根源。它现在作为ns服务器,针对任何请求(合法或者非法的域名),均会返回固定的四条记录(以360.com和一个非法的域名作为例子)。
图6 ns.cwgsh.net针对任意请求均返回相同的应答结果
不过奇怪的是conficker域名的whois状态貌似在一直更新。并且和2010年主要注册信息(Name,email,organization,address, NS server)比对来看,均没有发生太大的变化。看起来域名所有者一直在保持更新。
数据流
是时候来看一下从这些老的conficker域名开始的web数据流向了(针对有些session做了删减,但并不影响整个业务流程)。
图7 conficker的web流程
1. lixfley.info是20100408的conficker.a的域名,针对lixfley.info的请求会解析到86.107.110.247(Romania/RO "AS8708 RCS & RDS")。
2. 之后是一个http 302的跳转,跳转到youforgottorenewyourhosting.com。从这个域名的词法来看,它是一个专门用来做过期域名跳转生意的。它对应的IP地址为192.232.208.138(United States/US Houston "AS46606 Unified Layer")。
3. 针对第二条的应答,仍然是一个302跳转,跳转目标为初始域名加一个tclub的前缀。它的应答除了包含常规的流量统计之外(第5条会话的请求),还包含了针对第8条会话的请求,这是它真正下一步的目的地。
4. 在第8条会话中,我们可以看到在它的URL中包含了ww9开头的后接初始请求域名的形式。在sucuri的一篇blog[4]中提到了ww2后接初始请求的域名形式。事实上这种请求域名形式完全依赖于第三条会话的返回内容。类似的形式包括”in/ww2/ww9/blog”等前缀形式。具体每种形式的前缀的含义现在还不清楚,猜测可能是标识不同的广告系统,另外这个前缀形式也需要体现在DNS的配置当中,具体参见上一节的DNS解析记录。
5. 在从第12条之后的会话过程便是ADnetwork的过程了。整个过程非常复杂,不停地在不同的页面之间进行跳转。上图隐藏的31~88会话均是这个过程。
6. 第80条是整个跳转链的结尾。上图的会话展示的是一个游戏站点。事实上跳转链结尾的站点(也就是广告主)的类型多种多样,既包含正规站点,也包含处于灰色地带的色情站点/虚假杀毒软件等站点。
基础设施
在针对conficker的DGA域名的滥用过程中,针对第一步跳转IP及这些域名的NS服务器。我们分别对其NS server和IP进行总结:
NS server:
ns[1-4].888dns.net
ns[1-3].dnskarma.com
IP:
195.22.126.212
195.22.126.213
166.78.101.108
213.184.126.162
213.184.126.163
50.57.203.17
5.79.74.75
64.71.74.227
77.247.178.109
86.107.110.247
91.92.110.2
结论
这是一起典型的由于NS服务器运营不当,在过期之后被他人接手导致原先这个NS服务器所服务的域名统统被接管的案例。只不过这个NS服务器所解析的域名是conficker的DGA域名,所以它尤显重要,所造成的问题也更显突出。
现在的parking/reselling状态的域名也存在诸多的乱象,很多恶意软件的分发中都存在这部分域名的影子。针对它们的分析也是我们后续工作的重点。
在sinkhole的运作方面也有很多值得思考的问题。后续我们会对不同类别的DGA以及非DGA域名被sinkhole的情况做进一步的分析。
参考资料
1. https://en.wikipedia.org/wiki/Conficker ↩︎
2. https://en.wikipedia.org/wiki/Domain_generation_algorithm ↩︎
3. https://research.domaintools.com/research/whois-history/search/?q=cwgsh.com#changes ↩︎
4. https://blog.sucuri.net/2016/07/fake-freedns-used-to-redirect-traffic-to-malicious-sites.html ↩︎
| {"version":"0.3.1","markups":[],"atoms":[],"cards":[["markdown",{"cardName":"card-markdown","markdown":"根据对conficker域名的跟踪,我们发现conficker的域名存在明显的滥用。主要表现为浏览器访问conficker域名后,会跳转到广告页面(既有正常业务,也有赌博/色情等灰色业务),有时候还会存在一些垃圾软件(比如虚假的杀毒软件)的推广等。\n\n由于conficker的DGA域名的巨大数量,我们希望了解产生这种状况的原因以及其现在的规模。\n\n##Conficker域名现状及被滥用状况\n\n###Conficker简介\nConficker是出现于2008年11月,曾感染了数百万台电脑。Conficker有一个独特的特性是它使用了DGA技术。利用随机生成的域名来防止网络设备的封堵。自此以后DGA技术也开始逐渐流行起来。关于conficker和DGA的细节,请参考[^1] [^2]。\n\n###校验数据集及passvieDNS中的命中情况\n\n我们选取了2010-01-01到2016-09-15这段时间内,由conficker.a 和conficker.b生成的全部的DGA域名作为数据全集,共1225000条域名。\n\n检查这些域名在passiveDNS中的命中情况。排除NXDOMAIN之外,总共命中了216352条。约占总数的17.67%。实际情况中,还有大量的conficker域名返回的是NXDOMAIN,因为并不是所有的conficker域名都被sinkhole。\n\n在这些命中的域名中,按照sinkhole的NS服务器的名字进行区分,每种NS服务器的sinkhole的域名数量分布如下:\n<table>\n<tr>\n<th>Count</th>\n<th>Type</th>\n<th>NS Server</th>\n</tr>\n\n<tr>\n<td>1892</td>\n<td>parkingdomains</td>\n<td>N/A</td>\n</tr>\n\n<tr>\n<td>23915</td>\n<td>cndomains</td>\n<td>ns.conficker-sinkhole.cn</td>\n</tr>\n\n<tr>\n<td>98182</td>\n<td>com_net_org_domains</td>\n<td>ns.conficker-sinkhole.com/net/org</td>\n</tr>\n\n<tr>\n<td>15091</td>\n<td>opendns_domains</td>\n<td>146.112.61.105</td>\n</tr>\n\n<tr>\n<td>40151</td>\n<td>cwgsh_domains</td>\n<td>ns.cwgsh.com/net/org</td>\n</tr>\n\n<tr>\n<td>19731</td>\n<td>0xc0f1c3a5_domains</td>\n<td>ns.0xc0f1c3a5.com/org</td>\n</tr>\n\n<tr>\n<td>17390</td>\n<td>unclassifed_domain</td>\n<td>N/A</td>\n</tr>\n</table>\n\n![](__GHOST_URL__/content/images/2016/09/conficker-sinkhole-distribution.png) *图1 不同sinkhole所解析的conficker域名分布数量*\n\n上图列出针对conficker的DGA域名的主要sinkhole占比情况,还有一些很小的sinkhole没有列出来。包括honeybot.us, sinkhole.ru等。由于它们对应的域名的数量很少,不再单独进行分类,统一合并到unclassified类型中。\n\n在unclassified的数据中,除了少量的sinkhole域名以及同样少量的NXDOMAIN被篡改为有效的IP(原因主要是各种ISP的不规范行为)之外,剩余的部分主要是与conficker域名冲突的正常业务的域名。\n\n处于parking/reselling状态的域名则是其NS服务器为parking的NS服务器。\n在我们的数据中,ns.conficker-sinkhole.cn与ns.conficker-sinkhole.com/net/org占的数量巨大,占到总份额的56%。是预防conficker扩散的主力军。\n\nns.cwgsh.com/net/org与ns.0xc0f1c3a5.com/org是由Microsoft及其关联方针对conficker DGA域名的sinkhole。它们的占比也达到了28%。\n\nOpenDNS和传统的sinkhole手段不同,它针对conficker的域名请求,在OpenDNS的resolver上设置了这些域名的黑名单,如果resolver发现请求的域名位列黑名单中,则返回一个提示性页面,这也是使用DNS提供安全服务的一种常见的手段。这个数量如上图所示,大概在7%左右。\n\n###哪些数据被滥用?\n在上面列出的各个种类中,由ns.cwgsh.com/net/org解析的conficker DGA域名是被滥用的主体。\n\n如上一节所提,通过查询WHOIS发现,ns.cwgsh.com/net/org与ns.0xc0f1c3a5.com/org所sinkhole的域名的注册邮箱都是cflicker@live.com。但是注册人分别为“Conficker Cabal/ Microsoft”与” Conficker Holding Account/ Afilias”。另外cwgsh服务的域名注册时间在2009年,0xc0f1c3a5服务的域名注册时间在2011年。它们所解析的域名分别在2010年与2011年有效。另外它们只解析TLD为**org,info**为后缀的conficker域名。\n\n尽管使用的是同一个注册邮箱,但是由于使用的NS服务器不同。它们解析的域名在被滥用方面却并不相同。其实0xc0f1c3a5.org/net/com也存在相应的问题。0xc0f1c3a5.org/net/com当中只有org域名是有效的,com/net两个域名无效。但是由于org域名一直保持更新(AUTORENEWPERIOD),因此它是一个有效的域名,所以它解析的域名解析是正常的。\n\n滥用部分主要集中在NS服务器为ns.cwgsh.com/net/org的conficker域名上。这三个域名是由shandowserver注册的,在注册一年之后(2011-03-04),由于没有续费,NS服务器被切换到NS1/2.RENEWYOURNAME.NET。在此之后,这个域名就处在parking/reselling状态,在不同的注册商之间颠沛流离[^3]。它们负责解析的conficker域名也就无法继续被正常的解析和使用。\n\n###滥用域名的数量\n从conficker域名的生效日期来看,每天的数据量相差不大,只有2010年10月份的数据要稍高一点。如图1所示,滥用规模占整个conficker.a conficker.b的有效记录总数的近20% 。\n![](__GHOST_URL__/content/images/2016/09/abuse_dn_num.png) *图2 滥用的conficker域名的有效日期分布*\n\n从每个conficker域名的DNS请求量来看,这个数量并不大。访问数量在43以下的,已经占到所有的数据的98.5%。50以下的占到99%。整体来看,访问量比较偏少。\n![](__GHOST_URL__/content/images/2016/09/DNS-request-number.jpg) *图3 滥用的conficker域名的访问量分布*\n\n从访问来源来看,从2014年10月份开始到2016年8月23日,我们总共看到了5300+个独立的访问源。\n从地理位置上来看,主要分布在国内。有少量的欧洲和南美的访问。\n![](__GHOST_URL__/content/images/2016/09/geo.png) *图4 滥用的conficker访问源的地理分布*\n\n从访问时间来看,最早的数据访问记录在2014年的10月(真实情况可能比这个时间更早)。大规模的访问是从2015年8月中旬开始的。从那时起每日访问的域名平均在1000个左右。访问的日期分布如下:\n![](__GHOST_URL__/content/images/2016/09/access_count_daily.png) *图5 滥用的conficker访问日期分布*\n\n###访问的原因\n\n由于被访的Conficker域名生效时间在2010年。在时隔5~6年之后的今天,理论上是不会有conficker的受害用户对这种域名再进行访问的。是什么原因导致产生这种访问呢?\n根据我们对DNS请求来源的调查发现,现在每天至少有50~70个独立的用户会发起这些过期域名的请求。并且在这些用户当中,大约有65%~80%的用户即会访问新的(比如2016年当天生成的)conficker域名,同时也会访问2010年老的conficker域名。也就是说大多数的conficker受害用户是产生这种访问的主要原因。至于为什么会有这种怪异的请求出现,现在尚不清楚。另外还有20%~30%的用户则只请求2010年的conficker域名,这部分访问量的产生也需要进一步分析。\n\n##域名接管及后续数据流\n现在我们来了解一下这些conficker域名是如何从sinkhole状态转到给垃圾广告导流的。\n###域名的接管\n从DNS角度来看,要接管一个域名,接管它的NS服务器就可以了。这些conficker域名就是这样转变的。\n\n由于conficker的DGA域名的最初的NS服务器NS.CWGSH.COM/NET/ORG这三个域名在2011年2月28日到期之后,没有再进行续费。导致这三个域名就进入了注册商的reselling/parking列表。而使用这些NS服务器的DGA域名(后缀为info/org)的解析状态进入不确定的状态。\n\n就目前(2016.08.30)来看,cwgsh.com是比较“纯粹”的处在saling状态的域名。尽管这个页面上也会放置一些广告。\ncwgsh.org现在则是一个XX网站,也比较纯粹。\nns.cwgsh.net是引起conficker转变的根源。它现在作为ns服务器,针对任何请求(合法或者非法的域名),均会返回固定的四条记录(以360.com和一个非法的域名作为例子)。\n![](__GHOST_URL__/content/images/2016/09/cwgsh.net.jpg) *图6 ns.cwgsh.net针对任意请求均返回相同的应答结果*\n\n不过奇怪的是conficker域名的whois状态貌似在一直更新。并且和2010年主要注册信息(Name,email,organization,address, NS server)比对来看,均没有发生太大的变化。看起来域名所有者一直在保持更新。\n\n###数据流\n是时候来看一下从这些老的conficker域名开始的web数据流向了(针对有些session做了删减,但并不影响整个业务流程)。\n![](__GHOST_URL__/content/images/2016/09/fiddler.png) *图7 conficker的web流程*\n\n1.\tlixfley.info是20100408的conficker.a的域名,针对lixfley.info的请求会解析到86.107.110.247(Romania/RO\t\"AS8708 RCS & RDS\")。\n2.\t之后是一个http 302的跳转,跳转到youforgottorenewyourhosting.com。从这个域名的词法来看,它是一个专门用来做过期域名跳转生意的。它对应的IP地址为192.232.208.138(United States/US Houston\t\"AS46606 Unified Layer\")。\n3.\t针对第二条的应答,仍然是一个302跳转,跳转目标为初始域名加一个tclub的前缀。它的应答除了包含常规的流量统计之外(第5条会话的请求),还包含了针对第8条会话的请求,这是它真正下一步的目的地。\n4.\t在第8条会话中,我们可以看到在它的URL中包含了ww9开头的后接初始请求域名的形式。在sucuri的一篇blog[^4]中提到了ww2后接初始请求的域名形式。事实上这种请求域名形式完全依赖于第三条会话的返回内容。类似的形式包括”in/ww2/ww9/blog”等前缀形式。具体每种形式的前缀的含义现在还不清楚,猜测可能是标识不同的广告系统,另外这个前缀形式也需要体现在DNS的配置当中,具体参见上一节的DNS解析记录。\n5.\t在从第12条之后的会话过程便是ADnetwork的过程了。整个过程非常复杂,不停地在不同的页面之间进行跳转。上图隐藏的31~88会话均是这个过程。\n6.\t第80条是整个跳转链的结尾。上图的会话展示的是一个游戏站点。事实上跳转链结尾的站点(也就是广告主)的类型多种多样,既包含正规站点,也包含处于灰色地带的色情站点/虚假杀毒软件等站点。\n\n###基础设施\n在针对conficker的DGA域名的滥用过程中,针对第一步跳转IP及这些域名的NS服务器。我们分别对其NS server和IP进行总结:\n\nNS server:\nns[1-4].888dns.net\nns[1-3].dnskarma.com\n\nIP: \n195.22.126.212\n195.22.126.213 \n166.78.101.108\n213.184.126.162\n213.184.126.163\n50.57.203.17\n5.79.74.75\n64.71.74.227\n77.247.178.109\n86.107.110.247\n91.92.110.2\n\n#结论\n这是一起典型的由于NS服务器运营不当,在过期之后被他人接手导致原先这个NS服务器所服务的域名统统被接管的案例。只不过这个NS服务器所解析的域名是conficker的DGA域名,所以它尤显重要,所造成的问题也更显突出。\n\n现在的parking/reselling状态的域名也存在诸多的乱象,很多恶意软件的分发中都存在这部分域名的影子。针对它们的分析也是我们后续工作的重点。\n\n在sinkhole的运作方面也有很多值得思考的问题。后续我们会对不同类别的DGA以及非DGA域名被sinkhole的情况做进一步的分析。\n\n#参考资料\n[^1]: https://en.wikipedia.org/wiki/Conficker\n[^2]: https://en.wikipedia.org/wiki/Domain\\_generation_algorithm\n[^3]: https://research.domaintools.com/research/whois-history/search/?q=cwgsh.com#changes\n[^4]: https://blog.sucuri.net/2016/07/fake-freedns-used-to-redirect-traffic-to-malicious-sites.html\n"}]],"sections":[[10,0]],"ghostVersion":"3.0"} | 8 |
post | null | 2016-09-02T03:50:47.000Z | 63873b9a8b1c1e0007f52ee5 | cldap-is-now-the-3rd-reflection-amplified-ddos-attack-vector-surpassing-ssdp-and-chargen-en | 0 | 2021-05-08T05:10:18.000Z | public | published | null | 2017-11-01T10:14:35.000Z | CLDAP is Now the No.3 Reflection Amplified DDoS Attack Vector, Surpassing SSDP and CharGen | <!--kg-card-begin: markdown--><p>Author: Xu Yang,kenshin</p>
<p>With our <a href="https://ddosmon.net/">DDoSMon</a>, we are able to perform continuous and near real-time monitoring on global DDoS attacks. For quite a long time, DNS, NTP, CharGen and SSDP have been the most frequently abused services in DDoS reflection amplification attacks. They rank respectively 1st, 2nd, 3rd and 4th in the last 365 days.</p>
<p>Recently, we noticed that CLDAP-based reflection amplification attacks (hereinafter referred to as CLDAP attack) have surpassed SSDP and CharGEN as the third biggest reflective DDoS attack vector. The figures below display the percentage of CLDAP attacks in the last 365 and 90 days among all reflective amplification DDoS attacks:</p>
<p><img src="__GHOST_URL__/content/images/2017/11/CLDAP_share_comparation_365day_90day.png" alt="" loading="lazy"></p>
<p>(Source: <a href="https://ddosmon.net">DDoSMon</a>. The <a href="https://ddosmon.net/insight">Insight</a> web page on this site covers most of the data in this blog.)</p>
<p>CLDAP attack first appeared in the end of October last year, just a year ago. In this blog, we look at the rise of the CLDAP attack:</p>
<ul>
<li>Over the last 365 days, we have observed a total of 304,146 CLDAP reflection amplification attacks involving 215,229 unique IPs.</li>
<li>In the last three months, CLDAP attack has entered into a new stage, the number of CLDAP attacks in the last three months has reached to 168k (11.2%), slightly more than CharGen attack(164k, 11%), and much more than SSDP attack (70k, 4.4%).</li>
</ul>
<p>Our <a href="http://data.netlab.360.com/drdos-reflector/">DRDoS data feed</a> at our <a href="http://data.netlab.360.com/">OpenData page</a> maintain a list of top reflector IPs being used in the last 30 days, security researchers can contact <a href="emailto:netlab@360.cn">netlab@360.cn</a> to apply for free feed download.</p>
<h3 id="stagesofattackevolution">Stages of Attack Evolution</h3>
<p><img src="__GHOST_URL__/content/images/2017/11/cldap_trend_last_year-2.png" alt="" loading="lazy"></p>
<p>The above figure shows last years’ weekly counts of CLDAP reflection attack.</p>
<p>We can divide CLDAP attack activity into three stages:</p>
<ul>
<li>Initial stage: 2016-10 ~ 2017-04, about 1000 attacks per week on average</li>
<li>The first climbing stage: 2017-04 ~ 2017-08, about 6000 attacks per week on average</li>
<li>The second climbing stage: 2017-08 ~ now, about 15000 attacks per week on average</li>
</ul>
<p>From the above statistics, you can see that CLDAP has become one of the workhorses in DDoS attack.</p>
<p>We also extracted all the LDAP reflector IPs that had been used in ddos attacks, did a month to month comparison, and generated the following diagram.<br>
From the diagram, you can tell that the overlap rate of CLDAP ips has been going up and getting stable at around 40%.</p>
<p><img src="__GHOST_URL__/content/images/2017/11/reflector_comparation_by_month.png" alt="" loading="lazy"></p>
<h3 id="attackvectors">Attack Vectors</h3>
<p>In all attacks involving CLDAP, over 84% are CLDAP only, with no other combined attacking vector. There are also some other combinations, which be seen as below.</p>
<p><img src="__GHOST_URL__/content/images/2017/11/attack_vector_distribution.png" alt="" loading="lazy"></p>
<h3 id="attackingduration">Attacking Duration</h3>
<p>The duration of CLDAP attack varies: the shortest attack was less than 1 minute, and the longest one lasted more than 3 days. As shown in the figure below, the attack time span at 1, 2 and 3 standard deviations (68%, 95%, 99.7%) are respectively 30 minutes, 10 hours and 24 hours.</p>
<p><img src="__GHOST_URL__/content/images/2017/11/attack_duration_distribution.png" alt="" loading="lazy"></p>
<p>The 3-days attack mentioned above occurred from 2017-09-24 15:00:00 to 2017-09-28 09:00:00. The victim IP address, 151.<em><strong>.</strong></em>.15 belongs to a CDN service provider.</p>
<p><img src="__GHOST_URL__/content/images/2017/11/a_3_days_CLDAP_attack.png" alt="" loading="lazy"></p>
<h3 id="destinationports">Destination Ports</h3>
<p>The distribution of the victim's destination port is shown in the following table:</p>
<ul>
<li>In most cases(96.5%) of CLDAP attack, the destination ports are randomized. This is consistent with other reflection amplified DDoS attacks.</li>
<li>Note port 26383 stands out, which is not a commonly used service port, we suspect a particular CLDAP attack toolkit gets reused all the time by different attackers, or maybe there is big CLDAP attack provider somewhere.</li>
</ul>
<p><img src="__GHOST_URL__/content/images/2017/11/dst_port_distribution.png" alt="" loading="lazy"></p>
<!--kg-card-end: markdown--> | Author: Xu Yang,kenshin
With our DDoSMon, we are able to perform continuous and near real-time monitoring on global DDoS attacks. For quite a long time, DNS, NTP, CharGen and SSDP have been the most frequently abused services in DDoS reflection amplification attacks. They rank respectively 1st, 2nd, 3rd and 4th in the last 365 days.
Recently, we noticed that CLDAP-based reflection amplification attacks (hereinafter referred to as CLDAP attack) have surpassed SSDP and CharGEN as the third biggest reflective DDoS attack vector. The figures below display the percentage of CLDAP attacks in the last 365 and 90 days among all reflective amplification DDoS attacks:
(Source: DDoSMon. The Insight web page on this site covers most of the data in this blog.)
CLDAP attack first appeared in the end of October last year, just a year ago. In this blog, we look at the rise of the CLDAP attack:
* Over the last 365 days, we have observed a total of 304,146 CLDAP reflection amplification attacks involving 215,229 unique IPs.
* In the last three months, CLDAP attack has entered into a new stage, the number of CLDAP attacks in the last three months has reached to 168k (11.2%), slightly more than CharGen attack(164k, 11%), and much more than SSDP attack (70k, 4.4%).
Our DRDoS data feed at our OpenData page maintain a list of top reflector IPs being used in the last 30 days, security researchers can contact netlab@360.cn to apply for free feed download.
Stages of Attack Evolution
The above figure shows last years’ weekly counts of CLDAP reflection attack.
We can divide CLDAP attack activity into three stages:
* Initial stage: 2016-10 ~ 2017-04, about 1000 attacks per week on average
* The first climbing stage: 2017-04 ~ 2017-08, about 6000 attacks per week on average
* The second climbing stage: 2017-08 ~ now, about 15000 attacks per week on average
From the above statistics, you can see that CLDAP has become one of the workhorses in DDoS attack.
We also extracted all the LDAP reflector IPs that had been used in ddos attacks, did a month to month comparison, and generated the following diagram.
From the diagram, you can tell that the overlap rate of CLDAP ips has been going up and getting stable at around 40%.
Attack Vectors
In all attacks involving CLDAP, over 84% are CLDAP only, with no other combined attacking vector. There are also some other combinations, which be seen as below.
Attacking Duration
The duration of CLDAP attack varies: the shortest attack was less than 1 minute, and the longest one lasted more than 3 days. As shown in the figure below, the attack time span at 1, 2 and 3 standard deviations (68%, 95%, 99.7%) are respectively 30 minutes, 10 hours and 24 hours.
The 3-days attack mentioned above occurred from 2017-09-24 15:00:00 to 2017-09-28 09:00:00. The victim IP address, 151...15 belongs to a CDN service provider.
Destination Ports
The distribution of the victim's destination port is shown in the following table:
* In most cases(96.5%) of CLDAP attack, the destination ports are randomized. This is consistent with other reflection amplified DDoS attacks.
* Note port 26383 stands out, which is not a commonly used service port, we suspect a particular CLDAP attack toolkit gets reused all the time by different attackers, or maybe there is big CLDAP attack provider somewhere.
| {"version":"0.3.1","markups":[],"atoms":[],"cards":[["markdown",{"cardName":"card-markdown","markdown":"Author: Xu Yang,kenshin\n\n\nWith our [DDoSMon](https://ddosmon.net/), we are able to perform continuous and near real-time monitoring on global DDoS attacks. For quite a long time, DNS, NTP, CharGen and SSDP have been the most frequently abused services in DDoS reflection amplification attacks. They rank respectively 1st, 2nd, 3rd and 4th in the last 365 days.\n\nRecently, we noticed that CLDAP-based reflection amplification attacks (hereinafter referred to as CLDAP attack) have surpassed SSDP and CharGEN as the third biggest reflective DDoS attack vector. The figures below display the percentage of CLDAP attacks in the last 365 and 90 days among all reflective amplification DDoS attacks:\n\n![](__GHOST_URL__/content/images/2017/11/CLDAP_share_comparation_365day_90day.png)\n\n(Source: [DDoSMon](https://ddosmon.net). The [Insight](https://ddosmon.net/insight) web page on this site covers most of the data in this blog.)\n\nCLDAP attack first appeared in the end of October last year, just a year ago. In this blog, we look at the rise of the CLDAP attack:\n\n* Over the last 365 days, we have observed a total of 304,146 CLDAP reflection amplification attacks involving 215,229 unique IPs.\n* In the last three months, CLDAP attack has entered into a new stage, the number of CLDAP attacks in the last three months has reached to 168k (11.2%), slightly more than CharGen attack(164k, 11%), and much more than SSDP attack (70k, 4.4%).\n\n\nOur [DRDoS data feed](http://data.netlab.360.com/drdos-reflector/) at our [OpenData page](http://data.netlab.360.com/) maintain a list of top reflector IPs being used in the last 30 days, security researchers can contact [netlab@360.cn](emailto:netlab@360.cn) to apply for free feed download.\n\n###Stages of Attack Evolution\n\n![](__GHOST_URL__/content/images/2017/11/cldap_trend_last_year-2.png)\n\nThe above figure shows last years’ weekly counts of CLDAP reflection attack.\n\nWe can divide CLDAP attack activity into three stages:\n\n\n* Initial stage: 2016-10 ~ 2017-04, about 1000 attacks per week on average\n* The first climbing stage: 2017-04 ~ 2017-08, about 6000 attacks per week on average\n* The second climbing stage: 2017-08 ~ now, about 15000 attacks per week on average\n\nFrom the above statistics, you can see that CLDAP has become one of the workhorses in DDoS attack.\n\nWe also extracted all the LDAP reflector IPs that had been used in ddos attacks, did a month to month comparison, and generated the following diagram.\nFrom the diagram, you can tell that the overlap rate of CLDAP ips has been going up and getting stable at around 40%.\n\n\n![](__GHOST_URL__/content/images/2017/11/reflector_comparation_by_month.png)\n\n\n###Attack Vectors\n \nIn all attacks involving CLDAP, over 84% are CLDAP only, with no other combined attacking vector. There are also some other combinations, which be seen as below.\n\n![](__GHOST_URL__/content/images/2017/11/attack_vector_distribution.png)\n\n###Attacking Duration\n\nThe duration of CLDAP attack varies: the shortest attack was less than 1 minute, and the longest one lasted more than 3 days. As shown in the figure below, the attack time span at 1, 2 and 3 standard deviations (68%, 95%, 99.7%) are respectively 30 minutes, 10 hours and 24 hours.\n\n![](__GHOST_URL__/content/images/2017/11/attack_duration_distribution.png)\n\nThe 3-days attack mentioned above occurred from 2017-09-24 15:00:00 to 2017-09-28 09:00:00. The victim IP address, 151.***.***.15 belongs to a CDN service provider.\n\n![](__GHOST_URL__/content/images/2017/11/a_3_days_CLDAP_attack.png)\n\n\n###Destination Ports\nThe distribution of the victim's destination port is shown in the following table:\n\n* In most cases(96.5%) of CLDAP attack, the destination ports are randomized. This is consistent with other reflection amplified DDoS attacks.\n* Note port 26383 stands out, which is not a commonly used service port, we suspect a particular CLDAP attack toolkit gets reused all the time by different attackers, or maybe there is big CLDAP attack provider somewhere.\n\n![](__GHOST_URL__/content/images/2017/11/dst_port_distribution.png)"}]],"sections":[[10,0]],"ghostVersion":"3.0"} | 12 |
post | null | 2016-09-02T06:44:58.000Z | 63873b9a8b1c1e0007f52ee6 | new-elknot-billgates-variant-with-xor-like-c2-configuration-encryption-scheme | 0 | 2018-10-06T08:53:33.000Z | public | published | null | 2016-09-02T07:46:45.000Z | New Elknot/Billgates Variant with XOR like C2 Configuration Encryption Scheme | <!--kg-card-begin: markdown--><h1 id="overview">Overview</h1>
<p>Elknot is a notorious DDoS botnet family which runs on both Linux and Windows platforms <a href="https://www.botconf.eu/wp-content/uploads/2014/12/2014-2.10-Chinese-Chicken-Multiplatform-DDoS-Botnets.pdf">[1]</a> <a href="http://blog.malwaremustdie.org/2014/11/china-elf-botnet-malware-infection.html">[2]</a> <a href="https://thisissecurity.net/2015/09/30/when-elf-BillGates-met-windows/">[3]</a> <a href="http://www.novetta.com/wp-content/uploads/2015/06/NTRG_ElasticBotnetReport_06102015.pdf">[4]</a>. Multiple variants have been found since its first appearance, while the most infamous variant is called BillGates by many researchers because of its characteristic use of Bill and Gates modules <a href="http://www.kernelmode.info/forum/viewtopic.php?f=16&t=3099">[5]</a>. Besides that this variant is also highlighted in using the school-book style of RSA encryption to hide its C2 configurations including server, port, campaign name, etc. The plain configuration is made up of one or more C2 lines, with each line having the format of "<em>< C2 ip or domain >:< C2 port >:< Is Listener ?>: < IsService ?>: < Campaign Name >:< Enable Backdoor ?></em> "<a href="https://www.akamai.com/us/en/multimedia/documents/state-of-the-internet/bill-gates-botnet-threat-advisory.pdf">[6]</a>.</p>
<p>In September 2015, we found a new elknot/BillGates variant which uses a new C2 encryption scheme while keeps the old DDoS attack functions and C&C protocols.</p>
<p>This article will discuss the new elknot/BillGates variant with a focus on the updates from the previous one. The analysis work is mainly based on the following 2 samples:</p>
<ul>
<li>md5: 2579aa65a28c32778790ec1c673abc49, type: ELF32:Intel80386:UNIX-SystemV.</li>
<li>md5: 474429d9da170e733213940acc9a2b1c, type: ftype=ELF32:Intel80386:UNIX-SystemV.</li>
</ul>
<h1 id="newencryptionscheme">New Encryption Scheme</h1>
<p>In the previous version of Elknot/BillGates samples RSA cipher text and parameters are stored in hex format string, which can be easily extracted with Linux utility like <em>strings</em>. To get the further plain C2 information what you need to do is just inputting the extracted cipher text to a RSA decryption tool which can be easily obtained on Internet. Since it’s not this article’s emphasis so we skip it. We have developed such a C2 extraction solution which works well on all collected BillGates samples.</p>
<p><img src="__GHOST_URL__/content/images/2016/09/Fig_1.png" alt="" loading="lazy"><br>
<em>Figure 1, RSA cipher text and parameters in sample</em></p>
<p>From September 2015, however, we began to notice that there were more and more elknot/BillGates samples from which valid C2 configurations could be extracted but the extracted C2 servers could never be successfully contacted. The most frequently extracted C2 servers were fk.appledoesnt.com and 115.231.218.64. The C2 port for fk.appledoesnt.com was always 3000, while both 8226 and 13864 were often together used for 115.231.218.64. As the abnormal cases began to accumulate, we felt obliged to have an investigation. After running the questionable samples in sandboxes, we got surprised by the fact that the really contacted C2 servers were neither fk.appledoesnt.com nor 115.231.218.64. We had to re-check our C2 extraction program but found no problems, which made us to infer that new variant might have appeared.</p>
<p>Our inference was soon confirmed after some Bindiff and dynamic tracing work was done. A new Elknot/BillGates variant did emerge. The fake C2 servers, aka fk.appledoesnt.com and 115.231.218.64, will be replaced by the true C2’s hidden by the new encryption scheme after sample runs. This explained why they could not be successfully contacted.</p>
<p>Further analysis shows that the new encryption scheme composes of 2 functions, which are renamed as DecryptC2Cfg and Decrypt. The entry function (aka DecryptC2Cfg) is called by CSysTool::Ikdfu94, which is responsible for decrypting the C2 configuration in old version. The following figure shows the difference between new version (the left code snippet, md5=2579aa65a28c32778790ec1c673abc49) and the old one (the right code snippet, md5=8285f35183f0341b8dfe425b7348411d) in function CSysTool::Ikdfu94.</p>
<p><img src="__GHOST_URL__/content/images/2016/09/Fig_2.png" alt="" loading="lazy"><br>
<em>Figure 2, differences of CSysTool::Ikdfu94 functions</em></p>
<p>The entry function, as shown in Figure 3, does the following things:<br>
1, locating the cipher text.<br>
2, calling the Decrypt function to decrypt plain C2 information.<br>
3, jumping to CUtility::Split to split the plain C2 information by splitter of “:”.</p>
<p>It is interesting that DecryptC2Cfg will not directly return to the calling place but jump to CUtility::Split, which indicates that the decryption code is inserted by some 3rd builder after the sample is compiled. If you look at the old version code, as shown in the right snippet of Figure 2, CUtility::Split is function that should be called at 0x8077AB4. The jump to CUtility::Split exactly accomplishes the object of replacing the fake C2 information decrypted by RSA while not interrupting the original execution flow. Other evidences for the above speculation are as follows:<br>
1, the common shellcode technique of “call $+5” is used in DecryptC2Cfg for address locating.<br>
2, the 2 decryption functions were both stripped, while it’s not true for all the other functions.</p>
<p><img src="__GHOST_URL__/content/images/2016/09/Fig_3.png" alt="" loading="lazy"><br>
<em>Figure 3, new encryption scheme’s entry function</em></p>
<p>The Decrypt function is illustrated in Figure 4. It has a fixed cipher text (0x40 here). The core operation is getting each plain byte by XORing current byte with its next neighboring one.</p>
<p><img src="__GHOST_URL__/content/images/2016/09/Fig_4.png" alt="" loading="lazy"><br>
*Figure 4, CFG of Decrypt() function *</p>
<p>There exists another version of DecryptC2Cfg as that found in sample md5=474429d9da170e733213940acc9a2b1c. The difference is that the addresses of cipher text and flag are hardcoded.</p>
<p><img src="__GHOST_URL__/content/images/2016/09/fig_5.png" alt="" loading="lazy"><br>
*Figure 5, Another version of DecryptC2Cfg() function *</p>
<p>As for the Decrypt function, the same control flow graph was seen shared among all found samples.</p>
<p>When analyzing the new version of samples we found that the decryption functions, aka DecrytpC2Cfg and Decrypt, are usually not inside any valid sections. The following is the code snippet found in the sample with MD5 of 474429d9da170e733213940acc9a2b1c. The code is responsible for calling the called DecryptC2Cfg with address of 0x8130800.</p>
<p><img src="__GHOST_URL__/content/images/2016/09/fig_6.png" alt="" loading="lazy"><br>
<em>Figure 6, The DecryptC2Cfg() function not inside valid sections</em></p>
<p>It’s easy to observe the sample sections with Linux utility <em>readelf</em>. The following is the output of “readelf –S” for sample md5=474429d9da170e733213940acc9a2b1c. It’s obvious that the address of 0x813080 is not inside any valid sections, which provides another evidence that the decryption code is inserted by some 3rd builder.</p>
<p><img src="__GHOST_URL__/content/images/2016/09/fig_7.png" alt="" loading="lazy"><br>
<em>Figure 7, the address of DecryptC2Cfg outside of valid sections</em></p>
<h1 id="yararule">YARA Rule</h1>
<p>We have written a YARA rule according to the 2 cases of DecryptC2Cfg functions as follows.</p>
<pre><code>rule elknot_xor : ELF PE DDoS XOR BillGates
{
meta:
author = "liuya@360.cn"
description = "elknot/Billgates variants with XOR like C2 encryption scheme"
date = "2015-09-12"
strings:
//md5=474429d9da170e733213940acc9a2b1c
/*
seg000:08130801 68 00 09 13 08 push offset dword_8130900
seg000:08130806 83 3D 30 17 13 08 02 cmp ds:dword_8131730, 2
seg000:0813080D 75 07 jnz short loc_8130816
seg000:0813080F 81 04 24 00 01 00 00 add dword ptr [esp], 100h
seg000:08130816 loc_8130816:
seg000:08130816 50 push eax
seg000:08130817 E8 15 00 00 00 call sub_8130831
seg000:0813081C E9 C8 F6 F5 FF jmp near ptr 808FEE9h
*/
$decrypt_c2_func_1 = {08 83 [5] 02 75 07 81 04 24 00 01 00 00 50 e8 [4] e9}
// md5=2579aa65a28c32778790ec1c673abc49
/*
.rodata:08104D20 E8 00 00 00 00 call $+5
.rodata:08104D25 87 1C 24 xchg ebx, [esp+4+var_4] ;
.rodata:08104D28 83 EB 05 sub ebx, 5
.rodata:08104D2B 8D 83 00 FD FF FF lea eax, [ebx-300h]
.rodata:08104D31 83 BB 10 CA 02 00 02 cmp dword ptr [ebx+2CA10h], 2
.rodata:08104D38 75 05 jnz short loc_8104D3F
.rodata:08104D3A 05 00 01 00 00 add eax, 100h
.rodata:08104D3F loc_8104D3F:
.rodata:08104D3F 50 push eax
.rodata:08104D40 FF 74 24 10 push [esp+8+strsVector]
*/
$decrypt_c2_func_2 = {e8 00 00 00 00 87 [2] 83 eb 05 8d 83 [4] 83 bb [4] 02 75 05}
condition:
1 of ($decrypt_c2_func_*)
}
</code></pre>
<p><em>Figure 8, YARA rule to detect the mentioned variant</em></p>
<h1 id="statistics">Statistics</h1>
<p>After mining the sample database, we found that the first sample of this variant had appeared as early as April 2015. Currently there are about 750 of such samples were collected, with nearly 700 unique C2 servers extracted. We will keep on watching the growth of this notorious DDoS family in the future.</p>
<h1 id="relatedwork">Related work</h1>
<p>[1] <a href="https://www.botconf.eu/wp-content/uploads/2014/12/2014-2.10-Chinese-Chicken-Multiplatform-DDoS-Botnets.pdf">https://www.botconf.eu/wp-content/uploads/2014/12/2014-2.10-Chinese-Chicken-Multiplatform-DDoS-Botnets.pdf</a></p>
<p>[2] <a href="http://blog.malwaremustdie.org/2014/11/china-elf-botnet-malware-infection.html">http://blog.malwaremustdie.org/2014/11/china-elf-botnet-malware-infection.html</a></p>
<p>[3] When ELF.BillGates met Windows, <a href="https://thisissecurity.net/2015/09/30/when-elf-BillGates-met-windows/">https://thisissecurity.net/2015/09/30/when-elf-BillGates-met-windows/</a></p>
<p>[4] <a href="http://www.novetta.com/wp-content/uploads/2015/06/NTRG_ElasticBotnetReport_06102015.pdf">http://www.novetta.com/wp-content/uploads/2015/06/NTRG_ElasticBotnetReport_06102015.pdf</a></p>
<p>[5] <a href="http://www.kernelmode.info/forum/viewtopic.php?f=16&t=3099">http://www.kernelmode.info/forum/viewtopic.php?f=16&t=3099</a></p>
<p>[6] <a href="https://www.akamai.com/us/en/multimedia/documents/state-of-the-internet/bill-gates-botnet-threat-advisory.pdf">https://www.akamai.com/us/en/multimedia/documents/state-of-the-internet/bill-gates-botnet-threat-advisory.pdf</a></p>
<!--kg-card-end: markdown--> | Overview
Elknot is a notorious DDoS botnet family which runs on both Linux and Windows platforms [1] [2] [3] [4]. Multiple variants have been found since its first appearance, while the most infamous variant is called BillGates by many researchers because of its characteristic use of Bill and Gates modules [5]. Besides that this variant is also highlighted in using the school-book style of RSA encryption to hide its C2 configurations including server, port, campaign name, etc. The plain configuration is made up of one or more C2 lines, with each line having the format of "< C2 ip or domain >:< C2 port >:< Is Listener ?>: < IsService ?>: < Campaign Name >:< Enable Backdoor ?> "[6].
In September 2015, we found a new elknot/BillGates variant which uses a new C2 encryption scheme while keeps the old DDoS attack functions and C&C protocols.
This article will discuss the new elknot/BillGates variant with a focus on the updates from the previous one. The analysis work is mainly based on the following 2 samples:
* md5: 2579aa65a28c32778790ec1c673abc49, type: ELF32:Intel80386:UNIX-SystemV.
* md5: 474429d9da170e733213940acc9a2b1c, type: ftype=ELF32:Intel80386:UNIX-SystemV.
New Encryption Scheme
In the previous version of Elknot/BillGates samples RSA cipher text and parameters are stored in hex format string, which can be easily extracted with Linux utility like strings. To get the further plain C2 information what you need to do is just inputting the extracted cipher text to a RSA decryption tool which can be easily obtained on Internet. Since it’s not this article’s emphasis so we skip it. We have developed such a C2 extraction solution which works well on all collected BillGates samples.
Figure 1, RSA cipher text and parameters in sample
From September 2015, however, we began to notice that there were more and more elknot/BillGates samples from which valid C2 configurations could be extracted but the extracted C2 servers could never be successfully contacted. The most frequently extracted C2 servers were fk.appledoesnt.com and 115.231.218.64. The C2 port for fk.appledoesnt.com was always 3000, while both 8226 and 13864 were often together used for 115.231.218.64. As the abnormal cases began to accumulate, we felt obliged to have an investigation. After running the questionable samples in sandboxes, we got surprised by the fact that the really contacted C2 servers were neither fk.appledoesnt.com nor 115.231.218.64. We had to re-check our C2 extraction program but found no problems, which made us to infer that new variant might have appeared.
Our inference was soon confirmed after some Bindiff and dynamic tracing work was done. A new Elknot/BillGates variant did emerge. The fake C2 servers, aka fk.appledoesnt.com and 115.231.218.64, will be replaced by the true C2’s hidden by the new encryption scheme after sample runs. This explained why they could not be successfully contacted.
Further analysis shows that the new encryption scheme composes of 2 functions, which are renamed as DecryptC2Cfg and Decrypt. The entry function (aka DecryptC2Cfg) is called by CSysTool::Ikdfu94, which is responsible for decrypting the C2 configuration in old version. The following figure shows the difference between new version (the left code snippet, md5=2579aa65a28c32778790ec1c673abc49) and the old one (the right code snippet, md5=8285f35183f0341b8dfe425b7348411d) in function CSysTool::Ikdfu94.
Figure 2, differences of CSysTool::Ikdfu94 functions
The entry function, as shown in Figure 3, does the following things:
1, locating the cipher text.
2, calling the Decrypt function to decrypt plain C2 information.
3, jumping to CUtility::Split to split the plain C2 information by splitter of “:”.
It is interesting that DecryptC2Cfg will not directly return to the calling place but jump to CUtility::Split, which indicates that the decryption code is inserted by some 3rd builder after the sample is compiled. If you look at the old version code, as shown in the right snippet of Figure 2, CUtility::Split is function that should be called at 0x8077AB4. The jump to CUtility::Split exactly accomplishes the object of replacing the fake C2 information decrypted by RSA while not interrupting the original execution flow. Other evidences for the above speculation are as follows:
1, the common shellcode technique of “call $+5” is used in DecryptC2Cfg for address locating.
2, the 2 decryption functions were both stripped, while it’s not true for all the other functions.
Figure 3, new encryption scheme’s entry function
The Decrypt function is illustrated in Figure 4. It has a fixed cipher text (0x40 here). The core operation is getting each plain byte by XORing current byte with its next neighboring one.
*Figure 4, CFG of Decrypt() function *
There exists another version of DecryptC2Cfg as that found in sample md5=474429d9da170e733213940acc9a2b1c. The difference is that the addresses of cipher text and flag are hardcoded.
*Figure 5, Another version of DecryptC2Cfg() function *
As for the Decrypt function, the same control flow graph was seen shared among all found samples.
When analyzing the new version of samples we found that the decryption functions, aka DecrytpC2Cfg and Decrypt, are usually not inside any valid sections. The following is the code snippet found in the sample with MD5 of 474429d9da170e733213940acc9a2b1c. The code is responsible for calling the called DecryptC2Cfg with address of 0x8130800.
Figure 6, The DecryptC2Cfg() function not inside valid sections
It’s easy to observe the sample sections with Linux utility readelf. The following is the output of “readelf –S” for sample md5=474429d9da170e733213940acc9a2b1c. It’s obvious that the address of 0x813080 is not inside any valid sections, which provides another evidence that the decryption code is inserted by some 3rd builder.
Figure 7, the address of DecryptC2Cfg outside of valid sections
YARA Rule
We have written a YARA rule according to the 2 cases of DecryptC2Cfg functions as follows.
rule elknot_xor : ELF PE DDoS XOR BillGates
{
meta:
author = "liuya@360.cn"
description = "elknot/Billgates variants with XOR like C2 encryption scheme"
date = "2015-09-12"
strings:
//md5=474429d9da170e733213940acc9a2b1c
/*
seg000:08130801 68 00 09 13 08 push offset dword_8130900
seg000:08130806 83 3D 30 17 13 08 02 cmp ds:dword_8131730, 2
seg000:0813080D 75 07 jnz short loc_8130816
seg000:0813080F 81 04 24 00 01 00 00 add dword ptr [esp], 100h
seg000:08130816 loc_8130816:
seg000:08130816 50 push eax
seg000:08130817 E8 15 00 00 00 call sub_8130831
seg000:0813081C E9 C8 F6 F5 FF jmp near ptr 808FEE9h
*/
$decrypt_c2_func_1 = {08 83 [5] 02 75 07 81 04 24 00 01 00 00 50 e8 [4] e9}
// md5=2579aa65a28c32778790ec1c673abc49
/*
.rodata:08104D20 E8 00 00 00 00 call $+5
.rodata:08104D25 87 1C 24 xchg ebx, [esp+4+var_4] ;
.rodata:08104D28 83 EB 05 sub ebx, 5
.rodata:08104D2B 8D 83 00 FD FF FF lea eax, [ebx-300h]
.rodata:08104D31 83 BB 10 CA 02 00 02 cmp dword ptr [ebx+2CA10h], 2
.rodata:08104D38 75 05 jnz short loc_8104D3F
.rodata:08104D3A 05 00 01 00 00 add eax, 100h
.rodata:08104D3F loc_8104D3F:
.rodata:08104D3F 50 push eax
.rodata:08104D40 FF 74 24 10 push [esp+8+strsVector]
*/
$decrypt_c2_func_2 = {e8 00 00 00 00 87 [2] 83 eb 05 8d 83 [4] 83 bb [4] 02 75 05}
condition:
1 of ($decrypt_c2_func_*)
}
Figure 8, YARA rule to detect the mentioned variant
Statistics
After mining the sample database, we found that the first sample of this variant had appeared as early as April 2015. Currently there are about 750 of such samples were collected, with nearly 700 unique C2 servers extracted. We will keep on watching the growth of this notorious DDoS family in the future.
Related work
[1] https://www.botconf.eu/wp-content/uploads/2014/12/2014-2.10-Chinese-Chicken-Multiplatform-DDoS-Botnets.pdf
[2] http://blog.malwaremustdie.org/2014/11/china-elf-botnet-malware-infection.html
[3] When ELF.BillGates met Windows, https://thisissecurity.net/2015/09/30/when-elf-BillGates-met-windows/
[4] http://www.novetta.com/wp-content/uploads/2015/06/NTRG_ElasticBotnetReport_06102015.pdf
[5] http://www.kernelmode.info/forum/viewtopic.php?f=16&t=3099
[6] https://www.akamai.com/us/en/multimedia/documents/state-of-the-internet/bill-gates-botnet-threat-advisory.pdf
| {"version":"0.3.1","markups":[],"atoms":[],"cards":[["markdown",{"cardName":"card-markdown","markdown":"#Overview\nElknot is a notorious DDoS botnet family which runs on both Linux and Windows platforms [[1]](https://www.botconf.eu/wp-content/uploads/2014/12/2014-2.10-Chinese-Chicken-Multiplatform-DDoS-Botnets.pdf) [[2]](http://blog.malwaremustdie.org/2014/11/china-elf-botnet-malware-infection.html) [[3]](https://thisissecurity.net/2015/09/30/when-elf-BillGates-met-windows/) [[4]](http://www.novetta.com/wp-content/uploads/2015/06/NTRG_ElasticBotnetReport_06102015.pdf). Multiple variants have been found since its first appearance, while the most infamous variant is called BillGates by many researchers because of its characteristic use of Bill and Gates modules [[5]](http://www.kernelmode.info/forum/viewtopic.php?f=16&t=3099). Besides that this variant is also highlighted in using the school-book style of RSA encryption to hide its C2 configurations including server, port, campaign name, etc. The plain configuration is made up of one or more C2 lines, with each line having the format of \"*< C2 ip or domain >:< C2 port >:< Is Listener ?>: < IsService ?>: < Campaign Name >:< Enable Backdoor ?>* \"[[6]](https://www.akamai.com/us/en/multimedia/documents/state-of-the-internet/bill-gates-botnet-threat-advisory.pdf).\n\nIn September 2015, we found a new elknot/BillGates variant which uses a new C2 encryption scheme while keeps the old DDoS attack functions and C&C protocols. \n\nThis article will discuss the new elknot/BillGates variant with a focus on the updates from the previous one. The analysis work is mainly based on the following 2 samples:\n\n* md5: 2579aa65a28c32778790ec1c673abc49, type: ELF32:Intel80386:UNIX-SystemV.\n* md5: 474429d9da170e733213940acc9a2b1c, type: ftype=ELF32:Intel80386:UNIX-SystemV.\n\n#New Encryption Scheme\nIn the previous version of Elknot/BillGates samples RSA cipher text and parameters are stored in hex format string, which can be easily extracted with Linux utility like *strings*. To get the further plain C2 information what you need to do is just inputting the extracted cipher text to a RSA decryption tool which can be easily obtained on Internet. Since it’s not this article’s emphasis so we skip it. We have developed such a C2 extraction solution which works well on all collected BillGates samples. \n\n![](__GHOST_URL__/content/images/2016/09/Fig_1.png)\n*Figure 1, RSA cipher text and parameters in sample*\n\nFrom September 2015, however, we began to notice that there were more and more elknot/BillGates samples from which valid C2 configurations could be extracted but the extracted C2 servers could never be successfully contacted. The most frequently extracted C2 servers were fk.appledoesnt.com and 115.231.218.64. The C2 port for fk.appledoesnt.com was always 3000, while both 8226 and 13864 were often together used for 115.231.218.64. As the abnormal cases began to accumulate, we felt obliged to have an investigation. After running the questionable samples in sandboxes, we got surprised by the fact that the really contacted C2 servers were neither fk.appledoesnt.com nor 115.231.218.64. We had to re-check our C2 extraction program but found no problems, which made us to infer that new variant might have appeared.\n\nOur inference was soon confirmed after some Bindiff and dynamic tracing work was done. A new Elknot/BillGates variant did emerge. The fake C2 servers, aka fk.appledoesnt.com and 115.231.218.64, will be replaced by the true C2’s hidden by the new encryption scheme after sample runs. This explained why they could not be successfully contacted.\n\nFurther analysis shows that the new encryption scheme composes of 2 functions, which are renamed as DecryptC2Cfg and Decrypt. The entry function (aka DecryptC2Cfg) is called by CSysTool::Ikdfu94, which is responsible for decrypting the C2 configuration in old version. The following figure shows the difference between new version (the left code snippet, md5=2579aa65a28c32778790ec1c673abc49) and the old one (the right code snippet, md5=8285f35183f0341b8dfe425b7348411d) in function CSysTool::Ikdfu94.\n\n![](__GHOST_URL__/content/images/2016/09/Fig_2.png)\n*Figure 2, differences of CSysTool::Ikdfu94 functions*\n\nThe entry function, as shown in Figure 3, does the following things:\n1, locating the cipher text.\n2, calling the Decrypt function to decrypt plain C2 information. \n3, jumping to CUtility::Split to split the plain C2 information by splitter of “:”.\n\nIt is interesting that DecryptC2Cfg will not directly return to the calling place but jump to CUtility::Split, which indicates that the decryption code is inserted by some 3rd builder after the sample is compiled. If you look at the old version code, as shown in the right snippet of Figure 2, CUtility::Split is function that should be called at 0x8077AB4. The jump to CUtility::Split exactly accomplishes the object of replacing the fake C2 information decrypted by RSA while not interrupting the original execution flow. Other evidences for the above speculation are as follows:\n1, the common shellcode technique of “call $+5” is used in DecryptC2Cfg for address locating.\n2, the 2 decryption functions were both stripped, while it’s not true for all the other functions. \n\n![](__GHOST_URL__/content/images/2016/09/Fig_3.png)\n*Figure 3, new encryption scheme’s entry function*\n\nThe Decrypt function is illustrated in Figure 4. It has a fixed cipher text (0x40 here). The core operation is getting each plain byte by XORing current byte with its next neighboring one.\n\n![](__GHOST_URL__/content/images/2016/09/Fig_4.png)\n*Figure 4, CFG of Decrypt() function *\n\nThere exists another version of DecryptC2Cfg as that found in sample md5=474429d9da170e733213940acc9a2b1c. The difference is that the addresses of cipher text and flag are hardcoded. \n\n![](__GHOST_URL__/content/images/2016/09/fig_5.png)\n*Figure 5, Another version of DecryptC2Cfg() function *\n\nAs for the Decrypt function, the same control flow graph was seen shared among all found samples. \n\nWhen analyzing the new version of samples we found that the decryption functions, aka DecrytpC2Cfg and Decrypt, are usually not inside any valid sections. The following is the code snippet found in the sample with MD5 of 474429d9da170e733213940acc9a2b1c. The code is responsible for calling the called DecryptC2Cfg with address of 0x8130800.\n\n![](__GHOST_URL__/content/images/2016/09/fig_6.png)\n*Figure 6, The DecryptC2Cfg() function not inside valid sections*\n\nIt’s easy to observe the sample sections with Linux utility *readelf*. The following is the output of “readelf –S” for sample md5=474429d9da170e733213940acc9a2b1c. It’s obvious that the address of 0x813080 is not inside any valid sections, which provides another evidence that the decryption code is inserted by some 3rd builder.\n\n![](__GHOST_URL__/content/images/2016/09/fig_7.png)\n*Figure 7, the address of DecryptC2Cfg outside of valid sections*\n\n#YARA Rule\nWe have written a YARA rule according to the 2 cases of DecryptC2Cfg functions as follows.\n\n```\nrule elknot_xor : ELF PE DDoS XOR BillGates \n{\nmeta:\n author = \"liuya@360.cn\"\n description = \"elknot/Billgates variants with XOR like C2 encryption scheme\"\n date = \"2015-09-12\"\n\nstrings:\n //md5=474429d9da170e733213940acc9a2b1c\n /*\n seg000:08130801 68 00 09 13 08 push offset dword_8130900\n seg000:08130806 83 3D 30 17 13 08 02 cmp ds:dword_8131730, 2\n seg000:0813080D 75 07 jnz short loc_8130816\n seg000:0813080F 81 04 24 00 01 00 00 add dword ptr [esp], 100h\n seg000:08130816 loc_8130816: \n seg000:08130816 50 push eax\n seg000:08130817 E8 15 00 00 00 call sub_8130831\n seg000:0813081C E9 C8 F6 F5 FF jmp near ptr 808FEE9h\n */\n $decrypt_c2_func_1 = {08 83 [5] 02 75 07 81 04 24 00 01 00 00 50 e8 [4] e9}\n\n // md5=2579aa65a28c32778790ec1c673abc49\n /*\n .rodata:08104D20 E8 00 00 00 00 call $+5\n .rodata:08104D25 87 1C 24 xchg ebx, [esp+4+var_4] ;\n .rodata:08104D28 83 EB 05 sub ebx, 5\n .rodata:08104D2B 8D 83 00 FD FF FF lea eax, [ebx-300h]\n .rodata:08104D31 83 BB 10 CA 02 00 02 cmp dword ptr [ebx+2CA10h], 2\n .rodata:08104D38 75 05 jnz short loc_8104D3F\n .rodata:08104D3A 05 00 01 00 00 add eax, 100h\n .rodata:08104D3F loc_8104D3F: \n .rodata:08104D3F 50 push eax\n .rodata:08104D40 FF 74 24 10 push [esp+8+strsVector]\n */\n $decrypt_c2_func_2 = {e8 00 00 00 00 87 [2] 83 eb 05 8d 83 [4] 83 bb [4] 02 75 05}\n\ncondition:\n 1 of ($decrypt_c2_func_*)\n}\n\n```\n\n*Figure 8, YARA rule to detect the mentioned variant*\n\n#Statistics\nAfter mining the sample database, we found that the first sample of this variant had appeared as early as April 2015. Currently there are about 750 of such samples were collected, with nearly 700 unique C2 servers extracted. We will keep on watching the growth of this notorious DDoS family in the future.\n\n#Related work\n[1] https://www.botconf.eu/wp-content/uploads/2014/12/2014-2.10-Chinese-Chicken-Multiplatform-DDoS-Botnets.pdf\n\n[2] http://blog.malwaremustdie.org/2014/11/china-elf-botnet-malware-infection.html\n\n[3] When ELF.BillGates met Windows, https://thisissecurity.net/2015/09/30/when-elf-BillGates-met-windows/\n\n[4] http://www.novetta.com/wp-content/uploads/2015/06/NTRG_ElasticBotnetReport_06102015.pdf\n\n[5] http://www.kernelmode.info/forum/viewtopic.php?f=16&t=3099\n\n[6] https://www.akamai.com/us/en/multimedia/documents/state-of-the-internet/bill-gates-botnet-threat-advisory.pdf\n"}]],"sections":[[10,0]],"ghostVersion":"3.0"} | 16 |
post | null | 2016-10-09T02:39:13.000Z | 63873b9a8b1c1e0007f52ee7 | invalid-rdata-in-dns | 0 | 2018-10-06T08:54:59.000Z | public | published | null | 2016-10-09T03:08:28.000Z | DNS中的“无效Rdata” | <!--kg-card-begin: markdown--><p>所谓Rdata是指在DNS记录中与类型相关的数据部分。比如对于DNS的A记录中的IPv4地址或者MX记录中的主机名及其优先级。</p>
<p>在分析DNS的数据过程中,常常能见到各种不同种类的怪异的Rdata。我们把不能有效反应域名和rdata的对应关系的数据称为“无效Rdata”。对这些无效Rdata进行分析是理解DNS数据的一个有趣的切入点。</p>
<p>另外,结合最近火爆的威胁情报,发现很多的数据源中,都包含了这些“无效的Rdata”,它们降低了这些威胁情报的质量。因此对这些无效rdata的过滤是提高威胁情报质量的一个重要手段。</p>
<p>尽管还有很多其他类型的无效的rdata,但是相比IP地址来说,其他种类的数据影响较小。因此本文主要讨论IP地址。</p>
<h1 id="dnssinkholeip">DNS Sinkhole的IP地址</h1>
<p>DNS Sinkhole是安全厂商为了研究恶意软件的行为,将恶意软件的网络流量进行接管的一种方式,具体参见<a href="https://en.wikipedia.org/wiki/DNS_sinkhole">wiki的定义</a>。</p>
<p>从PassiveDNS中的数据来看,sinkhole的域名主要集中在使用DGA技术产生随机域名的恶意软件上。比如<a href="__GHOST_URL__/conficker-domain-abuse/">上一篇blog</a>中提到的conficker,以及大名鼎鼎的GOZ等。现在来看,多数的DGA域名都已经被不同的安全机构做了sinkhole。</p>
<p>除了DGA域名之外,也有安全厂商对特定的恶意软件进行sinkhole,比如卡巴斯基就惯用这种手法对未知的恶意软件使用sinkhole对其网络行为进行研究。</p>
<p>因此如果你的情报数据中出现了sinkhole的IP地址。说明在安全行为分析上面是完善的,尤其是针对恶意域名的研究是完善的,可是这种分析可能不是最新的。它已经落后于其他的某些安全机构,如果在研究过程中和这些IP有过通信(多数情况都无法正常通信),那么你的某些研究行为也可能已经暴露在那些安全机构面前。</p>
<p>由于各家安全研究机构对自身的sinkhole的保密性,业界尚未有完整的sinkhole列表。但是一些安全研究机构也做了一些整理,比如abuse.ch的<a href="https://sinkdb.abuse.ch/">sinkdb</a>。</p>
<h1 id="nxdomainip">NXDomain引起的虚假IP地址</h1>
<p>NXDomain的含义是指对于不存在的域名,DNS系统能够返回确定的IP地址。但如果继续访问的话,这些IP地址呈现的内容往往和你想要的又完全不同。其实上一节的sinkhole也是这种情况当中的一种,只是sinkhole在安全研究方面比较特殊,我们把它单独列了出来。</p>
<p>造成NXdomain有确定IP映射的原因其实不尽相同,我们列举几种比较常见的情况。</p>
<h2 id="">运营商的问题</h2>
<p>运营商针对不存在的域名,返回自己控制的IP以达到导流的目的,这种现象我们司空见惯。并且这种行为并不仅仅发生在国内,在全世界各地都存在这种“劫持”行为。以至于Google的chrome浏览器(以及基于chrome内核的其他浏览器)在启动的时候要<a href="https://mikewest.org/2012/02/chrome-connects-to-three-random-domains-at-startup">发送随机DNS查询</a>对这种“劫持”行为进行探测以免干扰浏览器的正常工作。</p>
<p>在实际网络环境中,大量的恶意软件会产生无效域名请求,比如未被sinkhole或者sinkhole不完全的DGA域名等。另外各种扫描器以及形如散列前缀攻击的攻击行为都会产生大量的无效域名请求。</p>
<p>如果不加筛选将这种IP列入分析结果,输出为IP黑名单。尽管实际用户使用可能危害并不明显,但是准确度却打了折扣。尤其是在涉及到僵尸网络的C&C分析的时候,会对分析结果造成很大的挑战。</p>
<h2 id="dnsresolver">DNS resolver的问题</h2>
<p>也许是为了避免被运营商劫持,大量用户开始使用公开的非运营商的open resolver作为自己的DNS服务器。而现在越来越多的DNS服务器提供安全服务,而这种安全服务从技术上来看,与运营商劫持的手法相同。即它们会将其认为存在安全隐患的域名返回为一个其控制的IP地址。页面内容一般是比较显著的安全提示信息。<br>
典型的例子是OpenDNS。其提供安全服务的一个IP地址为146.112.61.105。</p>
<p>同运营商的问题类似,将这类IP地址输出为IP黑名单,对实际用户并不会有太大的影响(其实会干扰这些DNS resolver的功能完整性),但是对所分析问题的准确度有影响。根据我们对PassiveDNS数据的分析,这类IP的数量不在少数。</p>
<h2 id="">注册商的问题</h2>
<p>如果说前两种情况发生在DNS查询过程中靠近用户这一侧,是对查询结果的劫持。那么由注册商引起的虚假应答就属于“官方作假”了。</p>
<p>从技术手段上来说,实现这种“官方作假”很简单,只需要把对应域名的<a href="https://en.wikipedia.org/wiki/Wildcard_DNS_record">泛解析</a>开启即可。</p>
<h3 id="tld">顶级域(TLD)级别</h3>
<p>在我们的印象中,TLD的管理应该是合规慎重的。因此第一次了解到泛解析开在TLD级别上还是有些吃惊。<br>
现在发现至少ws、sy、ph这几个ccTLD是开启泛解析的。因此如果在分析域名时,发现TLD为这几个后缀的域名,还请留意一下是否为泛解析的IP地址。一个典型的例子银行木马是<a href="http://www.symantec.com/content/en/us/enterprise/media/security_response/whitepapers/dyre-emerging-threat.pdf">dyre</a>的DGA域名有的是以ws作为TLD,显然它们都会有有效的解析地址,但并不是真正的C&C地址。</p>
<p>随着ICANN开放TLD的注册,现在越来越多的TLD可供选择。也许为了利益的目的,在TLD上开放泛解析的行为也必然会越来越多。</p>
<h1 id="ip">特殊用途的IP</h1>
<h2 id="111122228888114114114114">形如1.1.1.1/2.2.2.2/8.8.8.8/114.114.114.114等</h2>
<p>如果在PassiveDNS中以类似如上IP进行查询,能够发现大量的域名与这些IP存在对应关系。尽管这些IP中有些并不可达,比如1.1.1.1,2.2.2.2;有些则完全另有他用,比如8.8.8.8, 114.114.114.114都是知名的DNS resolver。</p>
<p>造成这种对应关系的原因有多种:一种可能是管理员用于测试的配置,还有一种可能是某些DNS服务器在检测到攻击之后,对某些请求返回一些知名的地址。比如我们见到针对DNS的散列前缀攻击,有些DNS服务器对散列前缀的域名返回8.8.8.8以及8.8.4.4的情况。</p>
<p>要说明的是第二种情况是必须禁止的,某些情况下,错误的返回会导致返回地址遭到大流量的DDoS攻击。这种情况在真实环境中出现过。</p>
<h2 id="">保留地址</h2>
<p>最常见的保留地址就是我们熟悉的私网地址:10.0.0.0/8,172.16.0.0/12,192.168.0.0/16。它们在PassiveDNS中作为rdata并不罕见。显然这是内网数据泄漏的典型,将内网的网络拓扑一览无余的对外暴露了。</p>
<p>其他的保留地址也有出现,比如传统意义上的D类和E类地址,以及用于TEST-NET的保留地址等。<br>
完整的保留地址参见wiki的<a href="https://en.wikipedia.org/wiki/Reserved_IP_addresses">保留地址列表</a>。</p>
<p>同上一节的原因相同,造成这种问题的原因既有可能是配置错误,也有可能是一种安全防御手段。作为一种安全防御手段,尽管用保留地址在某种意义上来说比胡乱指向其它的有效IP更为保险,但是这种行为仍不建议。</p>
<h1 id="">结束语</h1>
<p>这篇文章简单的列举了几类无效rdata的情况。它们可能是造成黑名单不准确的一个因素。当然,还有很多其他的因素也有可能对rdata的准确度造成影响,比如国家防火墙造成的域名IP的映射混乱,比如虚拟主机提供商所造成数据准确度的偏差以及那些我们尚未认识到的原因造成的数据错误等等。这里我们无法对每种原因都进行详细的说明,但是在数据分析的过程中需要我们不断的对每种情况进行分析才有可能认清网络世界,同时才能够产生高质量的数据。</p>
<p>文中提到的这些数据,<a href="http://netlab.360.com/">360网络安全研究院</a>都有整理。任何想法都欢迎与我们交流。</p>
<!--kg-card-end: markdown--> | 所谓Rdata是指在DNS记录中与类型相关的数据部分。比如对于DNS的A记录中的IPv4地址或者MX记录中的主机名及其优先级。
在分析DNS的数据过程中,常常能见到各种不同种类的怪异的Rdata。我们把不能有效反应域名和rdata的对应关系的数据称为“无效Rdata”。对这些无效Rdata进行分析是理解DNS数据的一个有趣的切入点。
另外,结合最近火爆的威胁情报,发现很多的数据源中,都包含了这些“无效的Rdata”,它们降低了这些威胁情报的质量。因此对这些无效rdata的过滤是提高威胁情报质量的一个重要手段。
尽管还有很多其他类型的无效的rdata,但是相比IP地址来说,其他种类的数据影响较小。因此本文主要讨论IP地址。
DNS Sinkhole的IP地址
DNS Sinkhole是安全厂商为了研究恶意软件的行为,将恶意软件的网络流量进行接管的一种方式,具体参见wiki的定义。
从PassiveDNS中的数据来看,sinkhole的域名主要集中在使用DGA技术产生随机域名的恶意软件上。比如上一篇blog中提到的conficker,以及大名鼎鼎的GOZ等。现在来看,多数的DGA域名都已经被不同的安全机构做了sinkhole。
除了DGA域名之外,也有安全厂商对特定的恶意软件进行sinkhole,比如卡巴斯基就惯用这种手法对未知的恶意软件使用sinkhole对其网络行为进行研究。
因此如果你的情报数据中出现了sinkhole的IP地址。说明在安全行为分析上面是完善的,尤其是针对恶意域名的研究是完善的,可是这种分析可能不是最新的。它已经落后于其他的某些安全机构,如果在研究过程中和这些IP有过通信(多数情况都无法正常通信),那么你的某些研究行为也可能已经暴露在那些安全机构面前。
由于各家安全研究机构对自身的sinkhole的保密性,业界尚未有完整的sinkhole列表。但是一些安全研究机构也做了一些整理,比如abuse.ch的sinkdb。
NXDomain引起的虚假IP地址
NXDomain的含义是指对于不存在的域名,DNS系统能够返回确定的IP地址。但如果继续访问的话,这些IP地址呈现的内容往往和你想要的又完全不同。其实上一节的sinkhole也是这种情况当中的一种,只是sinkhole在安全研究方面比较特殊,我们把它单独列了出来。
造成NXdomain有确定IP映射的原因其实不尽相同,我们列举几种比较常见的情况。
运营商的问题
运营商针对不存在的域名,返回自己控制的IP以达到导流的目的,这种现象我们司空见惯。并且这种行为并不仅仅发生在国内,在全世界各地都存在这种“劫持”行为。以至于Google的chrome浏览器(以及基于chrome内核的其他浏览器)在启动的时候要发送随机DNS查询对这种“劫持”行为进行探测以免干扰浏览器的正常工作。
在实际网络环境中,大量的恶意软件会产生无效域名请求,比如未被sinkhole或者sinkhole不完全的DGA域名等。另外各种扫描器以及形如散列前缀攻击的攻击行为都会产生大量的无效域名请求。
如果不加筛选将这种IP列入分析结果,输出为IP黑名单。尽管实际用户使用可能危害并不明显,但是准确度却打了折扣。尤其是在涉及到僵尸网络的C&C分析的时候,会对分析结果造成很大的挑战。
DNS resolver的问题
也许是为了避免被运营商劫持,大量用户开始使用公开的非运营商的open resolver作为自己的DNS服务器。而现在越来越多的DNS服务器提供安全服务,而这种安全服务从技术上来看,与运营商劫持的手法相同。即它们会将其认为存在安全隐患的域名返回为一个其控制的IP地址。页面内容一般是比较显著的安全提示信息。
典型的例子是OpenDNS。其提供安全服务的一个IP地址为146.112.61.105。
同运营商的问题类似,将这类IP地址输出为IP黑名单,对实际用户并不会有太大的影响(其实会干扰这些DNS resolver的功能完整性),但是对所分析问题的准确度有影响。根据我们对PassiveDNS数据的分析,这类IP的数量不在少数。
注册商的问题
如果说前两种情况发生在DNS查询过程中靠近用户这一侧,是对查询结果的劫持。那么由注册商引起的虚假应答就属于“官方作假”了。
从技术手段上来说,实现这种“官方作假”很简单,只需要把对应域名的泛解析开启即可。
顶级域(TLD)级别
在我们的印象中,TLD的管理应该是合规慎重的。因此第一次了解到泛解析开在TLD级别上还是有些吃惊。
现在发现至少ws、sy、ph这几个ccTLD是开启泛解析的。因此如果在分析域名时,发现TLD为这几个后缀的域名,还请留意一下是否为泛解析的IP地址。一个典型的例子银行木马是dyre的DGA域名有的是以ws作为TLD,显然它们都会有有效的解析地址,但并不是真正的C&C地址。
随着ICANN开放TLD的注册,现在越来越多的TLD可供选择。也许为了利益的目的,在TLD上开放泛解析的行为也必然会越来越多。
特殊用途的IP
形如1.1.1.1/2.2.2.2/8.8.8.8/114.114.114.114等
如果在PassiveDNS中以类似如上IP进行查询,能够发现大量的域名与这些IP存在对应关系。尽管这些IP中有些并不可达,比如1.1.1.1,2.2.2.2;有些则完全另有他用,比如8.8.8.8, 114.114.114.114都是知名的DNS resolver。
造成这种对应关系的原因有多种:一种可能是管理员用于测试的配置,还有一种可能是某些DNS服务器在检测到攻击之后,对某些请求返回一些知名的地址。比如我们见到针对DNS的散列前缀攻击,有些DNS服务器对散列前缀的域名返回8.8.8.8以及8.8.4.4的情况。
要说明的是第二种情况是必须禁止的,某些情况下,错误的返回会导致返回地址遭到大流量的DDoS攻击。这种情况在真实环境中出现过。
保留地址
最常见的保留地址就是我们熟悉的私网地址:10.0.0.0/8,172.16.0.0/12,192.168.0.0/16。它们在PassiveDNS中作为rdata并不罕见。显然这是内网数据泄漏的典型,将内网的网络拓扑一览无余的对外暴露了。
其他的保留地址也有出现,比如传统意义上的D类和E类地址,以及用于TEST-NET的保留地址等。
完整的保留地址参见wiki的保留地址列表。
同上一节的原因相同,造成这种问题的原因既有可能是配置错误,也有可能是一种安全防御手段。作为一种安全防御手段,尽管用保留地址在某种意义上来说比胡乱指向其它的有效IP更为保险,但是这种行为仍不建议。
结束语
这篇文章简单的列举了几类无效rdata的情况。它们可能是造成黑名单不准确的一个因素。当然,还有很多其他的因素也有可能对rdata的准确度造成影响,比如国家防火墙造成的域名IP的映射混乱,比如虚拟主机提供商所造成数据准确度的偏差以及那些我们尚未认识到的原因造成的数据错误等等。这里我们无法对每种原因都进行详细的说明,但是在数据分析的过程中需要我们不断的对每种情况进行分析才有可能认清网络世界,同时才能够产生高质量的数据。
文中提到的这些数据,360网络安全研究院都有整理。任何想法都欢迎与我们交流。
| {"version":"0.3.1","markups":[],"atoms":[],"cards":[["markdown",{"cardName":"card-markdown","markdown":"所谓Rdata是指在DNS记录中与类型相关的数据部分。比如对于DNS的A记录中的IPv4地址或者MX记录中的主机名及其优先级。\n\n在分析DNS的数据过程中,常常能见到各种不同种类的怪异的Rdata。我们把不能有效反应域名和rdata的对应关系的数据称为“无效Rdata”。对这些无效Rdata进行分析是理解DNS数据的一个有趣的切入点。\n\n另外,结合最近火爆的威胁情报,发现很多的数据源中,都包含了这些“无效的Rdata”,它们降低了这些威胁情报的质量。因此对这些无效rdata的过滤是提高威胁情报质量的一个重要手段。\n\n尽管还有很多其他类型的无效的rdata,但是相比IP地址来说,其他种类的数据影响较小。因此本文主要讨论IP地址。\n\n#DNS Sinkhole的IP地址\nDNS Sinkhole是安全厂商为了研究恶意软件的行为,将恶意软件的网络流量进行接管的一种方式,具体参见[wiki的定义](https://en.wikipedia.org/wiki/DNS_sinkhole)。\n\n从PassiveDNS中的数据来看,sinkhole的域名主要集中在使用DGA技术产生随机域名的恶意软件上。比如[上一篇blog](__GHOST_URL__/conficker-domain-abuse/)中提到的conficker,以及大名鼎鼎的GOZ等。现在来看,多数的DGA域名都已经被不同的安全机构做了sinkhole。\n\n除了DGA域名之外,也有安全厂商对特定的恶意软件进行sinkhole,比如卡巴斯基就惯用这种手法对未知的恶意软件使用sinkhole对其网络行为进行研究。\n\n因此如果你的情报数据中出现了sinkhole的IP地址。说明在安全行为分析上面是完善的,尤其是针对恶意域名的研究是完善的,可是这种分析可能不是最新的。它已经落后于其他的某些安全机构,如果在研究过程中和这些IP有过通信(多数情况都无法正常通信),那么你的某些研究行为也可能已经暴露在那些安全机构面前。\n\n由于各家安全研究机构对自身的sinkhole的保密性,业界尚未有完整的sinkhole列表。但是一些安全研究机构也做了一些整理,比如abuse.ch的[sinkdb](https://sinkdb.abuse.ch/)。 \n\n#NXDomain引起的虚假IP地址\nNXDomain的含义是指对于不存在的域名,DNS系统能够返回确定的IP地址。但如果继续访问的话,这些IP地址呈现的内容往往和你想要的又完全不同。其实上一节的sinkhole也是这种情况当中的一种,只是sinkhole在安全研究方面比较特殊,我们把它单独列了出来。\n\n造成NXdomain有确定IP映射的原因其实不尽相同,我们列举几种比较常见的情况。\n##运营商的问题\n运营商针对不存在的域名,返回自己控制的IP以达到导流的目的,这种现象我们司空见惯。并且这种行为并不仅仅发生在国内,在全世界各地都存在这种“劫持”行为。以至于Google的chrome浏览器(以及基于chrome内核的其他浏览器)在启动的时候要[发送随机DNS查询](https://mikewest.org/2012/02/chrome-connects-to-three-random-domains-at-startup)对这种“劫持”行为进行探测以免干扰浏览器的正常工作。\n\n在实际网络环境中,大量的恶意软件会产生无效域名请求,比如未被sinkhole或者sinkhole不完全的DGA域名等。另外各种扫描器以及形如散列前缀攻击的攻击行为都会产生大量的无效域名请求。\n\n如果不加筛选将这种IP列入分析结果,输出为IP黑名单。尽管实际用户使用可能危害并不明显,但是准确度却打了折扣。尤其是在涉及到僵尸网络的C&C分析的时候,会对分析结果造成很大的挑战。\n##DNS resolver的问题\n也许是为了避免被运营商劫持,大量用户开始使用公开的非运营商的open resolver作为自己的DNS服务器。而现在越来越多的DNS服务器提供安全服务,而这种安全服务从技术上来看,与运营商劫持的手法相同。即它们会将其认为存在安全隐患的域名返回为一个其控制的IP地址。页面内容一般是比较显著的安全提示信息。\n典型的例子是OpenDNS。其提供安全服务的一个IP地址为146.112.61.105。\n\n同运营商的问题类似,将这类IP地址输出为IP黑名单,对实际用户并不会有太大的影响(其实会干扰这些DNS resolver的功能完整性),但是对所分析问题的准确度有影响。根据我们对PassiveDNS数据的分析,这类IP的数量不在少数。\n\n##注册商的问题\n如果说前两种情况发生在DNS查询过程中靠近用户这一侧,是对查询结果的劫持。那么由注册商引起的虚假应答就属于“官方作假”了。\n\n从技术手段上来说,实现这种“官方作假”很简单,只需要把对应域名的[泛解析](https://en.wikipedia.org/wiki/Wildcard_DNS_record)开启即可。\n###顶级域(TLD)级别\n在我们的印象中,TLD的管理应该是合规慎重的。因此第一次了解到泛解析开在TLD级别上还是有些吃惊。\n现在发现至少ws、sy、ph这几个ccTLD是开启泛解析的。因此如果在分析域名时,发现TLD为这几个后缀的域名,还请留意一下是否为泛解析的IP地址。一个典型的例子银行木马是[dyre](http://www.symantec.com/content/en/us/enterprise/media/security_response/whitepapers/dyre-emerging-threat.pdf)的DGA域名有的是以ws作为TLD,显然它们都会有有效的解析地址,但并不是真正的C&C地址。\n\n随着ICANN开放TLD的注册,现在越来越多的TLD可供选择。也许为了利益的目的,在TLD上开放泛解析的行为也必然会越来越多。\n#特殊用途的IP\n##形如1.1.1.1/2.2.2.2/8.8.8.8/114.114.114.114等\n如果在PassiveDNS中以类似如上IP进行查询,能够发现大量的域名与这些IP存在对应关系。尽管这些IP中有些并不可达,比如1.1.1.1,2.2.2.2;有些则完全另有他用,比如8.8.8.8, 114.114.114.114都是知名的DNS resolver。\n\n造成这种对应关系的原因有多种:一种可能是管理员用于测试的配置,还有一种可能是某些DNS服务器在检测到攻击之后,对某些请求返回一些知名的地址。比如我们见到针对DNS的散列前缀攻击,有些DNS服务器对散列前缀的域名返回8.8.8.8以及8.8.4.4的情况。\n\n要说明的是第二种情况是必须禁止的,某些情况下,错误的返回会导致返回地址遭到大流量的DDoS攻击。这种情况在真实环境中出现过。\n##保留地址\n最常见的保留地址就是我们熟悉的私网地址:10.0.0.0/8,172.16.0.0/12,192.168.0.0/16。它们在PassiveDNS中作为rdata并不罕见。显然这是内网数据泄漏的典型,将内网的网络拓扑一览无余的对外暴露了。\n\n其他的保留地址也有出现,比如传统意义上的D类和E类地址,以及用于TEST-NET的保留地址等。\n完整的保留地址参见wiki的[保留地址列表](https://en.wikipedia.org/wiki/Reserved_IP_addresses)。\n\n同上一节的原因相同,造成这种问题的原因既有可能是配置错误,也有可能是一种安全防御手段。作为一种安全防御手段,尽管用保留地址在某种意义上来说比胡乱指向其它的有效IP更为保险,但是这种行为仍不建议。\n\n#结束语\n这篇文章简单的列举了几类无效rdata的情况。它们可能是造成黑名单不准确的一个因素。当然,还有很多其他的因素也有可能对rdata的准确度造成影响,比如国家防火墙造成的域名IP的映射混乱,比如虚拟主机提供商所造成数据准确度的偏差以及那些我们尚未认识到的原因造成的数据错误等等。这里我们无法对每种原因都进行详细的说明,但是在数据分析的过程中需要我们不断的对每种情况进行分析才有可能认清网络世界,同时才能够产生高质量的数据。\n\n文中提到的这些数据,[360网络安全研究院](http://netlab.360.com/)都有整理。任何想法都欢迎与我们交流。\n"}]],"sections":[[10,0]],"ghostVersion":"3.0"} | 29 |
post | null | 2016-10-14T20:20:38.000Z | 63873b9a8b1c1e0007f52ee8 | a-quick-stats-on-the-608-083-mirai-ips-that-hit-our-honeypots-in-the-past-2-5-months | 0 | 2018-10-06T08:55:30.000Z | public | published | null | 2016-10-15T11:21:49.000Z | A quick stats on the 608,083 Mirai IPs that hit our honeypots in the past 2.5 months | <!--kg-card-begin: markdown--><p>Over the last few weeks Mirai, a DDoS botnet family which is believed to be responsible for the large attacks against Brian Krebs on September 13, 2016, has become a hot topic in security community. Previous investigations show that this malware mainly infects IoT devices, e.g., CCTV, and TCP ports of 23 and 2323, which are used for Telnet, are the main infection vector.<br>
On September 30, Mirai’s source code was leaked, which gives us the chance to better understand how this family of botnet works. After a some exploration on the leaked source, a vulnerability was found in its scan module, which, together with the fact that Mirai only scans TCP ports of 23 and 2323, enables us to distinguish the Mira TCP SYN scans from other scanners by checking the SYN packet's header fields. The evaluation on our old dataset shows 608,083 uinique Mirai IPs have hit our honeypots since August 1, 2016. In this post, I will give a quick statistics on the checked Mira scans.<br>
The first Mirai scan that came to us was on 2016-08-01 12:46:01 UTC+8, August 1, 2016. Till 23:59:59 UTC+8, October 13, 2016, totally 1,063,786 Mirai scans were checked. The daily stats can be shown in Figure 1.<br>
<img src="__GHOST_URL__/content/images/2016/10/Daily-variations-of-Mirai-scans.png" alt="" loading="lazy"><br>
<em>Figure 1, Daily variations of Mirai scans</em></p>
<p>It seems that after a few fluctuations the Mirai botnets reached a plateau in mid-September and have remained that activeness status till now.<br>
Further investigations show that those scans came from totally 608,083 unique IPs across 196 countries, as shown in Figure 2.<br>
<img src="__GHOST_URL__/content/images/2016/10/Geo-locations-of-Mirai-bot-IPs.png" alt="" loading="lazy"><br>
<em>Figure2, Geo-locations of Mirai IPs</em></p>
<p>The top 10 countries/ASNs stats show that some Asian countries, including Vietnam, China, India, and Korea, have the largest number of Mirai bots.<br>
<img src="__GHOST_URL__/content/images/2016/10/Top-10-countries-of-Mirai-bot-IPs.png" alt="" loading="lazy"><br>
<em>Figure 3, Top 10 countries of Mirai bot IPs</em></p>
<p><img src="__GHOST_URL__/content/images/2016/10/Top-10-ASNs-of-Mirai-bot-IPs.png" alt="" loading="lazy"><br>
<em>Figure 4, Top 10 ASNs of Mirai bot IPs</em></p>
<p>In the future we will still keep an eye on the progress of Mirai scans.</p>
<p>Besides that, we have been able to extract couple of Mirai C2s (command and controller), and added them into our DDos botnet command tracking system, with that, we will hopefully be able to track the Mirai botnet attacks (target, attack type, attack instructions) in real time. Stay tuned for more update on this.</p>
<!--kg-card-end: markdown--> | Over the last few weeks Mirai, a DDoS botnet family which is believed to be responsible for the large attacks against Brian Krebs on September 13, 2016, has become a hot topic in security community. Previous investigations show that this malware mainly infects IoT devices, e.g., CCTV, and TCP ports of 23 and 2323, which are used for Telnet, are the main infection vector.
On September 30, Mirai’s source code was leaked, which gives us the chance to better understand how this family of botnet works. After a some exploration on the leaked source, a vulnerability was found in its scan module, which, together with the fact that Mirai only scans TCP ports of 23 and 2323, enables us to distinguish the Mira TCP SYN scans from other scanners by checking the SYN packet's header fields. The evaluation on our old dataset shows 608,083 uinique Mirai IPs have hit our honeypots since August 1, 2016. In this post, I will give a quick statistics on the checked Mira scans.
The first Mirai scan that came to us was on 2016-08-01 12:46:01 UTC+8, August 1, 2016. Till 23:59:59 UTC+8, October 13, 2016, totally 1,063,786 Mirai scans were checked. The daily stats can be shown in Figure 1.
Figure 1, Daily variations of Mirai scans
It seems that after a few fluctuations the Mirai botnets reached a plateau in mid-September and have remained that activeness status till now.
Further investigations show that those scans came from totally 608,083 unique IPs across 196 countries, as shown in Figure 2.
Figure2, Geo-locations of Mirai IPs
The top 10 countries/ASNs stats show that some Asian countries, including Vietnam, China, India, and Korea, have the largest number of Mirai bots.
Figure 3, Top 10 countries of Mirai bot IPs
Figure 4, Top 10 ASNs of Mirai bot IPs
In the future we will still keep an eye on the progress of Mirai scans.
Besides that, we have been able to extract couple of Mirai C2s (command and controller), and added them into our DDos botnet command tracking system, with that, we will hopefully be able to track the Mirai botnet attacks (target, attack type, attack instructions) in real time. Stay tuned for more update on this.
| {"version":"0.3.1","markups":[],"atoms":[],"cards":[["markdown",{"cardName":"card-markdown","markdown":"Over the last few weeks Mirai, a DDoS botnet family which is believed to be responsible for the large attacks against Brian Krebs on September 13, 2016, has become a hot topic in security community. Previous investigations show that this malware mainly infects IoT devices, e.g., CCTV, and TCP ports of 23 and 2323, which are used for Telnet, are the main infection vector.\nOn September 30, Mirai’s source code was leaked, which gives us the chance to better understand how this family of botnet works. After a some exploration on the leaked source, a vulnerability was found in its scan module, which, together with the fact that Mirai only scans TCP ports of 23 and 2323, enables us to distinguish the Mira TCP SYN scans from other scanners by checking the SYN packet's header fields. The evaluation on our old dataset shows 608,083 uinique Mirai IPs have hit our honeypots since August 1, 2016. In this post, I will give a quick statistics on the checked Mira scans. \nThe first Mirai scan that came to us was on 2016-08-01 12:46:01 UTC+8, August 1, 2016. Till 23:59:59 UTC+8, October 13, 2016, totally 1,063,786 Mirai scans were checked. The daily stats can be shown in Figure 1.\n![](__GHOST_URL__/content/images/2016/10/Daily-variations-of-Mirai-scans.png)\n*Figure 1, Daily variations of Mirai scans*\n\nIt seems that after a few fluctuations the Mirai botnets reached a plateau in mid-September and have remained that activeness status till now. \nFurther investigations show that those scans came from totally 608,083 unique IPs across 196 countries, as shown in Figure 2. \n![](__GHOST_URL__/content/images/2016/10/Geo-locations-of-Mirai-bot-IPs.png)\n*Figure2, Geo-locations of Mirai IPs*\n\nThe top 10 countries/ASNs stats show that some Asian countries, including Vietnam, China, India, and Korea, have the largest number of Mirai bots.\n![](__GHOST_URL__/content/images/2016/10/Top-10-countries-of-Mirai-bot-IPs.png)\n*Figure 3, Top 10 countries of Mirai bot IPs*\n\n![](__GHOST_URL__/content/images/2016/10/Top-10-ASNs-of-Mirai-bot-IPs.png)\n*Figure 4, Top 10 ASNs of Mirai bot IPs*\n\nIn the future we will still keep an eye on the progress of Mirai scans. \n\nBesides that, we have been able to extract couple of Mirai C2s (command and controller), and added them into our DDos botnet command tracking system, with that, we will hopefully be able to track the Mirai botnet attacks (target, attack type, attack instructions) in real time. Stay tuned for more update on this. "}]],"sections":[[10,0]],"ghostVersion":"3.0"} | 30 |
post | null | 2016-10-14T20:31:53.000Z | 63873b9a8b1c1e0007f52ee9 | new-mirai-variant-with-dga-chinese-version | 0 | 2020-08-11T03:52:24.000Z | public | published | null | 2016-12-12T04:10:57.000Z | Mirai 变种中的DGA | <!--kg-card-begin: markdown--><h3 id="">更新历史</h3>
<p>2016-12-09 首次发布<br>
2016-12-12 更新图0,修正了我们DGA实现中一处TLD选择的错误</p>
<h3 id="">概要</h3>
<p>两个星期前,我们发现2个新的感染载体(也即TCP端口7547和5555变种)被用来传播MIRAI恶意软件。</p>
<blockquote>
<p><<a href="__GHOST_URL__/a-few-observations-of-the-new-mirai-variant-on-port-7547/">A Few Observations of The New Mirai Variant on Port 7547</a>></p>
</blockquote>
<p>我的同事Ye Genshen快速设置了一些蜜罐,并且很快取得收获:11月28日一天就捕获了11个样本。 迄今为止,我们的蜜罐已从6个托管服务器捕获了53个独立样本。</p>
<p>在分析其中一个新样本时,我的同事Qu Wenji发现一些类似DGA的代码,并猜测变种中包含有DGA功能,这个猜测很快就从我们的沙箱数据中得到验证。详细的逆向工作显示,在通过TCP端口7547和5555分发的MIRAI样本中确实存在DGA特征。在本博客中,我将介绍我们的发现。简单来说,我们找到的DGA的属性总结如下:</p>
<ol>
<li>使用3个顶级域名:online/tech/support;</li>
<li>L2域名固定长度12字符,每个字符从“a”到“z”中随机选择;</li>
<li>域名仅由月、日和硬编码的种子字符串确定;</li>
<li>每天只生成一个域名,因此最多存在365个 DGA域名;</li>
<li>DGA域名仅在硬编码的C2域名无法解析时使用。</li>
</ol>
<p>通过逆向获取的DGA知识,我们在程序中重新实现了DGA,并用它来预测所有365个可能的域名。当进一步确认这些域名的注册信息时,我们发现其中部分域名已经被MIRAI作者注册,列表如下:</p>
<p><img src="__GHOST_URL__/content/images/2016/12/mirai_dga_registered_by_author-1.png" alt="" loading="lazy"></p>
<div align="center">图0, 已经被注册的DGA域名</div>
<p>值得一提的是,作者 dlinchkravitz@gmail.com在更早时间已经注册了其他mirai C2域名:</p>
<ul>
<li>zugzwang.me email <a href="mailto:dlinchkravitz@gmail.com">dlinchkravitz@gmail.com</a></li>
</ul>
<h3 id="">样本和分析</h3>
<p>本博客中用作说明的样本如下:<br>
<font size="3"></p>
<ul>
<li><strong>MD5</strong>: bf136fb3b350a96fd1003b8557bb758a</li>
<li><strong>SHA256</strong>: 971156ec3dca4fa5c53723863966ed165d546a184f3c8ded008b029fd59d6a5a</li>
<li><strong>File type</strong>: ELF 32-bit LSB executable, MIPS, MIPS-I version 1 (SYSV), statically linked, stripped<br>
</font></li>
</ul>
<p>样品做了去符号处理但未加壳。根据以分析mirai样本经验,我们很快就确定了其主要模块。比较代码发现,resolv_cnc_addr函数的CFG(流程控制图)与先前发现的样本非常不同。 新版本的CFG如图1所示。<br>
<img src="__GHOST_URL__/content/images/2016/12/mirai_dga_resolv_cnc_addr_cfg-1.png" alt="" loading="lazy"></p>
<div align="center">图1, 新版本的resolv_cnc_addr 流程控制图</div>
<p>在函数开始处,由于在样本中硬编码了多达3个C2域名,所以生成随机数以从第一和第二个C2域名中随机选择一个,如图2所示。<br>
<img src="__GHOST_URL__/content/images/2016/12/mirai_dga_choose_1st_cnc-1.png" alt="" loading="lazy"></p>
<div align="center">图2, resolv_cnc_addr 函数第一部分</div>
<p>如果被选中的C2域名无法解析,则bot并不解析未选择的域名或第三域名,而是将根据当前日期判断是决定是否去执行DGA代码分支还是去解析第三个C2域名,如图3。<br>
<img src="__GHOST_URL__/content/images/2016/12/mirai_dga_judge_dga-1.png" alt="" loading="lazy"></p>
<div align="center">图3, 决定是否进入DGA 代码分支</div>
<p>从上述代码片段我们可以看出,如果当前日期在11月1日和12月3日之间,将去解析第3个C2域名。否则将执行DGA代码分支。这可以理解为作者不希望DGA域名在12月4日之前被启用,这也恰好被前文提及首个被注册的mirai DGA域名对应于12月4日所映证。<br>
DGA主函数名为dga_gen_domain。域名完全是基于种子数字和当前日期生成的。种子通过调用strtol()从硬编码的十六进制格式字符串进行转换。看起来字符串“\x90\x91\x80\x90\x90\x91\x80\x90”是一个错误的配置,这会导致strtol()总是返回0。<br>
代码中通过调用time()和localtime()的C库函数得到本地日期。但只有月和日被使用,如图4所示。<br>
<img src="__GHOST_URL__/content/images/2016/12/mirai_dga_main_func_part1-1-1.png" alt="" loading="lazy"></p>
<div align="center">图4, dga_gen_domain 函数片段</div>
<p>L2域名是通过反复执行图5所示的代码块来生成的。其长度由$ t5和$ t2确定,它们的值在图4中设置,从中我们可以确定L2域名长度是12。<br>
<img src="__GHOST_URL__/content/images/2016/12/mirai_dga_main_func_part2-1-1.png" alt="" loading="lazy"></p>
<div align="center">图5, 生成L2域名的循环代码片段</div>
TLD(Top Level Domain)由寄存器$S0中的残余值确定,如图6所示。 我们可以看到在这里使用了3个TLD。
<p><a href="__GHOST_URL__/content/images/2016/12/mirai_dga_main_func_part3-1.png"><img src="__GHOST_URL__/content/images/2016/12/mirai_dga_main_func_part3-1.png" class="kg-image"/></a><div align="center">图6, 确定TLD 的代码分支</div></p>
<h3 id="ioc">IOC</h3>
<p>目前,DGA相关的特性存在于如下样本,所有这些DGA样本中的种子字符串和算法都完全相同:</p>
<ul>
<li>005241cf76d31673a752a76bb0ba7118</li>
<li>05891dbabc42a36f33c30535f0931555</li>
<li>0eb51d584712485300ad8e8126773941</li>
<li>15b35cfff4129b26c0f07bd4be462ba0</li>
<li>2da64ae2f8b1e8b75063760abfc94ecf</li>
<li>41ba9f3d13ce33526da52407e2f0589d</li>
<li>4a8145ae760385c1c000113a9ea00a3a</li>
<li>551380681560849cee3de36329ba4ed3</li>
<li>72bbfc1ff6621a278e16cfc91906109f</li>
<li>73f4312cc6f5067e505bc54c3b02b569</li>
<li>7d490eedc5b46aff00ffaaec7004e2a8</li>
<li>863dcf82883c885b0686dce747dcf502</li>
<li>bf136fb3b350a96fd1003b8557bb758a</li>
<li>bf650d39eb603d92973052ca80a4fdda</li>
<li>d89b1be09de36e326611a2abbedb8751</li>
<li>dbd92b08cbff8455ff76c453ff704dc6</li>
<li>eba670256b816e2d11f107f629d08494</li>
</ul>
<p>样本中的硬编码C2域名如下:</p>
<ul>
<li>zugzwang.me</li>
<li>tr069.online</li>
<li>tr069.tech</li>
<li>tr069.support</li>
</ul>
<p>我们将密切关注DGA变种的后续变化,敬请关注后续更新。</p>
<!--kg-card-end: markdown--> | 更新历史
2016-12-09 首次发布
2016-12-12 更新图0,修正了我们DGA实现中一处TLD选择的错误
概要
两个星期前,我们发现2个新的感染载体(也即TCP端口7547和5555变种)被用来传播MIRAI恶意软件。
<A Few Observations of The New Mirai Variant on Port 7547>
我的同事Ye Genshen快速设置了一些蜜罐,并且很快取得收获:11月28日一天就捕获了11个样本。 迄今为止,我们的蜜罐已从6个托管服务器捕获了53个独立样本。
在分析其中一个新样本时,我的同事Qu Wenji发现一些类似DGA的代码,并猜测变种中包含有DGA功能,这个猜测很快就从我们的沙箱数据中得到验证。详细的逆向工作显示,在通过TCP端口7547和5555分发的MIRAI样本中确实存在DGA特征。在本博客中,我将介绍我们的发现。简单来说,我们找到的DGA的属性总结如下:
1. 使用3个顶级域名:online/tech/support;
2. L2域名固定长度12字符,每个字符从“a”到“z”中随机选择;
3. 域名仅由月、日和硬编码的种子字符串确定;
4. 每天只生成一个域名,因此最多存在365个 DGA域名;
5. DGA域名仅在硬编码的C2域名无法解析时使用。
通过逆向获取的DGA知识,我们在程序中重新实现了DGA,并用它来预测所有365个可能的域名。当进一步确认这些域名的注册信息时,我们发现其中部分域名已经被MIRAI作者注册,列表如下:
图0, 已经被注册的DGA域名
值得一提的是,作者 dlinchkravitz@gmail.com在更早时间已经注册了其他mirai C2域名:
* zugzwang.me email dlinchkravitz@gmail.com
样本和分析
本博客中用作说明的样本如下:
* MD5: bf136fb3b350a96fd1003b8557bb758a
* SHA256: 971156ec3dca4fa5c53723863966ed165d546a184f3c8ded008b029fd59d6a5a
* File type: ELF 32-bit LSB executable, MIPS, MIPS-I version 1 (SYSV), statically linked, stripped
样品做了去符号处理但未加壳。根据以分析mirai样本经验,我们很快就确定了其主要模块。比较代码发现,resolv_cnc_addr函数的CFG(流程控制图)与先前发现的样本非常不同。 新版本的CFG如图1所示。
图1, 新版本的resolv_cnc_addr 流程控制图
在函数开始处,由于在样本中硬编码了多达3个C2域名,所以生成随机数以从第一和第二个C2域名中随机选择一个,如图2所示。
图2, resolv_cnc_addr 函数第一部分
如果被选中的C2域名无法解析,则bot并不解析未选择的域名或第三域名,而是将根据当前日期判断是决定是否去执行DGA代码分支还是去解析第三个C2域名,如图3。
图3, 决定是否进入DGA 代码分支
从上述代码片段我们可以看出,如果当前日期在11月1日和12月3日之间,将去解析第3个C2域名。否则将执行DGA代码分支。这可以理解为作者不希望DGA域名在12月4日之前被启用,这也恰好被前文提及首个被注册的mirai DGA域名对应于12月4日所映证。
DGA主函数名为dga_gen_domain。域名完全是基于种子数字和当前日期生成的。种子通过调用strtol()从硬编码的十六进制格式字符串进行转换。看起来字符串“\x90\x91\x80\x90\x90\x91\x80\x90”是一个错误的配置,这会导致strtol()总是返回0。
代码中通过调用time()和localtime()的C库函数得到本地日期。但只有月和日被使用,如图4所示。
图4, dga_gen_domain 函数片段
L2域名是通过反复执行图5所示的代码块来生成的。其长度由$ t5和$ t2确定,它们的值在图4中设置,从中我们可以确定L2域名长度是12。
图5, 生成L2域名的循环代码片段
TLD(Top Level Domain)由寄存器$S0中的残余值确定,如图6所示。 我们可以看到在这里使用了3个TLD。
图6, 确定TLD 的代码分支
IOC
目前,DGA相关的特性存在于如下样本,所有这些DGA样本中的种子字符串和算法都完全相同:
* 005241cf76d31673a752a76bb0ba7118
* 05891dbabc42a36f33c30535f0931555
* 0eb51d584712485300ad8e8126773941
* 15b35cfff4129b26c0f07bd4be462ba0
* 2da64ae2f8b1e8b75063760abfc94ecf
* 41ba9f3d13ce33526da52407e2f0589d
* 4a8145ae760385c1c000113a9ea00a3a
* 551380681560849cee3de36329ba4ed3
* 72bbfc1ff6621a278e16cfc91906109f
* 73f4312cc6f5067e505bc54c3b02b569
* 7d490eedc5b46aff00ffaaec7004e2a8
* 863dcf82883c885b0686dce747dcf502
* bf136fb3b350a96fd1003b8557bb758a
* bf650d39eb603d92973052ca80a4fdda
* d89b1be09de36e326611a2abbedb8751
* dbd92b08cbff8455ff76c453ff704dc6
* eba670256b816e2d11f107f629d08494
样本中的硬编码C2域名如下:
* zugzwang.me
* tr069.online
* tr069.tech
* tr069.support
我们将密切关注DGA变种的后续变化,敬请关注后续更新。
| {"version":"0.3.1","atoms":[],"cards":[["markdown",{"cardName":"card-markdown","markdown":"### 更新历史\n2016-12-09 首次发布\n2016-12-12 更新图0,修正了我们DGA实现中一处TLD选择的错误\n\n###概要\n\n两个星期前,我们发现2个新的感染载体(也即TCP端口7547和5555变种)被用来传播MIRAI恶意软件。\n\n> <[A Few Observations of The New Mirai Variant on Port 7547](__GHOST_URL__/a-few-observations-of-the-new-mirai-variant-on-port-7547/)>\n\n我的同事Ye Genshen快速设置了一些蜜罐,并且很快取得收获:11月28日一天就捕获了11个样本。 迄今为止,我们的蜜罐已从6个托管服务器捕获了53个独立样本。\n\n在分析其中一个新样本时,我的同事Qu Wenji发现一些类似DGA的代码,并猜测变种中包含有DGA功能,这个猜测很快就从我们的沙箱数据中得到验证。详细的逆向工作显示,在通过TCP端口7547和5555分发的MIRAI样本中确实存在DGA特征。在本博客中,我将介绍我们的发现。简单来说,我们找到的DGA的属性总结如下:\n\n1. 使用3个顶级域名:online/tech/support;\n2. L2域名固定长度12字符,每个字符从“a”到“z”中随机选择;\n3. 域名仅由月、日和硬编码的种子字符串确定;\n4. 每天只生成一个域名,因此最多存在365个 DGA域名;\n5. DGA域名仅在硬编码的C2域名无法解析时使用。\n\n通过逆向获取的DGA知识,我们在程序中重新实现了DGA,并用它来预测所有365个可能的域名。当进一步确认这些域名的注册信息时,我们发现其中部分域名已经被MIRAI作者注册,列表如下:\n\n![](__GHOST_URL__/content/images/2016/12/mirai_dga_registered_by_author-1.png)\n\n<div align=\"center\">图0, 已经被注册的DGA域名</div>\n\n值得一提的是,作者 dlinchkravitz@gmail.com在更早时间已经注册了其他mirai C2域名:\n\n* zugzwang.me email dlinchkravitz@gmail.com\n\n###样本和分析\n\n\n本博客中用作说明的样本如下:\n<font size=\"3\">\n* **MD5**: bf136fb3b350a96fd1003b8557bb758a \n* **SHA256**: 971156ec3dca4fa5c53723863966ed165d546a184f3c8ded008b029fd59d6a5a \n* **File type**: ELF 32-bit LSB executable, MIPS, MIPS-I version 1 (SYSV), statically linked, stripped \n</font>\n\n样品做了去符号处理但未加壳。根据以分析mirai样本经验,我们很快就确定了其主要模块。比较代码发现,resolv_cnc_addr函数的CFG(流程控制图)与先前发现的样本非常不同。 新版本的CFG如图1所示。\n![](__GHOST_URL__/content/images/2016/12/mirai_dga_resolv_cnc_addr_cfg-1.png)\n<div align=\"center\">图1, 新版本的resolv_cnc_addr 流程控制图</div>\n\n在函数开始处,由于在样本中硬编码了多达3个C2域名,所以生成随机数以从第一和第二个C2域名中随机选择一个,如图2所示。\n![](__GHOST_URL__/content/images/2016/12/mirai_dga_choose_1st_cnc-1.png)\n<div align=\"center\">图2, resolv_cnc_addr 函数第一部分</div>\n\n如果被选中的C2域名无法解析,则bot并不解析未选择的域名或第三域名,而是将根据当前日期判断是决定是否去执行DGA代码分支还是去解析第三个C2域名,如图3。\n![](__GHOST_URL__/content/images/2016/12/mirai_dga_judge_dga-1.png)\n<div align=\"center\">图3, 决定是否进入DGA 代码分支</div>\n\n从上述代码片段我们可以看出,如果当前日期在11月1日和12月3日之间,将去解析第3个C2域名。否则将执行DGA代码分支。这可以理解为作者不希望DGA域名在12月4日之前被启用,这也恰好被前文提及首个被注册的mirai DGA域名对应于12月4日所映证。\nDGA主函数名为dga_gen_domain。域名完全是基于种子数字和当前日期生成的。种子通过调用strtol()从硬编码的十六进制格式字符串进行转换。看起来字符串“\\x90\\x91\\x80\\x90\\x90\\x91\\x80\\x90”是一个错误的配置,这会导致strtol()总是返回0。\n代码中通过调用time()和localtime()的C库函数得到本地日期。但只有月和日被使用,如图4所示。\n![](__GHOST_URL__/content/images/2016/12/mirai_dga_main_func_part1-1-1.png)\n<div align=\"center\">图4, dga_gen_domain 函数片段</div>\n\nL2域名是通过反复执行图5所示的代码块来生成的。其长度由$ t5和$ t2确定,它们的值在图4中设置,从中我们可以确定L2域名长度是12。\n![](__GHOST_URL__/content/images/2016/12/mirai_dga_main_func_part2-1-1.png)\n<div align=\"center\">图5, 生成L2域名的循环代码片段</div>\nTLD(Top Level Domain)由寄存器$S0中的残余值确定,如图6所示。 我们可以看到在这里使用了3个TLD。\n\n<a href=\"__GHOST_URL__/content/images/2016/12/mirai_dga_main_func_part3-1.png\"><img src=\"__GHOST_URL__/content/images/2016/12/mirai_dga_main_func_part3-1.png\" class=\"kg-image\"/></a><div align=\"center\">图6, 确定TLD 的代码分支</div>\n\n###IOC\n目前,DGA相关的特性存在于如下样本,所有这些DGA样本中的种子字符串和算法都完全相同:\n\n* 005241cf76d31673a752a76bb0ba7118 \n* 05891dbabc42a36f33c30535f0931555 \n* 0eb51d584712485300ad8e8126773941 \n* 15b35cfff4129b26c0f07bd4be462ba0 \n* 2da64ae2f8b1e8b75063760abfc94ecf \n* 41ba9f3d13ce33526da52407e2f0589d \n* 4a8145ae760385c1c000113a9ea00a3a \n* 551380681560849cee3de36329ba4ed3 \n* 72bbfc1ff6621a278e16cfc91906109f \n* 73f4312cc6f5067e505bc54c3b02b569 \n* 7d490eedc5b46aff00ffaaec7004e2a8 \n* 863dcf82883c885b0686dce747dcf502 \n* bf136fb3b350a96fd1003b8557bb758a \n* bf650d39eb603d92973052ca80a4fdda \n* d89b1be09de36e326611a2abbedb8751 \n* dbd92b08cbff8455ff76c453ff704dc6 \n* eba670256b816e2d11f107f629d08494 \n\n样本中的硬编码C2域名如下:\n\n* zugzwang.me \n* tr069.online \n* tr069.tech \n* tr069.support\n\n\n我们将密切关注DGA变种的后续变化,敬请关注后续更新。\n"}]],"markups":[],"sections":[[10,0]],"ghostVersion":"3.0"} | 31 |
post | null | 2016-10-23T13:43:56.000Z | 63873b9a8b1c1e0007f52eea | a-dyn-twitter-ddos-event-report-and-mirai-botnet-review | 0 | 2018-10-06T08:55:47.000Z | public | published | null | 2016-10-23T14:21:21.000Z | 关于 dyn / twitter 受攻击情况的说明和 mirai 僵尸网络的回顾 | <!--kg-card-begin: markdown--><p>【更新记录】</p>
<p>2016-10-23 初始版本<br>
2016-10-27 获得了少量攻击现场数据,分析结果与之前观点吻合一致。</p>
<p>北京时间2016年10月21 日晚间,北美地区大量反馈若干重要的互联网网站无法正常访问。涉及到的网站包括 twitter, paypal,github等等,由于这些网站与北美地区日常生活强烈相关,这次网络故障被北美主要媒体广泛报道,也引起了安全社区的强烈关注。我们与国外安全社区一起协同,对本次网络事件提供数据、加以分析并做了溯源跟踪。</p>
<p>目前我们已经能够确定本次事件是一次DDoS网络攻击事件,攻击目标主要是Dynamic Network Services(dyn)公司,twitter、paypal、github等网站作为dyn公司的客户,在本次攻击中不幸被波及。<br>
在攻击持续溯源的过程中,虽然目前Flashpoint公司已经确认最近广泛受关注的mirai僵尸网络参与了本次网络攻击,但是我们倾向认为虽然mirai贡献了本次攻击的部分攻击流量,但并非所有的攻击流量都来自原始泄漏版本mirai。具体来源不明,可能是源自我们数据地缘性导致的分析误差,也可能是来自mirai的变种或者混合模式的DDoS攻击。</p>
<p>2016年10月27日更新:在安全社区的帮助下,我们获得了少量攻击现场的数据,证实了之前分析中的若干观点:攻击手段中包含 syn flood,真实源IP,小包,这些真实 bot IP 在我们到今天为止的bot IP 列表中命中率大约33%;攻击手段中包含dns flood,使用伪造源IP,可以断定这部分攻击不是有mirai发起,至少不是泄漏版本mirai发起。所有这些现象与我们之前的观点吻合一致。</p>
<p>【攻击受害者的判定和影响范围的评估】</p>
<p>接到反馈后,我们很快认定攻击受害者是twitter.com使用的域名服务器,而非 twitter.com paypal.com 的Web服务器直接遭受攻击。</p>
<p>dyn公司是知名的网络域名服务提供商,本次攻击中受影响的twitter等多个著名公司都是dyn公司的客户。Dyn公司使用了四个域名/IP为twitter提供域名解析服务,这四个IP分布在四个C类段或者两个B类段中,传统上这是一种常见的网络负载均衡手段。四个IP地址如下表所示。</p>
<p><img src="__GHOST_URL__/content/images/2016/10/table_01_direct_victim.png" alt="" loading="lazy"></p>
<p>在本次事件中,四个IP地址在当天19:00~22:50期间的网络流量波形图如下。峰值达到日常背景流量的20倍,可以判定发生了流量攻击。<br>
<img src="__GHOST_URL__/content/images/2016/10/01_direct_target_flow_chart.png" alt="" loading="lazy"></p>
<p>在我们数据基础上进一步的分析指出,攻击者的攻击手段是混合使用DNS_flood和 syn_flood,结合公开媒体的报道,我们推断这组攻击得手,这组服务器不再对外提供服务,twitter.com 网站在这段时间内也无法访问。以上是攻击的直接受害者。<br>
<img src="__GHOST_URL__/content/images/2016/10/table_02_ddos_vector.png" alt="" loading="lazy"></p>
<p>但是除了twitter还有大量网站例如 paypal.com 和 github.com也无法访问,我们推断这是由于上述攻击造成的波及效应。如下表所示,paypal和github也是DYN的客户。</p>
<p><img src="__GHOST_URL__/content/images/2016/10/table_03_sympathatic_victim.png" alt="" loading="lazy"></p>
<p>dyn为每个重要客户提供四组地址,分布在四个C类段中,如前所述,这是一种传统的网络负载均衡手段。但是在这个结构中,如果四个网段同时遭到大流量的网络攻击,则全部四个段的客户都会受到影响。</p>
<p>我们认为在本次事件中就发生了这种情况,大流量针对 <em>.34/twitter的攻击影响到了同网段不限于 <em>.15/github、</em>.57/paypal服务器的网络流量,最终 github/paypal和twitter一同暂时无法访问。不仅是以上列出的三家网站,其他该网段的客户也会受到影响,比如</em>.5/playstation.net;而如果一个网站不使用dyn的域名解析服务则不会受到影响,比如 wikileak。</p>
<p>在我们的分析中,我们也注意到 github.com 的Web服务器在当天早些时候遭受了直接的DDoS攻击,但是我们不认为那次攻击可以解释整体大范围的安全事件,也并未深究个体事件与整体事件背后的关系。<br>
以上攻击信息可以通过 <a href="https://ddosmon.net/explore/your.target/">https://ddosmon.net/explore/your.target/</a> 来验证。部分链接如下,读者可以根据需要自行调整查询。<br>
<a href="https://ddosmon.net/explore/twitter.com/">https://ddosmon.net/explore/twitter.com/</a><br>
<a href="https://ddosmon.net/explore/github.com/">https://ddosmon.net/explore/github.com/</a><br>
<a href="https://ddosmon.net/explore/paypal.com/">https://ddosmon.net/explore/paypal.com/</a><br>
<a href="https://ddosmon.net/explore/208.78.70.34/">https://ddosmon.net/explore/208.78.70.34/</a><br>
<a href="https://ddosmon.net/explore/208.78.71.34/">https://ddosmon.net/explore/208.78.71.34/</a><br>
<a href="https://ddosmon.net/explore/204.13.250.34/">https://ddosmon.net/explore/204.13.250.34/</a><br>
<a href="https://ddosmon.net/explore/204.13.251.34/">https://ddosmon.net/explore/204.13.251.34/</a></p>
<p>【攻击现场技术特征】</p>
<p>攻击现场有更多技术细节可供讨论,我们列举出部分认为重要的特点,供安全社区进一步分析,以期减轻攻击者对网络的影响。</p>
<p>时间窗口方面,本次攻击主要发生在北京时间2016年10月21日晚间19:00~22:50之间。</p>
<p>攻击手段方面,如前所述本次事件中主要是syn flood和dns flood。下面我们分析攻击的具体特征,并试图分析攻击与mirai泄漏版本/未知mirai变种/其他基于IoT的僵尸网络之间的归因关系。</p>
<p>关于本次攻击中的Syn flood部分,攻击发起的bot IP地址我们倾向认为是真实的。这些IP地址中有45%在最近有扫描23/2323端口的历史行为记录,这一点与mirai的行为相似。在安全社区已经公开的信息中,认为本次攻击流量特征符合Mirai的流量特点。综合以上两点,我们认为本次攻击中有Mirai或者其变种参与。但是对比这些Ip地址与已知mirai bot列表,只有<2%的比例命中,这会一定程度上削弱“整体而非部分攻击由mirai发起”的说法,我们在后文试图引入不同的假设给予解释。</p>
<p>关于本次攻击中的 dns flood 部分,我们倾向认为发起的bot IP是伪造或者是非Mirai家族的。这些IP地址分布离散度直观上看并不高,并且没有历史扫描行为,探查部分IP的开放端口看起来也不像是IoT设备。再加上从泄漏版本的Mirai源码分析,原始版本的mirai 在发起dns flood攻击的时候不会伪造源IP地址,我们可以判定:要么这些IP地址是伪造的,那么一定不是原始版本的mirai;要么这些IP地址是真实的,那就与mirai的关系更远,甚至可能是其他任何僵尸网络发起的。</p>
<p>2016年10月27日更新:在安全社区的帮助下,我们获得了少量攻击现场的数据,证实了之前分析中的若干观点:攻击手段中包含 syn flood,真实源IP,小包,这些真实 bot IP 在我们到今天为止的bot IP 列表中命中率大约33%;攻击手段中包含dns flood,使用伪造源IP,这部分攻击可以断言不是由mirai发起,至少不是泄漏版本mirai发起。所有这些现象与我们之前的观点吻合一致。</p>
<p>以上IP地址和mirai/mirai变种之间的分析汇总如下表所示:<br>
<img src="__GHOST_URL__/content/images/2016/10/table_04_ddos_sip_attribute.png" alt="" loading="lazy"></p>
<p>多个公开的消息源还提到本次攻击中存在DNS变前缀攻击。这种攻击手段通常是针对域名解析服务器,本次攻击中的受害者正是如此。虽然在我们自有的数据中无法验证上述说法,按照我们对消息源既往的信任程度,我们认为这种说法的确成立。</p>
<p>综合起来在攻击手段方面,我们本次攻击中看到了syn flood 和 dns flood,并且相信有dns变前缀攻击存在。总体而言,我们虽然可以认定泄漏版本mirai贡献了本次攻击中的部分流量,但是无法将全部流量归结到泄漏版本mirai。加入不同的假设可以对现象做不同的解释:<br>
——也许是我们收集的bot IP 列表不全面;<br>
——或者我们看到的攻击流量不足以代表dyn在北美地区实际遭受的攻击;<br>
——或者是mirai产生了变种,并且参与了本次攻击;<br>
——或者是其他僵尸网络家族参与了本次攻击。<br>
目前为止我们无法用手头的数据或事实来选择任何一种假设继续深入。</p>
<p>botIP方面,部分bot IP 探测情况是光猫、网络摄像头和网关路由器,这可以验证近期安全社区对以maria为代表的基于IoT的僵尸网络的担心,也值得我们在这里呼吁各IoT设备厂商加强与互联网安全厂商的合作,共同增强网络空间中的安全感。</p>
<p>部分攻击源IP系统截图如下:<br>
<img src="__GHOST_URL__/content/images/2016/10/02_bot_system_list.png" alt="" loading="lazy"></p>
<p>【Mirai僵尸网络历史情况回溯和统计数据】</p>
<p>在2016年8月1日,我们设置的蜜罐第一次被未知扫描源扫中。在9月6日,我们意识到在2323端口上的扫描源有一个显著的spike,并在后续的时间里,我们与安全社区一起,对mirai的源码、扫描感染行为、攻击行为在流量特征、样本特征等方面做了持续的跟踪和分析。整体过程的时间线如下:<br>
<img src="__GHOST_URL__/content/images/2016/10/table_05_marai_traceback_timeline.png" alt="" loading="lazy"></p>
<p>蜜罐被mirai首次扫描到的时间是2016-08-01 12:46,如下图所示。对应的数据可以在下图附属的URL中获得,即2016-08-01~2016-08-08期间感染marai的bot ip数据。<br>
<img src="__GHOST_URL__/content/images/2016/10/table_06_marai_port23_scan_first_hit.png" alt="" loading="lazy"><br>
<a href="http://data.netlab.360.com/feeds/mirai-scanner/scanner.list">http://data.netlab.360.com/feeds/mirai-scanner/scanner.list</a></p>
<p>端口2323上的mirai扫描首次出现在 2016-09-06,如下图所示。2016-08-09及以后的数据,可以发邮件到 <a href="mailto:netlab@360.cn">netlab@360.cn</a> 申请。<br>
<img src="__GHOST_URL__/content/images/2016/10/table_07_marai_port2323_scan_first_hit.png" alt="" loading="lazy"></p>
<p>我们在9月6日观察到的在端口2323上的扫描源暴涨的情况,可以在下图中直观的观察到,或者可以在图下附属的URL中看到最近30天变化的版本。<br>
<img src="__GHOST_URL__/content/images/2016/10/03_spike_on_port2323_first_notice.png" alt="" loading="lazy"></p>
<p><a href="http://scan.netlab.360.com/#/dashboard?dstport=2323">http://scan.netlab.360.com/#/dashboard?dstport=2323</a></p>
<p>我们首篇关于marai的文章发表于2016年10月16日,在blog.netlab.360.com上。在这篇文章中我们提及了收集marai bot IP列表的基本原理和当时的数据统计情况:<br>
<a href="__GHOST_URL__/a-quick-stats-on-the-608-083-mirai-ips-that-hit-our-honeypots-in-the-past-2-5-months/">http://blog.netlab.360.com/a-quick-stats-on-the-608-083-mirai-ips-that-hit-our-honeypots-in-the-past-2-5-months/</a></p>
<p>我们在分析mirai泄漏源码的过程中,发现了mirai扫描模块的一些缺陷/特征,基于这一点我们可以通过检查syn包头部将mirai的扫描与其他在 tcp 23 和tcp 2323 上的扫描源做显著的区分。基于以上分析,我们在历史数据中将mirai的扫描活动可以一直回溯到首次命中时间2016年8月1日。<br>
进一步对Mirai的历史扫描做统计,使得我们有机会细致观察mirai的感染过程的不同阶段:</p>
<p>——8月1日开始,扫描感染过程发起,至9月6日以前,mirai仅扫描23端口。每日扫描源在2k~13k之间波动,中间两个波峰期每日扫描源维持在8k~11k上下,这段时间内每天大约90%~80%的扫描源是之前没有看到的;</p>
<p>——9月6日开始,mirai开始扫描2323 端口,与23端口相比,数量小了大约1个数量级。但此时扫描量相对较小,无论是23端口还是2323端口。</p>
<p>——9月16日到现在,mirai的扫描感染进入一个稳定的发展期,日均扫描IP稳定在16k~22k之间,全新扫描/botIP的比例从80%逐渐下滑到65%~55%区间以后下降速度非常缓慢。</p>
<p>——至2016年10月23日凌晨,累积观察到的mirai bot IP已经有大约720k。这是一个大规模的僵尸网络。</p>
<p>总体而言,marai僵尸网络目前规模已经有720k,这是个相当大的数字,再加上当前的规模扩张仍然保持高速且稳定,这让人相当不安。<br>
以上数据可以从下面两个图中直观的观察:<br>
<img src="__GHOST_URL__/content/images/2016/10/04_mirai_stats_01.png" alt="" loading="lazy"><br>
<img src="__GHOST_URL__/content/images/2016/10/04_mirai_stats_02.png" alt="" loading="lazy"></p>
<p>在来源IP的地理分布方面,我们观察到的bot主要来自 .vn .br .cn .in .co .ru。这五个国家和地区累积占据了我们视野中56%。<br>
<img src="__GHOST_URL__/content/images/2016/10/04_mirai_stats_03.png" alt="" loading="lazy"><br>
<img src="__GHOST_URL__/content/images/2016/10/table_08_marai_geo_distibute.png" alt="" loading="lazy"></p>
<p>我们已经建立了系统实时跟踪mirai僵尸网络,上述数字每日更新,可以在下列网址访问。这个网址上还有mirai的2016.08.01~2016.08.08的bot IP列表可供下载。更完整的bot IP 列表可以发电子邮件到 netlab@360.com申请。<br>
<a href="http://data.netlab.360.com/mirai-scanner">http://data.netlab.360.com/mirai-scanner</a></p>
<p>我们还进一步跟踪了mirai的攻击指令发送渠道。通过分析过去七天的指令发起时间,从时间分布上来看,指令的高峰期发生在北京时间 (GMT +8)的凌晨5:10~7:50之间,这不太符合这个时区既往僵尸网络操作者发出指令的时间,我们倾向于排除mirai的操作者来自北京时区(GMT +8)的可能性。<br>
<img src="__GHOST_URL__/content/images/2016/10/05_mirai_attack_cmd_timezone_distribute-1.png" alt="" loading="lazy"></p>
<p>分析过程中涉及到的工具系统均统一列出在 netlab.360.com,如下表。其中大部分的系统向公众开放,白帽子可以自行运用。部分数据不宜直接公开,仅向受信任的安全社区开放, 白帽子可以在取得我们信任的前提下申请访问。<br>
<img src="__GHOST_URL__/content/images/2016/10/table_09_marai_tracing_related_systems.png" alt="" loading="lazy"></p>
<!--kg-card-end: markdown--> | 【更新记录】
2016-10-23 初始版本
2016-10-27 获得了少量攻击现场数据,分析结果与之前观点吻合一致。
北京时间2016年10月21 日晚间,北美地区大量反馈若干重要的互联网网站无法正常访问。涉及到的网站包括 twitter, paypal,github等等,由于这些网站与北美地区日常生活强烈相关,这次网络故障被北美主要媒体广泛报道,也引起了安全社区的强烈关注。我们与国外安全社区一起协同,对本次网络事件提供数据、加以分析并做了溯源跟踪。
目前我们已经能够确定本次事件是一次DDoS网络攻击事件,攻击目标主要是Dynamic Network Services(dyn)公司,twitter、paypal、github等网站作为dyn公司的客户,在本次攻击中不幸被波及。
在攻击持续溯源的过程中,虽然目前Flashpoint公司已经确认最近广泛受关注的mirai僵尸网络参与了本次网络攻击,但是我们倾向认为虽然mirai贡献了本次攻击的部分攻击流量,但并非所有的攻击流量都来自原始泄漏版本mirai。具体来源不明,可能是源自我们数据地缘性导致的分析误差,也可能是来自mirai的变种或者混合模式的DDoS攻击。
2016年10月27日更新:在安全社区的帮助下,我们获得了少量攻击现场的数据,证实了之前分析中的若干观点:攻击手段中包含 syn flood,真实源IP,小包,这些真实 bot IP 在我们到今天为止的bot IP 列表中命中率大约33%;攻击手段中包含dns flood,使用伪造源IP,可以断定这部分攻击不是有mirai发起,至少不是泄漏版本mirai发起。所有这些现象与我们之前的观点吻合一致。
【攻击受害者的判定和影响范围的评估】
接到反馈后,我们很快认定攻击受害者是twitter.com使用的域名服务器,而非 twitter.com paypal.com 的Web服务器直接遭受攻击。
dyn公司是知名的网络域名服务提供商,本次攻击中受影响的twitter等多个著名公司都是dyn公司的客户。Dyn公司使用了四个域名/IP为twitter提供域名解析服务,这四个IP分布在四个C类段或者两个B类段中,传统上这是一种常见的网络负载均衡手段。四个IP地址如下表所示。
在本次事件中,四个IP地址在当天19:00~22:50期间的网络流量波形图如下。峰值达到日常背景流量的20倍,可以判定发生了流量攻击。
在我们数据基础上进一步的分析指出,攻击者的攻击手段是混合使用DNS_flood和 syn_flood,结合公开媒体的报道,我们推断这组攻击得手,这组服务器不再对外提供服务,twitter.com 网站在这段时间内也无法访问。以上是攻击的直接受害者。
但是除了twitter还有大量网站例如 paypal.com 和 github.com也无法访问,我们推断这是由于上述攻击造成的波及效应。如下表所示,paypal和github也是DYN的客户。
dyn为每个重要客户提供四组地址,分布在四个C类段中,如前所述,这是一种传统的网络负载均衡手段。但是在这个结构中,如果四个网段同时遭到大流量的网络攻击,则全部四个段的客户都会受到影响。
我们认为在本次事件中就发生了这种情况,大流量针对 .34/twitter的攻击影响到了同网段不限于 .15/github、.57/paypal服务器的网络流量,最终 github/paypal和twitter一同暂时无法访问。不仅是以上列出的三家网站,其他该网段的客户也会受到影响,比如.5/playstation.net;而如果一个网站不使用dyn的域名解析服务则不会受到影响,比如 wikileak。
在我们的分析中,我们也注意到 github.com 的Web服务器在当天早些时候遭受了直接的DDoS攻击,但是我们不认为那次攻击可以解释整体大范围的安全事件,也并未深究个体事件与整体事件背后的关系。
以上攻击信息可以通过 https://ddosmon.net/explore/your.target/ 来验证。部分链接如下,读者可以根据需要自行调整查询。
https://ddosmon.net/explore/twitter.com/
https://ddosmon.net/explore/github.com/
https://ddosmon.net/explore/paypal.com/
https://ddosmon.net/explore/208.78.70.34/
https://ddosmon.net/explore/208.78.71.34/
https://ddosmon.net/explore/204.13.250.34/
https://ddosmon.net/explore/204.13.251.34/
【攻击现场技术特征】
攻击现场有更多技术细节可供讨论,我们列举出部分认为重要的特点,供安全社区进一步分析,以期减轻攻击者对网络的影响。
时间窗口方面,本次攻击主要发生在北京时间2016年10月21日晚间19:00~22:50之间。
攻击手段方面,如前所述本次事件中主要是syn flood和dns flood。下面我们分析攻击的具体特征,并试图分析攻击与mirai泄漏版本/未知mirai变种/其他基于IoT的僵尸网络之间的归因关系。
关于本次攻击中的Syn flood部分,攻击发起的bot IP地址我们倾向认为是真实的。这些IP地址中有45%在最近有扫描23/2323端口的历史行为记录,这一点与mirai的行为相似。在安全社区已经公开的信息中,认为本次攻击流量特征符合Mirai的流量特点。综合以上两点,我们认为本次攻击中有Mirai或者其变种参与。但是对比这些Ip地址与已知mirai bot列表,只有<2%的比例命中,这会一定程度上削弱“整体而非部分攻击由mirai发起”的说法,我们在后文试图引入不同的假设给予解释。
关于本次攻击中的 dns flood 部分,我们倾向认为发起的bot IP是伪造或者是非Mirai家族的。这些IP地址分布离散度直观上看并不高,并且没有历史扫描行为,探查部分IP的开放端口看起来也不像是IoT设备。再加上从泄漏版本的Mirai源码分析,原始版本的mirai 在发起dns flood攻击的时候不会伪造源IP地址,我们可以判定:要么这些IP地址是伪造的,那么一定不是原始版本的mirai;要么这些IP地址是真实的,那就与mirai的关系更远,甚至可能是其他任何僵尸网络发起的。
2016年10月27日更新:在安全社区的帮助下,我们获得了少量攻击现场的数据,证实了之前分析中的若干观点:攻击手段中包含 syn flood,真实源IP,小包,这些真实 bot IP 在我们到今天为止的bot IP 列表中命中率大约33%;攻击手段中包含dns flood,使用伪造源IP,这部分攻击可以断言不是由mirai发起,至少不是泄漏版本mirai发起。所有这些现象与我们之前的观点吻合一致。
以上IP地址和mirai/mirai变种之间的分析汇总如下表所示:
多个公开的消息源还提到本次攻击中存在DNS变前缀攻击。这种攻击手段通常是针对域名解析服务器,本次攻击中的受害者正是如此。虽然在我们自有的数据中无法验证上述说法,按照我们对消息源既往的信任程度,我们认为这种说法的确成立。
综合起来在攻击手段方面,我们本次攻击中看到了syn flood 和 dns flood,并且相信有dns变前缀攻击存在。总体而言,我们虽然可以认定泄漏版本mirai贡献了本次攻击中的部分流量,但是无法将全部流量归结到泄漏版本mirai。加入不同的假设可以对现象做不同的解释:
——也许是我们收集的bot IP 列表不全面;
——或者我们看到的攻击流量不足以代表dyn在北美地区实际遭受的攻击;
——或者是mirai产生了变种,并且参与了本次攻击;
——或者是其他僵尸网络家族参与了本次攻击。
目前为止我们无法用手头的数据或事实来选择任何一种假设继续深入。
botIP方面,部分bot IP 探测情况是光猫、网络摄像头和网关路由器,这可以验证近期安全社区对以maria为代表的基于IoT的僵尸网络的担心,也值得我们在这里呼吁各IoT设备厂商加强与互联网安全厂商的合作,共同增强网络空间中的安全感。
部分攻击源IP系统截图如下:
【Mirai僵尸网络历史情况回溯和统计数据】
在2016年8月1日,我们设置的蜜罐第一次被未知扫描源扫中。在9月6日,我们意识到在2323端口上的扫描源有一个显著的spike,并在后续的时间里,我们与安全社区一起,对mirai的源码、扫描感染行为、攻击行为在流量特征、样本特征等方面做了持续的跟踪和分析。整体过程的时间线如下:
蜜罐被mirai首次扫描到的时间是2016-08-01 12:46,如下图所示。对应的数据可以在下图附属的URL中获得,即2016-08-01~2016-08-08期间感染marai的bot ip数据。
http://data.netlab.360.com/feeds/mirai-scanner/scanner.list
端口2323上的mirai扫描首次出现在 2016-09-06,如下图所示。2016-08-09及以后的数据,可以发邮件到 netlab@360.cn 申请。
我们在9月6日观察到的在端口2323上的扫描源暴涨的情况,可以在下图中直观的观察到,或者可以在图下附属的URL中看到最近30天变化的版本。
http://scan.netlab.360.com/#/dashboard?dstport=2323
我们首篇关于marai的文章发表于2016年10月16日,在blog.netlab.360.com上。在这篇文章中我们提及了收集marai bot IP列表的基本原理和当时的数据统计情况:
http://blog.netlab.360.com/a-quick-stats-on-the-608-083-mirai-ips-that-hit-our-honeypots-in-the-past-2-5-months/
我们在分析mirai泄漏源码的过程中,发现了mirai扫描模块的一些缺陷/特征,基于这一点我们可以通过检查syn包头部将mirai的扫描与其他在 tcp 23 和tcp 2323 上的扫描源做显著的区分。基于以上分析,我们在历史数据中将mirai的扫描活动可以一直回溯到首次命中时间2016年8月1日。
进一步对Mirai的历史扫描做统计,使得我们有机会细致观察mirai的感染过程的不同阶段:
——8月1日开始,扫描感染过程发起,至9月6日以前,mirai仅扫描23端口。每日扫描源在2k~13k之间波动,中间两个波峰期每日扫描源维持在8k~11k上下,这段时间内每天大约90%~80%的扫描源是之前没有看到的;
——9月6日开始,mirai开始扫描2323 端口,与23端口相比,数量小了大约1个数量级。但此时扫描量相对较小,无论是23端口还是2323端口。
——9月16日到现在,mirai的扫描感染进入一个稳定的发展期,日均扫描IP稳定在16k~22k之间,全新扫描/botIP的比例从80%逐渐下滑到65%~55%区间以后下降速度非常缓慢。
——至2016年10月23日凌晨,累积观察到的mirai bot IP已经有大约720k。这是一个大规模的僵尸网络。
总体而言,marai僵尸网络目前规模已经有720k,这是个相当大的数字,再加上当前的规模扩张仍然保持高速且稳定,这让人相当不安。
以上数据可以从下面两个图中直观的观察:
在来源IP的地理分布方面,我们观察到的bot主要来自 .vn .br .cn .in .co .ru。这五个国家和地区累积占据了我们视野中56%。
我们已经建立了系统实时跟踪mirai僵尸网络,上述数字每日更新,可以在下列网址访问。这个网址上还有mirai的2016.08.01~2016.08.08的bot IP列表可供下载。更完整的bot IP 列表可以发电子邮件到 netlab@360.com申请。
http://data.netlab.360.com/mirai-scanner
我们还进一步跟踪了mirai的攻击指令发送渠道。通过分析过去七天的指令发起时间,从时间分布上来看,指令的高峰期发生在北京时间 (GMT +8)的凌晨5:10~7:50之间,这不太符合这个时区既往僵尸网络操作者发出指令的时间,我们倾向于排除mirai的操作者来自北京时区(GMT +8)的可能性。
分析过程中涉及到的工具系统均统一列出在 netlab.360.com,如下表。其中大部分的系统向公众开放,白帽子可以自行运用。部分数据不宜直接公开,仅向受信任的安全社区开放, 白帽子可以在取得我们信任的前提下申请访问。
| {"version":"0.3.1","markups":[],"atoms":[],"cards":[["markdown",{"cardName":"card-markdown","markdown":"\n【更新记录】\n\n2016-10-23 初始版本\n2016-10-27 获得了少量攻击现场数据,分析结果与之前观点吻合一致。\n\n\n北京时间2016年10月21 日晚间,北美地区大量反馈若干重要的互联网网站无法正常访问。涉及到的网站包括 twitter, paypal,github等等,由于这些网站与北美地区日常生活强烈相关,这次网络故障被北美主要媒体广泛报道,也引起了安全社区的强烈关注。我们与国外安全社区一起协同,对本次网络事件提供数据、加以分析并做了溯源跟踪。\n\n目前我们已经能够确定本次事件是一次DDoS网络攻击事件,攻击目标主要是Dynamic Network Services(dyn)公司,twitter、paypal、github等网站作为dyn公司的客户,在本次攻击中不幸被波及。\n在攻击持续溯源的过程中,虽然目前Flashpoint公司已经确认最近广泛受关注的mirai僵尸网络参与了本次网络攻击,但是我们倾向认为虽然mirai贡献了本次攻击的部分攻击流量,但并非所有的攻击流量都来自原始泄漏版本mirai。具体来源不明,可能是源自我们数据地缘性导致的分析误差,也可能是来自mirai的变种或者混合模式的DDoS攻击。 \n\n2016年10月27日更新:在安全社区的帮助下,我们获得了少量攻击现场的数据,证实了之前分析中的若干观点:攻击手段中包含 syn flood,真实源IP,小包,这些真实 bot IP 在我们到今天为止的bot IP 列表中命中率大约33%;攻击手段中包含dns flood,使用伪造源IP,可以断定这部分攻击不是有mirai发起,至少不是泄漏版本mirai发起。所有这些现象与我们之前的观点吻合一致。\n\n【攻击受害者的判定和影响范围的评估】\n\n接到反馈后,我们很快认定攻击受害者是twitter.com使用的域名服务器,而非 twitter.com paypal.com 的Web服务器直接遭受攻击。\n\ndyn公司是知名的网络域名服务提供商,本次攻击中受影响的twitter等多个著名公司都是dyn公司的客户。Dyn公司使用了四个域名/IP为twitter提供域名解析服务,这四个IP分布在四个C类段或者两个B类段中,传统上这是一种常见的网络负载均衡手段。四个IP地址如下表所示。\n\n![](__GHOST_URL__/content/images/2016/10/table_01_direct_victim.png)\n\n在本次事件中,四个IP地址在当天19:00~22:50期间的网络流量波形图如下。峰值达到日常背景流量的20倍,可以判定发生了流量攻击。 \n![](__GHOST_URL__/content/images/2016/10/01_direct_target_flow_chart.png)\n\n在我们数据基础上进一步的分析指出,攻击者的攻击手段是混合使用DNS_flood和 syn_flood,结合公开媒体的报道,我们推断这组攻击得手,这组服务器不再对外提供服务,twitter.com 网站在这段时间内也无法访问。以上是攻击的直接受害者。\n![](__GHOST_URL__/content/images/2016/10/table_02_ddos_vector.png)\n\n\n但是除了twitter还有大量网站例如 paypal.com 和 github.com也无法访问,我们推断这是由于上述攻击造成的波及效应。如下表所示,paypal和github也是DYN的客户。\n\n![](__GHOST_URL__/content/images/2016/10/table_03_sympathatic_victim.png)\n\ndyn为每个重要客户提供四组地址,分布在四个C类段中,如前所述,这是一种传统的网络负载均衡手段。但是在这个结构中,如果四个网段同时遭到大流量的网络攻击,则全部四个段的客户都会受到影响。\n\n我们认为在本次事件中就发生了这种情况,大流量针对 *.34/twitter的攻击影响到了同网段不限于 *.15/github、*.57/paypal服务器的网络流量,最终 github/paypal和twitter一同暂时无法访问。不仅是以上列出的三家网站,其他该网段的客户也会受到影响,比如*.5/playstation.net;而如果一个网站不使用dyn的域名解析服务则不会受到影响,比如 wikileak。\n\n在我们的分析中,我们也注意到 github.com 的Web服务器在当天早些时候遭受了直接的DDoS攻击,但是我们不认为那次攻击可以解释整体大范围的安全事件,也并未深究个体事件与整体事件背后的关系。\n以上攻击信息可以通过 https://ddosmon.net/explore/your.target/ 来验证。部分链接如下,读者可以根据需要自行调整查询。\nhttps://ddosmon.net/explore/twitter.com/\nhttps://ddosmon.net/explore/github.com/\nhttps://ddosmon.net/explore/paypal.com/\nhttps://ddosmon.net/explore/208.78.70.34/\nhttps://ddosmon.net/explore/208.78.71.34/\nhttps://ddosmon.net/explore/204.13.250.34/\nhttps://ddosmon.net/explore/204.13.251.34/\n\n\n【攻击现场技术特征】\n\n攻击现场有更多技术细节可供讨论,我们列举出部分认为重要的特点,供安全社区进一步分析,以期减轻攻击者对网络的影响。\n\n时间窗口方面,本次攻击主要发生在北京时间2016年10月21日晚间19:00~22:50之间。\n\n攻击手段方面,如前所述本次事件中主要是syn flood和dns flood。下面我们分析攻击的具体特征,并试图分析攻击与mirai泄漏版本/未知mirai变种/其他基于IoT的僵尸网络之间的归因关系。\n\n关于本次攻击中的Syn flood部分,攻击发起的bot IP地址我们倾向认为是真实的。这些IP地址中有45%在最近有扫描23/2323端口的历史行为记录,这一点与mirai的行为相似。在安全社区已经公开的信息中,认为本次攻击流量特征符合Mirai的流量特点。综合以上两点,我们认为本次攻击中有Mirai或者其变种参与。但是对比这些Ip地址与已知mirai bot列表,只有<2%的比例命中,这会一定程度上削弱“整体而非部分攻击由mirai发起”的说法,我们在后文试图引入不同的假设给予解释。\n\n关于本次攻击中的 dns flood 部分,我们倾向认为发起的bot IP是伪造或者是非Mirai家族的。这些IP地址分布离散度直观上看并不高,并且没有历史扫描行为,探查部分IP的开放端口看起来也不像是IoT设备。再加上从泄漏版本的Mirai源码分析,原始版本的mirai 在发起dns flood攻击的时候不会伪造源IP地址,我们可以判定:要么这些IP地址是伪造的,那么一定不是原始版本的mirai;要么这些IP地址是真实的,那就与mirai的关系更远,甚至可能是其他任何僵尸网络发起的。\n\n2016年10月27日更新:在安全社区的帮助下,我们获得了少量攻击现场的数据,证实了之前分析中的若干观点:攻击手段中包含 syn flood,真实源IP,小包,这些真实 bot IP 在我们到今天为止的bot IP 列表中命中率大约33%;攻击手段中包含dns flood,使用伪造源IP,这部分攻击可以断言不是由mirai发起,至少不是泄漏版本mirai发起。所有这些现象与我们之前的观点吻合一致。\n\n以上IP地址和mirai/mirai变种之间的分析汇总如下表所示:\n![](__GHOST_URL__/content/images/2016/10/table_04_ddos_sip_attribute.png)\n\n多个公开的消息源还提到本次攻击中存在DNS变前缀攻击。这种攻击手段通常是针对域名解析服务器,本次攻击中的受害者正是如此。虽然在我们自有的数据中无法验证上述说法,按照我们对消息源既往的信任程度,我们认为这种说法的确成立。\n\n综合起来在攻击手段方面,我们本次攻击中看到了syn flood 和 dns flood,并且相信有dns变前缀攻击存在。总体而言,我们虽然可以认定泄漏版本mirai贡献了本次攻击中的部分流量,但是无法将全部流量归结到泄漏版本mirai。加入不同的假设可以对现象做不同的解释:\n——也许是我们收集的bot IP 列表不全面;\n——或者我们看到的攻击流量不足以代表dyn在北美地区实际遭受的攻击;\n——或者是mirai产生了变种,并且参与了本次攻击;\n——或者是其他僵尸网络家族参与了本次攻击。\n目前为止我们无法用手头的数据或事实来选择任何一种假设继续深入。\n\nbotIP方面,部分bot IP 探测情况是光猫、网络摄像头和网关路由器,这可以验证近期安全社区对以maria为代表的基于IoT的僵尸网络的担心,也值得我们在这里呼吁各IoT设备厂商加强与互联网安全厂商的合作,共同增强网络空间中的安全感。\n\n部分攻击源IP系统截图如下:\n![](__GHOST_URL__/content/images/2016/10/02_bot_system_list.png)\n\n\n【Mirai僵尸网络历史情况回溯和统计数据】\n\n在2016年8月1日,我们设置的蜜罐第一次被未知扫描源扫中。在9月6日,我们意识到在2323端口上的扫描源有一个显著的spike,并在后续的时间里,我们与安全社区一起,对mirai的源码、扫描感染行为、攻击行为在流量特征、样本特征等方面做了持续的跟踪和分析。整体过程的时间线如下:\n![](__GHOST_URL__/content/images/2016/10/table_05_marai_traceback_timeline.png)\n\n蜜罐被mirai首次扫描到的时间是2016-08-01 12:46,如下图所示。对应的数据可以在下图附属的URL中获得,即2016-08-01~2016-08-08期间感染marai的bot ip数据。\n![](__GHOST_URL__/content/images/2016/10/table_06_marai_port23_scan_first_hit.png)\nhttp://data.netlab.360.com/feeds/mirai-scanner/scanner.list\n\n端口2323上的mirai扫描首次出现在 2016-09-06,如下图所示。2016-08-09及以后的数据,可以发邮件到 netlab@360.cn 申请。\n![](__GHOST_URL__/content/images/2016/10/table_07_marai_port2323_scan_first_hit.png)\n\n我们在9月6日观察到的在端口2323上的扫描源暴涨的情况,可以在下图中直观的观察到,或者可以在图下附属的URL中看到最近30天变化的版本。\n![](__GHOST_URL__/content/images/2016/10/03_spike_on_port2323_first_notice.png)\n \nhttp://scan.netlab.360.com/#/dashboard?dstport=2323\n\n我们首篇关于marai的文章发表于2016年10月16日,在blog.netlab.360.com上。在这篇文章中我们提及了收集marai bot IP列表的基本原理和当时的数据统计情况:\n__GHOST_URL__/a-quick-stats-on-the-608-083-mirai-ips-that-hit-our-honeypots-in-the-past-2-5-months/\n\n我们在分析mirai泄漏源码的过程中,发现了mirai扫描模块的一些缺陷/特征,基于这一点我们可以通过检查syn包头部将mirai的扫描与其他在 tcp 23 和tcp 2323 上的扫描源做显著的区分。基于以上分析,我们在历史数据中将mirai的扫描活动可以一直回溯到首次命中时间2016年8月1日。\n进一步对Mirai的历史扫描做统计,使得我们有机会细致观察mirai的感染过程的不同阶段:\n\n——8月1日开始,扫描感染过程发起,至9月6日以前,mirai仅扫描23端口。每日扫描源在2k~13k之间波动,中间两个波峰期每日扫描源维持在8k~11k上下,这段时间内每天大约90%~80%的扫描源是之前没有看到的; \n\n——9月6日开始,mirai开始扫描2323 端口,与23端口相比,数量小了大约1个数量级。但此时扫描量相对较小,无论是23端口还是2323端口。\n\n——9月16日到现在,mirai的扫描感染进入一个稳定的发展期,日均扫描IP稳定在16k~22k之间,全新扫描/botIP的比例从80%逐渐下滑到65%~55%区间以后下降速度非常缓慢。\n\n——至2016年10月23日凌晨,累积观察到的mirai bot IP已经有大约720k。这是一个大规模的僵尸网络。\n\n总体而言,marai僵尸网络目前规模已经有720k,这是个相当大的数字,再加上当前的规模扩张仍然保持高速且稳定,这让人相当不安。\n以上数据可以从下面两个图中直观的观察:\n![](__GHOST_URL__/content/images/2016/10/04_mirai_stats_01.png)\n![](__GHOST_URL__/content/images/2016/10/04_mirai_stats_02.png)\n \n \n在来源IP的地理分布方面,我们观察到的bot主要来自 .vn .br .cn .in .co .ru。这五个国家和地区累积占据了我们视野中56%。\n![](__GHOST_URL__/content/images/2016/10/04_mirai_stats_03.png)\n![](__GHOST_URL__/content/images/2016/10/table_08_marai_geo_distibute.png)\n \n我们已经建立了系统实时跟踪mirai僵尸网络,上述数字每日更新,可以在下列网址访问。这个网址上还有mirai的2016.08.01~2016.08.08的bot IP列表可供下载。更完整的bot IP 列表可以发电子邮件到 netlab@360.com申请。\nhttp://data.netlab.360.com/mirai-scanner\n\n我们还进一步跟踪了mirai的攻击指令发送渠道。通过分析过去七天的指令发起时间,从时间分布上来看,指令的高峰期发生在北京时间 (GMT +8)的凌晨5:10~7:50之间,这不太符合这个时区既往僵尸网络操作者发出指令的时间,我们倾向于排除mirai的操作者来自北京时区(GMT +8)的可能性。\n![](__GHOST_URL__/content/images/2016/10/05_mirai_attack_cmd_timezone_distribute-1.png)\n\n分析过程中涉及到的工具系统均统一列出在 netlab.360.com,如下表。其中大部分的系统向公众开放,白帽子可以自行运用。部分数据不宜直接公开,仅向受信任的安全社区开放, 白帽子可以在取得我们信任的前提下申请访问。\n![](__GHOST_URL__/content/images/2016/10/table_09_marai_tracing_related_systems.png)\n\n"}]],"sections":[[10,0]],"ghostVersion":"3.0"} | 32 |
post | null | 2016-10-27T15:41:40.000Z | 63873b9a8b1c1e0007f52eeb | a-mirai-botnet-c2-data-analysis | 0 | 2018-10-06T08:56:11.000Z | public | published | null | 2016-10-27T16:04:02.000Z | 关于 mirai 僵尸网络控制主机的数据分析 | "<!--kg-card-begin: markdown--><p>之前的文章中已经提及,我们的僵尸网络跟踪系统(...TRUNCATED) | "之前的文章中已经提及,我们的僵尸网络跟踪系统对mirai僵尸网络控制主机(...TRUNCATED) | "{\"version\":\"0.3.1\",\"markups\":[],\"atoms\":[],\"cards\":[[\"markdown\",{\"cardName\":\"card-ma(...TRUNCATED) | 33 |
post | null | 2016-11-29T03:32:51.000Z | 63873b9a8b1c1e0007f52eec | a-mirai-botnet-evolvement-new-variant-and-old-c2 | 0 | 2018-10-06T08:56:25.000Z | public | published | null | 2016-11-29T10:40:18.000Z | 德国电信断网:mirai僵尸网络的新变种和旧主控 | "<!--kg-card-begin: markdown--><p>【更新】</p>\n<ol>\n<li>2016-11-29 18:40:00 初始版本</li>\(...TRUNCATED) | "【更新】\n\n\n 1. 2016-11-29 18:40:00 初始版本\n 2. 2016-11-29 20:10:00 增加了对德国(...TRUNCATED) | "{\"version\":\"0.3.1\",\"markups\":[],\"atoms\":[],\"cards\":[[\"markdown\",{\"cardName\":\"card-ma(...TRUNCATED) | 34 |
This dataset card aims to be a base template for new datasets. It has been generated using this raw template.
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
Users should be made aware of the risks, biases and limitations of the dataset. More information needed for further recommendations.
BibTeX:
[More Information Needed]
APA:
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]