Advertisement
theMace

vulnerable stored procedure

Dec 5th, 2011
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.30 KB | None | 0 0
  1. /* don't do this on your server... */
  2. CREATE PROCEDURE VerifyUser
  3.     @username VARCHAR(50),
  4.     @password VARCHAR(50)
  5. AS
  6. BEGIN
  7.     DECLARE @SQL nvarchar(500);
  8.     SET @SQL = 'select * from Usertable
  9.                 where username = ''' + @username + '''
  10.                 and password = ''' + @password + ''' ';
  11.     EXEC(@SQL);
  12. END
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement