3

xpoc漏洞使用与编写 浅尝 - 春告鳥

 11 months ago
source link: https://www.cnblogs.com/Cl0ud/p/17479603.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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

20230613213431.png

编写yaml

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

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

最新版本为 1.1

打开之后是这样

20230613213448.png

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

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

20230613213458.png

最后生成的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的正确性

20230613213512.png

使用poc

复制出来之后使用xray调用

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

20230613213520.png

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

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

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

GIF
GIF

__EOF__

本文作者:春告鳥
本文链接:https://www.cnblogs.com/Cl0ud/p/17479603.html
关于博主:评论和私信会在第一时间回复。或者直接私信我。
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
声援博主:如果您觉得文章对您有帮助,可以点击文章右下角推荐一下。您的鼓励是博主的最大动力!

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK