Files
vulhub/electron/CVE-2018-1000006/README.zh-cn.md
Aaron 63285f61aa
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
first commit
2025-09-06 16:08:15 +08:00

40 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# electron 远程命令执行漏洞CVE-2018-1000006
Electron是由Github开发用HTMLCSS和JavaScript来构建跨平台桌面应用程序的一个开源库。 Electron通过将Chromium和Node.js合并到同一个运行时环境中并将其打包为MacWindows和Linux系统下的应用来实现这一目的。
在Windows下如果Electron开发的应用注册了Protocol Handler允许用户在浏览器中召起该应用则可能出现一个参数注入漏洞并最终导致在用户侧执行任意命令。
参考链接:[Electron < v1.8.2-beta.4 远程命令执行漏洞—【CVE-2018-1000006】](https://xianzhi.aliyun.com/forum/topic/1990)
## 编译APP
执行如下命令编译一个包含漏洞的应用:
```
docker compose run -e ARCH=64 --rm electron
```
上述命令中因为软件需要在Windows平台上运行所以需要设置ARCH的值为平台的位数32或64。
编译完成后再执行如下命令启动web服务
```
docker compose run --rm -p 8080:80 web
```
此时,访问`http://your-ip:8080/`即可看到POC页面。
## 复现漏洞
首先在POC页面点击第一个链接下载编译好的软件`vulhub-app.tar.gz`。下载完成后解压,并运行一次:
![](1.png)
这一次将注册Protocol Handler。
然后再回到POC页面点击第二个链接将会弹出目标软件和计算器
![](2.png)
> 如果没有成功可能是浏览器原因。经测试新版Chrome浏览器点击POC时会召起vulhub-app但不会触发该漏洞。