sql注入漏洞测试

最近在学习mssql注入漏洞,一直找不到合适的网站系统,自己做了个有漏洞的连接数据库的代码来实验。

<html>
<head>
<title>sql注入漏洞测试</title>
</head>
<body>
<%
MM_conn_STRING = "Driver={SQL Server};server=(local);uid=sa;pwd=123;database=test;"
Set conn = Server.Createobject("ADODB.Connection")
conn.open MM_conn_STRING

aid=request.QueryString("id")

Set rs = Server.CreateObject("ADODB.RecordSet")
SQL="select * from hehe where id="&aid
rs.open SQL,conn,3,3    //有待进一步研究,当rs.open SQL,conn,1,1的时候进行mssql注入得不到有用信息

id=rs("id")
content=rs("content")

%>
<div>编号:<% response.write id %></div>
<div>内容:<% response.write content %></div>
</body>
</html>

 

posted @ 2012-11-14 15:05  山貓  阅读(357)  评论(0编辑  收藏  举报