• λ我爱Aspx >> C#.Net >> 脚本攻击防范策略完全篇
  • 脚本攻击防范策略完全篇

  • :aspxer  Դ:5iaspx  :2007-7-30 6:14:41  ؼ:
  • 'cmdshell' exec @a 'dir c:\'--&aid=9

    http://127.0.0.1/forum/showuser.asp?id=999'; declare @a sysname set @a='xp'+

    '_cm'+'dshell' exec @a 'dir c:\'--&aid=9

    甚至可以执行像:net user fqy fqy /add 这样的指令.当然这就需要你当前的运行身份必须是Sa,或者你攻击的只是一台虚拟主机,我劝你还是就此打住.

    对于一些整机使用的站点来说防止通过80端口攻击而直接拿到整机管理权限,这一点就变得至关重要了。对xp_cmdshell 的过滤就成为首要,很多站点的程序都是用GET或者是GET与POST混合来提交数据的,对于此,我们给出一种防止GET进行SQL注入的程序:如程序体(5)

    fqys=request.servervariables("query_string")

    dim nothis(18)

    nothis(0)="net user"

    nothis(1)="xp_cmdshell"

    nothis(2)="/add"

    nothis(3)="exec%20master.dbo.xp_cmdshell"

    nothis(4)="net localgroup administrators"

    nothis(5)="select"

    nothis(6)="count"

    nothis(7)="asc"

    nothis(8)="char"

    nothis(9)="mid"

    nothis(10)="'"

    nothis(11)=":"

    Ҷƪл˵?
  • һƪ用你写我读 文档录入和校对轻松搞定
    һƪ保障Web数据库安全运行