<?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>狂人山庄 &#124; Silence,声仔,吴洪声,奶罩 &#187; security</title>
	<atom:link href="http://wuhongsheng.com/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://wuhongsheng.com</link>
	<description>响应我党号召,全面建设和谐博客,坚持和谐写博的路线不动摇</description>
	<lastBuildDate>Wed, 04 May 2011 15:13:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>SSL窃听攻击实操</title>
		<link>http://wuhongsheng.com/it/2009/09/ssl-hijack/</link>
		<comments>http://wuhongsheng.com/it/2009/09/ssl-hijack/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 05:07:13 +0000</pubDate>
		<dc:creator>吴洪声</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[hijack]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[sohu]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://wuhongsheng.com/?p=315</guid>
		<description><![CDATA[OK，我恶毒的心灵又开始蠢蠢欲动了。今天带给大家的是SSL窃听攻击从理论到实际操作的成功例子 SSL窃听最主要的是你要有一张合法的SSL证书，并且证书名称必须和被攻击的网站域名一致。目前各大CA都有很低廉价格的SSL证书申请，最低的价格只需要10美元不到，甚至还有一些域名注册商大批量采购这些证书，并且在你注册域名的时候免费送你一张。 对于低廉价格的域名SSL证书，CA签发的前提只有一个：只要你有申请的域名某几个特定的邮箱，并且在CA给这个邮箱发送一封确认邮件的时候approve就可以了。 所以，问题的关键是如何截获到这封确认邮件。但我相信某些机构是有办法能做到这一点的。 当然，还有更加简单的办法：国内不少软件在安装的时候，都会偷偷摸摸的把自己的root CA装到用户电脑里面去。Windows的安全机制让这个导入root CA的操作根本没有任何的确认信息和提示。甚至微软还提供了一个专用的小程序用于导入证书。只要你找到这些软件厂商，就可以任意生成证书，并且这些证书都是有效的，不会出现警告。 废话不多说了，开始干活。这里sohu的vip邮箱为例（他们能在整个使用过程中支持ssl），先生成一张vip.sohu.com的key和csr Sam@Bra:~$ mkdir ssltest Sam@Bra:~$ cd ssltest Sam@Bra:~/ssltest$ openssl genrsa -out vip.sohu.com.key 1024 Generating RSA private key, 1024 bit long modulus ............++++++ .....................++++++ e is 65537 &#40;0x10001&#41; Sam@Bra:~/ssltest$ openssl req -new -key vip.sohu.com.key -out vip.sohu.com.csr You are about to be asked to enter information that will be incorporated [...]


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>OK，我恶毒的心灵又开始蠢蠢欲动了。今天带给大家的是SSL窃听攻击从理论到实际操作的成功例子<br />
SSL窃听最主要的是你要有一张合法的SSL证书，并且证书名称必须和被攻击的网站域名一致。目前各大CA都有很低廉价格的SSL证书申请，最低的价格只需要10美元不到，甚至还有一些域名注册商大批量采购这些证书，并且在你注册域名的时候免费送你一张。<br />
对于低廉价格的域名SSL证书，CA签发的前提只有一个：只要你有申请的域名某几个特定的邮箱，并且在CA给这个邮箱发送一封确认邮件的时候approve就可以了。<br />
所以，问题的关键是如何截获到这封确认邮件。但我相信某些机构是有办法能做到这一点的。<br />
当然，还有更加简单的办法：国内不少软件在安装的时候，都会偷偷摸摸的把自己的root CA装到用户电脑里面去。Windows的安全机制让这个导入root CA的操作根本没有任何的确认信息和提示。甚至微软还提供了一个专用的小程序用于导入证书。只要你找到这些软件厂商，就可以任意生成证书，并且这些证书都是有效的，不会出现警告。</p>
<p>废话不多说了，开始干活。这里sohu的vip邮箱为例（他们能在整个使用过程中支持ssl），先生成一张vip.sohu.com的key和csr</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Sam<span style="color: #000000; font-weight: bold;">@</span>Bra:~$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> ssltest
Sam<span style="color: #000000; font-weight: bold;">@</span>Bra:~$ <span style="color: #7a0874; font-weight: bold;">cd</span> ssltest
Sam<span style="color: #000000; font-weight: bold;">@</span>Bra:~<span style="color: #000000; font-weight: bold;">/</span>ssltest$ openssl genrsa <span style="color: #660033;">-out</span> vip.sohu.com.key <span style="color: #000000;">1024</span>
Generating RSA private key, <span style="color: #000000;">1024</span> bit long modulus
............++++++
.....................++++++
e is <span style="color: #000000;">65537</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>0x10001<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Sam<span style="color: #000000; font-weight: bold;">@</span>Bra:~<span style="color: #000000; font-weight: bold;">/</span>ssltest$ openssl req <span style="color: #660033;">-new</span> <span style="color: #660033;">-key</span> vip.sohu.com.key <span style="color: #660033;">-out</span> vip.sohu.com.csr
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter <span style="color: #ff0000;">'.'</span>, the field will be left blank.
<span style="color: #660033;">-----</span>
Country Name <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">2</span> letter code<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>AU<span style="color: #7a0874; font-weight: bold;">&#93;</span>:CN
State or Province Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>full name<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Some-State<span style="color: #7a0874; font-weight: bold;">&#93;</span>:BeiJing
Locality Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, city<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>:BeiJing
Organization Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, company<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Internet Widgits Pty Ltd<span style="color: #7a0874; font-weight: bold;">&#93;</span>:fake sohu
Organizational Unit Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, section<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>:fake
Common Name <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg, YOUR name<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>:vip.sohu.com
Email Address <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>:ssladmin<span style="color: #000000; font-weight: bold;">@</span>vip.sohu.com
&nbsp;
Please enter the following <span style="color: #ff0000;">'extra'</span> attributes
to be sent with your certificate request
A challenge password <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>:
An optional company name <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>:</pre></div></div>

<p>well，这样我们就有了一个用于vip.sohu.com的申请了，接着我们去签发这个申请</p>
<p><a href="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack1.png"><img src="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack1.png" alt="sslhijack1" title="sslhijack1" width="583" height="448" class="alignnone size-full wp-image-327" /></a></p>
<p>然后系统会给你一大堆管理员相关的邮箱等你去选<br />
<a href="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack2.png"><img src="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack2.png" alt="sslhijack2" title="sslhijack2" width="603" height="639" class="alignnone size-full wp-image-320" /></a></p>
<p>选上一个后，ca就会给你所选的邮箱发送一封确认邮件，邮件中带有一个连接，打开连接后会让你确认，确认后。。。嘿嘿，证书就到手了<br />
<a href="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack3.png"><img src="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack3.png" alt="sslhijack3" title="sslhijack3" width="747" height="552" class="alignnone size-full wp-image-329" /></a></p>
<p><a href="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack4.png"><img src="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack4.png" alt="sslhijack4" title="sslhijack4" width="773" height="510" class="alignnone size-full wp-image-330" /></a><a href="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack5.png"><img src="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack5.png" alt="sslhijack5" title="sslhijack5" width="761" height="96" class="alignnone size-full wp-image-331" /></a><a href="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack6.png"><img src="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack6.png" alt="sslhijack6" title="sslhijack6" width="865" height="475" class="alignnone size-full wp-image-332" /></a></p>
<p>把申请下来的证书保存一下，然后修改下nginx的配置文件，把证书加上，并且设置一个反向代理到vip.sohu.com，大概的样子如下</p>

<div class="wp_syntax"><div class="code"><pre class="conf" style="font-family:monospace;">    # HTTPS server
    #
    server {
        listen       443;
        server_name  vip.sohu.com;
&nbsp;
        ssl                  on;
        ssl_certificate      sslkeys/vip.sohu.com.crt;
        ssl_certificate_key  sslkeys/vip.sohu.com.key;
&nbsp;
        ssl_session_timeout  5m;
&nbsp;
        ssl_protocols  SSLv2 SSLv3 TLSv1;
        ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
        ssl_prefer_server_ciphers   on;
&nbsp;
        location / {
                proxy_pass      https://vip.sohu.com;
        }
    }</pre></div></div>

<p>搞定，保存，重启nginx。修改本机的hosts文件，把vip.sohu.com这个域名指向nginx所在的服务器</p>

<div class="wp_syntax"><div class="code"><pre class="conf" style="font-family:monospace;">127.0.0.1 vip.sohu.com</pre></div></div>

<p>打开浏览器，输入https://vip.sohu.com，你会发现。。。。根本没任何报错或者警告信息！也就是说，ssl证书被成功替换，再就是说，你的所有传输都被劫持了。<br />
经过测试，IE、firefox、safari等浏览器同仁纷纷表示对替换证书的行为毫不知情并对被替换后的证书予以大力支持，大肆宣扬被劫持的网站是高可信度的网站。</p>
<p>回头再简单阐述这个过程：用户访问一个网站，但中间已经被插了一层proxy。proxy使用了一个真实的并且高度可信的证书与用户交换数据。用户和proxy之间使用ssl加密通道交换数据。数据到了proxy后，会被解密并监听分析。之后proxy再模仿成一个client向网站的服务器发送数据，同样传输也是ssl加密的。网站的服务器对此毫不知情，只能获取到是proxy发出的请求，但其实proxy并不是最终用户，数据其实早已被监听并分析。</p>
<p>最后，还是应了那句话：不要迷恋ssl，ssl只是个传说</p>
<p>备注：<br />
1.转载请注明出处：http://wuhongsheng.com/it/2009/09/ssl-hijack/<br />
2.sohu的哥们不要来找我麻烦或者跨省追捕，选上你们是因为你们太安全了，支持ssl访问邮箱<br />
3.有时间大家还是多点关注我的DNSPod，最近DNSPod正在招人，人不好找啊。。。请大家帮忙宣传下，介绍一些人才过来 https://www.dnspod.com/About/Jobs</p>
<p>前面一张图是sohu自己原始的证书，第二张开始就是被替换后的证书<br />
<a href="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack7.png"><img src="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack7.png" alt="sslhijack7" title="sslhijack7" width="727" height="596" class="alignnone size-full wp-image-333" /></a></p>
<p><a href="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack8.png"><img src="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack8.png" alt="sslhijack8" title="sslhijack8" width="660" height="596" class="alignnone size-full wp-image-334" /></a></p>
<p><a href="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack9.png"><img src="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack9.png" alt="sslhijack9" title="sslhijack9" width="795" height="596" class="alignnone size-full wp-image-335" /></a></p>
<p><a href="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack10.png"><img src="http://wuhongsheng.com/wp-content/uploads/2009/09/sslhijack10.png" alt="sslhijack10" title="sslhijack10" width="889" height="366" class="alignnone size-full wp-image-336" /></a></p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wuhongsheng.com/it/2009/09/ssl-hijack/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>黑莓刷机后第三方软件无法上网的解决</title>
		<link>http://wuhongsheng.com/it/2009/03/how-to-re-enable-3rd-app-to-access-internet-on-blackberry-after-upgrade/</link>
		<comments>http://wuhongsheng.com/it/2009/03/how-to-re-enable-3rd-app-to-access-internet-on-blackberry-after-upgrade/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 10:00:29 +0000</pubDate>
		<dc:creator>吴洪声</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[8900]]></category>
		<category><![CDATA[blackberry]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[黑莓]]></category>

		<guid isPermaLink="false">http://wuhongsheng.com/?p=276</guid>
		<description><![CDATA[很简单： 选项-安全选项-防火墙-复位 很多人只做了上面这步，但还是无法上网。解决办法很简单： 重启一次 No related posts. Related posts brought to you by Yet Another Related Posts Plugin.


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>很简单：</p>
<p><strong>选项-安全选项-防火墙-复位<br />
</strong><br />
很多人只做了上面这步，但还是无法上网。解决办法很简单：</p>
<p><strong>重启一次</strong></p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wuhongsheng.com/it/2009/03/how-to-re-enable-3rd-app-to-access-internet-on-blackberry-after-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.405 seconds -->

