    
- 帖子
- 3852
- 积分
- 13044
- 威望
- 16780
- 金钱
- 36761
- 在线时间
- 1139 小时
         
|
这份源码已经放到机子里面很久了 今天拿出来看看 。。谁知道 真的有传说中的”漏洞”
一: cookies 注入
原先我打开index.asp 看到里面包含了conn.asp 八成是数据库连接文件或者是防注入文件。。conn.asp:
<%
SQL_ = "'|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare"
SQL_inj = split(SQL_,"|")
If Request.QueryString<>"" Then
For Each SQL_Get In Request.QueryString
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Request.QueryString(SQL_Get),Sql_Inj(Sql_DATA))>0 Then
Response.Write "请不要试图使用注入程序哦!^_^"
Response.end
end if
next
Next
End If
If Request.Form<>"" Then
For Each Sql_Post In Request.Form
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Request.Form(Sql_Post),Sql_Inj(Sql_DATA))>0 Then
Response.Write "请不要试图使用注入程序哦!^_^"
Response.end
end if
next
next
end if
%>
<%
On Error Resume Next
servermappath=server.mappath("/serverinfo.txt")
Set fso = CreateObject("Scripting.FileSystemObject")
Set txt = fso.OpenTextFile(servermappath,1)
DBstr=""&txt.ReadLine&"" '数据库地址名称
txt.close
set fso=nothing
dbname=""&DBstr&""
cn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(dbname)
%>
嘿嘿 数据库连接和防注入的功能都在这个文件了。。
(看看他们过滤的字眼 其实我们可以跨站。。自己测试了哦。。跨站是存在的)
大家认真看看。。那个管理员很认真得过滤了一些字眼。。
Gpc基本都过滤了?(gpc是php世界里面的某某。。g是get,p是post,c是cookies。。)
貌似。。。认真点看的话 你会发现 他们只过滤了 get和post过来的数据
于是乎。。。假如我们在其他文件找到request(*)类似的语句的话。。那么我们就可以通过cookies注入了。。。
这不 我还找到不少。。最明显的就是pay/index.asp里面。。
要干什么坏事自己去把。。。
这个程序我没仔细看。 估计还有不少地方是程序员疏忽了一点东西 导致俺们可以找一点可以利用的东西出来
另外忽悠一下你们 这个程序用的人不少。。
要拿shell的话 最简单的就是用挖掘机扫一个文件。。serverinfo.txt这个文件可是记录了数据库的地址的。。*(真不知道管理员是怎么想的。。。)这样我们就可以入侵一些懒人的网站了。。
一般里面是这样写的:
/chinammc_data/chinammc_shop.mdb
。。文章报告完毕 |
|