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

<channel>
	<title>Kernel2Heart &#187; Security</title>
	<atom:link href="http://www.kernel2heart.com/labels/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kernel2heart.com</link>
	<description>一个人的内心里,究竟隐藏了什么呢?</description>
	<lastBuildDate>Fri, 20 May 2011 05:10:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Chromium安全性提升</title>
		<link>http://www.kernel2heart.com/2010/11/the-security-improvement-of-chromium/</link>
		<comments>http://www.kernel2heart.com/2010/11/the-security-improvement-of-chromium/#comments</comments>
		<pubDate>Sat, 13 Nov 2010 16:13:33 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[八卦资讯]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2010/11/the-security-improvement-of-chromium/</guid>
		<description><![CDATA[一直想写一篇关于Chromium的安全性文章，但是一直没有写。今天真好趁着Google又给Chromiun添加新安全功能的时候，写一篇相关的文章吧。那么就从功能添加的顺序来吧。 1. 程序ASLR/标签进程降权运行 ASLR是Chromium最初就添加的功能，不过说实话这个功能对Firefox也是有的，但是Firefox有一个缺点是某些文件并未完全使用ASLR功能编译。而且ASLR功能还是需要Vista+系统支持才可以运行的。标签降权应该是Chromium最初用的吧，如果没记错的话。 2. 插件自动更新功能（Chrome） 插件是经常容易被攻击的方面，比如常见的Flash/PDF挂马。不过Google为了防止用户不能及时升级，于是将插件包含在浏览器中，于是乎，在升级浏览器时就会自动升级了插件。不过某些原因，Chomium并不包含某些非开源商业软件（比如Flash/PDF等等），而Chrome中使用的Flash是官方最新版，PDF则是Foxit Reader SDK编译的。 3. XSS攻击过滤功能 XSS是跨站攻击的简称，XSS对一般用户的攻击的后果，可能是挂马、自动执行某些私密功能，甚至密码外泄。该功能在最新版中并没有默认开启，可以在地址栏中输入：&#34;about:flags&#34;，进入实验室中找到“XSS Auditor”选择启用即可。 4. Flash插件Sandbox运行 Google 已经实现了利用下一代浏览器插件 API 成功的将 Flash 插件放入了沙箱中，从 Chromium Build 66022 开始，Windows 平台的 Flash 插件将默认运行于沙箱中（需要 Flash 10.1.103.19 或更新版本，现在这个版本的Flash还没发布）。这样就再也不用担心挂马问题了。 5. Click To Play 这个功能其实不怎么算新功能，以前就已经出现在了Chromium的代码中，不过需要使用命令行开启。现在出现在了实验室中，可以默认开启。Click To Play的功能是从另外一个方面禁止某些使用插件的恶意行为，比如挂马。在开启该功能后，在“高级选项”中的“内容设置”里的插件标签里可以选择。 这样，在网页中加载时并不会启用插件，即使有攻击该插件的恶意代码，也不能够执行。 &#160; &#8230; <a href="http://www.kernel2heart.com/2010/11/the-security-improvement-of-chromium/">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>一直想写一篇关于Chromium的安全性文章，但是一直没有写。今天真好趁着Google又给Chromiun添加新安全功能的时候，写一篇相关的文章吧。那么就从功能添加的顺序来吧。</p>
<p>  <span id="more-485"></span>
<p>1. 程序ASLR/标签进程降权运行</p>
<p>ASLR是Chromium最初就添加的功能，不过说实话这个功能对Firefox也是有的，但是Firefox有一个缺点是某些文件并未完全使用ASLR功能编译。而且ASLR功能还是需要Vista+系统支持才可以运行的。标签降权应该是Chromium最初用的吧，如果没记错的话。</p>
<p>2. 插件自动更新功能（Chrome）</p>
<p>插件是经常容易被攻击的方面，比如常见的Flash/PDF挂马。不过Google为了防止用户不能及时升级，于是将插件包含在浏览器中，于是乎，在升级浏览器时就会自动升级了插件。不过某些原因，Chomium并不包含某些非开源商业软件（比如Flash/PDF等等），而Chrome中使用的Flash是官方最新版，PDF则是Foxit Reader SDK编译的。</p>
<p>3. XSS攻击过滤功能</p>
<p>XSS是跨站攻击的简称，XSS对一般用户的攻击的后果，可能是挂马、自动执行某些私密功能，甚至密码外泄。该功能在最新版中并没有默认开启，可以在地址栏中输入：&quot;about:flags&quot;，进入实验室中找到“XSS Auditor”选择启用即可。</p>
<p>4. Flash插件Sandbox运行</p>
<p>Google 已经实现了利用下一代浏览器插件 API 成功的将 Flash 插件放入了沙箱中，从 Chromium Build 66022 开始，Windows 平台的 Flash 插件将默认运行于沙箱中（需要 Flash 10.1.103.19 或更新版本，<strong>现在这个版本的Flash还没发布</strong>）。这样就再也不用担心挂马问题了。</p>
<p>5. Click To Play</p>
<p>这个功能其实不怎么算新功能，以前就已经出现在了Chromium的代码中，不过需要使用命令行开启。现在出现在了实验室中，可以默认开启。Click To Play的功能是从另外一个方面禁止某些使用插件的恶意行为，比如挂马。在开启该功能后，在“高级选项”中的“内容设置”里的插件标签里可以选择。</p>
<p>这样，在网页中加载时并不会启用插件，即使有攻击该插件的恶意代码，也不能够执行。</p>
<p>&#160;</p>
<p>其实，Google对待安全的态度确实是值得称赞的，相比很多大厂商都要好上很多。这样的企业，且不问是不是什么品质如何的公司，起码可算是一个专业的公司了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2010/11/the-security-improvement-of-chromium/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>一个有趣的禁止复制代码</title>
		<link>http://www.kernel2heart.com/2010/07/a-clipboard-hijack-code/</link>
		<comments>http://www.kernel2heart.com/2010/07/a-clipboard-hijack-code/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 07:05:32 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2010/07/%e4%b8%80%e4%b8%aa%e6%9c%89%e8%b6%a3%e7%9a%84%e7%a6%81%e6%ad%a2%e5%a4%8d%e5%88%b6%e4%bb%a3%e7%a0%81/</guid>
		<description><![CDATA[其实是clipboard hijacking技术罢了。 主要内容是在content-min中：]]></description>
			<content:encoded><![CDATA[<p>其实是clipboard hijacking技术罢了。</p>
<p> <span id="more-450"></span>  主要内容是在content-min中： <</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">KISSY.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;textarea&quot;</span><span style="color: #339933;">,</span> b <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\u</span>7981<span style="color: #000099; font-weight: bold;">\u</span>6b62copy!&quot;</span><span style="color: #339933;">,</span> g <span style="color: #339933;">=</span> c.<span style="color: #660066;">Event</span><span style="color: #339933;">,</span> f <span style="color: #339933;">=</span> document<span style="color: #339933;">,</span> d <span style="color: #339933;">=</span> f.<span style="color: #660066;">body</span><span style="color: #339933;">,</span> h <span style="color: #339933;">=</span> c.<span style="color: #660066;">DOM</span><span style="color: #339933;">,</span> e <span style="color: #339933;">=</span> c.<span style="color: #660066;">Node</span><span style="color: #339933;">,</span> 
    a <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> e<span style="color: #009900;">&#40;</span>d.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>h.<span style="color: #660066;">create</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;&quot;</span> <span style="color: #339933;">+</span> i <span style="color: #339933;">+</span> <span style="color: #3366CC;">' style=&quot;position:absolute;left:-9999px;&quot;&gt;'</span> <span style="color: #339933;">+</span> b <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&lt;/&quot;</span> <span style="color: #339933;">+</span> i <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    g.<span style="color: #660066;">on</span><span style="color: #009900;">&#40;</span>document<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;contextmenu&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>j<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        j.<span style="color: #660066;">halt</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    g.<span style="color: #660066;">on</span><span style="color: #009900;">&#40;</span>document<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;keydown&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>l<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> m <span style="color: #339933;">=</span> l.<span style="color: #660066;">keyCode</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>m <span style="color: #339933;">===</span> <span style="color: #CC0000;">67</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>l.<span style="color: #660066;">ctrlKey</span> <span style="color: #339933;">||</span> l.<span style="color: #660066;">metaKey</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> j <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> c.<span style="color: #660066;">Selection</span><span style="color: #009900;">&#40;</span>f<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> k <span style="color: #339933;">=</span> j.<span style="color: #660066;">getRanges</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
            a<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #000066;">focus</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            a<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">select</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            setTimeout<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#123;</span>
                k.<span style="color: #660066;">select</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    d.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">createTextNode</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\u</span>6211<span style="color: #000099; font-weight: bold;">\u</span>662f<span style="color: #000099; font-weight: bold;">\u</span>5185<span style="color: #000099; font-weight: bold;">\u</span>5bb9<span style="color: #000099; font-weight: bold;">\u</span>ff0c<span style="color: #000099; font-weight: bold;">\u</span>4f60<span style="color: #000099; font-weight: bold;">\u</span>53ef<span style="color: #000099; font-weight: bold;">\u</span>4ee5copy<span style="color: #000099; font-weight: bold;">\u</span>6211<span style="color: #000099; font-weight: bold;">\u</span>770b<span style="color: #000099; font-weight: bold;">\u</span>770b<span style="color: #000099; font-weight: bold;">\u</span>ff01&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>适用于所有浏览器，google Docs也是使用的这种技术。<br />
例子可以在<a href="http://lite-ext.googlecode.com/svn/trunk/lite-ext/playground/no-copy/no-copy.html" target="_blank">http://lite-ext.googlecode.com/svn/trunk/lite-ext/playground/no-copy/no-copy.html</a>找到</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2010/07/a-clipboard-hijack-code/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>江湖波澜：360缘何紧咬金山不放</title>
		<link>http://www.kernel2heart.com/2010/05/why-360safe-attacks-kingsoft/</link>
		<comments>http://www.kernel2heart.com/2010/05/why-360safe-attacks-kingsoft/#comments</comments>
		<pubDate>Wed, 26 May 2010 12:33:32 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[视点观察]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2010/05/why-360safe-attacks-kingsoft/</guid>
		<description><![CDATA[有人的地方就有江湖，这真是一个用来讲解这个故事最好的注解。我们都是这场商业赌局的旁观者，而这场争斗中，胜者永远只有一个，抱歉我不那么看好金山。 好个周鸿祎！一出手就是雷霆万钧，使金山措手不及，一石三鸟，可谓占尽先机。 周鸿祎缘何这个时候发力，打压金山呢？这个问题还是我们慢慢说起吧。 市场份额之争 360选择在这个时机打击金山，最主要的问题无疑是保证自己的知名度，然后保证市场份额。 当前段时间360发力，打击瑞星的时候，瑞星也是茫然无措，仓皇应对。这场争斗的结果是，瑞星杀毒软件的市场份额大减，而360自制的360杀毒的市场份额则产生了大幅的市场份额提升。虽然这一次和上一次瑞星和360之争不太一样，但是回过头来看看，360却是受到了别人的威胁，这个威胁来自于金山。 金山推出的一款金山网盾本来就是360网盾的直接竞争对手（其实之前360也没有网盾这东西，算是集成在360的网页防护里），今年金山有在不遗余力的推动金山卫士的发展，这个可是深深的撼动了360的根本。360最大的装机量无疑是360安全卫士，这个软件的装机量应该仅次于QQ，如果360丢失了360安全卫士强大的装机量，那么就像一个大厦没有了基石，倒不倒根本不用回答，只要看什么时候倒就可以了。 360与可牛之争 可牛是什么？可牛在此之前仅仅只是一个非主流修图软件。但是说道360和可牛的关系，那可真的不一般。可牛的创立者傅盛就是前奇虎公司个人软件事业部总经理，负责360安全卫士及相关产品的开发和产品。2008年8月19日正式从奇虎离职之后，傅盛就创立了可牛网络技术（北京）有限公司。 当时傅盛离职时，给360带来了重创。因为傅盛的离职，带走了一批360的骨干技术人员，也成就了新可牛的骨干。当时对360的影响之大，估计外人一时很难了解，不过在那一段时间中，360的招聘条件却能反映出这个企业因为傅盛离职带来的元气大伤。虽然后来我曾私下问起这件事情，不过表面上回答的轻松：一切正常，没有问题，但实际上暗中的动作还是难掩实力的下降。 不过经过年半的修养生息，360已经比以前更加强大了，而傅盛限于一个不得进入同行业竞争的协议，迟迟未再入安全行业。不过事实上傅盛带走的不单单是一些普通的程序员，而是一队专业的安全人员，因此再入安全行业，只不过是迟早的事情罢了。 前段时间就有新闻提到可牛实际是卡巴斯基+金山云引擎，联想到傅盛与周鸿祎的恩恩怨怨，难免会有一些联想罢了。 360的市场拓展 这个事情估计外人也不见得了解了，我想除了周鸿祎，很难有人猜的透他究竟在做什么。没错，360安全卫士永久免费，360杀毒永久免费，可是这些都免费了，钱从哪里来呢？从风投？ 当时马云一句话：“淘宝免费”，于是当淘宝要收费的消息出来之后导致大量卖家的强烈反对，最终还是免费的网站。周鸿祎有了一个前车之鉴，难免不得揣测一下自己的前途。产品都免费了，钱从哪里来？360也许需要变革了吧。 国外的安全厂商，有一些也是免费个人用户杀毒，那么他们怎么赚钱的呢？对，企业用户。于是周鸿祎盯上了企业这块大蛋糕。实际上在此之前，国内主要的企业级安全厂商主要把持在赛门铁克、瑞星、金山这些大家比较熟悉的玩家手中，如何从他们手中获得市场，也是周鸿祎值得考虑的问题。 周鸿祎不笨，所以就把用过的手段重新用一遍就可以了。而且，周鸿祎从离开yahoo时就开始玩，而且一直都没失手过。 后记 本来写这篇文章的冲动还是满强烈的，不过想了想，最后一直也还是没怎么开始动手。停了几停，删掉一些比较敏感和倾向性的话，所以文章就变成了这个样子。 我很敬佩周鸿祎，曾经方正的天才程序员，现在也是一个伟大的商人。商场如战场，也是我所信奉的信条。可惜一直没有见到过周鸿祎的真颜，卻感遗憾。第一年老周宴请，我不知道而未到席，第二年去的时候，齐向东已经走马上任，于是还是没有见到。如果有机会，还是希望可以和周鸿祎先生一起坐下来，倒一杯茶，慢慢聊聊这个神奇的世界，也不错。]]></description>
			<content:encoded><![CDATA[<p>有人的地方就有江湖，这真是一个用来讲解这个故事最好的注解。我们都是这场商业赌局的旁观者，而这场争斗中，胜者永远只有一个，抱歉我不那么看好金山。</p>
<p>好个周鸿祎！一出手就是雷霆万钧，使金山措手不及，一石三鸟，可谓占尽先机。</p>
<p>周鸿祎缘何这个时候发力，打压金山呢？这个问题还是我们慢慢说起吧。</p>
<p> <span id="more-413"></span><br />
<h1>市场份额之争</h1>
<p>360选择在这个时机打击金山，最主要的问题无疑是保证自己的知名度，然后保证市场份额。</p>
<p>当前段时间360发力，打击瑞星的时候，瑞星也是茫然无措，仓皇应对。这场争斗的结果是，瑞星杀毒软件的市场份额大减，而360自制的360杀毒的市场份额则产生了大幅的市场份额提升。虽然这一次和上一次瑞星和360之争不太一样，但是回过头来看看，360却是受到了别人的威胁，这个威胁来自于金山。</p>
<p>金山推出的一款金山网盾本来就是360网盾的直接竞争对手（其实之前360也没有网盾这东西，算是集成在360的网页防护里），今年金山有在不遗余力的推动金山卫士的发展，这个可是深深的撼动了360的根本。360最大的装机量无疑是360安全卫士，这个软件的装机量应该仅次于QQ，如果360丢失了360安全卫士强大的装机量，那么就像一个大厦没有了基石，倒不倒根本不用回答，只要看什么时候倒就可以了。</p>
<h1>360与可牛之争</h1>
<p>可牛是什么？可牛在此之前仅仅只是一个非主流修图软件。但是说道360和可牛的关系，那可真的不一般。可牛的创立者傅盛就是前奇虎公司个人软件事业部总经理，负责360安全卫士及相关产品的开发和产品。2008年8月19日正式从奇虎离职之后，傅盛就创立了可牛网络技术（北京）有限公司。</p>
<p>当时傅盛离职时，给360带来了重创。因为傅盛的离职，带走了一批360的骨干技术人员，也成就了新可牛的骨干。当时对360的影响之大，估计外人一时很难了解，不过在那一段时间中，360的招聘条件却能反映出这个企业因为傅盛离职带来的元气大伤。虽然后来我曾私下问起这件事情，不过表面上回答的轻松：一切正常，没有问题，但实际上暗中的动作还是难掩实力的下降。</p>
<p>不过经过年半的修养生息，360已经比以前更加强大了，而傅盛限于一个不得进入同行业竞争的协议，迟迟未再入安全行业。不过事实上傅盛带走的不单单是一些普通的程序员，而是一队专业的安全人员，因此再入安全行业，只不过是迟早的事情罢了。</p>
<p>前段时间就有新闻提到可牛实际是卡巴斯基+金山云引擎，联想到傅盛与周鸿祎的恩恩怨怨，难免会有一些联想罢了。</p>
<h1>360的市场拓展</h1>
<p>这个事情估计外人也不见得了解了，我想除了周鸿祎，很难有人猜的透他究竟在做什么。没错，360安全卫士永久免费，360杀毒永久免费，可是这些都免费了，钱从哪里来呢？从风投？</p>
<p>当时马云一句话：“淘宝免费”，于是当淘宝要收费的消息出来之后导致大量卖家的强烈反对，最终还是免费的网站。周鸿祎有了一个前车之鉴，难免不得揣测一下自己的前途。产品都免费了，钱从哪里来？360也许需要变革了吧。</p>
<p>国外的安全厂商，有一些也是免费个人用户杀毒，那么他们怎么赚钱的呢？对，企业用户。于是周鸿祎盯上了企业这块大蛋糕。实际上在此之前，国内主要的企业级安全厂商主要把持在赛门铁克、瑞星、金山这些大家比较熟悉的玩家手中，如何从他们手中获得市场，也是周鸿祎值得考虑的问题。</p>
<p>周鸿祎不笨，所以就把用过的手段重新用一遍就可以了。而且，周鸿祎从离开yahoo时就开始玩，而且一直都没失手过。</p>
<h1>后记</h1>
<p>本来写这篇文章的冲动还是满强烈的，不过想了想，最后一直也还是没怎么开始动手。停了几停，删掉一些比较敏感和倾向性的话，所以文章就变成了这个样子。</p>
<p>我很敬佩周鸿祎，曾经方正的天才程序员，现在也是一个伟大的商人。商场如战场，也是我所信奉的信条。可惜一直没有见到过周鸿祎的真颜，卻感遗憾。第一年老周宴请，我不知道而未到席，第二年去的时候，齐向东已经走马上任，于是还是没有见到。如果有机会，还是希望可以和周鸿祎先生一起坐下来，倒一杯茶，慢慢聊聊这个神奇的世界，也不错。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2010/05/why-360safe-attacks-kingsoft/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ida5.5侧漏进行时</title>
		<link>http://www.kernel2heart.com/2009/12/ida-5-5-with-hex-rays-download/</link>
		<comments>http://www.kernel2heart.com/2009/12/ida-5-5-with-hex-rays-download/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 00:38:37 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[八卦资讯]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2009/12/ida-5-5-with-hex-rays-download/</guid>
		<description><![CDATA[早晨的时候看到小波同学说ida又侧漏了，一直不太明白什么意思。中午的时候就有人放出了ida5.5版的下载。这次的下载东西比较全了， 包括ida5.5、Hex-rays1.1、汉化补丁什么的都一应俱全了。 下面是推荐下载地址： http://dl.dropbox.com/u/3158427/Down/idapro55.zip http://dl.dropbox.com/u/3158427/Down/IDA Pro Advanced 5.5 去除局域网检测补丁.rar http://dl.dropbox.com/u/3158427/Down/IDA Pro Advanced v5.5_Simplified Chinese language file.rar http://dl.dropbox.com/u/3158427/Down/PythonForWin2.5.rar(组件python，可选组件) 各种分流下载： http://hotfile.com/dl/20983476/df1b86d/idapro55.zip.html http://rapidshare.com/files/322331794/idapro55.zip.html http://narod.ru/disk/16084747000/idapro55.zip.html&#160; http://www.multiupload.com/GICLN1AOE3 值得提醒的是目前的ida.CHS不支持Hex-Rays1.1，如果使用这个功能建议使用E文原版，或者使用下面的补丁实现： http://d.namipan.com/d/10aa4396b2ff8dda750ea71a1aa817cd44ef6f3385490100 另外据说ida新版支持了python，如果有兴趣的可以参考下ida安装目录下的例程，不过我还没看到这个pyida怎么用…和之前是独立插件的那种方式不一样好像…再安装几个常用插件，比如SMB分析工具，SWF分析工具，图形化对比软件等等，请根据个人需求安装。本人就不提供下载啦]]></description>
			<content:encoded><![CDATA[<p>早晨的时候看到小波同学说ida又侧漏了，一直不太明白什么意思。中午的时候就有人放出了ida5.5版的下载。这次的下载东西比较全了， 包括ida5.5、Hex-rays1.1、汉化补丁什么的都一应俱全了。</p>
<p>下面是推荐下载地址：</p>
<p><a href="http://dl.dropbox.com/u/3158427/Down/idapro55.zip">http://dl.dropbox.com/u/3158427/Down/idapro55.zip</a>     <br /><a href="http://dl.dropbox.com/u/3158427/Down/IDA Pro Advanced 5.5 去除局域网检测补丁.rar">http://dl.dropbox.com/u/3158427/Down/IDA Pro Advanced 5.5 去除局域网检测补丁.rar</a>     <br /><a href="http://dl.dropbox.com/u/3158427/Down/IDA Pro Advanced v5.5_Simplified Chinese language file.rar">http://dl.dropbox.com/u/3158427/Down/IDA Pro Advanced v5.5_Simplified Chinese language file.rar</a>     <br /><a href="http://dl.dropbox.com/u/3158427/Down/PythonForWin2.5.rar">http://dl.dropbox.com/u/3158427/Down/PythonForWin2.5.rar</a>(组件python，可选组件)</p>
<p>各种分流下载：</p>
<p><a href="http://hotfile.com/dl/20983476/df1b86d/idapro55.zip.html">http://hotfile.com/dl/20983476/df1b86d/idapro55.zip.html</a>     <br /><a href="http://rapidshare.com/files/322331794/idapro55.zip.html">http://rapidshare.com/files/322331794/idapro55.zip.html</a>     <br /><a href="http://narod.ru/disk/16084747000/idapro55.zip.html">http://narod.ru/disk/16084747000/idapro55.zip.html</a>&#160; <br /><a href="http://www.multiupload.com/GICLN1AOE3">http://www.multiupload.com/GICLN1AOE3</a></p>
<p>值得提醒的是目前的ida.CHS不支持Hex-Rays1.1，如果使用这个功能建议使用E文原版，或者使用下面的补丁实现：</p>
<p><a title="http://d.namipan.com/d/10aa4396b2ff8dda750ea71a1aa817cd44ef6f3385490100" href="http://d.namipan.com/d/10aa4396b2ff8dda750ea71a1aa817cd44ef6f3385490100">http://d.namipan.com/d/10aa4396b2ff8dda750ea71a1aa817cd44ef6f3385490100</a></p>
<p>另外据说ida新版支持了python，如果有兴趣的可以参考下ida安装目录下的例程，不过我还没看到这个pyida怎么用…和之前是独立插件的那种方式不一样好像…再安装几个常用插件，比如SMB分析工具，SWF分析工具，图形化对比软件等等，请根据个人需求安装。本人就不提供下载啦</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2009/12/ida-5-5-with-hex-rays-download/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>comodo提供dns解析服务</title>
		<link>http://www.kernel2heart.com/2009/09/comodo-supply-dns-server/</link>
		<comments>http://www.kernel2heart.com/2009/09/comodo-supply-dns-server/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 13:23:02 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[八卦资讯]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[墙]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2009/09/comodo%e6%8f%90%e4%be%9bdns%e8%a7%a3%e6%9e%90%e6%9c%8d%e5%8a%a1/</guid>
		<description><![CDATA[不知道这个算不算旧闻了，今天看欧欧酱在twitter上发才知道原来comodo还提供这个服务的，感觉很不错啊。可以用来替代OpenDNS在国内的作用了，对付DNS劫持也有一定作用的。 来源：comodo secure-DNS DNS地址：156.154.70.22 156.154.71.22 &#8211; 发送自我的 iPhone]]></description>
			<content:encoded><![CDATA[<p>不知道这个算不算旧闻了，今天看欧欧酱在twitter上发才知道原来comodo还提供这个服务的，感觉很不错啊。可以用来替代OpenDNS在国内的作用了，对付DNS劫持也有一定作用的。<br />
来源：<a href="http://www.comodo.com/secure-dns/" target="_blank">comodo secure-DNS<br />
</a></p>
<blockquote><p>DNS地址：<strong>156.154.70.22<br />
156.154.71.22</strong></p></blockquote>
<p>&#8211; 发送自我的 iPhone</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2009/09/comodo-supply-dns-server/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>web安全&#8212;-漫谈邮件服务安全威胁</title>
		<link>http://www.kernel2heart.com/2009/08/email-attacks-from-web/</link>
		<comments>http://www.kernel2heart.com/2009/08/email-attacks-from-web/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 22:50:38 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/?p=139</guid>
		<description><![CDATA[其实真的不好意思，这个文章写得真是很欠扁的一篇文章。虽然我把名目放在了技术交流项中，但是在你开始阅读本文之前，我不得不再次提醒你:在本文中你将无法见到任何Email攻击代码，仅仅只有一些隐约的内容截图，而且并不完全。那么好吧，既然你还想继续阅读下去，那我们开始吧。 <a href="http://www.kernel2heart.com/2009/08/email-attacks-from-web/">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>其实真的不好意思，这个文章写得真是很欠扁的一篇文章。虽然我把名目放在了技术交流项中，但是在你开始阅读本文之前，我不得不再次提醒你:在本文中你将<strong>无法见到任何Email攻击代码</strong>，仅仅只有一些隐约的内容截图，而且并不完全。那么好吧，既然你还想继续阅读下去，那我们开始吧。</p>
<p>Email邮件安全在那里？在过去很长一段时间里，人们仅仅把目光放在了邮件附件的文件安全上，认为如果邮件附件的内容安全的话，自己的邮箱就可以安然无忧，不受任何安全威胁了。真的如此吗？我们不妨看一下来自<a href="http://www.hotmail.com" target="_blank">hotmail server</a>的样例<span id="more-139"></span>：<br />
<img class="aligncenter" src="http://farm4.static.flickr.com/3501/3868987932_4b373ff122.jpg" alt="hotmail security settings" width="500" height="230" /><br />
好像这么看来，我们已经处于重重安全防护之下，对大型厂商MS来说，附件使用了杀毒软件扫描，Email本身的安全设置更是阻隔了很多的潜在危险，比如邮件中本身存在的图片，链接等等，当然，默认也是屏蔽掉附件的。</p>
<p>看起来，哇，我们都选用Hotmail好了，不过非常遗憾的说，在众多主流Email客户端测试结果中，结果表明，Hotmail的安全性仅仅只比国内主流邮箱安全性稍高一些而已&#8230;</p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2560/3869016446_4b90a466dd_o.jpg" alt="hotmail attacks" width="493" height="132" /></p>
<p>残酷的现实无疑再次击垮了我们的心理防线。没错，你的电子邮件已经不值得信任了！</p>
<p>我们常常会质疑安全厂商的炒作，认为某些问题本来就不像想象中的那么严重。没错，从某些情况上来看，安全厂商为了推广自己的产品，难免会有一些夸大其词，但是作为个人用户来说，做好足够的安全防护措施也是必要的。从上面一个简单的示例来说，我不得不提醒大家的Email服务器脆弱的安全性。好吧，我觉得安全性是可以这样排序的：</p>
<blockquote><p>安全性（由大到小）：</p>
<p><a href="http://www.gmail.com" target="_blank">Gmail</a>&gt;<a href="http://mail.yahoo.com" target="_blank">yahoo</a>&gt;<a href="http://www.hotmail.com" target="_blank">hotmail</a>&gt;国内Email（<a href="http://mail.qq.com" target="_blank">QQ</a>，<a href="http://mail.163.com" target="_blank">163</a>等等）</p></blockquote>
<p>这个消息可能真的不是那么让人舒服，但是事实如此。好吧，说了那么多，我也该适时给出我的安全建议了：</p>
<blockquote><p>1.使用Gmail邮箱，如果原邮箱有重要联系客户，或者更换代价较大，建议使用Gmail代收。因为据我所知，目前尚无非常有效攻击Gmail的方法。</p>
<p>2.附件尽量使用较为安全的文件格式，诸如TXT。word和pdf是不安全的文件格式，当然如果你属于小众，可以放心打开。不要随意点开缩短网址服务的网址，这也是相当危险的行为。</p>
<p>3.定期更换Email密码。好像就算别人无法获知你的密码就无法登陆一样，但是事实上不是如此。某人曾经对我吹嘘QQmail他可以完整获取对方的QQ密码，QQ好友，QQ空间相册等等，所有的这些仅仅需要一封电子邮件就可以做的到。不过，很明显，在你更换密码之后，这种方法就是失效了，当然，你能保证在此之前它没有把信息回传给攻击者。即使你被攻击了，修改密码之后，也可以断绝黑手对你的继续利用。</p></blockquote>
<p>哦，我暂时能够想到的安全措施如上所述了。其他的安全措施也希望你能够补充，毕竟我也不是什么安全专家，比起他们来着，我的差距还是蛮大的。本文到此就告一段落了，如果你有什么问题，可以致信到我的live邮箱。什么？我还敢用live mail？你说为什么呢？</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2009/08/email-attacks-from-web/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>虚拟机之外的rootkit检测思考</title>
		<link>http://www.kernel2heart.com/2009/07/about-scan-rootkit-outside-of-vm/</link>
		<comments>http://www.kernel2heart.com/2009/07/about-scan-rootkit-outside-of-vm/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 06:03:23 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[AntiVirus]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Virus]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2009/07/about-scan-rootkit-outside-of-vm/</guid>
		<description><![CDATA[昨天Nguyen Anh Quynh先生send给我了一封email，说今年会到中国的Xcon&#8217;09上进行一次演讲，演讲内容是他最近研究的一种在虚拟机之外的rootkit检测方法。 看Nguyen Anh Quynh先生的大致意思是这样的：一般的时候我们在检测病毒的时候，一般是在VM里面，这个VM包括了AntiVirus程序检测的简易VM。而Nguyen Anh Quynh的设计独立于vm之外，通过扫描vm的物理内存，进行检测。据Nguyen Anh Quynh介绍，他的这种检测方法可以解决大部分的kernel rootkit和ring3 rootkit。 我个人认为，这种方法看似巧妙，但是实际上还是有很大的缺陷在里面。假如我作为Vxer的时候，一定会采用防止VM run的方法。这是一个高级病毒maker一定会做的事情。而且，在自己的病毒或者rootkit中使用polymorphism和metamorphism。当然，说起来，在病毒和ring3级别的rootkit中使用这些技术较为简单，但是在ring0级别的rootkit中，这种技术倒是个硬伤。 那好吧，我们抛开ring0 rootkit不谈，假如我检测自己在VM底下，我选择不decode我的代码和执行，反而去解密一些较为正常的代码，变成一个在VM下无害的病毒呢？相信这些技术，作为一个熟练的Vxer应该是都已经掌握了的技巧了吧。 今年的xcon我不一定可以抽出时间来过去，真是遗憾不能再次听到Nguyen Anh Quynh的精彩演讲了。非常遗憾，希望以后有机会再联系吧。 [Update 07-23] 今天Xcon公布了新的议题内容，看起来比去年更加诱人一些。Nguyen Anh Quynh先生的程序是应用在邮件Server上，难怪会有讨论中的那些发言了。]]></description>
			<content:encoded><![CDATA[<p>昨天<a href="http://xcon.xfocus.net/XCon2007/speaker.html#Nguyen_Anh_Quynh" target="_blank">Nguyen Anh Quynh</a>先生send给我了一封email，说今年会到中国的<a href="http://xcon.xfocus.net" target="_blank">Xcon&#8217;09</a>上进行一次演讲，演讲内容是他最近研究的一种在虚拟机之外的rootkit检测方法。</p>
<p>看Nguyen Anh Quynh先生的大致意思是这样的：一般的时候我们在检测病毒的时候，一般是在VM里面，这个VM包括了<a href="http://www.kernel2heart.com/labels/antivirus/" class="st_tag internal_tag" rel="tag" title="Posts tagged with AntiVirus">AntiVirus</a>程序检测的简易VM。而Nguyen Anh Quynh的设计独立于vm之外，通过扫描vm的物理内存，进行检测。据Nguyen Anh Quynh介绍<span id="more-99"></span>，他的这种检测方法可以解决大部分的kernel rootkit和ring3 rootkit。</p>
<p>我个人认为，这种方法看似巧妙，但是实际上还是有很大的缺陷在里面。假如我作为<a href="http://b.baidu.com/view/1554820.html" target="_blank">Vxer</a>的时候，一定会采用防止VM run的方法。这是一个高级病毒maker一定会做的事情。而且，在自己的病毒或者rootkit中使用polymorphism和metamorphism。当然，说起来，在病毒和ring3级别的rootkit中使用这些技术较为简单，但是在ring0级别的rootkit中，这种技术倒是个硬伤。</p>
<p>那好吧，我们抛开ring0 rootkit不谈，假如我检测自己在VM底下，我选择不decode我的代码和执行，反而去解密一些较为正常的代码，变成一个在VM下无害的病毒呢？相信这些技术，作为一个熟练的Vxer应该是都已经掌握了的技巧了吧。</p>
<p>今年的xcon我不一定可以抽出时间来过去，真是遗憾不能再次听到Nguyen Anh Quynh的精彩演讲了。非常遗憾，希望以后有机会再联系吧。</p>
<hr />[Update 07-23] 今天Xcon公布了新的<a href="http://xcon.xfocus.net/speakers.html" target="_blank">议题内容</a>，看起来比去年更加诱人一些。Nguyen Anh Quynh先生的程序是应用在邮件Server上，难怪会有讨论中的那些发言了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2009/07/about-scan-rootkit-outside-of-vm/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>分享：一个unpack conficker worm的脚本</title>
		<link>http://www.kernel2heart.com/2009/07/ollydbg-script-for-unpack-conficker-worm-b/</link>
		<comments>http://www.kernel2heart.com/2009/07/ollydbg-script-for-unpack-conficker-worm-b/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 11:41:56 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[Ollydbg]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Virus]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2009/07/ollydbg-script-for-unpack-conficker-worm-b/</guid>
		<description><![CDATA[lclee 说: i just finish the ollyscript automated unpack the conficker worm tested these sample with MD5 MD5:83c52b56b1ecbe23183bae5e05474e3e MD5:6ee741c4e0d36d0dc9162a6e71943379 if want to get the sample, search the md5 from here http://www.offensivecomputing.net/ hmm..still not perfect yet the script it just can &#8230; <a href="http://www.kernel2heart.com/2009/07/ollydbg-script-for-unpack-conficker-worm-b/">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<blockquote><p>lclee 说:<br />
i just finish the ollyscript<br />
automated unpack the conficker worm<br />
tested these sample with MD5<br />
MD5:83c52b56b1ecbe23183bae5e05474e3e<br />
MD5:6ee741c4e0d36d0dc9162a6e71943379<br />
if want to get the sample, search the md5 from here<br />
<a href="http://www.offensivecomputing.net/">http://www.offensivecomputing.net/</a><br />
hmm..still not perfect yet the <a href="http://www.kernel2heart.com/labels/script/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Script">script</a><br />
it just can automated unpack the conficker variant B<br />
C still cannot</p></blockquote>
<p><span id="more-87"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
</pre></td><td class="code"><pre class="asm" style="font-family:monospace;">var goaddr1
var goaddr2
var goaddr3
var goaddr4
var goaddr5
var goaddr6
var goaddr7
var szmemory
&nbsp;
start<span style="color: #339933;">:</span>
  find eip<span style="color: #339933;">,</span> #807C240801#
  <span style="color: #00007f; font-weight: bold;">cmp</span> $RESULT<span style="color: #339933;">,</span> <span style="color: #0000ff;">0</span>
  <span style="color: #00007f; font-weight: bold;">jne</span> uncompress1
&nbsp;
error1<span style="color: #339933;">:</span>
  msg <span style="color: #7f007f;">&quot;Failed to uncompress 1st layer packer of conficker worm variant B&quot;</span>
  <span style="color: #00007f; font-weight: bold;">ret</span>
&nbsp;
uncompress1<span style="color: #339933;">:</span>
  <span style="color: #00007f; font-weight: bold;">sti</span>
  msg <span style="color: #7f007f;">&quot;Start to uncompress 1st layer packer&quot;</span>
  <span style="color: #00007f; font-weight: bold;">mov</span> goaddr1<span style="color: #339933;">,</span> $RESULT
  findop goaddr1<span style="color: #339933;">,</span> #83EC??#
  <span style="color: #00007f; font-weight: bold;">cmp</span> $RESULT<span style="color: #339933;">,</span> <span style="color: #0000ff;">0</span>
  bphws $RESULT<span style="color: #339933;">,</span> <span style="color: #7f007f;">&quot;x&quot;</span>
  run
  bphwc $RESULT
  <span style="color: #00007f; font-weight: bold;">sti</span>
  sto
  msg <span style="color: #7f007f;">&quot;1st Layer packer success uncompress, Now start uncompress 2nd layer packer&quot;</span>
&nbsp;
SearchAPI<span style="color: #339933;">:</span>
  gpa <span style="color: #7f007f;">&quot;VirtualProtect&quot;</span><span style="color: #339933;">,</span> <span style="color: #7f007f;">&quot;kernel32.dll&quot;</span>
  <span style="color: #00007f; font-weight: bold;">mov</span> goaddr2<span style="color: #339933;">,</span> $RESULT
  bphws goaddr2<span style="color: #339933;">,</span> <span style="color: #7f007f;">&quot;x&quot;</span>
  run
  bphwc goaddr2
  msg <span style="color: #7f007f;">&quot;Landed at address of VirtualProtect, check the segment address of memory allocate for dll&quot;</span>
  <span style="color: #00007f; font-weight: bold;">mov</span> goaddr3<span style="color: #339933;">,</span> <span style="color: #00007f;">esp</span>
  <span style="color: #00007f; font-weight: bold;">add</span> goaddr3<span style="color: #339933;">,</span> <span style="color: #0000ff;">4</span>
  <span style="color: #00007f; font-weight: bold;">mov</span> goaddr4<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>goaddr3<span style="color: #009900; font-weight: bold;">&#93;</span>
  findop goaddr4<span style="color: #339933;">,</span> #807C240801#
  <span style="color: #00007f; font-weight: bold;">cmp</span> $RESULT<span style="color: #339933;">,</span> <span style="color: #0000ff;">0</span>
  <span style="color: #00007f; font-weight: bold;">jne</span> uncompress2
&nbsp;
error2<span style="color: #339933;">:</span>
  msg <span style="color: #7f007f;">&quot;Failed to uncompress 2nd layer packer of conficker worm variant B&quot;</span>
  <span style="color: #00007f; font-weight: bold;">ret</span>
&nbsp;
uncompress2<span style="color: #339933;">:</span>
  <span style="color: #00007f; font-weight: bold;">mov</span> goaddr5<span style="color: #339933;">,</span> $RESULT
  go goaddr5
  msg <span style="color: #7f007f;">&quot;start uncompress 2nd layer packer&quot;</span>
  find eip<span style="color: #339933;">,</span> #83EC??#
  <span style="color: #00007f; font-weight: bold;">mov</span> goaddr6<span style="color: #339933;">,</span> $RESULT
  bphws goaddr6<span style="color: #339933;">,</span> <span style="color: #7f007f;">&quot;x&quot;</span>
  run
  bphwc goaddr6
  <span style="color: #00007f; font-weight: bold;">sti</span>
  sto
&nbsp;
  <span style="color: #339933;">//</span><span style="color: #00007f; font-weight: bold;">mov</span> goaddr7<span style="color: #339933;">,</span> eip
  <span style="color: #339933;">//</span>gmemi goaddr7<span style="color: #339933;">,</span> MEMORYSIZE
  <span style="color: #339933;">//</span><span style="color: #00007f; font-weight: bold;">mov</span> szmemory<span style="color: #339933;">,</span> $RESULT
&nbsp;
  <span style="color: #339933;">//</span>msgyn <span style="color: #7f007f;">&quot;Dump the file from the memory?&quot;</span>
  <span style="color: #339933;">//</span><span style="color: #00007f; font-weight: bold;">cmp</span> $RESULT<span style="color: #339933;">,</span> <span style="color: #0000ff;">0</span>
  <span style="color: #339933;">//</span><span style="color: #00007f; font-weight: bold;">jne</span> dumpfile
  <span style="color: #339933;">//</span><span style="color: #00007f; font-weight: bold;">jmp</span> <span style="color: #000000; font-weight: bold;">end</span>
&nbsp;
<span style="color: #339933;">//</span>error3<span style="color: #339933;">:</span>
  <span style="color: #339933;">//</span>msg <span style="color: #7f007f;">&quot;Failed to dump the file from the memory&quot;</span>
  <span style="color: #339933;">//</span><span style="color: #00007f; font-weight: bold;">ret</span>
&nbsp;
<span style="color: #339933;">//</span>dumpfile<span style="color: #339933;">:</span>
  <span style="color: #339933;">//</span>dma goaddr7<span style="color: #339933;">,</span> szmemory<span style="color: #339933;">,</span> <span style="color: #7f007f;">&quot;conficker.mem&quot;</span>
  <span style="color: #339933;">//</span>msg <span style="color: #7f007f;">&quot;stop&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #339933;">:</span>
  cmt eip<span style="color: #339933;">,</span> <span style="color: #7f007f;">&quot;This is Original Entry Point of the conficker worm variant B&quot;</span>
  msg <span style="color: #7f007f;">&quot;This is OEP of the binary file. Right click and select &quot;</span>backup<span style="color: #7f007f;">&quot; and &quot;</span>save <span style="color: #000000; font-weight: bold;">data</span> to file<span style="color: #7f007f;">&quot; and dump the binary from the memory. Binary decrypted.&quot;</span>
  msg <span style="color: #7f007f;">&quot;Script by lclee_vx/F-13 Labs&quot;</span>
  <span style="color: #00007f; font-weight: bold;">ret</span></pre></td></tr></table></div>

<p>很久没有沾手病毒这一块了，相对之下，lclee最近的成果可真是多呀 :)。 马上考完最后一场编译原理之后，我全部的精力就要集中在考研这种事情上了。加油！这个是给lclee的，也是给自己的。:)</p>
<p>目标还没有选好，北京理工其实也不错，不是吗？</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2009/07/ollydbg-script-for-unpack-conficker-worm-b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>一个小细节：Security Enhancements in the CRT</title>
		<link>http://www.kernel2heart.com/2009/07/security-enhancements-in-the-crt/</link>
		<comments>http://www.kernel2heart.com/2009/07/security-enhancements-in-the-crt/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 13:41:52 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2009/07/security-enhancements-in-the-crt/</guid>
		<description><![CDATA[最近写点小程序，为了安全性，打算改写部分CRT函数成secure versions of run-time library routines。最初的想法是，对于这类函数，一般就是加上_s，有的需要加个参数就可以了。没什么其他的需要修改。前段时间改了一个程序，因为写的不是很标准，就出了一点小问题。拿一个来说说： 1 2 3 4 5 &#40;&#40;_waccess&#40;strVirName,0&#41;&#41; != -1&#41; &#123; //ShowMessage(TEXT(&#34;There is a virus in here!&#34;),TEXT(&#34;IsExist&#34;)); return true; &#125; 这样是一定会在改写成_waccess_s时出现问题的。最初我以为是_waccess_s的定义问题，查了下msdn，是下面这个样子： 1 2 3 4 5 6 7 8 int _waccess&#40; const wchar_t *path, int mode &#8230; <a href="http://www.kernel2heart.com/2009/07/security-enhancements-in-the-crt/">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>最近写点小程序，为了安全性，打算改写部分CRT函数成secure versions of run-time library routines。最初的想法是，对于这类函数，一般就是加上_s，有的需要加个参数就可以了。没什么其他的需要修改。前段时间改了一个程序，因为写的不是很标准，就出了一点小问题。拿一个来说说：</p>
<p><span id="more-82"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>_waccess<span style="color: #008000;">&#40;</span>strVirName,<span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">!</span><span style="color: #000080;">=</span> <span style="color: #000040;">-</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	<span style="color: #666666;">//ShowMessage(TEXT(&quot;There is a virus in here!&quot;),TEXT(&quot;IsExist&quot;));</span>
	<span style="color: #0000ff;">return</span> <span style="color: #0000ff;">true</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>这样是一定会在改写成_waccess_s时出现问题的。最初我以为是_waccess_s的定义问题，查了下msdn，是下面这个样子：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">int</span> _waccess<span style="color: #008000;">&#40;</span>
   <span style="color: #0000ff;">const</span> <span style="color: #0000ff;">wchar_t</span> <span style="color: #000040;">*</span>path,
   <span style="color: #0000ff;">int</span> mode
<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
errno_t _waccess_s<span style="color: #008000;">&#40;</span>
   <span style="color: #0000ff;">const</span> <span style="color: #0000ff;">wchar_t</span> <span style="color: #000040;">*</span>path,
   <span style="color: #0000ff;">int</span> mode
<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></pre></td></tr></table></div>

<p>这两个函数在参数上没什么差别，貌似问题并不出在这里。看编译器并不在这里提示错误，但是最后逻辑一定会有错误。不过仔细看下类型，一个是int，一个是errno_t，这个不太一样。但是实际上你看下errno_t的定义就知道，其实这个是tpyedef int errno_t来的。好像程序分析到这里陷入到了僵局。不过注意到_waccess定义中有一句话：</p>
<blockquote><p>Each function returns 0 if the file has the given mode. The function returns –1 if the named file does not exist or does not have the given mode; in this case, <strong>errno</strong> is set as shown in the following table.</p></blockquote>
<p>从这句话看，我这原来的程序在这里没有任何问题，修改后应该也不会出现什么问题，但是实际上却不然。在_waccess_t的返回值中是这么提到的：</p>
<blockquote><p>Each function returns 0 if the file has the given mode. The function returns an error code if the named file does not exist or is not accessible in the given mode. In this case, the function returns an error code from the set as follows and also sets <strong>errno</strong> to the same value.</p></blockquote>
<p>这就说明，实际上在_wacess_s中-1并不能在这里判定文件不存在，因为在_waccess_s中不会出现这个返回值，仅会出现EACCES、ENOENT、EINVAL三者之中的一个。因此实际上将最初语句中的-1替换为ENOENT就可以解决这个问题了。</p>
<p>实际上，这个问题也是很有提示作用的，这说明在写程序的时候，还是需要用些定义的了东西，不仅在移植的时候方便，而且更新的时候不需要具体的调整参数了，避免一些莫名其妙的错误。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2009/07/security-enhancements-in-the-crt/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

