r/programming • u/Davipb • Aug 12 '22
RCE Vulnerability found in Electron, affects Discord, Teams, and more
https://www.vice.com/en/article/m7gb7y/researchers-find-vulnerability-in-software-underlying-discord-microsoft-teams-and-other-apps
1.9k
Upvotes
397
u/knapstack123 Aug 13 '22 edited Aug 13 '22
Hi Everyone,
I’m Aaditya Purani (knapstack), one of the researcher who presented this talk at BlackHat USA 2022 yesterday.
We found vulnerabilities in 20 commonly used applications such as discord, MS Teams, Notion, BaseCamp, etc.
The first requirement for all of these vulnerabilities to work is to get a javascript execution in the Electron application’s webview (the portion where sites are rendered). This is possible either through a vulnerability such as XSS, Open URL redirection or through features (like creating embeds, markdown, etc.) in the website. (for example: discord, element, etc)
The second step is to then abuse ElectronJS framework to escalate that arbitrary JS execution to gain Remote code execution on end-users operating system. These depends on the security settings and IPC channels available in the app. In our talk, I demonstrate attacks from least restrictive to the most restrictive settings.
For the most restrictive setting, We found a novel attack surface in ElectronJS framework which allows you to do this easily. The root cause for this is, There is always a substantial patch-gap between Chrome -> ElectronJS framework -> apps.
Hence, It is possible to use an existing Chromium n-day renderer RCE exploits to disable Electron’s Security settings as these settings are defined on the renderer process. Hence, are reachable via v8 renderer exploit. This occurs because of the way ElectronJS is designed and is a fundamental design issue within the framework. (ElectronJs = JS + Chromium so this intersection is where the flaw occurs as it’s not same as your normal chrome browser).
ElectronJS maintainers fixed promptly one of the framework issue we reported by not exposing IPCs to NodeIntegrationInSubFrames child renderer processes.
Again, If you’re an end-user - all of these attacks are applicable if there is slight social-engineering involved but I want to emphasis that some of our exploits on lot of these apps are zero click exploits (For example: just sending a message to you can hack you). Hence, It is highly possible that you can get pwned through such exploits in comparison to getting phished or installing rogue extensions on your favorite Browser. The main benefit for an attacker to use these Electron exploits to target you is - They’ll gain control over your operating system by getting a system level RCE. 😅
We will publish more blogposts at https://blog.electrovolt.io or follow @ElectrovoltSec on Twitter for all of our findings and if you’re at DEFCON, I’ll give this same talk again on Sunday 1:00 PM PT. Don’t miss out!
233
u/[deleted] Aug 12 '22
Videos that can crash or hang Discord/Chromium have been around for quite a while now, I'm honestly not surprised that someone managed to find a more serious threat (albeit it took a while).
15
u/shishir-nsane Aug 12 '22 edited Aug 12 '22
Is this vulnerability entered into CVE database?
61
u/mcp613 Aug 12 '22
So are they finally gonna update discord's electron on Linux so I can screen share with Wayland?
16
u/saichampa Aug 12 '22
I need teams occasionally but not enough that I open it regularly, so I just use it in the browser. Might take their advice and use other electron apps that way too. I was under the impression that the chromium browser sandboxing was part of deployed electron apps but I guess not
5
u/danbulant Aug 13 '22
Spotify uses CER, not electron as said in the article.
And it has significantly smaller attack surface by not having that much user content anyway.
1
u/erik542 Aug 12 '22
Where's the bridge review?
1
u/saevon Aug 13 '22
Anyone have the Electron Version that fixed the bug? and an easy way to check if discord is using that now?
1
u/LoserEXE_ Aug 13 '22
I remember someone sent me a video that triggered my anti virus (IT was from a trusted friend)
1
u/pogogram Aug 13 '22
So we’re saying Tauri is the way to go instead of Electron for now I guess.
1
u/Ollieq77 Sep 04 '22
Anyone getting windows defender HIVE.ZY
1
u/[deleted] Sep 04 '22
Is this what we see in defender today with the Win32/Hive.ZY ?
1
u/[deleted] Sep 14 '22
Electron sucks balls
-2
u/fp_weenie Aug 12 '22
lmao can't wait for the Electron excuses to pile in.
-1
u/IrreverentHippie Aug 13 '22
I wonder if discord know about this and has done anything to fix it?
-10
u/NastroAzzurro Aug 12 '22
vice.com is still a thing?
-7
u/MuonManLaserJab Aug 13 '22
Electron bad
-20
u/broknbottle Aug 12 '22
False, electron is super secure and low on resource usage. If you upvoted this reply then you are mentally handicapped
0
u/[deleted] Aug 12 '22
[deleted] — view deleted comment
0
u/[deleted] Aug 12 '22
[deleted] — view deleted comment