xray 扫描器
目录
下载安装
- xray 为单文件命令行工具,且自带所有依赖,安装打开即可,无需安装
- 下载地址:https://github.com/chaitin/xray/releases
- 文档地址:https://chaitin.github.io/xray
- 支持平台:windows x86\ windows x64 \linux \ MacOS \ARM X64
- 编写POC文档:https://chaitin.github.io/xray/#/guide/poc
- VS Code 安装软件:https://code.visualstudio.com
被动代理原理
配置过程:
- 安装浏览器插件 SwitchyOmega
- 启动 xray ,使用命令生成证书—— 【xray_windows_amd64.exe genca】
- 安装 并信任生成的证书
- 启动 xray 代理——【xray_windows_amd64.exe webscan --listen 127.0.0.1:666 --html-output proxy.html】
- 配置浏览器开始扫描
xray 参数:
- 允许扫描的域—— Mitm: restriction
- 为代理添加认证——Mitm: auth
- 扫描插件配置——plugins
- 发包速率限制—— http: max_qps
- 扫描代理配置—— http: proxy
启动Xray
Burpsuite 作为xray 的上游代理(抓取 xray 发包)
Xray 作为 burpsuite 的上游(协助测试)
编写POC
启动POC框架
将编写好的POC进行测试
VS Code 软件
Visual Studio Code(以下简称vscode)是一个轻量且强大的跨平台开源代码编辑器(IDE),支持Windows,OS
X和Linux。内置JavaScript、TypeScript和Node.js支持,而且拥有丰富的插件生态系统,可通过安装插件来支持
C++、C#、Python、PHP等其他语言。
插件 yaml 便于编写POC
{
"yaml.schemas": {
"https://chaitin.github.io/xray/assets/poc/yaml-poc-schema.json": "poc-yaml-*.yml"
}
}
下面进行poc 编写
--url 可以对单个地址进行检测,通过设置其中的关键字进行测试
phantasm 函数