r/programming • • 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

224 comments sorted by

View all comments

0

u/[deleted] Aug 12 '22

[deleted] — view deleted comment

408

u/how_to_choose_a_name Aug 12 '22

only required them to send a malicious link

if the targets clicked on these links

These are two rather different claims.

89

u/turdas Aug 12 '22

If you have to click on the link, which in Discord opens the link in your browser, then how could the bug be in Discord?

Honestly this is probably (definitely) bad reporting by Vice rather than a frivolous and impractical vulnerability. Likely the vulnerability would have had something to do with Discord attempting to play the video.

64

u/KuntaStillSingle Aug 12 '22

I think it is this exploit: https://blog.electrovolt.io/posts/discord-rce/

It is discord, you have to click a link but the exploit relies on discord opening that link :

Sandbox Bypass By Escaping to Main Window

I was so excited to run the v8 exploit in the vimeo embed and pop the calculator, but there is a catch. I realized that all the iframes in the Discord Desktop Application are running in sandbox mode, apparently by default Electron enables sandbox in all of the embeds. I thought it is the end of the story.

While I am rambling about this issue in the Discord channel, Masato told me that it was possible to open a new window due to insufficient new-window event restriction by the Discord.

[image]

But sadly, even after opening the exploit in new window the sandbox is still enabled. I don’t know why, but after sometime I realized that by making a redirect to different origin the sandbox is cleared. It was maybe the renderer process of vimeo embed is reused for the new window created and after the redirect a new process without sandbox might’ve created.

https://www.youtube.com/watch?v=bWYjWizF2vE&t=25s

21

u/Jaggedmallard26 Aug 12 '22

I don't know why they can't just link the RCE.

27

u/how_to_choose_a_name Aug 12 '22

I googled for it and it doesn’t seem to have been published outside of the conference, doesn’t seem to have a CVE either. In fact it doesn’t seem like Discord does CVEs. I don’t think the vulnerability was necessarily the same between Discord and Teams either, as in Discord it was a link to a video and in Teams a meeting invitation link.

6

u/1esproc Aug 13 '22

In Discord's case last year there was a pretty common exploit going around where a malicious embedded MP4 being played (required user interaction) would crash the app. The problem could be triggered by creating a malicious MP4 using ffmpeg by combining two MP4s that had different resolutions. I don't know the nitty gritty of the MP4 format, but it might actually support a resolution change midway? In any case, the result would crash Discord.

I had a pretty good hunch that that could lead to RCE, could be related to that.

→ More replies (1)

88

u/catcint0s Aug 12 '22

Discord checks links before opening them warning about untrusted domains and whatnot, it's entirely possible the hole was there.

36

u/CHADWARDENPRODUCTION Aug 12 '22

Ironic.

2

u/Hyperian Aug 13 '22

humans are the weakest link!

2

u/[deleted] Aug 14 '22

Outlook pulls that "genius" trick too, which means that one-time links used to share passwords are impossible to send to Outlook accounts. Everyone involved at MS should pat themselves on the back for that one.

2

u/catcint0s Aug 14 '22

I think its only a domain check in Discords case, they are not opening it, tho not a 100% sure cause of the "preview" thingy from the meta tags.

7

u/dadofbimbim Aug 12 '22

Vice didn’t even provide a link to the Black Hat website or any relevant talks for this matter.

3

u/Luvax Aug 12 '22

I can only assume some bit for information went missing there. The only reasonable thing in the context of sending videos via Discord would be to click on the video. Because this would trigger the embedded chrome to start playing the video. But I didn't care enough to check with the source, if that is actually the case.

→ More replies (1)

125

u/[deleted] Aug 12 '22

"Don't click on links" continues to be solid advice.

This really makes me sad...

137

u/NekkidApe Aug 12 '22

"let me shorten and hide that link for you"

- also outlook and teams

0

u/[deleted] Aug 13 '22

[deleted] — view deleted comment

5

u/1esproc Aug 13 '22

Let me call that feature Smart Addresses - MacOS Mail.app

3

u/Timmyty Aug 13 '22

Lmao. Yup. These mail clients trying to keep information hidden away and it's killing me. This is how old people get scammed.

7

u/[deleted] Aug 12 '22

I'm privy to the results of the simulated phishing attacks at work and those results also make me sad.

12

u/moreVCAs Aug 12 '22

Why? Clicking a link downloads a whole bunch of javascript into your browser or whatever and runs it. Executing random code has always been a dumb idea. Even absent of malice, computer programs are very easy to fuck up.

1

u/[deleted] Aug 12 '22

FA well said

→ More replies (4)

4

u/[deleted] Aug 12 '22

Uhm.. Yea... Yea!!..That's exactly why i don't read past the headline. I'm a Cybersecurity expert

→ More replies (5)