Databases

MASS SQL Injection 에 대한 DB 복구

duraboys 2008. 10. 22. 17:44
출처 카페 > SecurityPlus | 방립동
원문 http://cafe.naver.com/securityplus/10181

MASS SQL Injection 에 당해서 피해보는 사례가 많은것 같습니다.

그래서 요즘 이런 형태 분석에 많은 시간을 투자하고 있네요..

참고가 될까 해서 올립니다.(마지막이 될듯...)

 

아래 쿼리를 실행시키면 MASS SQL Injection로 당한 DB에서 악성코드 문자열을 제거합니다.

 

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