--- notion-id: 3c54263f-e599-4f29-9580-7b228aaa72c8 --- 流程: 1、`./phantomjs xss.js` 运行相关文件 2、Burpsuite抓包 3、运行XSS配置参数 # 一、客户端 Windows Linux # 二、服务端 下载phantomjs以及xss.js [https://phantomjs.org/download.html](https://phantomjs.org/download.html) [https://github.com/nVisium/xssValidator](https://github.com/nVisium/xssValidator) phantomjs安装完毕 将xss拷贝到相关目录 运行指令:`phantomjs.exe xss.js` **linxu**: 解压完成过,我们进入…/phantomjs-2.1.1-linux-x86_64/bin/文件夹中,将phantomjs执行文件放入/use/bin文件夹下,相当于我们在windows中配置环境变量,从而方便我们运行。 注意修改下方解压地址: `sudo ln -s /phantomjs-xxx-linux-x86_64/bin/phantomjs /usr/bin/phantomjs` 输入命令 `phantomjs -h`如果你发现报错了 **(没有报错请跳过)** 这个问题是因为Ubuntu 22.04 使用新的 OpenSSL 版本 3.0.2 而不是旧的 OpenSSL 版本 1.1.1 。这些 OpenSSL 版本不完全向后兼容,所以这就是为什么您在 PhantomJS 尝试自动配置 SSL/TLS 设置时看到此错误的原因。 **临时修改变量环境**【重启后失效】 输入下方指令: ```shell export OPENSSL_CONF=/dev/null ``` 再次运行phantomjs -h,就恢复正常 接下来我们运行`phantomjs /phantomjs-2.1.1-linux-x86_64/examples/hello.js` ```shell phantomjs /home/kali/下载/phantomjs-2.1.1-linux-x86_64/bin/xss.js ``` 即可 **永久修改变量环境** ```shell 输入sudo vi /etc/profile 将export OPENSSL_CONF=/dev/null新增到文件最后一行保存 注:修改文件后要想马上生效还要运行# source /etc/profile不然只能在下次重进此用户时生效 /etc/profile 对应 sh ~/.bashrc 对应 bash bash 先找 ~/.bashrc ,如果没有才去找/etc/profile ,算是保持对sh的一致 ``` **配置XSS插件** burpsuite安装XSS插件 **步骤1** ![[IMG-20260516155634003.png]] **步骤2** ![[IMG-20260516155634017.png]] **步骤3** ![[IMG-20260516155634107.png]] **步骤4** ![[IMG-20260516155634154.png]] **步骤5** ![[IMG-20260516155634204.png]] **步骤6、修改请求参数并进行XSS自动扫描** ![[IMG-20260516155634247.png]] **步骤7、查看单独的结果(有勾选的就是有XSS漏洞的)** ![[IMG-20260516155634275.png]] ![[IMG-20260516155634321.png]] **步骤8、在浏览器中重现** ![[IMG-20260516155634330.png]] ![[IMG-20260516155634389.png]] ![[IMG-20260516155634423.png]]