Giter VIP home page Giter VIP logo

xpoc's Introduction

xpoc

为供应链漏洞扫描设计的快速应急响应工具

Documentation

快速开始特点使用贡献下载使用文档


🚀 快速使用

在使用之前,请务必阅读并同意 License 文件中的条款,否则请勿安装使用本工具。

  1. 扫描指定目标

    • ./xpoc -t https://example.com -o result.html
  2. 查看所有云端的POC

    • ./xpoc list -a
  3. 批量扫描

    • ./xpoc < targets.txt
    • cat targets.txt | ./xpoc
    • ./xpoc -i targets.txt
  4. 同步最新插件

    首次启动会自动进行一次全量同步

    • ./xpoc pull
  5. 更新到最新版本

    • ./xpoc upgrade

🪟 特点

  1. 支持云端获取POC,可以以最快的速度进行应急响应
  2. 使用xray yaml poc脚本格式,支持TCP/UDP协议的插件的编写和加载,并可以使用golang自定义插件实现功能增强
  3. 自定义golang插件,支持更多种的漏洞检测,支持加载工具插件等
    • 漏洞扫描
    • 向yaml脚本注入新功能
    • 自定义爬虫
    • 网页截图
    • ...

📦 安装使用

releases中下载对应的系统的最新版即可,运行xpoc -h即可查看帮助

   __  /\    /\_.  ___.  _____
  | |/ /   / __.\/ __.\/ ____|
  |   /XRAY™/_/ / / / / /
 / . |   / .___/ /_/ / /___.
/ /|_|  / /    \____/\____/
\/v0.0.3\/cloud plugins: [97]

[INFO] 2023-05-26 15:10:17 use config at: xpoc-config.yaml [strategy.go:30]

NAME:
  xpoc - light poc scanner

USAGE:
  Scan single target:      xpoc -t https://example.com
   └>  multiple targets:   xpoc -t 192.168.0.1,192.168.0.1:443,tcp://192.168.1.1:8000
  Input from file:         xpoc -i targets.txt
   └>   from pipe:         cat targets.txt | xpoc
  Output to JSON:          xpoc -t https://example.com -o result.json
   └>    to HTML:          xpoc -t https://example.com -o result.html
  Run plugins form cloud:  xpoc -r 1 -t http://example.com
   └> plugins from local:  xpoc -r ./poc-yaml-example.yaml -t http://example.com
  List local plugins:      xpoc list
   └>  cloud plugins:      xpoc list -a
  Pull all cloud plugins:  xpoc pull
   └>  specific plugins:   xpoc pull -id 1

COMMANDS:
  pull     下载及更新插件
  add      将文件添加到插件仓库
  list     列出插件
  upgrade  升级到最新版本
  help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
  --run value, -r value      执行指定插件 多个插件间','分割 支持glob语法 用于测试插件或过滤插件
  --enable value, -e value   在默认策略(全量探测)基础上增加本地插件,支持glob语法
  --disable value, -d value  禁用部分插件,支持glob语法
  --config value, -c value   指定配置文件
  --debug                    debug (default: false)
  --quiet, -q                不显示banner (default: false)
  -p value                   需要探测的TCP端口 <info-live>
  --bw value                 最大带宽占用限制(KB/s): 限制扫描发包的最大速率 与PPS的换算关系为: PPS=带宽*1024/60 <info-live> (default: 2000)
  --Pn                       禁用主机存活探测: 端口扫描之前不进行主机存活探测 <info-live> (default: false)
  -o value [ -o value ]      结果输出: 指定保存结果的文件路径 <result-printer>
  -t value                   扫描目标: 可以为URL/IP/域名/Host:Port等多种形式的混合输入 <util-target-split> <default>
  -i value                   目标文件: 指定含有扫描目标的文本文件 <util-target-split>
  --help, -h                 show help (default: false)

⚡️ 进阶

下列高级用法请查看 https://docs.xray.cool/ 使用。

  • 修改配置文件
  • go插件编写(施工中)
  • 反连平台的使用
  • ...

😘 贡献 POC

xray的进步离不开各位师傅的支持,秉持着互助共建的精神,为了让我们共同进步,xray也开通了“PoC收录”的渠道!在这里你将会得到:

提交流程

  1. 贡献者以 PR 的方式向 github xray 社区仓库内提交, POC 提交位置: https://github.com/chaitin/xray/tree/master/pocs, 指纹识别脚本提交位置: https://github.com/chaitin/xray/tree/master/fingerprints
  2. PR 中根据 Pull Request 的模板填写 POC 信息
  3. 内部审核 PR,确定是否合并入仓库
  4. 但需要注意,如果想要获得POC的奖励,需要将你的POC提交到CT stack,才能获取到奖励

丰厚的奖励

  • 贡献PoC将获得丰厚的金币奖励,成就感满满;
  • 丰富的礼品兑换专区,50余种周边礼品任你挑选;
  • 定期更有京东卡上线兑换,离财富自由又近了一步;
  • 进入核心社群的机会,领取特殊任务,赚取高额赏金

完善的教程

  • 完善的PoC编写教程和指导,让你快速上手,少走弯路;

学习与交流

  • 与贡献者、开发者面对面学习交流的机会,各项能力综合提高;
  • 免笔试的直通面试机会,好工作不是梦;

如果你已经成功贡献过PoC但是还没有进群,请添加客服微信:

提供平台注册id进行验证,验证通过后即可进群!

参照: https://docs.xray.cool/#/guide/contribute

🔧周边生态

POC编写辅助工具

该工具可以辅助生成POC,且在线版支持poc查重,本地版支持直接发包验证

在线版

本地版

xray gui辅助工具

本工具仅是简单的命令行包装,并不是直接调用方法。在 xray 的规划中,未来会有一款真正的完善的 GUI 版 XrayPro 工具,敬请期待。

📝 讨论区

提交误报漏报需求等等请务必先阅读 https://docs.xray.cool/#/guide/feedback

如有问题可以在 GitHub 提 issue, 也可在下方的讨论组里

  1. GitHub issue: https://github.com/chaitin/xpoc/issues

  2. 微信公众号:微信扫描以下二维码,关注我们

  1. 微信群: 请添加微信公众号并点击“联系我们" -> "加群“,然后扫描二维码加群

  2. QQ 群: 717365081

xpoc's People

Contributors

chinaykc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

xpoc's Issues

poc

同为yaml,不兼容nuclei的poc吗

xpoc0.3版本无法正常使用

图片
D:\SSTTGGJJ\漏洞探测\xpoc>xpoc_windows_386.exe -t https://example.com -o result.html
__ /\ /_. . _____
| |/ / / __./ __./ |
| /XRAY™/
/ / / / / /
/ . | / .
/ /
/ / /
.
/ /|
| / / _/_/
/v0.0.3/cloud plugins: [97]
[INFO] 2023-05-26 18:30:56 use config at: C:\Users\93789.xray\xpoc-config.yaml [strategy.go:30]
[INFO] 2023-05-26 18:30:56 load plugins form: [C:\Users\93789.xray\xpoc\plugins] [loader.go:123]
[WARN] 2023-05-26 18:30:56 reverse-clientinit error:token not found [plugin.go:87]
[WARN] 2023-05-26 18:30:56 *reverseclient.ReverseClient init fail, reverse-factory disabled [plugin.go:95]
[ERRO] 2023-05-26 18:31:05 detect-url: Get "https://example.com": dial tcp 93.184.216.34:443: i/o timeout [detect.go:17]
[INFO] 2023-05-26 18:31:05 result-printer: no target was scanned. or discard output. use the '-t' option to specify the scanning target.

是否支持目录结构不固定的POC

背景:目前xray和xpoc所编写的yaml的poc是将完整的url替换掉,这种方式不能对攻击payload在各个参数处进行替换,例如不能实现像内置的poc-go-apache-log4j2-rce一样的效果

问题:在 chaitin/xray#1727chaitin/xray#84 中有看到之后会开放插件支持以解决上述问题,请问:1. 这个支持是不是就是xpoc主页中所说的“并可以使用golang自定义插件实现功能增强”和“自定义golang插件”所指的内容。2. 如果是的话这个功能大概什么时候可以正式推出呢,非常期待 :)

感谢大佬们~

Error while scan

[WARN] 2023-11-29 21:20:44 go load fail: ../../.xray/xpoc/plugins/go-poc-geoserver-geoserver-sql_injection-CVE-2023-25157.go.bin: 4:2: bytes/_.go redeclared in this block [loader_go.go:61]
[WARN] 2023-11-29 21:20:44 go load fail: ../../.xray/xpoc/plugins/poc-go-ecology_filedownloadforoutdoc-sqli.go.bin: 4:2: fmt/_.go redeclared in this block [loader_go.go:61]
[WARN] 2023-11-29 21:20:44 go load fail: ../../.xray/xpoc/plugins/ecology_clusterupgrade_upload.go.bin: 5:2: bytes/_.go redeclared in this block [loader_go.go:61]
[WARN] 2023-11-29 21:21:01 reverse-client init error:health check failed for remote reverse server, error: Get "http://localhost:8080/_/api/health_check": dial tcp 127.0.0.1:8080: connect: connection refused [plugin.go:87]
[WARN] 2023-11-29 21:21:01 *reverseclient.ReverseClient init fail, reverse-factory disabled [plugin.go:95]
[ERRO] 2023-11-29 21:21:02 sync: WaitGroup is reused before previous Wait has returned [cli.go:40]

What problem ?

xpoc not in GOPATH

[INFO] 2023-12-11 22:19:53 use config at: /home/vuln/.xray/xpoc-config.yaml [strategy.go:30]
[INFO] 2023-12-11 22:19:53 load plugins form: [/home/vuln/.xray/xpoc/plugins] [loader.go:126]
[WARN] 2023-12-11 22:19:53 go load fail: ../../../.xray/xpoc/plugins:lstat ../../../.xray/xpoc/plugins: no such file or directory [loader_go.go:206]
[INFO] 2023-12-11 22:19:53 load plugins form: [test_local_poc.go] [loader.go:126]
[WARN] 2023-12-11 22:19:53 go load fail: test_local_poc.go: test_local_poc.go:10:2: import "git.in.chaitin.net/lohengrin/xray/event" error: package location /home/vuln/pentest/scan/xpoc not in GOPATH [loader_go.go:70]

使用全部poc巡检会中断

看文档描述默认策略是(全量探测),但实际使用只输-t发现日志仅输出了一部分poc的扫描。指定打印消息中没有的其他的单一poc,确实能扫描出结果。在配置文件中发现enable 那里是 - poc-* 改成其他通配符发现并不生效或者其实匹配的并不是文件名。

想请问一下,如何能全量使用所有poc针对目标进行扫描?

最新的payload报错

在进行. ./xpoc up 拉取最新的poc之后 ,运行程序出现报错
环境:mac os arm
image

无法全量POC验证

将插件pull到本地,也修改了配置文件中的path地址,且运行后的打印信息中的load plugins form后的path也是正确的本地的POC地址,但只能验证10+poc,求解答

no target was scanned. use the '-t' option to specify the scanning target.

λxpoc_windows_amd64.exe -t 192.168.1.1
__ /\ /_. . _____
| |/ / / __./ __./ |
| /XRAY™/
/ / / / / /
/ . | / .
/ /
/ / /
.
/ /|
| / / _/_/
/v0.0.1/cloud plugins: [97]
[INFO] 2023-05-24 12:36:11 use config at: C:\Users\dky.xray\xpoc-config.yaml [strategy.go:30]
[INFO] 2023-05-24 12:36:11 load plugins form: [C:\Users\dky.xray\xpoc\plugins] [loader.go:123]
[WARN] 2023-05-24 12:36:12 reverse-clientinit error:token not found [plugin.go:87]
[WARN] 2023-05-24 12:36:12 *reverseclient.ReverseClient init fail, reverse-factory disabled [plugin.go:95]
[INFO] 2023-05-24 12:36:12 result-printer: no target was scanned. use the '-t' option to specify the scanning target.

C:\Users\xx\Desktop\xpoc_windows_amd64
λping 192.168.1.1

正在 Ping 192.168.1.1 具有 32 字节的数据:
来自 192.168.1.1 的回复: 字节=32 时间=45ms TTL=64
来自 192.168.1.1 的回复: 字节=32 时间=4ms TTL=64
来自 192.168.1.1 的回复: 字节=32 时间=94ms TTL=64

192.168.1.1 的 Ping 统计信息:
数据包: 已发送 = 3,已接收 = 3,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 4ms,最长 = 94ms,平均 = 47ms

关于输出问题

这个-o的输出支持什么格式,我试了txt,json,xml感觉有点杂乱无章,希望能够改进一下输出,比如输出存在的漏洞以及url以及关于链接就够了

无法正常使用

图片
图片
D:\SSTTGGJJ>xpoc_windows_386.exe upgrade
__ /\ /_. . _____
| |/ / / __./ __./ |
| /XRAY™/
/ / / / / /
/ . | / .
/ /
/ / /
.
/ /|
| / / _/_/
/v0.0.1/cloud plugins: [97]
[INFO] 2023-05-26 18:25:45 use config at: C:\Users\93789.xray\xpoc-config.yaml [strategy.go:30]
[INFO] 2023-05-26 18:25:45 load plugins form: [C:\Users\93789.xray\xpoc\plugins] [loader.go:123]
[ERRO] 2023-05-26 18:25:45 Rel: can't make C:\Users\93789.xray\xpoc\plugins relative to D:\SSTTGGJJ [loader_go.go:146]
[INFO] 2023-05-26 18:25:45 upgrade: no update found. you are currently using the latest version. [upgrade.go:27]

甚至于无法正常运行
D:\SSTTGGJJ>xpoc_windows_386.exe
__ /\ /_. . _____
| |/ / / __./ __./ |
| /XRAY™/
/ / / / / /
/ . | / .
/ /
/ / /
.
/ /|
| / / _/_/
/v0.0.1/cloud plugins: [97]
[INFO] 2023-05-26 18:27:31 use config at: C:\Users\93789.xray\xpoc-config.yaml [strategy.go:30]
[INFO] 2023-05-26 18:27:31 load plugins form: [C:\Users\93789.xray\xpoc\plugins] [loader.go:123]
[ERRO] 2023-05-26 18:27:31 Rel: can't make C:\Users\93789.xray\xpoc\plugins relative to D:\SSTTGGJJ [loader_go.go:146]
NAME:
xpoc - light poc scanner

无法正常使用Xpoc进行扫描

图片
错误信息如下
[ERRO] 2023-05-24 14:22:34 Rel: can't make C:\Users\93789.xray\xpoc\plugins relative to D:\SSTTGGJJ [loader_go.go:146]
[ERRO] 2023-05-24 14:22:34 flag provided but not defined: -html [cli.go:41]
CMD整体如下
D:\SSTTGGJJ>xpoc_windows_386.exe -t https://example.com -html result.html
__ /\ /_. . _____
| |/ / / __./ __./ |
| /XRAY™/
/ / / / / /
/ . | / .
/ /
/ / /
.
/ /|
| / / _/_/
/v0.0.1/cloud plugins: [97]
[INFO] 2023-05-24 14:22:34 use config at: C:\Users\93789.xray\xpoc-config.yaml [strategy.go:30]
[INFO] 2023-05-24 14:22:34 load plugins form: [C:\Users\93789.xray\xpoc\plugins] [loader.go:123]
[ERRO] 2023-05-24 14:22:34 Rel: can't make C:\Users\93789.xray\xpoc\plugins relative to D:\SSTTGGJJ [loader_go.go:146]
Incorrect Usage: flag provided but not defined: -html

Did you mean "-h"?

NAME:
xpoc - light poc scanner

USAGE:
Scan single target: xpoc -t https://example.com
└> multiple targets: xpoc -t 192.168.0.1,192.168.0.1:443,tcp://192.168.1.1:8000
Input from file: xpoc -i targets.txt
└> from pipe: cat targets.txt | xpoc
Output to JSON: xpoc -t https://example.com -json result.json
└> to HTML: xpoc -t https://example.com -html result.html
Run plugins form cloud: xpoc -r 1 -t http://example.com
└> plugins from local: xpoc -r ./poc-yaml-example.yaml -t http://example.com
List local plugins: xpoc list
└> cloud plugins: xpoc list -a
Pull all cloud plugins: xpoc pull
└> specific plugins: xpoc pull -id 1

COMMANDS:
upgrade 升级到最新版本
list 列出插件
add 将文件添加到插件仓库
pull 下载及更新插件
help, h Shows a list of commands or help for one command

GLOBAL OPTIONS:
--run value, -r value 执行指定插件 多个插件间','分割
--enable value, -e value 仅启用部分插件,支持glob语法
--disable value, -d value 禁用部分插件,支持glob语法
--config value, -c value 指定配置文件
--debug debug (default: false)
--quiet, -q 不显示banner (default: false)
-o value [ -o value ] 结果输出: 指定保存结果的文件路径 (result-printer)
-t value 扫描目标: 可以为URL/IP/域名/Host:Port等多种形式的混合输入 (util-target-split)
-i value 目标文件: 指定含有扫描目标的文本文件 (util-target-split)
--bw value 最大带宽占用限制(KB/s): 限制扫描发包的最大速率 与PPS的换算关系为: PPS=带宽*1024/60 (info-live) (default: 2000)
--Pn 禁用主机存活探测: 端口扫描之前不进行主机存活探测 (info-live) (default: false)
-p value 需要探测的TCP端口 (info-live)
--help, -h show help (default: false)
[ERRO] 2023-05-24 14:22:34 flag provided but not defined: -html [cli.go:41]

功能建议

poc 是否可以添加组或者标签,在对以知系统进行poc测试时可通过组或者标签来指定某一类用于测试poc

关于poc模版

xpoc的扫描引擎做的超棒,很喜欢,但是规则写起来感觉不太舒服,可不可以兼容nuclei的规则,如果真的这样就太好了。

建议添加自定义Header选项

建议添加自定义header选项,有些环境,需要先登录企业内部的统一认证才能正常访问系统,没有统一认证cookie的都自动跳统一登录页面了,没法正常扫描

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.