【原创】成功入侵一政府网站——善后工作
[color=blue]今天成功入侵一政府网站,一进webshell看到的东西吓死人[/color][color=blue][/color]}:n9a]W#hkjR
[color=blue]有个10MB左右的数据库,全是人才信息方面的,一个表有1w多条记录!!![/color]F8M _1i4?;C'?e E1S\
[color=blue][/color]
[color=blue]入侵的方法不方便说,关键是修补他们的漏洞[/color]
[color=blue][/color]U"No)P[0~
[color=blue]首先修补了他们的注入漏洞,他们只修补了conn.asp[/color]#|\p |.~b
[color=blue][/color]
[color=blue]但是数据库连接文件竟然是dbconn.asp,写入一下代码[/color][code]<% kyD@cmVb
Dim flashack_Post,flashack_Get,flashack_In,flashack_Inf,flashack_Xh,flashack_db,flashack_dbstr ['xX/?.qr;W iEc
flashack_In = "'※;※and※exec※insert※select※delete※update※count※*※%※chr※mid※master※truncate※char※declare" P9h[7[*nA
flashack_Inf = split(flashack_In,"※") *`)Cs y2hfd2\]
If Request.Form<>"" Then 0{D}]Xb#o.iu
For Each flashack_Post In Request.Form
For flashack_Xh=0 To Ubound(flashack_Inf)
If Instr(LCase(Request.Form(flashack_Post)),flashack_Inf(flashack_Xh))<>0 Then
Response.Write "<Script Language=JavaScript>alert('柔肠寸断[3.A.S.T]提示你↓\n\n请不要在参数中包含非法字符尝试注入,QQ:790653916!\n\nHTTP://WWW.3AST.COM.CN');</Script>" ;xR*U@*k\F
Response.Write "非法操作!<br>" )VN+Fys
Response.Write "操作IP:"&Request.ServerVariables("REMOTE_ADDR")&"<br>" Fh)jI,iS^L
Response.Write "操作时间:"&Now&"<br>" 0G7I f/G_d]j6U
Response.Write "操作页面:"&Request.ServerVariables("URL")&"<br>" 1q6j4a.t)C
Response.Write "提交方式:POST<br>" xU3{.i:Po
Response.Write "提交参数:"&flashack_Post&"<br>"
Response.Write "提交数据:"&Request.Form(flashack_Post)
Response.End e)@&f_W5sQ
End If KN0\4{*AgOK&A
Next (~;[:p;c?0\,d }/U
Next 3XQJK"s.i%j/g
End If 4HQ1Am:s^:QW.c
If Request.QueryString<>"" Then
For Each flashack_Get In Request.QueryString }Uq:u@r;[_
For flashack_Xh=0 To Ubound(flashack_Inf) t$d F KnG.Zw0U
If Instr(LCase(Request.QueryString(flashack_Get)),flashack_Inf(flashack_Xh))<>0 Then
Response.Write "<Script Language=JavaScript>alert('柔肠寸断[3.A.S.T]提示你↓\n\n请不要在参数中包含非法字符尝试注入,QQ:790653916!\n\nHTTP://WWW.3AST.COM.CN');</Script>" $u;k eY#{6B
Response.Write "非法操作!br>" kA^cyv-R
Response.Write "操作IP:"&Request.ServerVariables("REMOTE_ADDR")&"<br>" V(~/u2m `e/Cq`
Response.Write "操作时间:"&Now&"<br>"
Response.Write "操作页面:"&Request.ServerVariables("URL")&"<br>" 9B-] hxb'J1e9E)J
Response.Write "提交方式:GET<br>"
Response.Write "提交参数:"&flashack_Get&"<br>"
Response.Write "提交数据:"&Request.QueryString(flashack_Get)
Response.End
End If C9{R7q5n1m\ t/R
Next
Next p'QPF3TZk Xm X}
End If
%>(ng1cqa:|1~0IZ
4MO$?{ |:a|8dF/cGm
[/code]OK,注入漏洞解决
还有上传漏洞,我分析了一下上传处理页面的asp代码,竟然一点不完善[code]<%
