SQL injection 관련 > MSSQL Tip

본문 바로가기
 

SQL injection 관련

작성일 09-01-17 12:47

페이지 정보

작성자 no_profile 휴먼 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 조회 16,735회 댓글 0건

본문

2009/01/14 오후 4:08 | 데이터베이스

요즘 중국쪽 해커들의 침입이 비일비재 합니다.
위의 사이트 참조.. 위와 같이 b.js , a.js...등 또는 iframe 등을 통해 읽게 해서 악성코드를 유포 하기도 합니다..
제가 자체적으로 해당 ip경로를 분석해 본결과.. 중국이 대부분 이었던 예전과는 달리 현재는 북미 쪽에서도 침입이 많이 들어 오는것으로 알려져 있습니다.
중국쪽에서 경유지를 통해서 이동하는것 같기도 하구요..
위와 같은 방식으로 접근 하는거 외에 또다른 방식 .
HDSI,D-SQL,PTSEC,AIO 등 중국쪽 해킹 툴로 사이트의 취약점,어드민을 해킹을 하기도 합니다.
원하시는 분은 저한테 연락주시면 위의 해킹툴을 드리도록 하겠습니다. 악의적인 공격을 위해서가 아닌 진단이나 막는데 이용 하시고 싶다면.
제가 예전에 게시판에 올려놓은 웹나이트를 사용 해도 되지만 워낙 셋팅 하기도 힘들고..-ㅅ-;
업로드컴포넌트와 잘 호환이 안되는 경우의 수가 너무 많기 때문에.. 웹나이트를 저희 사이트에서도 사용을 할려다가 버렸습니다.
그 대책으로 소스를 하나 공유 하도록 하겠습니다.
 
해당 소스를 include 하시던지.. 전 페이지에 include 되어 있는 부분(예를 들면 db연결페이지)에 해당소스를 삽입 을 하시면 되겠습니다.
array_split_item = Array("/*", "*/", "@@", "char", "nchar", "varchar", "nvarchar", "alter", "begin", "cast", "create", "cursor", "declare", "delete", "drop", "end", "exec","execute", "fetch", "insert", "kill", "open","select", "sys", "sysobjects", "syscolumns","table", "update", "<script", "</script>", "''","&apos;","and","1=1",";","--","select","insert","update","delete","drop ","alter ","create ","inner join","from ","where ","union","group by","having ","table ","shutdown","kill ","declare","openrowset","opendatasource","pwdencrypt","msdasql","sqloledb","char(","syslogins","sysxlogins","sysdatabases","sysobjects","syscomments","raiserror","exec","xp_","sp_","xp_cmdshell","xp_reg","xp_servicecontrol","xp_setsqlsecurity","xp_readerrorlog","xp_controlqueueservice","xp_createprivatequeue","xp_decodequeuecommand","xp_deleteprivatequeue","xp_deletequeue","xp_displayqueuemesgs","xp_dsinfo","xp_mergelineages","xp_readpkfromqueue","xp_readpkfromvarbin","xp_repl_encrypt","xp_resetqueue","xp_sqlinventory","xp_unpackcab","xp_sprintf","xp_displayparamstmt","xp_enumresult","xp_showcolv","xp_updatecolvbm","xp_execresultset","xp_printstatements","xp_peekqueue","xp_proxiedmetadata","xp_displayparamstmt","xp_availablemedia","xp_enumdsn","xp_filelist","sp_password","sp_adduser","sp_addextendedproc","sp_dropextendedproc","sp_add_job","sp_start_job","sp_delete_alert","sp_msrepl_startup")
for each item in Request.QueryString
for array_counter = lbound(array_split_item) to ubound(array_split_item)

item_position1 = InStr(lcase(Request(item)), array_split_item(array_counter))

if item_position1 > 0 then
 
'''''''''''''''' 위의 해당 arr 에 해당 하는 값이 폼값으로 넘어 왓다면 해당 부분 실행.즉,해킹시도시
Response.redirect "http://www.m2mcomputer.com/"  ''''''''''''''''엠투엠으로 보내버립니다!!!!!!!!!!!!-ㅁ-ㅋ쌤이 잡아 주시겠지 -ㅅ-;;
Response.End()
end if
next
next
 
위의 array_split_item 부분은 웹나이 부분에서 추출한 인젝션 공격의 여러 예제를 넣은것이기 때문에.
보고 자신의 사이트와 안맞는 부분은 지워 주면 되겠습니다.
 
 

댓글목록

등록된 댓글이 없습니다.

전체 12건 1 페이지
게시물 검색