xpoc漏洞使用与编写浅尝

博客 动态
0 136
羽尘
羽尘 2023-06-14 11:10:36
悬赏:0 积分 收藏

xpoc漏洞使用与编写 浅尝

下载地址 https://github.com/chaitin/xpoc/releases

目前最新版本是 0.0.4

可能是我还是不太习惯yaml这种结构的,感觉就很反人类,所以我以前一般都还是pocsuite用的比较多,结果pocsuite最后也支持yaml了 orz ,如下

#!yaml
name: test poc
description: This is a test POC script written in YAML format.
author: binjie09
date: 2023-06-12
references:
    - https://www.example.com/vuln
options:
    target:
        type: string
        required: true
        description: Target URL
    timeout:
        type: integer
        default: 10
        description: Timeout in seconds
poc:
    - name: Test vulnerability
      request:
          method: GET
          url: '{{target}}/vulnerability'
          headers:
              User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
              Accept-Language: en-US,en;q=0.8
          timeout: {{timeout}}
      response:
          - match: 'Vulnerable'
            keyword: true
            description: The target is vulnerable.
      error:
          - match: '403 Forbidden'
            description: Access denied.

运行xpoc

xpoc -h

编写yaml

你想真正把这玩意用起来就得自己写poc,本来想用在线版 为了安全性 算了

下载本地规则工具 https://github.com/zeoxisca/gamma-gui/releases

最新版本为 1.1

打开之后是这样

比如我想写一个未授权访问的POC

刚开始写POC的时候用这种图形化界面的生成就行 等后面用的比较多了,同时POC的复杂度上升了之后一般还是需要自己手动进行编写

最后生成的poc yaml为(当然我这里有些地方没有填写

name: poc-yaml-test
transport: http
rules:
  r0:
    request:
      method: POST
      path: /aaa
      follow_redirects: false
      headers:
        User-Agent: >-
          Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101
          Firefox/101.0
        Content-Type: application/x-www-form-urlencoded
        Accept-Encoding: gzip, deflate
      body: order=get
    expression: response.status == 200 && "SUCCESS".matches(response.body_string)
expression: r0()
detail:
  author: Cl0udG0d
  links: []

在临时发射场我们可以验证这里的POC的正确性

使用poc

复制出来之后使用xray调用

xpoc -r test.yaml -t http://www.baidu.com

这里当然是失败的 因为我随便乱写的POC ??

总结

我以前还写过xray破解的教程 orz,相对xray来说 我更喜欢xpoc,可以让我定制化的程度更高,也有可能是我不会用xray hhh

END

建了一个微信的安全交流群,欢迎添加我微信备注进群,一起来聊天吹水哇,以及一个会发布安全相关内容的公众号,欢迎关注 ??

GIF GIF
posted @ 2023-06-14 10:50  春告鳥  阅读(0)  评论(0编辑  收藏  举报
回帖
    羽尘

    羽尘 (王者 段位)

    2233 积分 (2)粉丝 (11)源码

     

    温馨提示

    亦奇源码

    最新会员